Session Notifications
SessionNotification
Container for session update notifications sent from agent to client.params field contains a SessionUpdate, which is a union type representing different kinds of session updates.
SessionUpdate
Union type for all possible session update notifications. The agent sends these during prompt processing to stream content, tool calls, usage information, and more.Update Types
ContentChunk
A streamed item of content from the language model.content field is a ContentBlock:
ToolCallUpdate
Notifies about tool call execution status and results.UsageUpdate
Notifies about token usage for the session.SessionInfoUpdate
Notifies about session information changes.CurrentModeUpdate
Notifies that the session mode has changed.ConfigOptionUpdate
Notifies that session configuration options have been updated.AvailableCommandsUpdate
Notifies that available commands are ready or have changed.Cancellation Notifications
CancelNotification
Notification to cancel ongoing operations for a session.CancelRequestNotification
UNSTABLE - Notification to cancel an ongoing request.Extensibility
ExtNotification
Allows for sending arbitrary notifications that are not part of the ACP spec.Usage Example
Here’s how notifications are typically used:SessionUpdate notifications during processing, allowing the client to stream content and display progress in real-time.