Skip to main content
Agno is a Python agent framework for building multi-agent systems. Braintrust traces Agno agents, teams, and workflows, along with the underlying model and tool calls.

Setup

Install the Braintrust SDK and Agno, plus the Yahoo Finance tools used in the example below:
Set your Braintrust and model provider API keys:
.env
Tracing Agno requires Agno 2.1.0 or later.

Auto-instrumentation

To trace Agno without modifying each agent call, call init_logger() and auto_instrument() once at startup. auto_instrument() patches Agno’s agent, team, model, workflow, and tool APIs along with every other supported library.
To patch Agno without enabling Braintrust’s other integrations, call setup_agno() instead. It initializes a logger for you when one isn’t already active.

Workflows

Agno workflows are traced without extra configuration. The workflow run appears as a parent span, with nested agent and model calls underneath it:

Eval runs

When you call auto_instrument() or setup_agno(), Braintrust also traces Agno’s built-in eval types (agno.eval) without additional configuration. Each eval run appears as an eval span with the run’s input, expected, output, and score.
Eval suites (agno.eval.suite, Agno 2.9 or later) automatically open a Braintrust experiment for each suite invocation so each case lands as an experiment row. To keep suite rows in logs instead, pass eval_experiments=False to setup_agno() or set BRAINTRUST_AGNO_EVAL_EXPERIMENTS=false.

What Braintrust traces

Braintrust captures:
  • Agent run spans (<agent>.run, <agent>.arun, and their streaming variants), with the run input, agent and model metadata, output, and token usage.
  • Team run spans (<team>.run, <team>.arun, and their streaming variants), with the run input, team and model metadata, output, and token usage.
  • Model call spans (<model>.invoke, <model>.response, and their async and streaming variants), with the request messages, model and provider metadata, response, and token usage.
  • Tool call spans (<tool>.execute and <tool>.aexecute), with the tool arguments, function metadata, and result.
  • Workflow run spans (<workflow>.run, its async and streaming variants, and nested workflow-step spans), with the workflow input, workflow metadata, output, and token usage.
  • Eval run spans (AccuracyEval, AgentAsJudgeEval, ReliabilityEval, and PerformanceEval), with the eval’s input, expected output, output, and 0-1 normalized scores. AgentAsJudgeEval requires Agno 2.4 or later. Batch runs include per-case scorer spans.
  • Eval suite case spans (agno.eval.suite, Agno 2.9 or later), with each case’s input, expected output, output, tags, and combined judge, reliability, and scorer scores. A Braintrust experiment opens automatically for the suite when a project is in scope.

Resources