AgentStreamEvent
type AgentStreamEvent = | ModelStreamEvent | ContentBlock | ToolStreamEvent | BeforeInvocationEvent | AfterInvocationEvent | BeforeModelCallEvent | AfterModelCallEvent | BeforeToolsEvent | AfterToolsEvent | BeforeToolCallEvent | AfterToolCallEvent | MessageAddedEvent | ModelStreamEventHook | AgentResult;Defined in: src/types/agent.ts:97
Union type representing all possible streaming events from an agent. This includes model events, tool events, and agent-specific lifecycle events.
This is a discriminated union where each event has a unique type field, allowing for type-safe event handling using switch statements.
Note: All agent lifecycle events are Hook Event instances, providing consistent structure with agent reference and extensibility features.