Post
1813
We have just released a new version ofâhttps://github.com/mozilla-ai/any-agent âexposing an API to be used in
async
contexts:import asyncio
from any_agent import AgentConfig, AnyAgent, TracingConfig
from any_agent.tools import search_web
async def main():
agent = await AnyAgent.create_async(
"openai",
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]
)
],
tracing=TracingConfig()
)
await agent.run_async("Which Agent Framework is the best??")
if __name__ == "__main__":
asyncio.run(main())