> ## 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

If you are a coding agent, prefer the Braintrust [`bt` CLI](/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, such as ad-hoc lookups and exploration from your IDE.

[Agno](https://www.agno.com/) is a Python agent framework for building AI applications. Braintrust automatically traces Agno agents and workflows, capturing agent interactions, tool calls, workflow execution, and model responses (supports Agno v2 and higher).

<Note>
  This guide covers manual instrumentation. For quicker setup, use [auto-instrumentation](/instrument/trace-llm-calls).
</Note>

## Setup

Install Braintrust alongside Agno:

<CodeGroup>
  ```bash Python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  pip install braintrust agno
  ```
</CodeGroup>

To trace Agno agents with Braintrust using an OpenAI model, configure these environment variables:

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

## Trace with Agno

To enable automatic tracing, call `setup_agno()` before creating your agents or workflows.

This example creates a stock price agent with Yahoo Finance tools:

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

```python title="agno_braintrust.py" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
from braintrust.wrappers.agno import setup_agno

# Enable Braintrust tracing
setup_agno(project_name="simple-agent-project")

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.yfinance import YFinanceTools

# 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)
```

## Trace Agno workflows

`setup_agno()` also instruments Agno workflows, including workflow-level spans around `run()`, async execution, and streaming execution paths.

```python title="agno_workflow_braintrust.py" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
from braintrust.wrappers.agno import setup_agno

setup_agno(project_name="workflow-project")

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.workflow import Workflow

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)
```

In Braintrust, the workflow run appears as a parent span and nested agent and model calls appear underneath it.

## Resources

* [Agno documentation](https://www.agno.com/)
