agui-event-contract

Standardize AG-UI/SSE event streams with deterministic ordering and strict field conventions.

Updated May 19, 2026
One-click install
npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill agui-event-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agui-event-contract
Source: https://github.com/zxc1a1a1/Multi_Agent-AgentHub/tree/main/.agents/skills/agui-event-contract
Command: npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill agui-event-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about agui-event-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize AG-UI SSE streaming events for reliable frontend rendering?

Standardize AG-UI SSE streaming events by enforcing a strict event contract that defines required fields, deterministic event ordering, and naming conventions across the run lifecycle, text streaming, tool calls, and state updates. This prevents contract drift and ensures reliable frontend aggregation.

What is the best way to handle multi-agent SSE event aggregation and message attribution?

Multi-agent SSE event aggregation requires standardizing message attribution via stable identifiers like runId, messageId, and toolCallId. This ensures correct grouping and rendering of interleaved STATE_UPDATE messaging and ordered_parallel strategies across concurrent agent streams.

Why does my frontend break when parsing sticky packets or partial chunks from an SSE stream?

Sticky packets and partial chunks break frontend parsing when SSE wire format rules are not enforced. Establishing robust SSE framing requirements and strict JSON parsing protocols prevents malformed payloads, split chunks, and flush termination mistakes during streaming.

How do I implement safe error handling and redaction in an AG-UI event stream?

Safe error handling in AG-UI event streams requires enforcing stable error codes and strict sensitive data redaction. This prevents leaking internal information while maintaining deterministic error messaging for the frontend during run lifecycle failures.

Does the AG-UI event contract support interleaved STATE_UPDATE messaging in ordered_parallel scenarios?

Yes, the AG-UI event contract supports multi-agent ordered_parallel strategies and interleaved STATE_UPDATE messaging. It enforces deterministic event ordering and strict delta/content compatibility to ensure the frontend can aggregate state updates without broken sequencing.

When do I need a strict event contract for AgentHub SSE streaming?

You need a strict event contract for AgentHub SSE streaming when building single-agent or multi-agent interfaces that require reliable frontend rendering. It is necessary to prevent malformed payloads, enforce field typing conventions, and guarantee deterministic event ordering.