Four ways in
They differ in one thing that matters more than convenience: whether the check is on the causal path or beside it.SDK
A few lines. You decide where authority is asked for, which means you can
also decide not to — enforcement here is cooperative.
Middleware
One line per runtime. Captures what your framework was already doing, so
the trajectory fills in without hand-instrumenting each call.
MCP proxy
Zero code in the agent. It sits between the decision and the tool call,
so an agent cannot route around a check it never makes.
OpenTelemetry
Nothing deployed alongside the agent. Point a collector at the receiver and
existing spans become governed records.
Capture and enforcement are different questions. Middleware and OTel
capture what happened. Only the proxy — and a resource verifying a capability
token — can refuse an action the agent did not ask permission for. Choosing an
adapter is choosing how much you record; choosing the proxy is choosing what
can be stopped.
Supported runtimes
OpenAI
watch_openaiAnthropic
watch_anthropicGoogle Gemini
watch_geminiAWS Bedrock
watch_bedrockLangChain
watch_langchainLangGraph
watch_langgraphGoogle ADK
watch_adkCrewAI
watch_crewAWS Strands
watch_strandsAutoGen
watch_autogenMCP
watch_mcpFunction reference
Everything below is exported fromrotascale.middleware.
What they all do, and what none of them do
Every adapter records steps: model calls, tool calls, retrievals and delegations, written onto the open trajectory with taint propagated. None of them asks for authority. That stays an explicit call, because a middleware that silently authorised would make an import into a spend decision:Content capture
Every adapter takescapture_content=False, which records shape and metadata —
model, latency, token counts, tool names — and not the text.
Use it where the prompt or the response is the sensitive part. The governance
record is just as complete: what an agent did is the governed fact, and the
words it used to do it are usually the part you are least able to store.
