Trace your AI agent
Setup guides for sending each supported agent framework and LLM gateway to Maple as one Agent Session per conversation.
Each guide sets up one framework so every conversation shows up in Maple as one Agent Session. You turn on the framework’s own OpenTelemetry instrumentation and point it at Maple; there is no Maple SDK.
Quick setup with a coding agent
Copy this prompt into a coding agent that can run shell commands, such as Claude Code, Codex or Cursor. It installs the maple-agent-tracing skill, which detects your framework and installs the matching skill.
Set up Maple agent tracing in this project.
Install the skill with `npx skills add MapleTechLabs/maple/skills --skill maple-agent-tracing -y`, then follow it.
My Maple ingest key is maple_pk_... and my organization is in the US region.
Your ingest key is in Settings → Ingestion. If your organization is in the EU region, change US to EU in the prompt.
Choose your framework
TypeScript & JavaScript
- Vercel AI SDK generateText, streamText and Agent
- Mastra Agents, workflows and memory threads
- Cloudflare Agents Agents in Durable Objects
- Genkit Flows, tools and sessions
- OpenAI Agents SDK Handoffs and agents as tools
- LangChain & LangGraph Graphs, threads and interrupts
- Claude Agent SDK & Claude Code TypeScript, Python and the CLI
- Google ADK Runners, sub-agents and sessions
- Strands Agents Swarms, graphs and agents as tools
- OpenRouter Broadcast traces from the gateway
- OpenAI, Anthropic & Gemini SDKs Your own agent loop
Python
- OpenAI Agents SDK Handoffs and agents as tools
- LangChain & LangGraph Graphs, threads and interrupts
- Claude Agent SDK & Claude Code TypeScript, Python and the CLI
- Google ADK Runners, sub-agents and sessions
- Strands Agents Swarms, graphs and agents as tools
- Pydantic AI Built-in GenAI instrumentation
- CrewAI Crews, flows and delegation
- LlamaIndex FunctionAgent and AgentWorkflow
- smolagents CodeAgent and managed agents
- Agno Agents and teams
- DSPy Modules, ReAct and optimizers
- Haystack Agent component and pipelines
- Microsoft Agent Framework And Semantic Kernel · Python and .NET
- OpenRouter Broadcast traces from the gateway
- LiteLLM SDK and proxy
- OpenAI, Anthropic & Gemini SDKs Your own agent loop
Java
C# / .NET
Other languages and frameworks
If you use a gateway like OpenRouter or LiteLLM together with a framework, instrument only the framework, or every model call is recorded twice. The OpenRouter guide covers the one exception.
Connection details
Every guide exports OTLP over HTTP with an ingest key from Settings → Ingestion:
export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.maple.dev" # https://ingest.eu.maple.dev for EU organizations
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer YOUR_INGEST_KEY"
export OTEL_SERVICE_NAME="support-agent"
Maple doesn’t accept gRPC, so set the protocol to http/protobuf if your exporter defaults to it. A traces endpoint passed in code or through OTEL_EXPORTER_OTLP_TRACES_ENDPOINT must end in /v1/traces.
Keep agent traffic at 100% sampling, or sampled-out turns leave gaps in the session. See Sampling and throughput.
Not listed?
Anything that emits the OpenTelemetry GenAI conventions works; Any language lists what Maple reads. OpenInference and OpenLLMetry instrumentations also work, shown as Unidentified. Tell us what you run at support@maple.dev or on Discord and we’ll add a guide.