> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rotascale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Framework middleware

> Adapters for the agent frameworks you already run, so the governed unit is the action rather than the framework.

RotaGrant is an SDK call, not a runtime. You keep whatever orchestration you
already chose. The middleware here exists to save you writing the same wiring
twice, not because the platform needs to sit inside your framework.

## What ships

One adapter per runtime, eleven of them. The full list, with the function each
one exports and what it wraps, is in
[Integrations](/integrations/overview) — kept in one place rather than two,
because two lists of the same thing eventually disagree and the one people read
is whichever is wrong.

<Card title="Integrations" icon="plug" href="/integrations/overview">
  OpenAI, Anthropic, Gemini, Bedrock, LangChain, LangGraph, Google ADK, CrewAI,
  AWS Strands, AutoGen and MCP.
</Card>

## What they do, and what they do not

They record steps. A callback sees the model calls, tool calls and retrievals
your framework is already making and writes them into the trajectory, so you do
not have to instrument each one by hand.

<Warning>
  Middleware does **not** authorise. It cannot: only your code knows which action
  is consequential, and a framework callback that guessed would either refuse
  everything or nothing.

  The `authorize` call stays where the action happens, written by you, on purpose.
</Warning>

## LangChain

```python theme={"system"}
from rotascale import Rotascale
from rotascale.middleware.langchain_api import RotascaleCallback

rs = Rotascale()

with rs.agent("support-router").trajectory(case="CASE-4403") as t:
    chain.invoke(payload, config={"callbacks": [RotascaleCallback(t)]})

    # Still yours, and still explicit.
    t.authorize("grt_01KZXYBYFG", {"tool": ["billing.credit"]},
                amount_minor=1200, currency="EUR")
```

## Trust defaults

Middleware marks retrievals and tool results **untrusted** unless told
otherwise, matching the SDK. If a source is genuinely yours, say so at the point
you configure it rather than globally, because a blanket `trusted=True` defeats
[clean context](/concepts/clean-context) everywhere at once.
