> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-change-1791323909-75c753a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Middleware integrations

> Integrate with middleware using LangChain JavaScript.

Browse available middleware for different providers or contribute your own to the ecosystem. Learn more about how middleware works in the [middleware overview](/oss/javascript/langchain/middleware/overview) and how to use middleware with Deep Agents in the [Deep Agents docs](/oss/javascript/deepagents/customization#middleware).

## Share your middleware

Middleware enables context engineering, harness customization, and runtime safety controls. It is a useful extension point in LangChain and we love highlighting what the community builds with it:

<CardGroup cols={2}>
  <Card title="Add an official integration" icon="package" href="/oss/javascript/contributing/implement-langchain#middleware">
    Follow the contributing guide to build and publish a middleware package.
  </Card>

  <Card title="Share a community middleware" icon="users" href="https://github.com/langchain-ai/docs">
    Open a PR to the docs repo to add your middleware to the table below.
  </Card>
</CardGroup>

## Official integrations

<div class="integration-downloads-table">
  | Provider | Middleware available | Source | Downloads |
  | :- | :- | :- | :- |
  | [`AWS middleware`](/oss/javascript/integrations/middleware/aws) | Prompt caching | [`langchain-ai/langchain-aws`](https://github.com/langchain-ai/langchain-aws) | <span data-sort-value="2711587"><a href="https://www.npmjs.com/package/@langchain/aws" target="_blank">  <img src="https://img.shields.io/npm/dm/@langchain/aws?style=flat-square&label=%20&" alt="Downloads per month" noZoom class="rounded not-prose" /></a></span> |
  | [`BrydgeMiddleware`](https://github.com/contactkontey-dotcom/langchain-brydge#readme) | Supervises an agent's tool calls with BRYDGE and checks the destination system's own records to report whether each action happened as permitted. | [`contactkontey-dotcom/langchain-brydge`](https://github.com/contactkontey-dotcom/langchain-brydge) | <span data-sort-value="285"><a href="https://www.npmjs.com/package/brydge-langchain" target="_blank">  <img src="https://img.shields.io/npm/dm/brydge-langchain?style=flat-square&label=%20&" alt="Downloads per month" noZoom class="rounded not-prose" /></a></span> |
  | [`Anthropic`](/oss/javascript/integrations/middleware/anthropic) | Prompt caching | [`langchain-ai/langchainjs`](https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain/src/agents/middleware/provider/anthropic) | <span data-sort-value="-1">N/A</span> |
</div>

## Community integrations

<Note>
  The community maintains these middleware integrations. They are contributed on an open-source basis and are not managed or maintained by LangChain.
</Note>

| Middleware | Description | Source |
| - | - | - |
| [langchain-task-steering](https://github.com/edvinhallvaxhiu/langchain-task-steering) | Implicit state-machine middleware for ordered task pipelines with per-task tool scoping, dynamic prompt injection, and composable completion validation. | [`edvinhallvaxhiu/langchain-task-steering`](https://github.com/edvinhallvaxhiu/langchain-task-steering) |
| [Nuggets Authority](https://nuggets.life) | Pre-execution authority enforcement for tool calls. Verifies a scoped, signed delegation before each tool runs, fails closed on deny, and emits an independently verifiable cryptographic proof of every decision. | [`NuggetsLtd/langchain-nuggets`](https://github.com/NuggetsLtd/langchain-nuggets) |

Have a middleware to share? [Open a PR](https://github.com/langchain-ai/docs) to add it here.

***

<div className="source-links">
  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to your agent of choice via MCP for real-time answers.
  </Callout>

  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/oss/javascript/integrations/middleware/index.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
