Content
<p align="center">
<picture>
<img src="docs/images/any-agent-logo-mark.png" width="20%" alt="Project logo"/>
</picture>
</p>
<div align="center">
# any-agent
[](https://github.com/mozilla-ai/any-agent/actions/workflows/docs.yaml/)
[](https://github.com/mozilla-ai/any-agent/actions/workflows/tests.yaml/)

A single interface to use and evaluate different agent frameworks.
</div>
## [Documentation](https://mozilla-ai.github.io/any-agent/)
- [Agents](https://mozilla-ai.github.io/any-agent/agents/)
- [Tools](https://mozilla-ai.github.io/any-agent/tools/)
- [Tracing](https://mozilla-ai.github.io/any-agent/tracing/)
- [Serving](https://mozilla-ai.github.io/any-agent/serving/)
- [Evaluation](https://mozilla-ai.github.io/any-agent/evaluation/)
## [Supported Frameworks](https://mozilla-ai.github.io/any-agent/)
[](https://github.com/google/adk-python) [](https://github.com/langchain-ai/langgraph) [](https://github.com/run-llama/llama_index) [](https://github.com/openai/openai-agents-python) [](https://smolagents.org/) []([https://smolagents.org/](https://huggingface.co/blog/tiny-agents)) [Agno AI](https://docs.agno.com/introduction)
### Planned for Support (Contributions Welcome!)
[Open Github tickets for new frameworks](https://github.com/mozilla-ai/any-agent/issues?q=is%3Aissue%20state%3Aopen%20label%3Aframeworks)
## Requirements
- Python 3.11 or newer
## Quickstart
Refer to [pyproject.toml](./pyproject.toml) for a list of the options available.
Update your pip install command to include the frameworks that you plan on using (or use `all` to install all the currently supported):
```bash
pip install 'any-agent[all]'
```
To define any agent system you will always use the same imports:
```python
from any_agent import AgentConfig, AnyAgent
```
For this example we use a model hosted by openai, but you may need to set the relevant API key for whichever provider being used.
See [our Model docs](https://mozilla-ai.github.io/any-agent/frameworks/#models) for more information about using different models.
```bash
export OPENAI_API_KEY="YOUR_KEY_HERE" # or MISTRAL_API_KEY, etc
```
### Single agent
```python
from any_agent.tools import search_web, visit_webpage
agent = AnyAgent.create(
"openai", # See all options in https://mozilla-ai.github.io/any-agent/
AgentConfig(
model_id="gpt-4.1-nano",
instructions="Use the tools to find an answer",
tools=[search_web, visit_webpage]
)
)
agent_trace = agent.run("Which Agent Framework is the best??")
print(agent_trace)
```
### Multi-agent
```python
from any_agent.tools import search_web, visit_webpage
agent = AnyAgent.create(
"openai", # See all options in https://mozilla-ai.github.io/any-agent/
AgentConfig(
model_id="gpt-4.1-mini",
instructions="You are the main agent. Use the other available agents to find an answer",
),
managed_agents=[
AgentConfig(
name="search_web_agent",
description="An agent that can search the web",
model_id="gpt-4.1-nano",
tools=[search_web]
),
AgentConfig(
name="visit_webpage_agent",
description="An agent that can visit webpages",
model_id="gpt-4.1-nano",
tools=[visit_webpage]
)
]
)
agent_trace = agent.run("Which Agent Framework is the best??")
print(agent_trace)
```
## Contributions
The AI agent space is moving fast! If you see a new agentic framework that AnyAgent doesn't yet support, we would love for you to create a Github issue. We also welcome your support in development of additional features or functionality.
## Running in Jupyter Notebook
If running in Jupyter Notebook you will need to add the following two lines before running AnyAgent, otherwise you may see the error `RuntimeError: This event loop is already running`. This is a known limitation of Jupyter Notebooks, see [Github Issue](https://github.com/jupyter/notebook/issues/3397#issuecomment-376803076)
```python
import nest_asyncio
nest_asyncio.apply()
```