What problem does it solve?
It ensures the frontend can reliably parse, aggregate, and render Gateway-emitted AG-UI/SSE streaming events without contract drift, broken ordering, or malformed payloads.
Core Features & Use Cases
- Defines the AG-UI/SSE event contract between Frontend and Gateway, including required fields, naming rules, and event sequencing for Run lifecycle, text streaming, tool calls, and UI state updates.
- Supports multi-agent and group conversations by standardizing how messages are attributed and aggregated via stable identifiers like runId/messageId/toolCallId.
- Establishes robust SSE wire format and parsing requirements to prevent issues caused by sticky packets, split/partial chunks, malformed JSON, and flush/termination mistakes.
- Enforces safety and error-handling rules such as stable error codes and strict redaction to avoid leaking sensitive information.
Quick Start
Use the agui-event-contract skill to validate or implement the Gateway-to-Frontend SSE event stream so that every event block conforms to the defined AG-UI schema, ordering, and aggregation rules for runId/messageId/toolCallId.