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

# Agno

> Use Fallom with Agno agents for automatic tracing and A/B testing

Fallom integrates seamlessly with [Agno](https://github.com/agno-agi/agno) to trace all your agent LLM calls automatically.

<Tip>Get your API key from the [dashboard](https://app.fallom.com).</Tip>

## Installation

```bash theme={null}
pip install fallom agno opentelemetry-instrumentation-openai
```

## Quick Start

```python theme={null}
# Initialize Fallom FIRST
import fallom
fallom.init(api_key="your-api-key")

# Now import Agno and your LLM provider
from agno.agent import Agent
from agno.models.openai import OpenAIChat

# Set session context for tracing
fallom.trace.set_session("my-agent", session_id)

# Create your Agno agent - LLM calls are automatically traced
agent = Agent(
    model=OpenAIChat(id="gpt-4o"),
    instructions="You are a helpful assistant."
)

# All LLM calls within the agent are traced
response = agent.run("What is the capital of France?")
```

## Model A/B Testing with Agno

Test different models with your Agno agents:

```python theme={null}
import fallom
from fallom import models

fallom.init(api_key="your-api-key")

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

# Get assigned model for this session
model_id = models.get("agno-agent", session_id, fallback="gpt-4o")

fallom.trace.set_session("agno-agent", session_id)

# Use the assigned model with your agent
agent = Agent(
    model=OpenAIChat(id=model_id),
    instructions="You are a helpful assistant."
)

response = agent.run("Explain quantum computing")
```

## Prompt Management with Agno

Use managed prompts for your agent instructions:

```python theme={null}
import fallom
from fallom import prompts

fallom.init(api_key="your-api-key")

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

# Get managed prompt for agent instructions
prompt = prompts.get("agent-instructions", variables={
    "persona": "helpful assistant",
    "domain": "customer support"
})

fallom.trace.set_session("agno-agent", session_id)

agent = Agent(
    model=OpenAIChat(id="gpt-4o"),
    instructions=prompt.system
)

response = agent.run("How do I reset my password?")
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Model A/B Testing" icon="flask" href="/model-testing">
    Learn more about model experiments.
  </Card>

  <Card title="View Dashboard" icon="gauge" href="https://app.fallom.com">
    See your agent traces and analytics.
  </Card>
</CardGroup>
