2
README
โก
nice
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())