Expand description
Normalized event types for streaming LLM responses.
This module defines a unified event model that abstracts over different LLM protocols (Chat Completions, Responses API) and provides consistent streaming events for the client UI.
§Event Types
The NormalizedEvent enum covers all possible streaming events:
- Message deltas for incremental text output
- Tool call lifecycle (delta, complete, result)
- Extended model capabilities (thinking, reasoning, citations, memory)
- Stream lifecycle (start, done, error)
§Example
use universal_agent_runtime::normalized::{NormalizedEvent, sse_event};
let event = NormalizedEvent::MessageDelta {
text: "Hello".to_string(),
};
let sse = sse_event(&event);
assert!(sse.contains("message.delta"));Structs§
- Citation
- Citation reference for source attribution.
Enums§
- Normalized
Event - Normalized streaming events emitted by the LLM orchestrator.
- Runtime
Step Kind - Lifecycle phase of a runtime step.
Functions§
- agui_
sse_ event - Convert a
NormalizedEventto an AG-UI compatible SSE event. - dual_
sse_ event - Emit both normalized and AG-UI events for a single
NormalizedEvent. - event_
name - Get the SSE event name for a
NormalizedEvent. - sse_
event - Convert a
NormalizedEventto an SSE-formatted string.