Skip to content

Installation

Requirements

  • Python 3.10 or higher
  • An API key for at least one supported provider

Install

exagent uses optional dependencies so you only install what you need.

pip install exagent[openai]
pip install exagent[anthropic]
pip install exagent[all]

API keys

exagent looks for API keys in two places, in this order:

  1. Environment variable — set in your shell or CI
  2. .env file — in your working directory
export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...

Create a .env file in your project root:

OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...

exagent reads this file automatically — no extra library needed.

Tip

The environment variable always takes priority over the .env file.


Verify

Start Python and confirm the import works:

import exagent

Next

Build your first agent →