Meta Events Proposal
Summary
Problem Statement
Currently, AG-UI events are tightly coupled to agent runs. There’s no standardized way to attach user feedback, annotations, or external signals to the event stream that are independent of the agent’s execution lifecycle.Motivation
AG-UI is extended with MetaEvents, a new class of events that can occur at any point in the event stream, independent of agent runs. MetaEvents provide a way to attach annotations, signals, or feedback to a serialized stream. They may originate from users, clients, or external systems rather than from agents. Examples include reactions such as thumbs up/down on a message.Status
- Status: Draft
- Author(s): Markus Ecker (mail@mme.xyz)
Detailed Specification
Overview
This proposal introduces:- A new MetaEvent type for side-band annotations
- Events that can appear anywhere in the stream
- Support for user feedback, tags, and external annotations
- Extensible payload structure for application-specific data
New Type: MetaEvent
Key Characteristics
- Run-independent: MetaEvents are not tied to any specific run lifecycle
- Position-flexible: Can appear before, between, or after runs
- Origin-diverse: May come from users, clients, or external systems
- Extensible: Applications define their own metaType values and payload schemas
Implementation Examples
User Feedback
Thumbs Up:Annotations
User Note:External System Events
Analytics Event:Common Meta Event Types
While applications can define their own types, these are commonly used:MetaType | Description | Typical Payload |
---|---|---|
thumbs_up | Positive feedback | { messageId, userId } |
thumbs_down | Negative feedback | { messageId, userId, reason? } |
note | User annotation | { text, relatedId?, author } |
tag | Categorization | { tags[], targetId } |
bookmark | Save for later | { messageId, userId } |
copy | Content copied | { messageId, content } |
share | Content shared | { messageId, method } |
rating | Numeric rating | { messageId, rating, maxRating } |
Use Cases
User Feedback Collection
Capture user reactions to agent responses for quality improvement.Conversation Annotation
Allow users to add notes, tags, or bookmarks to important parts of conversations.Analytics and Tracking
Record user interactions and behaviors without affecting agent execution.Content Moderation
Flag or mark content for review by external moderation systems.Collaborative Features
Enable multiple users to annotate or comment on shared conversations.Audit Trail
Create a complete record of all interactions, not just agent responses.Implementation Considerations
Client SDK Changes
TypeScript SDK:- New
MetaEvent
type in@ag-ui/core
- Helper functions for common meta event types
- MetaEvent filtering and querying utilities
MetaEvent
class implementation- Meta event builders for common types
- Event stream filtering capabilities
Testing Strategy
- Unit tests for MetaEvent creation and validation
- Integration tests with mixed event streams
- Performance tests with high-volume meta events
- Security tests for payload validation