from any_agent import AgentConfig, AgentFramework, AnyAgent
from any_agent.tracing import setup_tracing
framework = AgentFramework("langchain")
setup_tracing(framework)
agent = AnyAgent.create(
framework,
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=["any_agent.tools.search_web"]
),
AgentConfig(
name="visit_webpage_agent",
description="An agent that can visit webpages",
model_id="gpt-4.1-nano",
tools=["any_agent.tools.visit_webpage"]
)
]
)
agent.run("Which Agent Framework is the best??")