Developer-first agent tracing

Add two lines of code.
See everything your AI agent is doing.

Real-time traces, span trees, token costs, and error tracking for every agent run. No dashboards to configure. No infra to manage. Works with OpenAI, Anthropic, and any Python agent.

Python Quickstart
# Install the SDK
$ pip install agentlens

import agentlens as al
al.init(api_key="al_live_...")
al.instrument_openai()  # that's it — all calls now traced
Scroll for the operating system behind accountable agents.

Observability for agents

Standard observability doesn't work for agents.

Traditional APM tools track network requests and system metrics. They can't show you why an agent made a specific decision, which tool was invoked with what arguments, or how a prompt led to a failure.

01 / Silent failure

HTTP 200 does not mean the agent was right.

Most agent errors look successful at the API layer. The bugs happen inside the decision chain.

02 / Complex chains

Agents fail across multiple steps.

A single query triggers a chain of LLM calls, tool executions, and vector DB queries. Traditional logs miss the context flow.

03 / Detective work

Debugging agents is still too manual.

Developers spend hours stitching raw logs, database states, prompt strings, and JSON traces together after a run fails.

What AgentLens does

One trace layer across every agent run.

AgentLens sits beside your agent framework and automatically captures the execution graph of your workflows. It is built for developers who need to debug fast and understand exactly how their agents behave.

OpenAI Anthropic Gemini LangGraph CrewAI FastAPI PostgreSQL
agent-session-8fa21 / trace

Prompt captured

System, user, retrieved context, and model parameters preserved.

Tool chain mapped

Every API call, function argument, input, and output linked to the step.

Cost calculated

Token consumption, model pricing, and execution latency tracked in real time.

Error tracked

Exceptions, rate limits, and API failures logged with full stack context.

Replay engine

Reconstruct a run exactly as it happened, step by step, without asking engineers to guess the agent's internal state.

Span trees

Visualise nested loops, parallel tool calls, and complex agent reasoning paths in a developer-friendly UI.

Zero-config setup

Instrument your OpenAI, Anthropic, or custom client with just a few lines of code and immediately see results.

Who needs this first

Built for teams building production-ready AI agents.

AI platform teams

Standardize tracing, replay, and debugging across all your internal agent applications.

Software engineers

Debug multi-agent reasoning paths, parallel tool executions, and state variables in a unified trace UI.

Founders and builders

Ship agentic workflows faster with the observability layer you need to scale from MVP to production.

Product managers

Analyze token consumption, evaluate agent success rates, and monitor real-user interactions.

The thesis

The hardest part of building AI agents isn't the model. It's understanding what they do.

Start tracing in minutes

Understand your agentic workflows today.

Install the open-source SDK, initialize it in your code, and see every prompt, tool call, and token cost visualised instantly.

Get Started Free View GitHub
quickstart.py
# 1. Install agentlens
$ pip install agentlens

# 2. Add to your script
import agentlens as al

al.init(api_key="al_live_...")
al.instrument_openai()  # traces all calls