Install¶
Agent Adapter is on PyPI under the Apache-2.0 licence. Install it with pip, or from a checkout of the repository.
Requirements¶
| Need | Version |
|---|---|
| Python | 3.11 or later (developed on 3.12) |
| pydantic | >=2.12,<3 (installed for you) |
| google-genai | >=2.30, only for GeminiModel and gemini.genai_tool() |
The OpenAI and Anthropic renderers return plain dicts. They need no SDK.
Install from PyPI¶
pip install agent-adapter # core (pydantic only)
pip install "agent-adapter[openai]" # + one extra; see Extras below
Use a virtual environment per project. A company mirror of PyPI works the same way: set it
as pip's only index-url. Avoid --extra-index-url: pip then takes the highest version
from any index, so a package name on two indexes can resolve to the wrong one (dependency
confusion). agent-adapter doctor warns when one is set.
Install from a checkout¶
- Clone the repository and open its root folder.
-
Create a virtual environment.
-
Install the package, with the extras you need.
-
Check it works.
You should see
1.1.0.
Extras¶
The core needs only pydantic. Each extra adds the packages for one integration or feature.
| Extra | Adds | Status |
|---|---|---|
openai, gemini, anthropic |
the provider SDK, for the model ports (GeminiModel, genai_tool(), ...) |
Available (Model clients) |
one per framework: langchain, langgraph, mcp, openai-agents, pydantic-ai, llamaindex, agent-framework, agno, haystack, claude-agent, smolagents, autogen, ag2 |
that framework | Available (Integrations) |
own environment: crewai, strands, semantic-kernel, adk, camel, dspy |
that framework; each conflicts with another extra, so install it in its own venv | Available (why) |
a2a, ag-ui |
that protocol (A2A server and client; AG-UI event stream) | Available (A2A, AG-UI) |
openapi |
httpx, pyyaml, for import_openapi |
Available (OpenAPI) |
server, server-wsgi |
Starlette, Uvicorn, the MCP SDK; a2wsgi | Available (HTTP server) |
redis, otel |
Redis cache and stores; OpenTelemetry API | Available |
sqlalchemy, dynamodb |
database approval stores (SQLAlchemy async; aioboto3) | Available (Database stores) |
all |
every extra that co-installs from wheels; not crewai, strands, semantic-kernel, adk, camel, dspy (why) |
Available |
dev |
pytest, pytest-asyncio, pytest-cov, ruff, mypy, nox, hatchling, tzdata, fakeredis, lupa, sqlalchemy, aiosqlite, moto | Available |
docs |
mkdocs-material, mkdocstrings | Available |
Pinned ranges and test sessions per extra: Support matrix.
Next¶
Go to the Quickstart.