CostKey

LLM and agent observability

What to record for every agent run, what to alert on, and how the tools compare.

LLM observability is recording what your model-powered code does in production so you can answer three questions: did it work, why not, and what did it cost. For agents, which make many model and tool calls per task, that means tracing each run as a tree of steps rather than logging single requests.

What to record for every agent run

Monitoring: what to alert on

Proxy or SDK?

A gateway sits in the request path and sees every call that goes through it. That suits routing and central key management, but adds a hop and only sees what is routed through it. An SDK observes calls inside your process, so it also sees the code and the agent step that made each one, and nothing changes in your request path. CostKey is SDK-based: no proxy.

LLM observability tools compared

ToolSelf-hostFocus
CostKeyFree, one commandAgent runs, failures, code-level attribution, cost and budgets across 45+ providers
LangfuseFreeTracing, prompt management, datasets and evaluations
LangSmithEnterprise planTracing and evaluation, LangChain first
HeliconeYesGateway with request logging
Arize PhoenixYesTracing and evaluation on OpenTelemetry
BraintrustEnterpriseEvaluations and experiments

Getting started

Pick your framework: OpenAI Agents SDK, LangGraph, Vercel AI SDK, CrewAI, Claude Agent SDK or others. Plain provider SDKs work with no integration at all.

Questions

What is the difference between LLM observability and LLM monitoring?

Monitoring tells you something is wrong: alerts on failures, spend and quality. Observability lets you find out why, by tracing each run down to the step and the code.

What is agent observability?

LLM observability for agents: tracing a whole run as a tree of agents, steps and tool calls, because one task can make dozens of model calls.

Do I need OpenTelemetry?

No. CostKey's SDKs capture calls directly. If your stack already emits OpenTelemetry spans, the bridge turns them into CostKey spans.

Try it on your own machines

One command starts Postgres, the server and the console with Docker.

bash
curl -fsSL https://costkey.dev/install.sh | sh