Framework Adapters

20 adapters for every major AI framework. One-line integration for Mastra, Vercel AI, LangChain, OpenAI, Anthropic, and 15 more.

20 adapters for every major AI framework. Wrap your existing tools in one line — the adapter intercepts every call, runs gov.enforce() before execution, and logs an audit event. No changes to your agent logic.

How Adapters Work

Every adapter follows the same three-step flow:

  1. Wrap — Adapter wraps your framework-native tools
  2. Enforce — Before each call, gov.enforce() evaluates policies
  3. Audit — Decision, agent, tool, and timestamp written to audit trail

Note: Adapters auto-register the agent on first use. You do not need to call gov.register() manually when using an adapter.

Mastra

Middleware that plugs into the Mastra agent pipeline. Every tool call is governed before it reaches your handler.

ts

Vercel AI SDK

Wraps your Vercel AI tools so every invocation is policy-checked. Returns governed tools you pass directly to generateText().

ts

LangChain

Governs LangChain-style tools. Works with any tool that extends StructuredTool.

ts

OpenAI Agents SDK

Wraps individual OpenAI agent tools. Governance runs before each function call.

ts

Anthropic

Governs Anthropic tool-use calls. Policy enforcement runs before the tool handler executes.

ts

Tip: All adapters accept the same options: agentName and owner. The agent is registered automatically with these identifiers on first use.

All 20 Adapters

Every adapter is available as a separate import path. Zero unused code in your bundle.

AdapterImport Path
Mastraplugins/mastra
Mastra Processorplugins/mastra-processor
Vercel AI SDKplugins/vercel-ai
LangChainplugins/langchain
OpenAI Agents SDKplugins/openai-agents
Anthropicplugins/anthropic
MCPplugins/mcp
CrewAIplugins/crewai
Bedrockplugins/bedrock
Genkitplugins/genkit
Semantic Kernelplugins/semantic-kernel
AutoGenplugins/autogen
A2Aplugins/a2a
LlamaIndexplugins/llamaindex
Cloudflare AIplugins/cloudflare-ai
Denoplugins/deno
Mistralplugins/mistral
Ollamaplugins/ollama
E2Bplugins/e2b
Composioplugins/composio

Import Pattern

Every adapter follows the same import convention:

ts

Note: Each adapter is tree-shakeable. Only the adapter you import is included in your bundle — the other 19 are never loaded.