Integrations
MutagenT integration packages are thin adapters that map your framework’s events to MutagenT SDK tracing primitives. They provide automatic tracing with zero manual instrumentation — every LLM call, chain execution, tool invocation, and graph transition is captured without changing your application code.How It Works
Each integration package sits between your AI framework and the MutagenT SDK. The adapter intercepts framework events (callbacks, middleware hooks, or client wrappers) and translates them into SDK span operations. All span lifecycle management, batching, and transport is handled by the SDK — the integration packages contain no networking code.Supported Frameworks
| Framework | TypeScript Package | Pattern | Status |
|---|---|---|---|
| LangChain | @mutagent/langchain | Callback handler | Available |
| LangGraph | @mutagent/langchain | Same callback handler | Available |
| OpenAI | @mutagent/openai | Proxy wrapper (observeOpenAI) | Available |
| Vercel AI SDK | @mutagent/vercel-ai | OTel SpanExporter or Middleware | Available |
| Mastra | @mutagent/sdk (direct) | SDK tracing | Coming Soon |
@mutagent/sdk >=0.1.0 as a peer dependency.
Two Ways to Integrate
Option 1: CLI (Recommended)
The CLI can auto-detect your framework by scanning your codebase and generate configuration code:Option 2: Manual Setup
Install the integration package and initialize tracing yourself:What Gets Traced
LLM Calls
Input messages, output text, model name, and provider
Token Usage
Prompt tokens, completion tokens, and total token counts
Latency
Span duration for every operation, from LLM calls to tool executions
Errors
Error messages and status propagation for failed operations
Tool Calls
Tool inputs, outputs, and execution status
Graph Topology
Node transitions, edge routing, and conditional branching decisions
Framework Guides
LangChain
Callback handler for chains, agents, tools, and retrievers
LangGraph
Automatic tracing via LangChain callback handler
OpenAI
Proxy wrapper with full SDK surface preservation
Vercel AI SDK
OTel SpanExporter or middleware for generate and stream
Mastra
SDK-direct tracing for Mastra agent framework