Skip to main content

Interface Parameters

Pass one of agent or team to the AGUI constructor.
from agno.os.interfaces.agui import AGUI

AGUI(agent=my_agent, prefix="/chat")
ParameterTypeDefaultDescription
agentOptional[Union[Agent, RemoteAgent]]NoneAgno Agent to expose over AG-UI.
teamOptional[Union[Team, RemoteTeam]]NoneAgno Team to expose over AG-UI.
prefixstr""URL prefix for the AG-UI endpoints (e.g., /chat serves /chat/agui).
tagsOptional[List[str]]["AGUI"]FastAPI route tags for API documentation.
Provide agent or team. The constructor raises ValueError if neither is set.

Endpoints

Available at the interface prefix (root by default, customizable with prefix).

POST {prefix}/agui

Accepts a RunAgentInput payload and returns a Server-Sent Events stream (text/event-stream) of AG-UI protocol events.
StatusDescription
200Event stream opened. Agent errors surface as a RUN_ERROR event inside the stream, not as an HTTP error.
422Request body failed RunAgentInput validation.
The endpoint sets permissive CORS headers (Access-Control-Allow-Origin: *) for local frontend development.

GET {prefix}/status

Health check. Returns {"status": "available"}.

Event Mapping

The interface translates the Agno run stream into AG-UI protocol events.
Agno eventAG-UI event(s)
Run startRUN_STARTED
Text contentTEXT_MESSAGE_START, TEXT_MESSAGE_CONTENT, TEXT_MESSAGE_END
Tool call startedTOOL_CALL_START, TOOL_CALL_ARGS
Tool call completedTOOL_CALL_END, TOOL_CALL_RESULT
Reasoning startedREASONING_START, REASONING_MESSAGE_START
Reasoning contentREASONING_MESSAGE_CONTENT
Reasoning completedREASONING_MESSAGE_END, REASONING_END
Custom eventCUSTOM
Paused for external executionTOOL_CALL_START, TOOL_CALL_ARGS, TOOL_CALL_END (executed on the frontend)
Run completedRUN_FINISHED
Run errorRUN_ERROR
Reasoning works with both native reasoning models and the ReasoningTools toolkit. Frontend tools (external_execution=True) stream as tool calls the client executes and returns on the next request.

Developer Resources

AG-UI Guide

Sessions, reasoning, structured output, and troubleshooting.

Setup Guide

Run the backend and connect a Dojo frontend.

Deploy Guide

Serve the protocol endpoint for frontend integration.

AG-UI Protocol

Official protocol specification and SDKs.