Skip to main content

No project description provided

Project description

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

realtimex_any_agent-0.1.0.tar.gz (478.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

realtimex_any_agent-0.1.0-py3-none-any.whl (102.8 kB view details)

Uploaded Python 3

File details

Details for the file realtimex_any_agent-0.1.0.tar.gz.

File metadata

  • Download URL: realtimex_any_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 478.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for realtimex_any_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6fae189fc98acf23c86d44d43a627ed92960a4052cc94e33b3f4096b85e6a45c
MD5 92a80da495f55eccf1cf1e9ec6a5635c
BLAKE2b-256 0394394a9ec7e958b61d74ba425a2254dacb0526796b6138bf834f4c135df42d

See more details on using hashes here.

File details

Details for the file realtimex_any_agent-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for realtimex_any_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06f6603466461dcc0f47de83c77dc64ea5895a20b6d62134b03e883658b4de04
MD5 ccda2a945d778b176287b94b44a2e6d0
BLAKE2b-256 400a7f14787b85a4e636643237187149f8dcc8e04e8607e223d17c9b6c73d298

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page