notifications
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| AuthStatusUpdateNotification aclientp.schema.notifications **UNSTABLE**: The agent's authentication state changed (``auth/status_update``). |
||
| CancelNotification aclientp.schema.notifications Notification to cancel ongoing operations for a session. |
||
| CancelRequestNotification aclientp.schema.notifications Notification to cancel an ongoing request (``$/cancel_request``). |
||
| ExtNotification aclientp.schema.notifications Extension notification from client or agent. |
||
| SessionNotification aclientp.schema.notifications Notification containing a session update from the agent. |
🛈 DocStrings¶
Notification schema definitions.
AgentNotification
module-attribute
¶
AgentNotification = (
SessionNotification
| ElicitationCompleteNotification
| AuthStatusUpdateNotification
| MessageMcpNotification
| CancelRequestNotification
| ExtNotification
)
All possible notifications that an agent can send to a client.
This is used internally for routing RPC notifications. Notifications do not expect a response.
ClientNotification
module-attribute
¶
ClientNotification = (
CancelNotification | MessageMcpNotification | CancelRequestNotification | ExtNotification
)
All possible notifications that a client can send to an agent.
This is used internally for routing RPC notifications. Notifications do not expect a response.
AuthStatusUpdateNotification
¶
Bases: AnnotatedObject
UNSTABLE: The agent's authentication state changed (auth/status_update).
Source code in src/aclientp/schema/notifications.py
accounts
class-attribute
instance-attribute
¶
accounts: Sequence[AuthAccount] = Field(default_factory=list)
The accounts the agent has configured, for display.
CancelNotification
¶
Bases: AnnotatedObject
Notification to cancel ongoing operations for a session.
This is a notification sent by the client to cancel an ongoing prompt turn.
Upon receiving this notification, the Agent SHOULD:
- Stop all language model requests as soon as possible
- Abort all tool call invocations in progress
- Send any pending session/update notifications
- Respond to the original session/prompt request with StopReason::Cancelled
See protocol docs: Cancellation
Source code in src/aclientp/schema/notifications.py
CancelRequestNotification
¶
Bases: AnnotatedObject
Notification to cancel an ongoing request ($/cancel_request).
Either side may send it for a request it issued. The receiver should stop
the work and may reply with a -32800 (request cancelled) error or a normal
response. Unknown or already answered request IDs are ignored.
Source code in src/aclientp/schema/notifications.py
ExtNotification
¶
Bases: AnnotatedObject
Extension notification from client or agent.
Allows sending arbitrary notifications that are not part of the ACP spec. Extension notifications provide a way to send one-way messages for custom functionality while maintaining protocol compatibility.
The method name should be prefixed with an underscore (e.g., _myExtension/notify).
See protocol docs: Extensibility
Source code in src/aclientp/schema/notifications.py
SessionNotification
¶
Bases: AnnotatedObject
Notification containing a session update from the agent.
Used to stream real-time progress and results during prompt processing.
See protocol docs: Agent Reports Output