Skip to content

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

            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

            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
            class AuthStatusUpdateNotification(AnnotatedObject):
                """**UNSTABLE**: The agent's authentication state changed (``auth/status_update``)."""
            
                state: AuthState
                """Whether the agent can start sessions without the user signing in first."""
            
                accounts: Sequence[AuthAccount] = Field(default_factory=list)
                """The accounts the agent has configured, for display."""
            

            accounts class-attribute instance-attribute

            accounts: Sequence[AuthAccount] = Field(default_factory=list)
            

            The accounts the agent has configured, for display.

            state instance-attribute

            state: AuthState
            

            Whether the agent can start sessions without the user signing in first.

            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
            class CancelNotification(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](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)
                """
            
                session_id: str
                """The ID of the session to cancel operations for."""
            

            session_id instance-attribute

            session_id: str
            

            The ID of the session to cancel operations for.

            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
            class CancelRequestNotification(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.
                """
            
                request_id: int | str | None
                """The ID of the request to cancel."""
            

            request_id instance-attribute

            request_id: int | str | None
            

            The ID of the request to cancel.

            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
            class ExtNotification(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](https://agentclientprotocol.com/protocol/extensibility)
                """
            
                method: str
                """The extension method name (should be prefixed with underscore)."""
            
                params: dict[str, Any] | None = None
                """Optional parameters for the notification."""
            

            method instance-attribute

            method: str
            

            The extension method name (should be prefixed with underscore).

            params class-attribute instance-attribute

            params: dict[str, Any] | None = None
            

            Optional parameters for the notification.

            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

            Source code in src/aclientp/schema/notifications.py
            class SessionNotification(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](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)
                """
            
                session_id: str
                """The ID of the session this update pertains to."""
            
                update: SessionUpdate
                """The session update data."""
            

            session_id instance-attribute

            session_id: str
            

            The ID of the session this update pertains to.

            update instance-attribute

            update: SessionUpdate
            

            The session update data.