A

AG-UI (Agent-User Interaction Protocol)

An open protocol that streams an AI agent's actions, state, and output into the user's frontend in real time.

What it is

AG-UI is an event-based, bi-directional protocol that connects any agentic backend — Agentforce, a custom LangGraph workflow, or a vendor SaaS — to any user-facing application. It runs over standard web transports (HTTP, Server-Sent Events, WebSockets) and carries the streaming interaction between agent and user: messages, tool calls, state deltas, and UI events. Maintained by CopilotKit and adopted in 2026 by Oracle and Google as part of the joint Agent Spec integration.

Why it matters

Today each vendor's agent is bolted to its own chat window, so surfacing agents inside your Lightning page, Slack thread, or custom app means rewriting the integration every time. AG-UI standardizes that connection, so you can swap or combine agent backends — Agentforce today, a different agent tomorrow — without rebuilding the frontend. For Salesforce customers, that means a multi-agent experience can stream into a single Lightning surface with one integration layer.

Key components

  • Typed event streaming — MESSAGE_CHUNK, TOOL_CALL, STATE_DELTA, and UI_ACTION_REQUIRED events flow as a structured stream
  • Human-in-the-loop controls — pause, approve, edit, retry, or escalate mid-run without losing agent state
  • Bi-directional — users can redirect the agent with input, not just passively watch it work
  • Transport-agnostic — runs over HTTP, Server-Sent Events, or WebSockets depending on the deployment

How it works

  1. The frontend opens a streaming connection to the agent backend using AG-UI's event contract
  2. The backend emits typed events as it works — each message chunk, tool call, and state change is a distinct event
  3. The frontend renders each event appropriately and can send user input back on the same channel
  4. Either side can pause, resume, or redirect the run at any point without dropping state

Good to know

AG-UI pairs naturally with A2UI (for generative UI widgets the agent wants to render) and MCP (for agent tool context). Together they make up what the industry is calling the 2026 agent protocol stack: MCP for context, A2A for agent-to-agent coordination, AG-UI for the user-interaction layer, A2UI for the UI the user actually touches.

Need Help Implementing This?

We specialize in putting AI and Agentforce to work for Salesforce customers. Let's talk about your use case.

Book Intro Call