Agent Pulse docs
Record what each model and tool call costs, and see it by agent, customer, user and model.
Before you start
- An organisation: Sign up and create one. It holds your agents, keys and team.
- An API key with Write: Create it on the API keys page. The secret is shown once.
Quickstarts
Pick how your agent calls models. Each ends with your agent on the Agents page.
- Python: OpenAI, Anthropic and Gemini clients, ADK, LangChain
- TypeScript: Vercel AI SDK, or recording by hand
- Go: Gemini, Anthropic and OpenAI clients, Google ADK
- LiteLLM proxy: One line of config records every service behind it
- OpenTelemetry: Send the GenAI spans you already emit, from any language
Guides
- Track cost per customer and user: Say who each request is for.
- Set a budget: Alert, switch to a cheaper model, or stop calls at a limit.
- Find what is failing: What failed calls and retries cost, and where.
- Read your spend over the API: Put the figures in your own screens.
What it is for
- AI agent metering: What to record about each agent call, and what it lets you do.
- LLM cost tracking: How a call is priced, and how to read cost by customer and request.
How it compares
- Agent Pulse vs Langfuse: Cost by customer with budgets, beside tracing and evaluation.
- Agent Pulse vs Helicone: An in-process recorder, beside an AI gateway.
- Agent Pulse vs LiteLLM spend tracking: The proxy's own spend tracking, and what Agent Pulse adds.
Every page
Start
- Quickstart: Record your agent's first model call and see it in the console.
- Assess your codebase: A prompt for your coding agent that reads your repository and reports what Agent Pulse would show you and what it would take to connect.
- Ask your AI assistant: Connect Claude, ChatGPT, Cursor or VS Code to Agent Pulse and ask about your agents' spend.
Guides
- Track cost per customer and user: Tag each request with the customer and the signed-in user.
- Set a budget that warns or stops calls: Alert at a share of a limit, and either stop covered model calls at the limit or only warn.
- Get alerts in Slack or a webhook: Which alerts are raised, and how to send them to Slack or your own endpoint.
- Find what is failing: What failed calls and retries cost, which agents are failing, and why.
- Compare cheaper models: See what an agent's own calls would have cost on other models that can do the same work.
- Read your spend over the API: Put your organisation's figures in your own screens, a warehouse or a report.
- Check your bill: Send your Google bill once a day and see each hour checked against what was recorded.
Frameworks
- OpenAI, Anthropic and Gemini clients: Record every call a model client makes by wrapping it once.
- Google ADK: Register the recorder once on an ADK agent; no call site changes.
- LangChain and LangGraph: One handler on the outermost call records every model and tool call in the run.
- OpenAI Agents SDK: Run hooks record every model and tool call, under the agent that made it.
- Vercel AI SDK: A telemetry integration records every call; the middleware lets a budget stop one.
- LiteLLM proxy: One line in the proxy's config records every model and service behind it.
- OpenTelemetry: Point your OTLP exporter at Agent Pulse and send the GenAI spans you already emit.
- Pydantic AI: Send Pydantic AI's own OpenTelemetry spans to Agent Pulse.
- Strands Agents: Send Strands' own OpenTelemetry spans to Agent Pulse.
- Semantic Kernel: Send Semantic Kernel's own OpenTelemetry spans to Agent Pulse.
- Microsoft Agent Framework: Send Agent Framework's own OpenTelemetry spans to Agent Pulse.
- Mastra: Send Mastra's own OpenTelemetry spans to Agent Pulse.
- OpenLLMetry: Record any Python framework built on the OpenAI client with Traceloop's OpenLLMetry.
- OpenLIT: Record any Python framework built on the OpenAI client with OpenLIT.
- CrewAI: Record CrewAI's model calls with OpenLLMetry or OpenLIT.
- LlamaIndex: Record LlamaIndex's model calls with OpenLLMetry.
- Haystack: Record Haystack's model calls with OpenLLMetry.
- AutoGen: Record AutoGen's tool calls from its own spans and its model calls with OpenLLMetry.
Concepts
- What is recorded, and what never is: The fields on each record, and the content that never leaves your process.
- How cost is calculated: Priced on the server from token counts, at the rate in force when the call was made.
- Organisations, workspaces and requests: How spend is grouped, from your organisation down to one end-user request.
- When Agent Pulse is unavailable: The recorder never slows or breaks your agent; what happens when we are down.
- Security and trust: What never leaves your process, what happens when we are down, and how keys and records are kept.
API reference
- API overview: Base address, keys, money, paging and the OpenAPI document.
- List activities: Individual model and tool calls, newest first.
- Aggregate spend: Spend grouped by agent, customer, user, model, day and more.
- List agents: The agents recording under your organisation.
- List users: The names your agents have sent for user identifiers.
- List outcomes: Units of business work counted against a request.
- List prices: The rate card every call is priced against.
- Report a bill: Send a day of your Google bill and get each hour and model compared.
More
- Recorder settings: The environment settings every recorder reads, and the options you can tune.
- Error codes: Failure kinds on recorded calls, and the errors the API and recorders return.
- Changelog: How the API changes, and recorder releases, newest first.