Skip to main content
AgentConfig mirrors LangChain’s RunnableConfig fields - pass callbacks, tags, metadata, run_name directly. The entire agent run is wrapped in a single parent trace with all child operations nested automatically.
Environment variables - Set the following for Langfuse:

What gets traced

  • Each agent run as a single parent trace (named after the agent)
  • All LLM calls (ainvoke / astream) as child spans with token usage
  • All tool executions as child spans with inputs/outputs
  • Structured output fallback calls
  • Works with composite agents - each sub-agent creates its own nested trace
A2A boundaries - A2A is HTTP, so callbacks can’t cross the wire. Each A2A server should create its own handler. Link traces by passing a trace_id in task metadata.