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

# Installation

> Install the AgentX Python SDK and the framework extras you need

## Core package

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

Requires Python 3.9+.

## Framework-specific packages

Install only what your agent needs.

| Framework         | Install                                                         |
| ----------------- | --------------------------------------------------------------- |
| OpenAI            | `pip install openai`                                            |
| OpenAI Agents SDK | `pip install openai-agents`                                     |
| Anthropic         | `pip install anthropic`                                         |
| Google Gemini     | `pip install google-genai`                                      |
| LangChain         | `pip install langchain langchain-openai`                        |
| LlamaIndex        | `pip install llama-index llama-index-llms-openai`               |
| CrewAI            | `pip install crewai`                                            |
| AutoGen / AG2     | `pip install pyautogen` (or `pip install ag2` for the AG2 fork) |

<Note>
  These are plain framework packages; evaluating an agent doesn't need any
  `agentx-python[extra]` install. Those extras are only for
  [tracing](/sdk/tracing) auto-instrumentation (`AgentXCallbackHandler`,
  `patch_anthropic_client`, etc.), which evaluation examples don't use.
</Note>

<Note>
  For Google, install `google-genai`, not the deprecated `google-generativeai`
  package.
</Note>

## Environment

```bash theme={null}
export AGENTX_API_KEY="agtx_local_a1b2c3d4e5f60718293a4b5c6d7e8f9012345678"
```

Then in code:

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

client = AgentX.from_env()
client.ping()  # optional but recommended: fails fast on a wrong URL or key
```

Constructing the client never touches the network (standard SDK behavior - a bad `base_url`
or `api_key` won't error until first use), and trace delivery is fire-and-forget, so a
misconfigured client would otherwise only surface as a one-time warning in logs.
`client.ping()` makes one cheap authenticated call and raises `AgentXConnectionError` (bad
URL) or `AgentXAuthError` (rejected key) with an actionable message - call it once at startup
of anything long-running.

See [Python SDK Overview](/sdk/overview) for the full initialization options, including self-hosted `base_url` overrides.
