Skip to main content
The same agent can run in Go or serve a browser. Register agents once, then choose the interface your application needs. Start with AG-UI and embedded chat, then choose React or CopilotKit for a custom UI. Both integrations support persisted history, reconnects, stop requests, and frontend tools.

Protocol responsibilities

The server owns conversation history and execution. Send only the new turn when using that history. A dropped browser connection ends observation; use the stop endpoint to request cancellation. Reconnect using the last SSE event ID while replay is retained, and use persisted history for older turns. Resolve namespaces from trusted identity at the HTTP boundary. Client-selected thread IDs identify conversations within that namespace; they do not establish authorization. See production deployment for shared storage and lifecycle management.

Agent-to-agent HTTP

The AG-UI handler also mounts an A2A directory at /a2a/, discovery cards at /a2a/{agent}/.well-known/agent-card.json, and A2A JSON-RPC/SSE at /a2a/{agent}. With the embedded UI, prepend /api/agui. Configure agui.WithA2ABaseURL when a reverse proxy changes the public base URL. For agents within one application, use sub-agents or handoffs instead of adding an HTTP boundary.