AgUiEvent
type AgUiEvent = AgUiBase & | { input?: unknown; parentRunId?: string; protocolVersion?: string; runId: string; threadId: string; type: "RUN_STARTED";} | { outcome?: AgUiOutcome; result?: unknown; runId: string; threadId: string; type: "RUN_FINISHED"; usage?: unknown;} | { code?: string; message: string; type: "RUN_ERROR"; usage?: unknown;} | { messageId: string; name?: string; role?: string; type: "TEXT_MESSAGE_START";} | { delta: string; messageId: string; type: "TEXT_MESSAGE_CONTENT";} | { messageId: string; type: "TEXT_MESSAGE_END";} | { delta?: string; messageId?: string; name?: string; role?: string; type: "TEXT_MESSAGE_CHUNK";} | { parentMessageId?: string; toolCallId: string; toolCallName: string; type: "TOOL_CALL_START";} | { delta: string; toolCallId: string; type: "TOOL_CALL_ARGS";} | { toolCallId: string; type: "TOOL_CALL_END";} | { delta?: string; parentMessageId?: string; toolCallId?: string; toolCallName?: string; type: "TOOL_CALL_CHUNK";} | { content: string; messageId: string; role?: "tool"; toolCallId: string; type: "TOOL_CALL_RESULT";} | { stepName: string; type: "STEP_STARTED" | "STEP_FINISHED";} | { messages: readonly AgUiMessage[]; type: "MESSAGES_SNAPSHOT";} | { snapshot: unknown; type: "STATE_SNAPSHOT";} | { delta: readonly unknown[]; type: "STATE_DELTA";} | { activityType: string; content: unknown; messageId: string; replace?: boolean; type: "ACTIVITY_SNAPSHOT";} | { activityType: string; messageId: string; patch: readonly unknown[]; type: "ACTIVITY_DELTA";} | { description?: string; name: string; parentMessageId?: string; parentSubagentRunId?: string; parentToolCallId?: string; subagentRunId: string; type: "SUBAGENT_STARTED";} | { outcome?: { interruptIds: readonly string[]; type: "suspended"; }; result?: unknown; subagentRunId: string; type: "SUBAGENT_FINISHED";} | { code?: string; message: string; subagentRunId: string; type: "SUBAGENT_ERROR";} | { name: string; type: "CUSTOM"; value: unknown;} | { event: unknown; source?: string; type: "RAW";} | { messageId: string; type: "REASONING_START" | "REASONING_END" | "REASONING_MESSAGE_END";} | { messageId: string; role: "reasoning"; type: "REASONING_MESSAGE_START";} | { delta: string; messageId: string; type: "REASONING_MESSAGE_CONTENT";} | { delta?: string; messageId?: string; type: "REASONING_MESSAGE_CHUNK";} | { encryptedValue: string; entityId: string; subtype: "message" | "tool-call"; type: "REASONING_ENCRYPTED_VALUE";};Defined in: react/src/ag-ui/types.ts:52