> ## Documentation Index
> Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Agno

> Trace Agno agents, teams, and workflows in Braintrust to debug prompts, evaluate models, and monitor production usage

If you are a coding agent, prefer the Braintrust [`bt` CLI](/docs/reference/cli/quickstart) for repeatable, scriptable work: running evals, instrumenting code, querying logs, syncing data, managing functions, and configuring coding agents. Use the MCP server for reasoning over Braintrust data in conversation, and for capabilities the CLI doesn't cover, such as monitor views, alerts, and authoring evaluators, preprocessors, and facets.

[Agno](https://www.agno.com/) 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.

<View title="Python" icon="https://img.logo.dev/python.org?token=pk_BdcHD9e5SCW3j1rnJkNyMQ">
  <h2 id="setup-python">
    Setup
  </h2>

  Install the Braintrust SDK and Agno, plus the Yahoo Finance tools used in the example below:

  ```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  pip install braintrust agno yfinance
  ```

  Set your Braintrust and model provider API keys:

  ```bash title=".env" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  BRAINTRUST_API_KEY=your-api-key
  OPENAI_API_KEY=your-openai-key
  ```

  <Note>
    Tracing Agno requires Agno 2.1.0 or later.
  </Note>

  <h2 id="auto-instrumentation-python">
    Auto-instrumentation
  </h2>

  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.

  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    import braintrust
    from agno.agent import Agent
    from agno.models.openai import OpenAIChat
    from agno.tools.yfinance import YFinanceTools

    braintrust.init_logger(project="simple-agent-project")  # Replace with your project name
    braintrust.auto_instrument()

    # Create and configure the agent
    agent = Agent(
        name="Stock Price Agent",
        model=OpenAIChat(id="gpt-5-mini"),
        tools=[YFinanceTools()],
        instructions="You are a stock price agent. Answer questions in the style of a stock analyst.",
    )

    response = agent.run("What is the current price of AAPL?")
    print(response.content)
    ```
  </CodeGroup>

  <Accordion title="Instrument only Agno">
    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.

    <CodeGroup>
      ```python Python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      from braintrust.wrappers.agno import setup_agno
      from agno.agent import Agent
      from agno.models.openai import OpenAIChat
      from agno.tools.yfinance import YFinanceTools

      # Initialize Braintrust tracing for Agno
      setup_agno(project_name="simple-agent-project")

      agent = Agent(
          name="Stock Price Agent",
          model=OpenAIChat(id="gpt-5-mini"),
          tools=[YFinanceTools()],
          instructions="You are a stock price agent. Answer questions in the style of a stock analyst.",
      )

      response = agent.run("What is the current price of AAPL?")
      print(response.content)
      ```
    </CodeGroup>
  </Accordion>

  <h3 id="workflows-python">
    Workflows
  </h3>

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

  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    import braintrust
    from agno.agent import Agent
    from agno.models.openai import OpenAIChat
    from agno.workflow import Workflow

    braintrust.init_logger(project="workflow-project")  # Replace with your project name
    braintrust.auto_instrument()

    author_agent = Agent(
        name="Author Agent",
        model=OpenAIChat(id="gpt-5-mini"),
        instructions="Answer with only the author's name.",
    )

    workflow = Workflow(
        name="Book lookup workflow",
        steps=[author_agent],
    )

    response = workflow.run("Who wrote Charlotte's Web?")
    print(response.content)
    ```
  </CodeGroup>

  <h2 id="what-traced-python">
    What Braintrust traces
  </h2>

  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.

  <h2 id="resources-python">
    Resources
  </h2>

  * [Agno documentation](https://www.agno.com/)
  * [Trace LLM calls](/docs/instrument/trace-llm-calls)
</View>
