---
title: "AG-UI as the Agent–UI Contract Layer"
description: "AG-UI is a typed event contract between an agent backend and a frontend, turning streamed agent state into UI. This diagram maps the layers and shows where human review plugs in."
---

# AG-UI as the Agent–UI Contract Layer

**Type:** [Architecture](https://yomu.fyi/visual-explainers/category/architecture.md)

![Layered diagram with an agent layer on the left, a central AG-UI typed event spine in the middle, and an interface layer on the right, plus a human review gate branching below the spine and a return path for user intent.](https://yomufyi.s3.us-east-1.amazonaws.com/visual-explainers/e7b0c1d9-4ebe-4e17-a5d6-dc3c99026719/image-e3d9bcac-0ef7-4f05-a179-180ebac7735c.webp)

> AG-UI is a typed event contract between an agent backend and a frontend, turning streamed agent state into UI. This diagram maps the layers and shows where human review plugs in.

## Explanation

AG-UI defines a typed event stream that carries agent output, tool calls, shared state, and UI actions from a backend to a frontend, so both sides implement one contract instead of a bespoke WebSocket format. The architecture has three bands: the agent layer that produces state, the event spine that transports it, and the interface layer that renders it, with a return path for user intent. Human review is a branch on that spine, where low-confidence events escalate and approved edits flow back into the run. The payoff is that interface work stops being rewritten per agent framework, and one stream can feed native shells, server-driven views, or web clients.

## FAQ

### Does a shared event contract replace server-driven UI?

No — they solve different halves of the problem. Yelp's Assistant keeps a native shell and input bar while the conversation area is server-driven, fetching a view template once and hydrating it with data each turn. AG-UI standardizes how agent events arrive; it does not decide how the interface renders them.

**Tags:** [A2UI](https://yomu.fyi/topic/a2ui.md), [AG-UI](https://yomu.fyi/topic/ag-ui.md), [AI Agents](https://yomu.fyi/topic/ai-agents.md), [Human-in-the-Loop](https://yomu.fyi/topic/human-in-the-loop.md), [Server-Driven UI](https://yomu.fyi/topic/server-driven-ui.md), [Streaming](https://yomu.fyi/topic/streaming.md)

## Related reading

### [Build adaptive AI interfaces with the AG-UI protocol, agent swarms, and Nova Act on AWS](https://yomu.fyi/post/build-adaptive-ai-interfaces-with-the-ag-ui-protocol-agent-swarms-and.md)
- Company: [AWS](https://yomu.fyi/company/aws.md)
- Author: Anand Bilgaiyan
- Published: Sep 29, 2026
- Type: Tutorial

Static interfaces cannot adapt when generative AI produces variable outputs, such as a medical scan showing one fracture versus twenty ambiguous regions requiring expert review. The solution combines three AWS technologies: the AG-UI protocol for standardized agent-to-UI streaming via Server-Sent Events, the Strands Agents SDK Swarm pattern for peer-to-peer agent collaboration, and Amazon Nova Act for browser-based legacy system integration. AG-UI removes custom WebSocket formats by defining typed events that both agent frameworks and frontends implement as a universal contract. Strands swarm agents debate hypotheses and iteratively refine findings, producing explainable results visible in real time, while Nova Act navigates login screens and fills forms on systems without APIs. A complete radiology assistant walkthrough demonstrates reduced interface development time and HIPAA-compliant data handling for medical imaging.


### [Big improvements to Seer Agent](https://yomu.fyi/post/big-improvements-to-seer-agent.md)
- Company: [Sentry](https://yomu.fyi/company/sentry.md)
- Author: Peter McCarron
- Published: Sep 29, 2026
- Type: Announcement

Seer Agent, Sentry’s AI debugging assistant, now performs write actions through the Sentry API, such as setting up custom dashboards, creating monitors and alerts, and assigning, resolving, and archiving issues. It defaults to the user’s permission level and explicitly requests permission for tasks outside its write scope, with permissions not persisting beyond a single chat. The agent can also incorporate infrastructure data from external monitoring platforms like Datadog and Google Cloud Platform via Seer Connectors, using API keys instead of OAuth. This allows Seer Agent to diagnose issues by connecting front-end and back-end data beyond Sentry’s native scope. These updates evolve Seer Agent from a conversational rubber duck into a proactive debugging assistant that can act on behalf of users.


### [86% of brands think their AI works. Only 51% of customers agree.](https://yomu.fyi/post/86-of-brands-think-their-ai-works-only-51-of-customers-agree.md)
- Company: [Twilio](https://yomu.fyi/company/twilio.md)
- Author: Jesse Sumrak
- Published: Sep 29, 2026
- Type: Problem & solution

A Twilio research report identifies a 35-point satisfaction gap: 86% of brands believe their AI customer service satisfies customers, but only 51% of consumers agree. The discrepancy arises because companies measure metrics such as conversation completion surveys and containment rates, which systematically exclude abandoned or unresolved interactions. 71% of consumers abandon a conversation when the AI fails to recognize them, yet those exits rarely appear in satisfaction data. 49% of consumers say AI never resolved their issue. To close the gap, Twilio recommends tracking abandonment by conversation stage, resolution of the underlying issue across sessions, repeat contact within seven days, containment split by outcome, and escalation quality.


### [The making of the Yelp Assistant UI](https://yomu.fyi/post/the-making-of-the-yelp-assistant-ui.md)
- Company: [Yelp](https://yomu.fyi/company/yelp.md)
- Author: Daniel Andrade Groppe, Services Tech Lead
- Published: Sep 29, 2026
- Type: Explainer

Yelp Assistant is the first large-scale consumer LLM product at Yelp, connecting users with local professionals via chat. To iterate quickly across iOS, Android, and web while avoiding long app-store update cycles, the team chose a hybrid architecture: the top bar and input bar are native, while the chat content area is server-driven using Yelp’s CHAOS framework. The view and data are separated — the client fetches a CHAOS view template once, then conversation data hydrates that template on each turn. The backend sends MessageEvent objects, quick replies, and client actions (such as DisableChat) to control the UI. This hybrid approach enabled rapid iteration, but required building new CHAOS components for text input and network requests, and posed cross-platform consistency challenges.


### [Engineering Multi-Agent AI Teams That Build and Test Themselves](https://yomu.fyi/post/engineering-multi-agent-ai-teams-that-build-and-test-themselves.md)
- Company: [Salesforce](https://yomu.fyi/company/salesforce.md)
- Author: Scott Nyberg
- Published: Sep 28, 2026
- Type: Problem & solution

Salesforce Marketing Cloud’s AI Delivery Lead Sohini Arya and team built Agent Designer, a system that automates the creation and testing of multi-agent AI teams. The orchestrator cannot write agent files itself; instead, seven specialist agents analyze architecture, failure modes, and compliance before the orchestrator synthesizes findings for human review. The system transforms an engineer’s request into a tested multi-agent team in 15-30 minutes, down from 2-4 hours manually, and helped approximately 200 engineers adopt the manager-of-agents model. Governance challenges included enforcing write-scope boundaries via prompts, reconciling independently produced design conflicts, and applying topology-specific budget formulas that account for flat, swarm, or team structures. Verifier agents return structured PASS/WARN/FAIL blocks, and self-healing is limited to two fix attempts and a $3 ceiling to prevent runaway repairs, with the orchestrator’s 500-turn budget divided across analysis, approval, generation, testing, and retries.


### [Is Your “Human-in-the-Loop” Actually Slowing You Down? Here’s What We Learned](https://yomu.fyi/post/is-your-human-in-the-loop-actually-slowing-you-down-here-s-what-we-lea.md)
- Company: [Stack Overflow](https://yomu.fyi/company/stack-overflow.md)
- Author: Kavin Xavier
- Published: Sep 28, 2026
- Type: Problem & solution

Human-in-the-loop (HITL) frameworks integrate human judgment into automated AI workflows to improve reliability and safety, but without careful design they can create bottlenecks. The post reveals key trade-offs: more automation increases speed and reduces cost but raises risk, while more human oversight boosts accuracy and safety but adds latency and cost. Common failure modes include over-reviewing trivial cases, lacking clear trigger logic, and expecting human reviewers to scale linearly. The proposed solution is a tiered HITL system applying the Pareto principle: automation handles 85% of high-confidence decisions using confidence calibration, with three tiers addressing the remaining cases under 3 ms latency, asynchronous review within hours, and real-time oversight with 30-60 second windows. Success requires careful routing, reviewer tooling, and closing feedback loops across seconds, days, weeks, and quarterly cycles to continuously improve model performance and reduce human involvement over time.
