1
Create your account and project
Go to app.zespan.com and sign up for a free account. After verifying your email, you’ll be taken through the onboarding wizard:
- Create an organization — your billing workspace.
- Create a project — an isolated container for agent events. Name it after the application you’re instrumenting (e.g.
my-support-agent-production). - Copy your API key — shown once after project creation. It starts with
zsp_followed by 64 hex characters.
2
Install the SDK
- TypeScript / Node.js
- Python
3
Initialize and wrap your client
Add the following at the entry point of your application — before any agent or LLM calls are made.
- TypeScript / Node.js
- Python
zespan.init() initializes the global SDK client. wrapOpenAI() patches the OpenAI client so all calls — and every agent step that goes through it — are automatically traced. Your existing code is unchanged.Set the
ZESPAN_API_KEY environment variable to the API key from the dashboard. The SDK logs a warning if the key format is invalid.4
Run your agent or make an LLM call
Use your client exactly as you would normally. The SDK captures everything — model name, input and output tokens, cost, latency, tool calls, streaming TTFT, and finish reason.
- TypeScript / Node.js
- Python
- Just an LLM call
5
View your trace in the dashboard
Open app.zespan.com and navigate to your project. Within a few seconds you should see your trace in the Traces view. Click any row to open the flame graph — each bar is a span (agent scope, tool call, LLM call) with full cost and latency breakdown.
SDK initialization options
- TypeScript
- Python
Tracing other frameworks
Anthropic
zespan.wrapAnthropic(new Anthropic())Google Gemini
zespan.wrapGoogle(new GoogleGenerativeAI(key))AWS Bedrock
zespan.wrapBedrock(new BedrockRuntimeClient())Mistral
zespan.wrapMistral(new Mistral())Groq
zespan.wrapGroq(new Groq())OpenRouter
zespan.wrapOpenAI(new OpenAI({ baseURL: "..." }))LiteLLM
Drop-in proxy — point your SDK at the LiteLLM base URL.
LangChain
Full chain, agent executor, and retriever tracing via callback handler.
Google ADK
Multi-agent tracing with
instrumentADK, wrapADKRunner, or wrapADKAgent.CrewAI
Crew and task tracing via the Zespan CrewAI integration.
AutoGen
Multi-agent conversation and tool tracing for AutoGen / AG2.
LlamaIndex
Query engine, retriever, and agent tracing via callback handler.
Vercel AI SDK
generateText, streamText, and generateObject traced automatically.Haystack
Pipeline component and retriever tracing for Haystack 2.x.
Semantic Kernel
Kernel function and planner tracing for Microsoft Semantic Kernel.

