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

# Python SDK Overview

> agentx-python — tracing and CI/CD evaluation

## Installation

```bash theme={null}
pip install agentx-python
```

Requires Python 3.9+.

## Initialization

```python theme={null}
from agentx import AgentX

# From environment variable AGENTX_API_KEY
client = AgentX.from_env()

# Explicit key
client = AgentX(api_key="ax_live_xxxxxxxxxxxxxxxx")

# Self-hosted
client = AgentX(api_key="...", base_url="https://your-agentx-instance.com")
```

## What's included

| Module                       | Description                                                   |
| ---------------------------- | ------------------------------------------------------------- |
| `client.tracer`              | `Tracer` — decorator/context manager for recording agent runs |
| `client.tracer.run_eval()`   | High-level CI/CD evaluation lifecycle                         |
| `agentx.exceptions`          | `CIGateFailure`, `CINotEnabled`, `DatasetNotFound`, …         |
| `agentx.tracing.CIRun`       | Dataclass for CI run metadata                                 |
| `agentx.tracing.CIRunResult` | Dataclass for gate result + scores                            |

## Guides

<CardGroup cols={2}>
  <Card title="Tracing" icon="radar" href="/sdk/tracing">
    Record production agent runs
  </Card>

  <Card title="CI/CD Evaluation" icon="shield-check" href="/sdk/ci-cd">
    Gate releases with eval datasets
  </Card>
</CardGroup>
