> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Basic Team Tracing

> Trace teams with Agno in AgentOS.

Enable tracing for a team in AgentOS. When `tracing=True` is set, all team operations, member agent runs, model calls, and tool executions are captured automatically.

**1. Create a Python file**

```python basic_team_tracing.py theme={null}
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIResponses
from agno.os import AgentOS
from agno.team import Team
from agno.tools.hackernews import HackerNewsTools

# Set up database
db = SqliteDb(db_file="tmp/traces.db")

# Create member agent - no need to set tracing on each one!
agent = Agent(
    name="HackerNews Agent",
    model=OpenAIResponses(id="gpt-5.2"),
    tools=[HackerNewsTools()],
    instructions="You are a hacker news agent. Answer questions concisely.",
    markdown=True,
)

team = Team(
    name="HackerNews Team",
    model=OpenAIResponses(id="gpt-5.2"),
    members=[agent],
    instructions="You are a hacker news team. Answer questions concisely using HackerNews Agent member",
    db=db,
)

# Setup AgentOS with tracing enabled
# This automatically enables tracing for ALL agents and teams!
agent_os = AgentOS(
    description="Example app for tracing HackerNews",
    teams=[team],
    tracing=True,
)
app = agent_os.get_app()

if __name__ == "__main__":
    agent_os.serve(app="basic_team_tracing:app", reload=True)
```

<Snippet file="create-venv-step.mdx" />

**2. Install dependencies**

```bash theme={null}
uv pip install -U openai "agno[os]" opentelemetry-api opentelemetry-sdk openinference-instrumentation-agno
```

**3. Export your OpenAI API key**

```bash Mac/Linux theme={null}
export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
$Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**4. Run AgentOS**

```bash theme={null}
python basic_team_tracing.py
```

Your AgentOS will be available at `http://localhost:7777`. View traces in the AgentOS dashboard.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.