Repository navigation
Docs: add an AG2 integration page (AG2 ships ExaToolkit built on exa-py) #431
Description
Why this is filed here
The same request is open as exa-py#252 and has had no maintainer response in three weeks. Filing it in this repo, which is the most-starred repo in the org, in the hope it reaches whoever owns the docs site. Happy to have it closed as a duplicate of #252 — the ask is identical, and it is docs-only: nothing needs to be built or maintained on the Exa side.
Summary
AG2 now ships a first-class Exa integration built on exa-py, but there's no AG2 page in the Exa docs (there are ones for LangChain, CrewAI, LlamaIndex, Google ADK, …). We'd like to get one added, and we're happy to provide the content.
What landed on the AG2 side
As of ag2>=1.0.0 (current release 1.0.4), AG2 ships ExaToolkit in ag2.extensions.tools.search. It wraps exa_py.AsyncExa and exposes four Exa endpoints as agent tools sharing a single client:
| Tool | Exa endpoint |
|---|---|
exa_search |
search / search_and_contents |
exa_find_similar |
find_similar |
exa_get_contents |
get_contents |
exa_answer |
answer |
Each tool is also a factory method (toolkit.search(), toolkit.answer(), …), so per-tool Exa filters — search type, category, include/exclude domains, published/crawl date ranges, livecrawl, num_results, max_characters — can be bound per agent, and an agent can be given only the tools it needs.
pip install "ag2>=1.0.0" "exa-py>=2.12.1,<3"import os
from ag2 import Agent
from ag2.config import AnthropicConfig
from ag2.extensions.tools.search import ExaToolkit
agent = Agent(
"researcher",
config=AnthropicConfig(model="claude-sonnet-4-6"),
tools=[ExaToolkit(api_key=os.environ["EXA_API_KEY"])],
)
reply = await agent.ask("Find recent papers on neural retrieval and summarise them.")Links:
- AG2 docs page: https://docs.ag2.ai/docs/user-guide/extensions/tools/search/exa/
- Source:
ag2/extensions/tools/search/exa.pyin https://github.com/ag2ai/ag2
The ask
Add an AG2 page to the Exa docs — exa.ai/docs/integrations/ag2 (or /docs/reference/ag2, whichever matches your current grouping) plus a nav entry alongside the other agent-framework integrations.
We can't open the PR ourselves: exa.ai/docs is deployed from the private exa-labs/monorepo repo (docs/ directory), so this issue is the closest thing to one. Below is a ready-to-drop .mdx written in the style of your existing integration pages — feel free to edit or trim it.
docs/integrations/ag2.mdx (ready to drop in)
---
title: "AG2"
description: "Use Exa search, find-similar, contents, and answer as tools in AG2 agents with the built-in ExaToolkit."
---
[AG2](https://github.com/ag2ai/ag2) is an open-source framework for building agents and multi-agent
applications. Since `v1.0.0`, AG2 ships `ExaToolkit` out of the box: it is built directly on the
[Exa Python SDK](https://github.com/exa-labs/exa-py) and exposes four Exa endpoints as agent tools
that share a single `AsyncExa` client.
## Prerequisites
* Create an [API key](https://dashboard.exa.ai/api-keys) in Exa and set it as `EXA_API_KEY`.
```bash theme={null}
pip install "ag2>=1.0.0" "exa-py>=2.12.1,<3"Get started
Passing the toolkit to an agent registers all four tools at once.
import os
from ag2 import Agent
from ag2.config import AnthropicConfig
from ag2.extensions.tools.search import ExaToolkit
agent = Agent(
"researcher",
config=AnthropicConfig(model="claude-sonnet-4-6"),
tools=[ExaToolkit(api_key=os.environ["EXA_API_KEY"])],
)
reply = await agent.ask("Find recent papers on neural retrieval and summarise them.")If api_key is omitted, the Exa SDK reads EXA_API_KEY from the environment automatically.
Tools
| Tool | Exa endpoint | Description |
|---|---|---|
exa_search |
search / search_and_contents |
Web search with filters (type, category, domains, dates, livecrawl) |
exa_find_similar |
find_similar |
Find pages similar to a given URL |
exa_get_contents |
get_contents |
Fetch full text content for specific URLs |
exa_answer |
answer |
Get an answer with citations |
Picking a subset of tools
Each tool is also available as a factory method on the toolkit, so an agent can be given only the
tools it needs.
toolkit = ExaToolkit(api_key=os.environ["EXA_API_KEY"])
agent = Agent(
"researcher",
config=config,
tools=[toolkit.search(), toolkit.answer()],
)Per-tool configuration
Per-call Exa parameters live on the factory methods, so different agents can bind different filters
against the same toolkit.
search_tool = toolkit.search(
num_results=5,
max_characters=2000, # returns full text via search_and_contents
search_type="neural", # "auto" | "neural" | "fast" | "deep-lite" | "deep" | ...
category="research paper",
include_domains=["arxiv.org"],
start_published_date="2024-01-01",
livecrawl="always",
)Resources
</details>
### Also happy to do
If it's useful, we can open a small PR against this repo's `README.md` too: the "Other MCP Clients" table lists editors and desktop clients only, and AG2 can point at `https://mcp.exa.ai/mcp` directly through its built-in `MCPToolkit` — a one-row addition. Just say the word and we'll send it.
Activity
AayushJB03 commentedon Sep 8, 2026
I like to work on this issue
kesku commentedon Oct 8, 2026
This is live now: https://exa.ai/docs/integrations/ag2