Skip to main content

Project logo

any-agent

Docs Tests Python 3.11+ PyPI Discord

A single interface to use and evaluate different agent frameworks.

Documentation

Supported Frameworks

TinyAgent Google ADK LangChain LlamaIndex OpenAI Agents Smolagents Agno AI

Planned for Support (Contributions Welcome!)

Open Github tickets for new frameworks

Requirements

  • Python 3.11 or newer

Quickstart

Refer to pyproject.toml for a list of the options available. Update your pip install command to include the frameworks that you plan on using:

pip install 'any-agent'

To define any agent system you will always use the same imports:

from any_agent import AgentConfig, AnyAgent

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. See our Model docs for more information about using different models.

export MISTRAL_API_KEY="YOUR_KEY_HERE"  # or OPENAI_API_KEY, etc
from any_agent.tools import search_web, visit_webpage

agent = AnyAgent.create(
    "tinyagent",  # See all options in https://mozilla-ai.github.io/any-agent/
    AgentConfig(
        model_id="mistral/mistral-small-latest",
        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)

[!TIP] Multi-agent can be implemented using Agents-As-Tools.

Cookbooks

Get started quickly with these practical examples:

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

import nest_asyncio
nest_asyncio.apply()

Metadata

Release files for realtimex-any-agent 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for realtimex-any-agent 0.1.0
File Size Uploaded
realtimex_any_agent-0.1.0.tar.gz 478.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for realtimex-any-agent 0.1.0
File Interpreter ABI Platform
realtimex_any_agent-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 581.3 kB

Release files / realtimex_any_agent-0.1.0.tar.gz

Download URL realtimex_any_agent-0.1.0.tar.gz
Size 478.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6fae189fc98acf23c86d44d43a627ed92960a4052cc94e33b3f4096b85e6a45c
BLAKE2b-256 checksum
How to use checksums
0394394a9ec7e958b61d74ba425a2254dacb0526796b6138bf834f4c135df42d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.15

Release files / realtimex_any_agent-0.1.0-py3-none-any.whl

Download URL realtimex_any_agent-0.1.0-py3-none-any.whl
Size 102.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06f6603466461dcc0f47de83c77dc64ea5895a20b6d62134b03e883658b4de04
BLAKE2b-256 checksum
How to use checksums
400a7f14787b85a4e636643237187149f8dcc8e04e8607e223d17c9b6c73d298
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.15

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page