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

# Agno

> How to integrate Agno agents with Quraite.

## Overview

Quraite provides a built-in adapter for Agno agents. This adapter allows you to integrate Agno agents with Quraite and run evaluations on them.

This adapter uses OpenInference instrumentation to capture the trajectory of the agent.

## Prerequisites

* Agent dependencies: `agno` package, LLM API key, and any tools you want to use.
* Quraite dependencies: `quraite[agno-oi]` package.

## Define Your Agno Agent

You create a normal Agno `Agent` first, exactly as you would in any Agno project.

```python theme={null}
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIChat

def add(a: float, b: float) -> float:
    return a + b

def multiply(a: float, b: float) -> float:
    return a * b

def subtract(a: float, b: float) -> float:
    return a - b

def divide(a: float, b: float) -> float:
    if b == 0:
        raise ValueError("Cannot divide by zero")
    return a / b

calculator_agent = Agent(
    name="calculator agent",
    model=OpenAIChat(id="gpt-4o"),
    instructions="""You are a helpful calculator assistant.
    You MUST use ONLY the tools for calculations.
    """,
    tools=[add, multiply, subtract, divide],
    markdown=True,
    db=SqliteDb(db_file="agno_calculator_agent.sqlite"),
    add_history_to_context=True,
)
```

## Set up Tracing

Quraite provides a tracing setup helper. For Agno, you pass the `Framework.AGNO` enum:

```python theme={null}
from quraite.constants.framework import Framework
from quraite.tracing import setup_tracing

# OPENAI is required because this example uses OpenAI as the LLM.
tracer_provider = setup_tracing([Framework.AGNO, Framework.OPENAI])
```

## Wrap the Agno Agent

Wrap the agent with the `AgnoAdapter` and pass the `tracer_provider` to it.

```python theme={null}
from quraite.adapters import AgnoAdapter

agno_adapter = AgnoAdapter(
    agent=calculator_agent,
    agent_name="calculator agent",
    tracer_provider=tracer_provider,
)
```

## Run the Agent

Once wrapped, you expose the adapter using Quraite's `run_agent` helper.

```python theme={null}
if __name__ == "__main__":
    from dotenv import load_dotenv
    from quraite import run_agent

    load_dotenv(override=True)

    run_agent(
        agno_adapter,
        port=8080,
        host="0.0.0.0",
        tunnel="cloudflare",
    )
```

## End-to-End Examples

* [Agno calculator agent example](https://github.com/innowhyte/quraite-python/tree/main/examples/agno_calculator_agent)
* [Agno multi-agent example](https://github.com/innowhyte/quraite-python/tree/main/examples/agno_multi_agent)
