Activity Events Proposal
Summary
Problem Statement
Users want to render “activity” updates inline with chat, not just at run start or end. Currently, there’s no standardized way to represent ongoing agent progress between chat messages.Motivation
AG-UI is extended with ActivityEvents and ActivityMessages to represent ongoing agent progress in between chat messages. This allows frameworks to surface fine-grained activity updates chronologically, giving users immediate visibility into what an agent is doing without waiting for the next message or run boundary.Status
- Status: Draft
- Author(s): Markus Ecker (mail@mme.xyz)
Background
Users want real-time visibility into agent activities as they happen. Consider this example UI:Use Cases
- Workflows: Step-by-step progress through workflow execution
- Planning: Intermediate planning or tool use visibility
- Custom frameworks: Signals representing ongoing work in any agent system
Challenges
- Flexibility: Must handle arbitrary activity data from different frameworks
- Serializability: Events must be replayable and rehydrated for session recovery
- Extensibility: Developers should define custom renderers per activity type, with a generic fallback
- Chronology: Activities must interleave naturally with chat and run events
Detailed Specification
Overview
This proposal introduces two new concepts to the AG-UI protocol:- ActivityEvent: A new event type in the event stream
- ActivityMessage: A new message type alongside TextMessage, ToolMessage, etc.
New Event: ActivityEvent
Example Events
Initial activity snapshot:New Message: ActivityMessage
Rendering Strategy
- Generic renderer: Displays raw snapshot/patch as JSON or formatted text
- Custom renderer: Developers can register a renderer per
activityType
:"PLAN"
→ Interactive checklist component"SEARCH"
→ Live status with progress indicators"WORKFLOW"
→ Step-by-step workflow visualization
Implementation Considerations
Client SDK Changes
TypeScript SDK additions:- New
ActivityEvent
type in@ag-ui/core
- New
ActivityMessage
type in message unions - Activity renderer registry in
@ag-ui/client
- New
ActivityEvent
class inag_ui.core.events
- New
ActivityMessage
class in message types - Activity serialization/deserialization support
Integration Impact
- Planning Frameworks: Can emit ActivityEvents during planning or tool execution phases
- Workflow Systems: Can surface step-by-step workflow progress as ActivityEvents
- Other frameworks: May emit ActivityEvents freely; AG-UI will serialize them like other events
Examples and Use Cases
Example 1: Web Search Activity
Use Case: Multi-Step Workflow Visibility
A data analysis agent performing multiple steps:- Loading dataset → ActivityEvent shows progress bar
- Cleaning data → ActivityEvent shows rows processed
- Running analysis → ActivityEvent shows current computation
- Generating report → ActivityEvent shows sections completed
Testing Strategy
- Unit tests for ActivityEvent serialization/deserialization
- Integration tests with mock frameworks emitting ActivityEvents
- E2E tests in AG-UI Dojo demonstrating activity rendering
- Performance benchmarks for high-frequency activity updates