A single interface to use and evaluate different agent frameworks
$git clone https://github.com/mozilla-ai/any-agentInstalls into the current project.
Install any-agent by running `git clone https://github.com/mozilla-ai/any-agent`, then use it for the current task and follow its documentation at https://github.com/mozilla-ai/any-agent.
| 1 | <p align="center"> |
| 2 | <picture> |
| 3 | <img src="https://raw.githubusercontent.com/mozilla-ai/any-agent/refs/heads/main/docs/images/any-agent-logo-mark.png" width="20%" alt="Project logo"/> |
| 4 | </picture> |
| 5 | </p> |
| 6 | |
| 7 | <div align="center"> |
| 8 | |
| 9 | # any-agent |
| 10 | |
| 11 | [](https://github.com/mozilla-ai/any-agent/actions/workflows/docs.yaml/) |
| 12 | [](https://github.com/mozilla-ai/any-agent/actions/workflows/tests-integration.yaml/) |
| 13 |  |
| 14 | [](https://pypi.org/project/any-agent/) |
| 15 | <a href="https://discord.gg/4gf3zXrQUc"> |
| 16 | <img src="https://img.shields.io/static/v1?label=Chat%20on&message=Discord&color=blue&logo=Discord&style=flat-square" alt="Discord"> |
| 17 | </a> |
| 18 | |
| 19 | A single interface to use and evaluate different agent frameworks. |
| 20 | |
| 21 | </div> |
| 22 | |
| 23 | > [!IMPORTANT] |
| 24 | > **`any-agent` is in soft deprecation.** It started as a research project to compare agent frameworks and refine a minimal common surface. That distillation has graduated to its own package: [`mozilla-ai-tinyagent`](https://github.com/mozilla-ai/tinyagent) (PyPI: `mozilla-ai-tinyagent`). For new projects we recommend using `tinyagent` directly. |
| 25 | > |
| 26 | > `any-agent` continues to be published and we'll take security/bug-fix PRs, but no new features are planned. Reach for `any-agent` when you specifically need to **run or evaluate agents across multiple frameworks** (Agno, Google ADK, LangChain, LlamaIndex, OpenAI Agents SDK, smolagents) under one API. If you only need the core agent loop, `mozilla-ai-tinyagent` is the leaner path. |
| 27 | |
| 28 | ## [Documentation](https://docs.mozilla.ai/any-agent/) |
| 29 | |
| 30 | - [Agents](https://docs.mozilla.ai/any-agent/agents/) |
| 31 | - [Tools](https://docs.mozilla.ai/any-agent/agents/tools/) |
| 32 | - [Tracing](https://docs.mozilla.ai/any-agent/core-concepts/tracing) |
| 33 | - [Serving](https://docs.mozilla.ai/any-agent/core-concepts/serving) |
| 34 | - [Evaluation](https://docs.mozilla.ai/any-agent/core-concepts/evaluation) |
| 35 | |
| 36 | ## [Supported Frameworks](https://docs.mozilla.ai/any-agent/) |
| 37 | |
| 38 | [](https://huggingface.co/blog/tiny-agents) [](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://github.com/huggingface/smolagents) [](https://github.com/agno-agi/agno) |
| 39 | |
| 40 | |
| 41 | |
| 42 | ### Planned for Support (Contributions Welcome!) |
| 43 | |
| 44 | [Open Github tickets for new frameworks](https://github.com/mozilla-ai/any-agent/issues?q=is%3Aissue%20state%3Aopen%20label%3Aframeworks) |
| 45 | |
| 46 | ## Requirements |
| 47 | |
| 48 | - Python 3.11 or newer |
| 49 | |
| 50 | ## Quickstart |
| 51 | |
| 52 | Refer to [pyproject.toml](./pyproject.toml) for a list of the options available. |
| 53 | Update your pip install command to include the frameworks that you plan on using: |
| 54 | |
| 55 | ```bash |
| 56 | pip install 'any-agent' |
| 57 | ``` |
| 58 | |
| 59 | To define any agent system you will always use the same imports: |
| 60 | |
| 61 | ```python |
| 62 | from any_agent import AgentConfig, AnyAgent |
| 63 | ``` |
| 64 | For this example we use a model hosted by Mistral, but you may need to set the relevant API key for whichever provider being used. |
| 65 | See our [Model Configuration docs](https://docs.mozilla.ai/any-agent/agents/models/) for more information about configuring models. |
| 66 | |
| 67 | ```bash |
| 68 | export MISTRAL_API_KEY="YOUR_KEY_HERE" # or OPENAI_API_KEY, etc |
| 69 | ``` |
| 70 | |
| 71 | ```python |