AgentMetrics Docs

Open source observability for AI agents. Track cost, latency, token usage, failures, and tool calls — running on your own infrastructure.

How it works

Two components work together.

Server — receives and stores run data from your agents. Dashboard at http://localhost:3099, API at http://localhost:8099. You run this yourself.

SDK or integration — a few lines of code in your agent that send run data to the server. Works with Python, JavaScript, and all major agent frameworks.

No account. No external service. Your data stays on your infrastructure.

Where to start

Starting fresh? Quickstart gets the server running and your first agent tracked in under five minutes.

Deploying for a team or to the cloud? Deploy covers Docker Compose, pip system service, Render, Fly.io, and Railway.

Server already running? Jump straight to your SDK or integration.

Integrations

IntegrationInstallRequires
Python SDKpip install agentmetricsPython 3.9+
JavaScript SDKnpm install agentmetricsNode.js 18+
LangChain (Python)pip install agentmetrics-langchainPython 3.10+
LangChain (JS)npm install agentmetrics-langchainNode.js 18+
CrewAIpip install agentmetrics-crewaiPython 3.10+
LlamaIndexpip install agentmetrics-llamaindexPython 3.10+
Anthropic Managed Agents (Python)pip install agentmetrics-anthropicPython 3.10+
Anthropic Managed Agents (JS)npm install agentmetrics-anthropicNode.js 18+
OpenAI Agents SDKpip install agentmetrics-openai-agentsPython 3.10+
AutoGenpip install agentmetrics-autogenPython 3.10+
Hermes pluginhermes plugins install agentmetrics-hermesHermes 2026.1.0+
OpenClaw pluginopenclaw plugins install agentmetrics-openclawOpenClaw 2026.3.2+

What gets tracked

MetricDescription
DurationWall-clock time from first call to final response
CostEstimated from token counts and model pricing tables
Token usageInput, output, and cached tokens per run
Statussuccess or failure
Error messagesFull error text on failures
Tool callsCount, names, and errors per run
ModelWhich model was used (captured automatically via instrument())