See what your agent actually did — every model call, every tool invocation, every state transition — and find regressions fast.
Black box flight recorder for agents. Every message, every tool call, every retry is stamped with timestamps and logged to a dashboard.
agent.run -> [trace span] model + tool + tool + model
|
v
LangSmith / Langfuse dashboard
+ eval suite re-runs over golden traces
Agent observability platforms capture every LLM call, tool call, and state transition with structured metadata. They let you replay a session, find the prompt that caused the bad output, and run regression evals on historical runs. Use LangSmith (deep LangChain integration) or Langfuse (open source, multi-provider). Always add tracing in dev; always add it in prod.
import langsmith
from langchain_openai import ChatOpenAI
langsmith.trace(enabled=True, project='agent-prod')
chain = prompt | ChatOpenAI() | parser
print(chain.invoke({'topic':'cats'})) # automatic trace capture
LangSmith auto-traces LangChain Runnables; minimal code.
# Langfuse (provider-agnostic)
from langfuse.openai import OpenAI
oai = OpenAI(api_key='sk-...', base_url='https://...')
resp = oai.chat.completions.create(model='gpt-4o-mini',
messages=[{'role':'user','content':'Hello'}])
Langfuse.openai SDK wraps OpenAI and adds tracing; works for any provider.
# run the eval suite on golden traces
from langsmith.evaluation import evaluate
evaluate(chain.invoke, data='golden-set-2026-05', evaluators=[length, json_valid])
evaluate() replays a golden dataset through your chain; surface regressions early.
Tracing only in dev. If you cannot see production runs, you cannot debug production.
Add tracing from day one. Use LangSmith for LangChain-heavy code; Langfuse for cross-provider. Replay golden datasets on every release.