How does Agno's ag_ui support multiple agents?

# Create an agent
agent1 = Agent(
    id="agent1",
    name="Assistant",
    model=azure_model,
    db=db,
    instructions=["You are a helpful AI assistant"],
    enable_user_memories=True,
    markdown=True,
    add_history_to_context=True,
)

# Create AgentOS app
agent_os = AgentOS(
    description="My first AgentOS app1",
    os_id="my-app",
    agents=[agent1],
    interfaces=[AGUI(agent=agent1)],
)

app = agent_os.get_app()

if __name__ == "__main__":
    # Start the server
    agent_os.serve(app="main:app", reload=False)
    # agent_os.serve(app="main:app", reload=True)
    # Visit http://localhost:7777 to interact with your agent

in /docs, use /agui api
curl -X POST ‘http://localhost:7777/agui’ \
-H “Content-Type: application/json” \
-d ‘{
“thread_id”: “test_thread_1235”,
“run_id”: “test_run_456”,
“messages”: [
{
“id”: “msg_1”,
“role”: “user”,
“content”: “hello”
}
],
“tools”: ,
“context”: ,
“forwarded_props”: {},
“state”: {}
}’

no agent_id or team_id, how to config multi agents

Hi @shanshi, great question!

Right now our AG-UI integration exposes a single agent (or team) at a time via the /agui route. This is how the AG-UI protocol is designed — users can’t dynamically choose between multiple agents at runtime.

However, we’ve been discussing with the CopilotKit team about extending this. The recommended approach is to expose a discovery step on our side (e.g. GET /agents), which would return something like:

{
  "agent1": "http://localhost:7777/agui?agent_id=agent1",
  "agent2": "http://localhost:7777/agui?agent_id=agent2"
}

On the frontend, CopilotRuntime can then register those agents dynamically:

const discoveredAgents = await AgnoAgent.getAgents({ url: "http://localhost:7777/agents" });

new CopilotRuntime({ agents: discoveredAgents });

This would let users “select” which agent they want to interact with, while still keeping AG-UI simple and backwards-compatible

i see, thank you.
i found class BaseInterface have a router_prefix field, i try to assign a path to a ‘router_prefix’, but it does not work.

Could you pls share the error you are seeing?