schema
Class info¶
Re-exported classes¶
| Class | Module | Description |
|---|---|---|
| AcpMcpServer | aclientp.schema.mcp | UNSTABLE: MCP server reachable over the ACP connection itself (mcp/message). |
| AgentAuthCapabilities | aclientp.schema.capabilities | Authentication-related capabilities supported by the agent. |
| AgentCapabilities | aclientp.schema.capabilities | Capabilities supported by the agent. |
| AgentMessageChunk | aclientp.schema.session_updates | A chunk of the agent's response being streamed. |
| AgentMessageCursorAnchor | aclientp.schema.cursors | UNSTABLE: The cursor is next to an agent message. |
| AgentPlanUpdate | aclientp.schema.session_updates | The agent's execution plan for complex tasks. |
| AgentThoughtChunk | aclientp.schema.session_updates | A chunk of the agent's internal reasoning being streamed. |
| AgentThoughtCursorAnchor | aclientp.schema.cursors | UNSTABLE: The cursor is next to an agent thought. |
| AllowedOutcome | aclientp.schema.tool_call | The user selected one of the provided options. |
| Annotations | aclientp.schema.content_blocks | Optional annotations for the client. |
| ArchiveSessionRequest | aclientp.schema.client_requests | UNSTABLE: Request parameters for archiving a session. |
| ArchiveSessionResponse | aclientp.schema.agent_responses | UNSTABLE: Response to session/archive. |
| AudioContentBlock | aclientp.schema.content_blocks | Audio data for transcription or analysis. |
| AuthAccount | aclientp.schema.common | UNSTABLE: An account the agent has configured, for display. |
| AuthCapabilities | aclientp.schema.capabilities | Authentication capabilities supported by the client. |
| AuthMethodAgent | aclientp.schema.common | Agent handles authentication itself. |
| AuthMethodTerminal | aclientp.schema.common | Terminal authentication method. |
| AuthStatusCapabilities | aclientp.schema.capabilities | UNSTABLE: Support for auth/status and auth/status_update. |
| AuthStatusRequest | aclientp.schema.client_requests | UNSTABLE: Request the agent's current authentication state. |
| AuthStatusResponse | aclientp.schema.agent_responses | UNSTABLE: Response to auth/status. |
| AuthStatusUpdateNotification | aclientp.schema.notifications | UNSTABLE: The agent's authentication state changed (auth/status_update). |
| AuthenticateRequest | aclientp.schema.client_requests | Request parameters for the authenticate method. |
| AuthenticateResponse | aclientp.schema.agent_responses | Response to authenticate method. |
| AvailableCommand | aclientp.schema.slash_commands | Information about a command. |
| AvailableCommandInput | aclientp.schema.slash_commands | A container for the input specification for a command. |
| AvailableCommandsUpdate | aclientp.schema.session_updates | Available commands are ready or have changed. |
| BlobResourceContents | aclientp.schema.content_blocks | Binary resource contents. |
| BooleanConfigOptionCapabilities | aclientp.schema.capabilities | Capabilities for boolean session configuration options. |
| BooleanPropertySchema | aclientp.schema.elicitation | Schema for boolean properties in an elicitation form. |
| BooleanSessionConfigOption | aclientp.schema.config_options | UNSTABLE: This capability is not part of the spec yet. |
| CancelNotification | aclientp.schema.notifications | Notification to cancel ongoing operations for a session. |
| CancelRequestNotification | aclientp.schema.notifications | Notification to cancel an ongoing request ($/cancel_request). |
| ClientCapabilities | aclientp.schema.capabilities | Capabilities supported by the client. |
| ClientSessionCapabilities | aclientp.schema.capabilities | Session-related capabilities supported by the client. |
| CloseSessionRequest | aclientp.schema.client_requests | Request parameters for closing an active session. |
| CloseSessionResponse | aclientp.schema.agent_responses | Response from closing a session. |
| CommandInputHint | aclientp.schema.slash_commands | All text that was typed after the command name is provided as input. |
| CompactionCapabilities | aclientp.schema.capabilities | Client support for ID-addressed context compaction updates. |
| CompactionCursorAnchor | aclientp.schema.cursors | UNSTABLE: The cursor is next to a context compaction. |
| CompactionSummaryChunk | aclientp.schema.session_updates | A content block appended to a compaction's summary. |
| CompactionUpdate | aclientp.schema.session_updates | A context compaction upsert. |
| ConfigOptionUpdate | aclientp.schema.session_updates | A session configuration option value has changed. |
| ContentToolCallContent | aclientp.schema.tool_call | Standard content block (text, images, resources). |
| Cost | aclientp.schema.session_updates | Cost information for a session. |
| CreateTerminalRequest | aclientp.schema.agent_requests | Request to create a new terminal and execute a command. |
| CreateTerminalResponse | aclientp.schema.client_responses | Response containing the ID of the created terminal. |
| CurrentModeUpdate | aclientp.schema.session_updates | The current mode of the session has changed. |
| CursorCapabilities | aclientp.schema.cursors | UNSTABLE: The methods that currently accept a cursor. |
| CursorForkCapabilities | aclientp.schema.cursors | UNSTABLE: The cursor can be passed to session/fork as cursorId. |
| CursorMessageAnchor | aclientp.schema.cursors | UNSTABLE: A cursor anchored to a message; type names the kind of message. |
| CursorUpdate | aclientp.schema.session_updates | UNSTABLE: A session cursor was announced or its capabilities changed. |
| CustomRequest | aclientp.schema.client_requests | Request for custom/extension methods. |
| CustomResponse | aclientp.schema.agent_responses | Response for custom/extension methods. |
| DeleteSessionRequest | aclientp.schema.client_requests | Request parameters for deleting a session from session/list. |
| DeleteSessionResponse | aclientp.schema.agent_responses | Response to session/delete. |
| DeniedOutcome | aclientp.schema.tool_call | The prompt turn was cancelled before the user responded. |
| DisableProviderRequest | aclientp.schema.providers | Disable a non-required provider. |
| DisableProviderResponse | aclientp.schema.providers | Response to providers/disable. |
| ElicitationCapabilities | aclientp.schema.elicitation | Elicitation capabilities supported by the client. |
| ElicitationCompleteNotification | aclientp.schema.elicitation | Notification sent by the agent when a URL-based elicitation is complete. |
| ElicitationFormCapabilities | aclientp.schema.elicitation | Form-based elicitation capabilities. |
| ElicitationRequest | aclientp.schema.elicitation | Request from the agent to elicit structured user input (elicitation/create). |
| ElicitationResponse | aclientp.schema.elicitation | Response from the client to an elicitation request. |
| ElicitationSchema | aclientp.schema.elicitation | Type-safe elicitation schema for requesting structured user input. |
| ElicitationUrlCapabilities | aclientp.schema.elicitation | URL-based elicitation capabilities. |
| EmbeddedResourceContentBlock | aclientp.schema.content_blocks | Complete resource contents embedded directly in the message. |
| EnumOption | aclientp.schema.elicitation | A titled enum option with a const value, human-readable title and optional description. |
| EnvVariable | aclientp.schema.common | An environment variable to set when launching an MCP server. |
| Error | aclientp.schema.common | JSON-RPC error object. |
| ExtNotification | aclientp.schema.notifications | Extension notification from client or agent. |
| FileEditToolCallContent | aclientp.schema.tool_call | File modification shown as a diff. |
| FileSystemCapabilities | aclientp.schema.capabilities | File system capabilities that a client may support. |
| ForkSessionRequest | aclientp.schema.client_requests | UNSTABLE: Request parameters for forking an existing session. |
| ForkSessionResponse | aclientp.schema.agent_responses | UNSTABLE: Response from forking an existing session. |
| HttpHeader | aclientp.schema.mcp | An HTTP header to set when making requests to the MCP server. |
| HttpMcpServer | aclientp.schema.mcp | HTTP transport configuration. |
| IdleStateUpdate | aclientp.schema.session_updates | UNSTABLE: The child is ready to process another prompt. |
| ImageContentBlock | aclientp.schema.content_blocks | Images for visual context or analysis. |
| Implementation | aclientp.schema.common | Describes the name and version of an ACP implementation. |
| InitialSessionConfigOption | aclientp.schema.config_options | UNSTABLE: A config option value to apply when a session is set up. |
| InitializeProxyRequest | aclientp.schema.proxy | Request parameters for proxy/initialize. Same as initialize. |
| InitializeProxyResponse | aclientp.schema.proxy | Response to proxy/initialize. Same as the initialize response. |
| InitializeRequest | aclientp.schema.client_requests | Request parameters for the initialize method. |
| InitializeResponse | aclientp.schema.agent_responses | Response from the initialize method. |
| IntegerPropertySchema | aclientp.schema.elicitation | Schema for integer properties in an elicitation form. |
| KillTerminalRequest | aclientp.schema.agent_requests | Request to kill a terminal command without releasing the terminal. |
| KillTerminalResponse | aclientp.schema.client_responses | Response to the terminal/kill method. |
| ListProvidersRequest | aclientp.schema.providers | Request the configurable providers. |
| ListProvidersResponse | aclientp.schema.providers | Response to providers/list. |
| ListSessionsRequest | aclientp.schema.client_requests | Request parameters for listing existing sessions. |
| ListSessionsResponse | aclientp.schema.agent_responses | Response from listing sessions. |
| LoadSessionRequest | aclientp.schema.client_requests | Request parameters for loading an existing session. |
| LoadSessionResponse | aclientp.schema.agent_responses | Response from loading an existing session. |
| LogoutCapabilities | aclientp.schema.capabilities | Logout capabilities supported by the agent. |
| LogoutRequest | aclientp.schema.client_requests | Request parameters for the logout method. |
| LogoutResponse | aclientp.schema.agent_responses | Response to the logout method. |
| McpCapabilities | aclientp.schema.capabilities | MCP capabilities supported by the agent. |
| McpError | aclientp.schema.mcp | UNSTABLE: A structured inner MCP error. Never an ACP error code. |
| MessageMcpNotification | aclientp.schema.mcp | UNSTABLE: An inner MCP notification tied to an active inner MCP request. |
| MessageMcpRequest | aclientp.schema.mcp | UNSTABLE: An inner MCP request sent to an acp MCP server via mcp/message. |
| MessageMcpResponse | aclientp.schema.mcp | UNSTABLE: Response to mcp/message: exactly one inner MCP outcome. |
| MultiSelectPropertySchema | aclientp.schema.elicitation | Schema for multi-select (array) properties in an elicitation form. |
| NewSessionRequest | aclientp.schema.client_requests | Request parameters for creating a new session. |
| NewSessionResponse | aclientp.schema.agent_responses | Response from creating a new session. |
| Notice | aclientp.schema.session_updates | Fire-and-forget information for the user. |
| NoticeCapabilities | aclientp.schema.capabilities | Client support for presenting live notice session updates to the user. |
| NumberPropertySchema | aclientp.schema.elicitation | Schema for number (floating-point) properties in an elicitation form. |
| PermissionOption | aclientp.schema.tool_call | An option presented to the user when requesting permission. |
| PlanCapabilities | aclientp.schema.capabilities | UNSTABLE: Client support for ID-addressed plan_update / plan_removed updates. |
| PlanEntry | aclientp.schema.agent_plan | A single entry in the execution plan. |
| PlanItems | aclientp.schema.agent_plan | UNSTABLE: A plan made of structured entries. |
| PlanMarkdown | aclientp.schema.agent_plan | UNSTABLE: A plan made of raw markdown content. |
| PlanRemoved | aclientp.schema.session_updates | UNSTABLE: Remove an ID-addressed plan. |
| PlanUpdate | aclientp.schema.session_updates | UNSTABLE: Create or replace an ID-addressed plan. |
| PromptCapabilities | aclientp.schema.capabilities | Prompt capabilities supported by the agent in session/prompt requests. |
| PromptRequest | aclientp.schema.client_requests | Request parameters for sending a user prompt to the agent. |
| PromptResponse | aclientp.schema.agent_responses | Response from processing a user prompt. |
| PromptSuggestion | aclientp.schema.session_updates | UNSTABLE: A prompt the client can offer to the user. |
| PromptSuggestionsAudioCapabilities | aclientp.schema.capabilities | UNSTABLE: Prompt suggestions may include audio content blocks. |
| PromptSuggestionsCapabilities | aclientp.schema.capabilities | UNSTABLE: Client support for prompt_suggestions_update session updates. |
| PromptSuggestionsEmbeddedContextCapabilities | aclientp.schema.capabilities | UNSTABLE: Prompt suggestions may include resource content blocks. |
| PromptSuggestionsImageCapabilities | aclientp.schema.capabilities | UNSTABLE: Prompt suggestions may include image content blocks. |
| PromptSuggestionsUpdate | aclientp.schema.session_updates | UNSTABLE: Suggested next prompts, replacing any previous suggestions. |
| ProviderCurrentConfig | aclientp.schema.providers | Current effective non-secret routing config of a provider. |
| ProviderInfo | aclientp.schema.providers | A configurable provider with its current routing info, suitable for UI display. |
| ProvidersCapabilities | aclientp.schema.capabilities | UNSTABLE: Support for providers/list, providers/set and providers/disable. |
| ProxySuccessorNotification | aclientp.schema.proxy | A notification wrapped for delivery to the proxy's successor. |
| ProxySuccessorRequest | aclientp.schema.proxy | A request wrapped for delivery to the proxy's successor. |
| ReadTextFileRequest | aclientp.schema.agent_requests | Request to read content from a text file. |
| ReadTextFileResponse | aclientp.schema.client_responses | Response containing the contents of a text file. |
| ReleaseTerminalRequest | aclientp.schema.agent_requests | Request to release a terminal and free its resources. |
| ReleaseTerminalResponse | aclientp.schema.client_responses | Response to terminal/release method. |
| RequestPermissionRequest | aclientp.schema.agent_requests | Request for user permission to execute a tool call. |
| RequestPermissionResponse | aclientp.schema.client_responses | Response to a permission request. |
| RequiresActionStateUpdate | aclientp.schema.session_updates | UNSTABLE: Foreground work is blocked on user action. |
| ResourceContentBlock | aclientp.schema.content_blocks | References to resources that the agent can access. |
| ResumeSessionRequest | aclientp.schema.client_requests | Request parameters for resuming an existing session. |
| ResumeSessionResponse | aclientp.schema.agent_responses | Response from resuming an existing session. |
| RunningStateUpdate | aclientp.schema.session_updates | UNSTABLE: Foreground work is in progress. |
| SelectSessionConfigOption | aclientp.schema.config_options | A select-type session configuration option. |
| SessionAdditionalDirectoriesCapabilities | aclientp.schema.capabilities | Support for additionalDirectories on session lifecycle requests. |
| SessionArchiveCapabilities | aclientp.schema.capabilities | UNSTABLE: Support for session/archive and session/unarchive. |
| SessionCancelCapabilities | aclientp.schema.capabilities | UNSTABLE: Permits the client to cancel a subagent's current work. |
| SessionCapabilities | aclientp.schema.capabilities | Session capabilities supported by the agent. |
| SessionCloseCapabilities | aclientp.schema.capabilities | Capabilities for the session/close method. |
| SessionConfigOptionValueBoolean | aclientp.schema.config_options | A boolean value for setting a config option (type: "boolean"). |
| SessionConfigOptionValueId | aclientp.schema.config_options | A SessionConfigValueId string value for setting a config option. |
| SessionConfigOptionsCapabilities | aclientp.schema.capabilities | Session configuration option capabilities supported by the client. |
| SessionConfigSelectGroup | aclientp.schema.config_options | A group of possible values for a configuration selector. |
| SessionConfigSelectOption | aclientp.schema.config_options | A possible value for a configuration selector. |
| SessionCursorsCapabilities | aclientp.schema.capabilities | UNSTABLE: Client support for cursor_update session updates. |
| SessionDeleteCapabilities | aclientp.schema.capabilities | Capabilities for the session/delete method. |
| SessionForkCapabilities | aclientp.schema.capabilities | Capabilities for the session/fork method. |
| SessionInfo | aclientp.schema.session_state | Information about a session returned by session/list. |
| SessionInfoUpdate | aclientp.schema.session_updates | Incremental update to session metadata. |
| SessionListCapabilities | aclientp.schema.capabilities | Capabilities for the session/list method. |
| SessionMessage | aclientp.schema.session_updates | UNSTABLE: A message exchanged between sessions (e.g. parent and subagent). |
| SessionMessageChunk | aclientp.schema.session_updates | UNSTABLE: A content block appended to a session_message. |
| SessionMessageCursorAnchor | aclientp.schema.cursors | UNSTABLE: The cursor is next to a session-directed message. |
| SessionMode | aclientp.schema.session_state | A mode the agent can operate in. |
| SessionModeState | aclientp.schema.session_state | The set of modes and the one currently active. |
| SessionNotification | aclientp.schema.notifications | Notification containing a session update from the agent. |
| SessionOptionsCapabilities | aclientp.schema.capabilities | UNSTABLE: Support for session/options. |
| SessionOptionsRequest | aclientp.schema.client_requests | UNSTABLE: Request the modes and config options a session would start with. |
| SessionOptionsResponse | aclientp.schema.agent_responses | UNSTABLE: The modes and config options a session would start with. |
| SessionReferenceToolCallContent | aclientp.schema.tool_call | UNSTABLE: Reference to another session, e.g. a subagent spawned by this tool call. |
| SessionResumeCapabilities | aclientp.schema.capabilities | Capabilities for the session/resume method. |
| SessionSetupRequest | aclientp.schema.client_requests | Fields shared by the session lifecycle requests (new, load, resume, fork). |
| SessionStatusCapabilities | aclientp.schema.capabilities | UNSTABLE: Support for session/status. |
| SessionStatusRequest | aclientp.schema.client_requests | UNSTABLE: Request parameters for checking whether the Agent has a session in memory. |
| SessionStatusResponse | aclientp.schema.agent_responses | UNSTABLE: Response to session/status. |
| SessionSystemPromptCapabilities | aclientp.schema.capabilities | Capabilities for client-provided system prompts. |
| SessionSystemPromptModeCapabilities | aclientp.schema.capabilities | System prompt delivery modes the agent supports in addition to append. |
| SessionSystemPromptOverrideCapabilities | aclientp.schema.capabilities | Support for the override system prompt mode. |
| SessionTitleCapabilities | aclientp.schema.capabilities | UNSTABLE: Support for session/set_title. |
| SetProviderRequest | aclientp.schema.providers | Configure a provider's routing. |
| SetProviderResponse | aclientp.schema.providers | Response to providers/set. |
| SetSessionConfigOptionRequest | aclientp.schema.client_requests | Request parameters for setting a session configuration option. |
| SetSessionConfigOptionResponse | aclientp.schema.agent_responses | Response to session/set_config_option method. |
| SetSessionModeRequest | aclientp.schema.client_requests | Request parameters for setting a session mode. |
| SetSessionModeResponse | aclientp.schema.agent_responses | Response to session/set_mode method. |
| SetSessionTitleRequest | aclientp.schema.client_requests | UNSTABLE: Request parameters for renaming a session. |
| SetSessionTitleResponse | aclientp.schema.agent_responses | UNSTABLE: Response to session/set_title. |
| SseMcpServer | aclientp.schema.mcp | SSE transport configuration. |
| StdioMcpServer | aclientp.schema.mcp | Stdio transport configuration. |
| StringPropertySchema | aclientp.schema.elicitation | Schema for string properties in an elicitation form. |
| SubagentCapabilities | aclientp.schema.capabilities | UNSTABLE: Client support for subagent_update session updates. |
| SubagentSessionCapabilities | aclientp.schema.capabilities | UNSTABLE: Capabilities of a subagent session. |
| SubagentUpdate | aclientp.schema.session_updates | UNSTABLE: A subagent session started by the parent, or a change to it. |
| SystemPrompt | aclientp.schema.client_requests | Client-provided system-level instructions for a session. |
| TerminalExitStatus | aclientp.schema.terminal | Exit status of a terminal command. |
| TerminalOutputRequest | aclientp.schema.agent_requests | Request to get the current output and status of a terminal. |
| TerminalOutputResponse | aclientp.schema.client_responses | Response containing the terminal output and exit status. |
| TerminalToolCallContent | aclientp.schema.tool_call | Embed a terminal created with terminal/create by its id. |
| TextContentBlock | aclientp.schema.content_blocks | Text content. |
| TextResourceContents | aclientp.schema.content_blocks | Text-based resource contents. |
| TitledMultiSelectItems | aclientp.schema.elicitation | Items definition for titled multi-select enum properties. |
| ToolCallCursorAnchor | aclientp.schema.cursors | UNSTABLE: The cursor is next to a tool call. |
| ToolCallLocation | aclientp.schema.tool_call | A file location being accessed or modified by a tool. |
| ToolCallProgress | aclientp.schema.session_updates | Update on the status or results of a tool call. |
| ToolCallStart | aclientp.schema.session_updates | Notification that a new tool call has been initiated. |
| ToolCallUpdate | aclientp.schema.tool_call | Details about the tool call requiring permission. |
| UnarchiveSessionRequest | aclientp.schema.client_requests | UNSTABLE: Request parameters for unarchiving a session. |
| UnarchiveSessionResponse | aclientp.schema.agent_responses | UNSTABLE: Response to session/unarchive. |
| UnknownCursorAnchor | aclientp.schema.cursors | UNSTABLE: A cursor anchored to a custom or future kind of entity. |
| UnknownStateUpdate | aclientp.schema.session_updates | UNSTABLE: The Agent cannot currently determine foreground activity. |
| UntitledMultiSelectItems | aclientp.schema.elicitation | Items definition for untitled multi-select enum properties. |
| Usage | aclientp.schema.session_updates | UNSTABLE: Token usage information for a prompt turn. |
| UsageUpdate | aclientp.schema.session_updates | Context window and cost update for a session. |
| UserMessageChunk | aclientp.schema.session_updates | A chunk of the user's message being streamed. |
| UserMessageCursorAnchor | aclientp.schema.cursors | UNSTABLE: The cursor is next to a user message. |
| WaitForTerminalExitRequest | aclientp.schema.agent_requests | Request to wait for a terminal command to exit. |
| WaitForTerminalExitResponse | aclientp.schema.client_responses | Response containing the exit status of a terminal command. |
| WriteTextFileRequest | aclientp.schema.agent_requests | Request to write content to a text file. |
| WriteTextFileResponse | aclientp.schema.client_responses | Response to fs/write_text_file. |
🛈 DocStrings¶
Schema definitions for the ACP protocol.
AgentMethod
module-attribute
¶
AgentMethod = Literal[
"auth/status",
"authenticate",
"initialize",
"logout",
"mcp/message",
"providers/disable",
"providers/list",
"providers/set",
"session/archive",
"session/cancel",
"session/close",
"session/delete",
"session/fork",
"session/list",
"session/load",
"session/new",
"session/options",
"session/prompt",
"session/resume",
"session/set_config_option",
"session/set_mode",
"session/set_title",
"session/status",
"session/unarchive",
]
Methods handled by the agent.
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.
AuthMethod
module-attribute
¶
AuthMethod = Annotated[
Annotated[AuthMethodAgent, Tag("agent")] | Annotated[AuthMethodTerminal, Tag("terminal")],
Discriminator(_auth_method_discriminator),
]
Describes an available authentication method.
The type field acts as the discriminator. When no type is present,
the method is treated as agent.
AuthState
module-attribute
¶
UNSTABLE: Whether the agent can start sessions without the user signing in first.
ClientMethod
module-attribute
¶
ClientMethod = Literal[
"auth/status_update",
"elicitation/complete",
"elicitation/create",
"fs/read_text_file",
"fs/write_text_file",
"mcp/message",
"session/request_permission",
"session/update",
"terminal/create",
"terminal/kill",
"terminal/output",
"terminal/release",
"terminal/wait_for_exit",
]
Methods handled by the client.
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.
CompactionId
module-attribute
¶
Agent-owned ID of a context compaction, unique within the session.
CompactionStatus
module-attribute
¶
Lifecycle state of a context compaction.
CursorAnchor
module-attribute
¶
CursorAnchor = Annotated[
Annotated[UserMessageCursorAnchor, Tag("user_message")]
| Annotated[AgentMessageCursorAnchor, Tag("agent_message")]
| Annotated[AgentThoughtCursorAnchor, Tag("agent_thought")]
| Annotated[SessionMessageCursorAnchor, Tag("session_message")]
| Annotated[ToolCallCursorAnchor, Tag("tool_call")]
| Annotated[CompactionCursorAnchor, Tag("compaction")]
| Annotated[UnknownCursorAnchor, Tag("unknown")],
Discriminator(_anchor_discriminator),
]
UNSTABLE: Where a cursor is, relative to an entity the Client holds.
A known type with a malformed payload is an error; it does not fall back to
:class:UnknownCursorAnchor.
CursorAnchorPosition
module-attribute
¶
UNSTABLE: On which side of the anchored entity the cursor is.
before: the history before the cursor excludes the entity. after: it includes
the entity and nothing that follows it. Values starting with _ are extensions;
a Client that does not recognize the value cannot place the cursor.
CursorId
module-attribute
¶
UNSTABLE: Agent-owned ID of a cursor, unique within its session.
Never reused for another position. Clients MUST NOT parse, change or construct it.
ElicitationActionType
module-attribute
¶
User action in response to an elicitation.
ElicitationContentValue
module-attribute
¶
Possible value types in elicitation content.
ElicitationModeType
module-attribute
¶
Elicitation mode. Values beginning with _ are implementation-specific.
ElicitationPropertySchema
module-attribute
¶
ElicitationPropertySchema = Annotated[
Annotated[StringPropertySchema, Tag("string")]
| Annotated[NumberPropertySchema, Tag("number")]
| Annotated[IntegerPropertySchema, Tag("integer")]
| Annotated[BooleanPropertySchema, Tag("boolean")]
| Annotated[MultiSelectPropertySchema, Tag("array")],
Discriminator(_property_schema_discriminator),
]
Property schema for elicitation form fields.
Each variant corresponds to a JSON Schema "type" value.
ErrorCode
module-attribute
¶
JSON-RPC error code. See the *_ERROR / *_REQUIRED constants for predefined codes.
LlmProtocol
module-attribute
¶
API protocol spoken by a provider endpoint.
McpRequestId
module-attribute
¶
UNSTABLE: Caller-generated identifier for an inner MCP request.
McpServerAcpId
module-attribute
¶
UNSTABLE: Identifier of an MCP server provided over ACP.
MultiSelectItems
module-attribute
¶
MultiSelectItems = Annotated[
Annotated[UntitledMultiSelectItems, Tag("untitled")]
| Annotated[TitledMultiSelectItems, Tag("titled")],
Discriminator(_multi_select_items_discriminator),
]
Items for a multi-select (array) property schema.
NoticeSeverity
module-attribute
¶
Severity hint for a session notice.
PlanId
module-attribute
¶
UNSTABLE: Agent-owned identifier of a plan, unique within the session.
PlanUpdateContent
module-attribute
¶
PlanUpdateContent = Annotated[PlanItems | PlanMarkdown, Field(discriminator='type')]
UNSTABLE: Content of an ID-addressed plan update.
ProtocolMethod
module-attribute
¶
Methods either side may send.
ProxyMethod
module-attribute
¶
UNSTABLE: Methods handled by proxies in a proxy chain.
SessionArchiveFilter
module-attribute
¶
UNSTABLE: Which sessions session/list returns by archive state.
exclude (the default) returns only sessions that are not archived.
SessionConfigOption
module-attribute
¶
SessionConfigOption = Annotated[
SelectSessionConfigOption | BooleanSessionConfigOption, Discriminator("type")
]
A session configuration option, discriminated by type.
For type: "select" the options and current_value (string) fields
are present. For type: "boolean" only current_value (bool) is present.
SessionConfigOptionCategory
module-attribute
¶
SessionConfigOptionCategory = (
Literal["mode", "model", "model_config", "speed", "thought_level", "other"] | str
)
Semantic category for a session configuration option.
This is intended to help Clients distinguish broadly common selectors (e.g. model selector vs
session mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,
placement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown
categories gracefully (treat as other).
speed is UNSTABLE.
SessionConfigOptionValue
module-attribute
¶
SessionConfigOptionValue = SessionConfigOptionValueBoolean | SessionConfigOptionValueId
The value to set for a session configuration option.
When type is "boolean", carries a bool. Otherwise (or when type
is absent), carries a SessionConfigValueId string.
SessionConfigSelectOptions
module-attribute
¶
SessionConfigSelectOptions = (
Sequence[SessionConfigSelectOption] | Sequence[SessionConfigSelectGroup]
)
The possible values for a configuration selector, optionally organized into groups.
SessionStatus
module-attribute
¶
UNSTABLE: Whether the Agent has the session in memory.
open: The Agent has the session in memory, for any connection.saved: The Agent knows the session and can resume it, but does not have it in memory.
StateUpdate
module-attribute
¶
StateUpdate = Annotated[
Annotated[RunningStateUpdate, Tag("running")]
| Annotated[IdleStateUpdate, Tag("idle")]
| Annotated[RequiresActionStateUpdate, Tag("requires_action")]
| Annotated[UnknownStateUpdate, Tag("unknown")],
Discriminator(_state_discriminator),
]
UNSTABLE: State snapshot of a subagent session.
SystemPromptMode
module-attribute
¶
How the Agent combines a client-provided system prompt with its own instructions.
append: Add the content to the Agent's own instructions.override: Replace the Agent's built-in default instructions (requiressession_capabilities.system_prompt.mode.override).
AcpMcpServer
¶
Bases: BaseMcpServer
UNSTABLE: MCP server reachable over the ACP connection itself (mcp/message).
Only available when the Agent capabilities indicate mcp_capabilities.acp is true.
Source code in src/aclientp/schema/mcp.py
server_id
instance-attribute
¶
server_id: McpServerAcpId
Unique identifier for this MCP server, generated by the component providing it.
type
class-attribute
instance-attribute
¶
ACP transport type.
AgentAuthCapabilities
¶
Bases: AnnotatedObject
Authentication-related capabilities supported by the agent.
Source code in src/aclientp/schema/capabilities.py
logout
class-attribute
instance-attribute
¶
logout: LogoutCapabilities | None = None
Whether the agent supports the logout method.
status
class-attribute
instance-attribute
¶
status: AuthStatusCapabilities | None = None
UNSTABLE: Whether the agent supports auth/status.
AgentCapabilities
¶
Bases: AnnotatedObject
Capabilities supported by the agent.
Advertised during initialization to inform the client about available features and content types.
See protocol docs: Agent Capabilities
Source code in src/aclientp/schema/capabilities.py
auth
class-attribute
instance-attribute
¶
auth: AgentAuthCapabilities | None = Field(default_factory=AgentAuthCapabilities)
Authentication-related capabilities supported by the agent.
load_session
class-attribute
instance-attribute
¶
Whether the agent supports session/load.
mcp_capabilities
class-attribute
instance-attribute
¶
mcp_capabilities: McpCapabilities | None = Field(default_factory=McpCapabilities)
MCP capabilities supported by the agent.
prompt_capabilities
class-attribute
instance-attribute
¶
prompt_capabilities: PromptCapabilities | None = Field(default_factory=PromptCapabilities)
Prompt capabilities supported by the agent.
providers
class-attribute
instance-attribute
¶
providers: ProvidersCapabilities | None = None
UNSTABLE: LLM provider configuration support.
session_capabilities
class-attribute
instance-attribute
¶
session_capabilities: SessionCapabilities | None = Field(default_factory=SessionCapabilities)
Session capabilities supported by the agent.
create
classmethod
¶
create(
load_session: bool | None = False,
http_mcp_servers: bool = False,
sse_mcp_servers: bool = False,
audio_prompts: bool = False,
embedded_context_prompts: bool = False,
image_prompts: bool = False,
list_sessions: bool = False,
resume_session: bool = False,
close_session: bool = False,
) -> Self
Create an instance of AgentCapabilities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
load_session
|
bool | None
|
Whether the agent supports |
False
|
http_mcp_servers
|
bool
|
Whether the agent supports HTTP MCP servers. |
False
|
sse_mcp_servers
|
bool
|
Whether the agent supports SSE MCP servers. |
False
|
audio_prompts
|
bool
|
Whether the agent supports audio prompts. |
False
|
embedded_context_prompts
|
bool
|
Whether the agent supports embedded context prompts. |
False
|
image_prompts
|
bool
|
Whether the agent supports image prompts. |
False
|
list_sessions
|
bool
|
Whether the agent supports |
False
|
resume_session
|
bool
|
Whether the agent supports |
False
|
close_session
|
bool
|
Whether the agent supports |
False
|
Source code in src/aclientp/schema/capabilities.py
AgentMessageChunk
¶
AgentMessageCursorAnchor
¶
Bases: CursorMessageAnchor
UNSTABLE: The cursor is next to an agent message.
Source code in src/aclientp/schema/cursors.py
AgentPlanUpdate
¶
Bases: AnnotatedObject
The agent's execution plan for complex tasks.
See protocol docs: Agent Plan.
Source code in src/aclientp/schema/session_updates.py
AgentThoughtChunk
¶
AgentThoughtCursorAnchor
¶
Bases: CursorMessageAnchor
UNSTABLE: The cursor is next to an agent thought.
Source code in src/aclientp/schema/cursors.py
AllowedOutcome
¶
Bases: AnnotatedObject
The user selected one of the provided options.
Source code in src/aclientp/schema/tool_call.py
Annotations
¶
Bases: AnnotatedObject
Optional annotations for the client.
The client can use annotations to inform how objects are used or displayed.
Source code in src/aclientp/schema/content_blocks.py
audience
class-attribute
instance-attribute
¶
Audience for the annotated resource.
last_modified
class-attribute
instance-attribute
¶
Last modified timestamp of the annotated resource.
priority
class-attribute
instance-attribute
¶
Priority of the annotated resource.
optionally_create
classmethod
¶
optionally_create(
audience: Audience | None = None,
last_modified: datetime | str | None = None,
priority: float | None = None,
) -> Self | None
Create an annotations object if any value is given, otherwise return None.
Source code in src/aclientp/schema/content_blocks.py
ArchiveSessionRequest
¶
Bases: Request
UNSTABLE: Request parameters for archiving a session.
Only available if the Agent supports the session.archive capability.
Source code in src/aclientp/schema/client_requests.py
ArchiveSessionResponse
¶
AudioContentBlock
¶
Bases: BaseContentBlock
Audio data for transcription or analysis.
Requires the audio prompt capability when included in prompts.
Source code in src/aclientp/schema/content_blocks.py
AuthAccount
¶
Bases: AnnotatedObject
UNSTABLE: An account the agent has configured, for display.
Source code in src/aclientp/schema/common.py
active
class-attribute
instance-attribute
¶
Whether the agent currently uses this account by default.
description
class-attribute
instance-attribute
¶
Short text shown with the label, e.g. the credential source. MUST NOT contain secrets.
label
instance-attribute
¶
Human-readable name for the account, e.g. Claude Max or OpenAI API key.
organization
class-attribute
instance-attribute
¶
Display name of the organization, team, or workspace the account is using.
AuthCapabilities
¶
Bases: AnnotatedObject
Authentication capabilities supported by the client.
Advertised during initialization to inform the agent which authentication method types the client can handle.
Source code in src/aclientp/schema/capabilities.py
terminal
class-attribute
instance-attribute
¶
Whether the client supports terminal authentication methods.
AuthMethodAgent
¶
Bases: AnnotatedObject
Agent handles authentication itself.
This is the default authentication method type.
When no type field is present, the method is treated as agent.
Source code in src/aclientp/schema/common.py
AuthMethodTerminal
¶
Bases: AnnotatedObject
Terminal authentication method.
Client runs the configured agent program as a separate interactive process for the user to authenticate.
Source code in src/aclientp/schema/common.py
args
class-attribute
instance-attribute
¶
Additional arguments to pass when running the agent binary for terminal auth.
description
class-attribute
instance-attribute
¶
Optional description providing more details about this authentication method.
env
class-attribute
instance-attribute
¶
Additional environment variables to set when running the agent binary for terminal auth.
type
class-attribute
instance-attribute
¶
Discriminator field.
AuthStatusCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Support for auth/status and auth/status_update.
Source code in src/aclientp/schema/capabilities.py
AuthStatusRequest
¶
Bases: Request
UNSTABLE: Request the agent's current authentication state.
Only available if the Agent supports the auth.status capability.
Source code in src/aclientp/schema/client_requests.py
AuthStatusResponse
¶
Bases: Response
UNSTABLE: Response to auth/status.
Source code in src/aclientp/schema/agent_responses.py
accounts
class-attribute
instance-attribute
¶
accounts: Sequence[AuthAccount] = Field(default_factory=list)
The accounts the agent has configured, for display.
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.
AuthenticateRequest
¶
Bases: Request
Request parameters for the authenticate method.
Specifies which authentication method to use.
Source code in src/aclientp/schema/client_requests.py
method_id
instance-attribute
¶
The ID of the authentication method to use.
Must be one of the methods advertised in the initialize response.
AuthenticateResponse
¶
AvailableCommand
¶
Bases: AnnotatedObject
Information about a command.
Source code in src/aclientp/schema/slash_commands.py
description
instance-attribute
¶
Human-readable description of what the command does.
input
class-attribute
instance-attribute
¶
input: AvailableCommandInput | None = None
Input for the command if required.
create
classmethod
¶
Create a new Command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the command. |
required |
description
|
str
|
Description of the command. |
required |
input_hint
|
str | None
|
Hint for the input. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
A new available command. |
Source code in src/aclientp/schema/slash_commands.py
AvailableCommandInput
¶
Bases: RootModel[CommandInputHint]
A container for the input specification for a command.
Source code in src/aclientp/schema/slash_commands.py
AvailableCommandsUpdate
¶
Bases: AnnotatedObject
Available commands are ready or have changed.
Source code in src/aclientp/schema/session_updates.py
available_commands
instance-attribute
¶
available_commands: Sequence[AvailableCommand]
Commands the agent can execute
session_update
class-attribute
instance-attribute
¶
session_update: Literal["available_commands_update"] = Field(
default="available_commands_update", init=False
)
Available commands are ready or have changed.
BlobResourceContents
¶
Bases: BaseResourceContents
Binary resource contents.
Source code in src/aclientp/schema/content_blocks.py
BooleanConfigOptionCapabilities
¶
Bases: AnnotatedObject
Capabilities for boolean session configuration options.
Source code in src/aclientp/schema/capabilities.py
BooleanPropertySchema
¶
Bases: AnnotatedObject
Schema for boolean properties in an elicitation form.
Source code in src/aclientp/schema/elicitation.py
BooleanSessionConfigOption
¶
Bases: BaseSessionConfigOption
UNSTABLE: This capability is not part of the spec yet.
A boolean on/off toggle session configuration option.
Advertised by the agent to describe an available boolean config option and its current state.
See SessionConfigOptionValueBoolean for the value sent by the client when changing it.
Source code in src/aclientp/schema/config_options.py
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
ClientCapabilities
¶
Bases: AnnotatedObject
Capabilities supported by the client.
Advertised during initialization to inform the agent about available features and methods.
See protocol docs: Client Capabilities
Source code in src/aclientp/schema/capabilities.py
auth
class-attribute
instance-attribute
¶
auth: AuthCapabilities | None = Field(default_factory=AuthCapabilities)
Authentication capabilities supported by the client.
elicitation
class-attribute
instance-attribute
¶
elicitation: ElicitationCapabilities | None = None
Elicitation capabilities supported by the client.
Determines which elicitation modes the agent may use.
fs
class-attribute
instance-attribute
¶
fs: FileSystemCapabilities | None = Field(default_factory=FileSystemCapabilities)
File system capabilities supported by the client.
Determines which file operations the agent can request.
plan
class-attribute
instance-attribute
¶
plan: PlanCapabilities | None = None
UNSTABLE: Client support for ID-addressed plan updates.
session
class-attribute
instance-attribute
¶
session: ClientSessionCapabilities | None = None
Session-related capabilities supported by the client.
subagents
class-attribute
instance-attribute
¶
subagents: SubagentCapabilities | None = None
UNSTABLE: Client support for subagent_update session updates.
terminal
class-attribute
instance-attribute
¶
Whether the Client support all terminal/* methods.
create
classmethod
¶
create(
read_text_file: bool | None = False,
write_text_file: bool | None = False,
terminal: bool | None = False,
auth: AuthCapabilities | None = None,
) -> Self
Create a new instance of ClientCapabilities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
read_text_file
|
bool | None
|
Whether the Client supports |
False
|
write_text_file
|
bool | None
|
Whether the Client supports |
False
|
terminal
|
bool | None
|
Whether the Client supports all |
False
|
auth
|
AuthCapabilities | None
|
Authentication capabilities supported by the client. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
A new instance of ClientCapabilities. |
Source code in src/aclientp/schema/capabilities.py
ClientSessionCapabilities
¶
Bases: AnnotatedObject
Session-related capabilities supported by the client.
Source code in src/aclientp/schema/capabilities.py
compaction
class-attribute
instance-attribute
¶
compaction: CompactionCapabilities | None = None
Support for ID-addressed context compaction updates.
config_options
class-attribute
instance-attribute
¶
config_options: SessionConfigOptionsCapabilities | None = None
Config option capabilities supported by the client.
cursors
class-attribute
instance-attribute
¶
cursors: SessionCursorsCapabilities | None = None
UNSTABLE: Support for cursor_update session updates.
notices
class-attribute
instance-attribute
¶
notices: NoticeCapabilities | None = None
Support for live user-facing notice session updates.
prompt_suggestions
class-attribute
instance-attribute
¶
prompt_suggestions: PromptSuggestionsCapabilities | None = None
UNSTABLE: Support for prompt_suggestions_update session updates.
CloseSessionRequest
¶
Bases: Request
Request parameters for closing an active session.
The agent must cancel any ongoing work related to the session
(treat it as if session/cancel was called) and then free up any resources
associated with the session.
Only available if the Agent supports the session.close capability.
Source code in src/aclientp/schema/client_requests.py
CloseSessionResponse
¶
CommandInputHint
¶
Bases: AnnotatedObject
All text that was typed after the command name is provided as input.
Source code in src/aclientp/schema/slash_commands.py
CompactionCapabilities
¶
Bases: AnnotatedObject
Client support for ID-addressed context compaction updates.
{} advertises the complete compaction contract.
Source code in src/aclientp/schema/capabilities.py
CompactionCursorAnchor
¶
Bases: AnnotatedObject
UNSTABLE: The cursor is next to a context compaction.
Source code in src/aclientp/schema/cursors.py
position
instance-attribute
¶
position: CursorAnchorPosition
On which side of the compaction the cursor is.
CompactionSummaryChunk
¶
Bases: AnnotatedObject
A content block appended to a compaction's summary.
A first-seen ID creates an in-progress compaction. Chunks append in receive order.
Source code in src/aclientp/schema/session_updates.py
compaction_id
instance-attribute
¶
compaction_id: CompactionId
ID of the compaction whose summary receives this content.
CompactionUpdate
¶
Bases: AnnotatedObject
A context compaction upsert.
The first notification fixes the compaction's timeline position.
Later updates with the same ID patch that entity in place.
Only sent if the client advertised session.compaction.
Source code in src/aclientp/schema/session_updates.py
compaction_id
instance-attribute
¶
compaction_id: CompactionId
The Agent-owned ID of this compaction.
error
class-attribute
instance-attribute
¶
Human-readable error details for the compaction.
summary
class-attribute
instance-attribute
¶
Complete replacement user-displayable summary content for the compaction.
ConfigOptionUpdate
¶
Bases: AnnotatedObject
A session configuration option value has changed.
The full set of configuration options and their current values is sent on every change. Clients should replace their cached list entirely.
See protocol docs: Session Config Options <https://agentclientprotocol.com/protocol/session-config-options>_
Source code in src/aclientp/schema/session_updates.py
config_options
instance-attribute
¶
config_options: Sequence[SessionConfigOption]
The full set of configuration options and their current values.
ContentToolCallContent
¶
Bases: AnnotatedObject
Standard content block (text, images, resources).
Source code in src/aclientp/schema/tool_call.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | |
type
class-attribute
instance-attribute
¶
Standard content block (text, images, resources).
audio
classmethod
¶
audio(
data: str | bytes,
mime_type: str,
audience: Audience | None = None,
last_modified: datetime | str | None = None,
priority: float | None = None,
) -> Self
Create a ToolCallContent containing audio content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
str | bytes
|
The audio data. |
required |
mime_type
|
str
|
The MIME type of the audio data. |
required |
audience
|
Audience | None
|
The audience for the audio chunk. |
None
|
last_modified
|
datetime | str | None
|
The last modified date of the audio chunk. |
None
|
priority
|
float | None
|
The priority of the audio chunk. |
None
|
Source code in src/aclientp/schema/tool_call.py
embedded_blob_resource
classmethod
¶
embedded_blob_resource(
data: bytes | str,
uri: str,
mime_type: str | None = None,
audience: Audience | None = None,
last_modified: datetime | str | None = None,
priority: float | None = None,
) -> Self
Create a ToolCallContent containing an embedded blob resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes | str
|
The data to embed. |
required |
uri
|
str
|
The URI of the resource. |
required |
mime_type
|
str | None
|
The MIME type of the resource. |
None
|
audience
|
Audience | None
|
The audience to apply to the resource. |
None
|
last_modified
|
datetime | str | None
|
The last modified date of the resource. |
None
|
priority
|
float | None
|
The priority of the resource. |
None
|
Source code in src/aclientp/schema/tool_call.py
embedded_text_resource
classmethod
¶
embedded_text_resource(
text: str,
uri: str,
mime_type: str | None = None,
audience: Audience | None = None,
last_modified: datetime | str | None = None,
priority: float | None = None,
) -> Self
Create a ToolCallContent containing an embedded text resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
The text to embed. |
required |
uri
|
str
|
The URI of the resource. |
required |
mime_type
|
str | None
|
The MIME type of the resource. |
None
|
audience
|
Audience | None
|
The audience to apply to the resource. |
None
|
last_modified
|
datetime | str | None
|
The last modified date of the resource. |
None
|
priority
|
float | None
|
The priority of the resource. |
None
|
Source code in src/aclientp/schema/tool_call.py
image
classmethod
¶
image(
data: str | bytes,
mime_type: str,
uri: str | None = None,
audience: Audience | None = None,
last_modified: datetime | str | None = None,
priority: float | None = None,
) -> Self
Create a ToolCallContent containing an embedded image resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
str | bytes
|
The image data. |
required |
mime_type
|
str
|
The MIME type of the image. |
required |
uri
|
str | None
|
The URI of the image. |
None
|
audience
|
Audience | None
|
The audience for the image. |
None
|
last_modified
|
datetime | str | None
|
The last modified date of the image. |
None
|
priority
|
float | None
|
The priority of the image. |
None
|
Source code in src/aclientp/schema/tool_call.py
resource
classmethod
¶
resource(
name: str,
uri: str,
description: str | None = None,
mime_type: str | None = None,
size: int | None = None,
title: str | None = None,
audience: Audience | None = None,
last_modified: datetime | str | None = None,
priority: float | None = None,
) -> Self
Create a ToolCallContent containing a resource content block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the resource. |
required |
uri
|
str
|
The URI of the resource. |
required |
description
|
str | None
|
The description of the resource. |
None
|
mime_type
|
str | None
|
The MIME type of the resource. |
None
|
size
|
int | None
|
The size of the resource. |
None
|
title
|
str | None
|
The title of the resource. |
None
|
audience
|
Audience | None
|
The audience of the resource. |
None
|
last_modified
|
datetime | str | None
|
The last modified date of the resource. |
None
|
priority
|
float | None
|
The priority of the resource. |
None
|
Source code in src/aclientp/schema/tool_call.py
text
classmethod
¶
text(
text: str,
*,
audience: Audience | None = None,
last_modified: datetime | str | None = None,
priority: float | None = None,
) -> Self
Create a ToolCallContent containing text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
The text content. |
required |
audience
|
Audience | None
|
The audience for the text. |
None
|
last_modified
|
datetime | str | None
|
The last modified date of the text. |
None
|
priority
|
float | None
|
The priority of the text. |
None
|
Source code in src/aclientp/schema/tool_call.py
Cost
¶
Bases: AnnotatedObject
Cost information for a session.
Source code in src/aclientp/schema/session_updates.py
CreateTerminalRequest
¶
Bases: BaseAgentRequest
Request to create a new terminal and execute a command.
Source code in src/aclientp/schema/agent_requests.py
args
class-attribute
instance-attribute
¶
Array of command arguments.
cwd
class-attribute
instance-attribute
¶
Working directory for the command (absolute path).
env
class-attribute
instance-attribute
¶
env: Sequence[EnvVariable] | None = None
Environment variables for the command.
output_byte_limit
class-attribute
instance-attribute
¶
Maximum number of output bytes to retain.
When the limit is exceeded, the Client truncates from the beginning of the output to stay within the limit.
The Client MUST ensure truncation happens at a character boundary to maintain valid string output, even if this means the retained output is slightly less than the specified limit.
CreateTerminalResponse
¶
Bases: Response
Response containing the ID of the created terminal.
Source code in src/aclientp/schema/client_responses.py
CurrentModeUpdate
¶
Bases: AnnotatedObject
The current mode of the session has changed.
See protocol docs: Session Modes
Source code in src/aclientp/schema/session_updates.py
CursorCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: The methods that currently accept a cursor.
Source code in src/aclientp/schema/cursors.py
fork
class-attribute
instance-attribute
¶
fork: CursorForkCapabilities | None = None
session/fork accepts this cursor. None means unsupported.
CursorForkCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: The cursor can be passed to session/fork as cursorId.
Source code in src/aclientp/schema/cursors.py
CursorMessageAnchor
¶
Bases: AnnotatedObject
UNSTABLE: A cursor anchored to a message; type names the kind of message.
Source code in src/aclientp/schema/cursors.py
position
instance-attribute
¶
position: CursorAnchorPosition
On which side of the message the cursor is.
CursorUpdate
¶
Bases: AnnotatedObject
UNSTABLE: A session cursor was announced or its capabilities changed.
Upserts by cursor_id. The first update for a cursor MUST include anchor,
which is fixed afterwards; later updates change only capabilities.
Only sent if the client advertised session.cursors.
Source code in src/aclientp/schema/session_updates.py
anchor
class-attribute
instance-attribute
¶
anchor: CursorAnchor | None = None
Where the cursor is. Required on the first update for a cursor.
capabilities
class-attribute
instance-attribute
¶
capabilities: CursorCapabilities | None = None
The methods that currently accept this cursor; a new cursor starts with none.
CustomRequest
¶
Bases: Request
Request for custom/extension methods.
Source code in src/aclientp/schema/client_requests.py
CustomResponse
¶
DeleteSessionRequest
¶
Bases: Request
Request parameters for deleting a session from session/list.
Only available if the Agent supports the session.delete capability.
Source code in src/aclientp/schema/client_requests.py
DeleteSessionResponse
¶
DeniedOutcome
¶
Bases: Schema
The prompt turn was cancelled before the user responded.
When a client sends a session/cancel notification to cancel an ongoing
prompt turn, it MUST respond to all pending session/request_permission
requests with this Cancelled outcome.
See protocol docs: Cancellation
Source code in src/aclientp/schema/tool_call.py
DisableProviderRequest
¶
DisableProviderResponse
¶
ElicitationCapabilities
¶
Bases: AnnotatedObject
Elicitation capabilities supported by the client.
Source code in src/aclientp/schema/elicitation.py
form
class-attribute
instance-attribute
¶
form: ElicitationFormCapabilities | None = None
Whether the client supports form-based elicitation.
url
class-attribute
instance-attribute
¶
url: ElicitationUrlCapabilities | None = None
Whether the client supports URL-based elicitation.
ElicitationCompleteNotification
¶
Bases: AnnotatedObject
Notification sent by the agent when a URL-based elicitation is complete.
Source code in src/aclientp/schema/elicitation.py
ElicitationFormCapabilities
¶
Bases: AnnotatedObject
Form-based elicitation capabilities.
Source code in src/aclientp/schema/elicitation.py
ElicitationRequest
¶
Bases: Request
Request from the agent to elicit structured user input (elicitation/create).
The agent sends this to the client to request information from the user, either via a form or by directing them to a URL.
Mode and scope fields are flattened into the request on the wire:
mode: "form"carriesrequested_schema.mode: "url"carrieselicitation_idandurl.- Session scope sets
session_id(and optionallytool_call_id), request scope setsrequest_id(e.g. during auth before any session exists).
Source code in src/aclientp/schema/elicitation.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
elicitation_id
class-attribute
instance-attribute
¶
URL mode: the unique identifier for this elicitation.
request_id
class-attribute
instance-attribute
¶
Request scope: the JSON-RPC request this elicitation is tied to.
requested_schema
class-attribute
instance-attribute
¶
requested_schema: ElicitationSchema | None = None
Form mode: a JSON Schema describing the form fields to present to the user.
session_id
class-attribute
instance-attribute
¶
Session scope: the session this elicitation is tied to.
tool_call_id
class-attribute
instance-attribute
¶
Session scope: optional tool call within the session.
url
class-attribute
instance-attribute
¶
URL mode: the URL to direct the user to.
form
classmethod
¶
form(
message: str,
schema: ElicitationSchema,
*,
session_id: str | None = None,
tool_call_id: str | None = None,
request_id: int | str | None = None,
) -> Self
Create a form-based elicitation request.
Source code in src/aclientp/schema/elicitation.py
url_based
classmethod
¶
url_based(
message: str,
elicitation_id: str,
url: str,
*,
session_id: str | None = None,
tool_call_id: str | None = None,
request_id: int | str | None = None,
) -> Self
Create a URL-based elicitation request.
Source code in src/aclientp/schema/elicitation.py
ElicitationResponse
¶
Bases: Response
Response from the client to an elicitation request.
Source code in src/aclientp/schema/elicitation.py
content
class-attribute
instance-attribute
¶
content: dict[str, ElicitationContentValue] | None = None
For accept: the user-provided content, as an object matching the requested schema.
ElicitationSchema
¶
Bases: AnnotatedObject
Type-safe elicitation schema for requesting structured user input.
This represents a JSON Schema object with primitive-typed properties, as required by the elicitation specification.
Source code in src/aclientp/schema/elicitation.py
description
class-attribute
instance-attribute
¶
Optional description of what this schema represents.
properties
class-attribute
instance-attribute
¶
properties: dict[str, ElicitationPropertySchema] = Field(default_factory=dict)
Property definitions (must be primitive types).
required
class-attribute
instance-attribute
¶
List of required property names.
type
class-attribute
instance-attribute
¶
Type discriminator. Always "object".
ElicitationUrlCapabilities
¶
Bases: AnnotatedObject
URL-based elicitation capabilities.
Source code in src/aclientp/schema/elicitation.py
EmbeddedResourceContentBlock
¶
Bases: BaseContentBlock
Complete resource contents embedded directly in the message.
Preferred for including context as it avoids extra round-trips.
Requires the embeddedContext prompt capability when included in prompts.
Source code in src/aclientp/schema/content_blocks.py
resource
instance-attribute
¶
Resource content that can be embedded in a message.
EnumOption
¶
Bases: AnnotatedObject
A titled enum option with a const value, human-readable title and optional description.
Source code in src/aclientp/schema/elicitation.py
EnvVariable
¶
Bases: AnnotatedObject
An environment variable to set when launching an MCP server.
Source code in src/aclientp/schema/common.py
Error
¶
Bases: Schema
JSON-RPC error object.
Represents an error that occurred during method execution, following the JSON-RPC 2.0 error object specification with optional additional data.
See protocol docs: JSON-RPC Error Object
Source code in src/aclientp/schema/common.py
code
instance-attribute
¶
code: ErrorCode
A number indicating the error type that occurred.
This must be an integer as defined in the JSON-RPC specification.
data
class-attribute
instance-attribute
¶
Optional primitive or structured value that contains additional errorinformation.
This may include debugging information or context-specific details.
message
instance-attribute
¶
A string providing a short description of the error.
The message should be limited to a concise single sentence.
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
FileEditToolCallContent
¶
Bases: AnnotatedObject
File modification shown as a diff.
Source code in src/aclientp/schema/tool_call.py
FileSystemCapabilities
¶
Bases: AnnotatedObject
File system capabilities that a client may support.
See protocol docs: FileSystem
Source code in src/aclientp/schema/capabilities.py
ForkSessionRequest
¶
Bases: SessionSetupRequest
UNSTABLE: Request parameters for forking an existing session.
Creates a new, active session based on the context of an existing one.
Only available if the Agent supports the session.fork capability.
Source code in src/aclientp/schema/client_requests.py
cursor_id
class-attribute
instance-attribute
¶
UNSTABLE: Fork at this session cursor instead of the end of the session.
The new session's history is the source history before the cursor. Only IDs of
cursors announced on the source session that currently advertise
capabilities.fork are valid; Agents reject others with -32602.
ForkSessionResponse
¶
Bases: Response
UNSTABLE: Response from forking an existing session.
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | None = None
The full list of config options with updated values.
modes
class-attribute
instance-attribute
¶
modes: SessionModeState | None = None
Initial mode state if supported by the Agent
See protocol docs: Session Modes
session_id
instance-attribute
¶
Unique identifier for the newly created forked session.
create
classmethod
¶
create(
session_id: str,
config_options: Sequence[SessionConfigOption] | None = None,
modes: Sequence[SessionMode] | None = None,
current_mode: str | None = None,
) -> Self
Create a response with the given session ID and config options.
Source code in src/aclientp/schema/agent_responses.py
HttpHeader
¶
Bases: AnnotatedObject
An HTTP header to set when making requests to the MCP server.
Source code in src/aclientp/schema/mcp.py
HttpMcpServer
¶
Bases: BaseMcpServer
HTTP transport configuration.
Only available when the Agent capabilities indicate mcp_capabilities.http is true.
Source code in src/aclientp/schema/mcp.py
headers
class-attribute
instance-attribute
¶
headers: Sequence[HttpHeader] = Field(default_factory=list)
HTTP headers to set when making requests to the MCP server.
type
class-attribute
instance-attribute
¶
HTTP transport type.
IdleStateUpdate
¶
Bases: AnnotatedObject
UNSTABLE: The child is ready to process another prompt.
Source code in src/aclientp/schema/session_updates.py
error
class-attribute
instance-attribute
¶
error: Error | None = None
For stop_reason: "error": the failure, as a JSON-RPC error object.
stop_reason
class-attribute
instance-attribute
¶
stop_reason: (
Literal["end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "error"]
| str
| None
) = None
Why foreground work stopped. Omitted when there is no stop reason.
ImageContentBlock
¶
Bases: BaseContentBlock
Images for visual context or analysis.
Requires the image prompt capability when included in prompts.
Source code in src/aclientp/schema/content_blocks.py
Implementation
¶
Bases: AnnotatedObject
Describes the name and version of an ACP implementation.
Includes an optional title for UI representation.
Source code in src/aclientp/schema/common.py
name
instance-attribute
¶
Intended for programmatic or logical use.
Can be used as a display name fallback if title isn't present.
title
class-attribute
instance-attribute
¶
Intended for UI and end-user contexts.
Optimized to be human-readable and easily understood. If not provided, the name should be used for display.
version
instance-attribute
¶
Version of the implementation.
Can be displayed to the user or used for debugging or metrics purposes.
InitialSessionConfigOption
¶
Bases: AnnotatedObject
UNSTABLE: A config option value to apply when a session is set up.
Sent on session/new, session/load, session/resume and session/fork.
When type is "boolean", value is a bool, otherwise a value ID string.
Source code in src/aclientp/schema/config_options.py
config_id
instance-attribute
¶
config_id: SessionConfigId
The ID of the configuration option to set.
type
class-attribute
instance-attribute
¶
The value type discriminator. "boolean" for bool values, absent for value IDs.
InitializeProxyRequest
¶
Bases: InitializeRequest
Request parameters for proxy/initialize. Same as initialize.
Source code in src/aclientp/schema/proxy.py
InitializeProxyResponse
¶
Bases: InitializeResponse
Response to proxy/initialize. Same as the initialize response.
The proxy MUST NOT change protocol_version.
Source code in src/aclientp/schema/proxy.py
InitializeRequest
¶
Bases: Request
Request parameters for the initialize method.
Sent by the client to establish connection and negotiate capabilities.
See protocol docs: Initialization
Source code in src/aclientp/schema/client_requests.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
client_capabilities
class-attribute
instance-attribute
¶
client_capabilities: ClientCapabilities | None = Field(default_factory=ClientCapabilities)
Capabilities supported by the client.
client_info
class-attribute
instance-attribute
¶
client_info: Implementation | None = None
Information about the Client name and version sent to the Agent.
Note: in future versions of the protocol, this will be required.
protocol_version
instance-attribute
¶
The latest protocol version supported by the client.
create
classmethod
¶
create(
title: str,
name: str,
version: str,
terminal: bool = True,
read_text_file: bool = True,
write_text_file: bool = True,
protocol_version: int = 1,
terminal_auth: bool = False,
prompt_suggestions: bool = False,
compaction: bool = False,
notices: bool = False,
metadata: dict[str, Any] | None = None,
) -> Self
Create a new InitializeRequest instance.
Source code in src/aclientp/schema/client_requests.py
create_for_package
classmethod
¶
create_for_package(
package_name: str,
allow_terminal: bool = True,
allow_file_operations: bool = True,
terminal_auth: bool = False,
prompt_suggestions: bool = False,
compaction: bool = False,
notices: bool = False,
metadata: dict[str, Any] | None = None,
) -> InitializeRequest
Create ACP initialize request for app with given name (based on pkg metadata).
Source code in src/aclientp/schema/client_requests.py
InitializeResponse
¶
Bases: Response
Response from the initialize method.
Contains the negotiated protocol version and agent capabilities.
See protocol docs: Initialization
Source code in src/aclientp/schema/agent_responses.py
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
agent_capabilities
class-attribute
instance-attribute
¶
agent_capabilities: AgentCapabilities | None = Field(default_factory=AgentCapabilities)
Capabilities supported by the agent.
agent_info
class-attribute
instance-attribute
¶
agent_info: Implementation | None = None
Information about the Agent name and version sent to the Client.
Note: in future versions of the protocol, this will be required.
auth_methods
class-attribute
instance-attribute
¶
auth_methods: Sequence[AuthMethod] | None = Field(default_factory=list)
Authentication methods supported by the agent.
protocol_version
class-attribute
instance-attribute
¶
The protocol version the client specified if supported by the agent.
Or the latest protocol version supported by the agent. The client should disconnect, if it doesn't support this version.
create
classmethod
¶
create(
name: str,
title: str,
version: str,
protocol_version: int,
load_session: bool | None = False,
http_mcp_servers: bool = False,
sse_mcp_servers: bool = False,
audio_prompts: bool = False,
embedded_context_prompts: bool = False,
image_prompts: bool = False,
list_sessions: bool = False,
resume_session: bool = False,
close_session: bool = False,
auth_methods: Sequence[AuthMethod] | None = None,
) -> Self
Create an instance of AgentCapabilities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the agent. |
required |
title
|
str
|
The title of the agent. |
required |
version
|
str
|
The version of the agent. |
required |
protocol_version
|
int
|
The protocol version of the agent. |
required |
load_session
|
bool | None
|
Whether the agent supports |
False
|
http_mcp_servers
|
bool
|
Whether the agent supports HTTP MCP servers. |
False
|
sse_mcp_servers
|
bool
|
Whether the agent supports SSE MCP servers. |
False
|
audio_prompts
|
bool
|
Whether the agent supports audio prompts. |
False
|
embedded_context_prompts
|
bool
|
Whether the agent supports embedded context prompts. |
False
|
image_prompts
|
bool
|
Whether the agent supports image prompts. |
False
|
list_sessions
|
bool
|
Whether the agent supports |
False
|
resume_session
|
bool
|
Whether the agent supports |
False
|
close_session
|
bool
|
Whether the agent supports |
False
|
auth_methods
|
Sequence[AuthMethod] | None
|
The authentication methods supported by the agent. |
None
|
Source code in src/aclientp/schema/agent_responses.py
IntegerPropertySchema
¶
Bases: AnnotatedObject
Schema for integer properties in an elicitation form.
Source code in src/aclientp/schema/elicitation.py
KillTerminalRequest
¶
Bases: BaseAgentRequest
Request to kill a terminal command without releasing the terminal.
Source code in src/aclientp/schema/agent_requests.py
KillTerminalResponse
¶
ListProvidersRequest
¶
ListProvidersResponse
¶
Bases: Response
Response to providers/list.
Source code in src/aclientp/schema/providers.py
providers
instance-attribute
¶
providers: Sequence[ProviderInfo]
Configurable providers with current routing info.
ListSessionsRequest
¶
Bases: Request
Request parameters for listing existing sessions.
Only available if the Agent supports the session.list capability.
Source code in src/aclientp/schema/client_requests.py
archived
class-attribute
instance-attribute
¶
archived: SessionArchiveFilter | None = None
UNSTABLE: Which sessions to return by archive state. Defaults to exclude.
cursor
class-attribute
instance-attribute
¶
Opaque cursor token from a previous response's nextCursor field for pagination.
cwd
class-attribute
instance-attribute
¶
Filter sessions by working directory. Must be an absolute path.
ListSessionsResponse
¶
Bases: Response
Response from listing sessions.
Source code in src/aclientp/schema/agent_responses.py
next_cursor
class-attribute
instance-attribute
¶
Opaque cursor token. If present, pass this in the next request's cursor parameter to fetch the next page. If absent, there are no more results.
sessions
class-attribute
instance-attribute
¶
sessions: Sequence[SessionInfo] = Field(default_factory=list)
Array of session information objects.
LoadSessionRequest
¶
Bases: SessionSetupRequest
Request parameters for loading an existing session.
Only available if the Agent supports the loadSession capability.
See protocol docs: Loading Sessions
Source code in src/aclientp/schema/client_requests.py
LoadSessionResponse
¶
Bases: Response
Response from loading an existing session.
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | None = None
The full list of config options with updated values.
modes
class-attribute
instance-attribute
¶
modes: SessionModeState | None = None
Initial mode state if supported by the Agent
See protocol docs: Session Modes
LogoutCapabilities
¶
Bases: AnnotatedObject
Logout capabilities supported by the agent.
By supplying {} it means that the agent supports the logout method.
Source code in src/aclientp/schema/capabilities.py
LogoutRequest
¶
Bases: Request
Request parameters for the logout method.
Terminates the current authenticated session.
After a successful logout, all new sessions will require authentication. There is no guarantee about the behavior of already running sessions.
Source code in src/aclientp/schema/client_requests.py
LogoutResponse
¶
McpCapabilities
¶
Bases: AnnotatedObject
MCP capabilities supported by the agent.
Source code in src/aclientp/schema/capabilities.py
McpError
¶
Bases: Schema
UNSTABLE: A structured inner MCP error. Never an ACP error code.
Source code in src/aclientp/schema/mcp.py
MessageMcpNotification
¶
Bases: AnnotatedObject
UNSTABLE: An inner MCP notification tied to an active inner MCP request.
Source code in src/aclientp/schema/mcp.py
params
class-attribute
instance-attribute
¶
Optional inner MCP params.
request_id
instance-attribute
¶
request_id: McpRequestId
The identifier of the active inner MCP request.
server_id
instance-attribute
¶
server_id: McpServerAcpId
The declared ACP MCP server handling the associated request.
MessageMcpRequest
¶
Bases: Request
UNSTABLE: An inner MCP request sent to an acp MCP server via mcp/message.
Either side may send it, to the side that declared the server.
Source code in src/aclientp/schema/mcp.py
params
class-attribute
instance-attribute
¶
Optional inner MCP params.
request_id
instance-attribute
¶
request_id: McpRequestId
The caller-generated identifier for the inner MCP request.
server_id
instance-attribute
¶
server_id: McpServerAcpId
The declared ACP MCP server receiving this request.
MessageMcpResponse
¶
Bases: Response
UNSTABLE: Response to mcp/message: exactly one inner MCP outcome.
Either an opaque result (which may be JSON null) or an error.
Receivers prefer result if both are present.
Source code in src/aclientp/schema/mcp.py
MultiSelectPropertySchema
¶
Bases: AnnotatedObject
Schema for multi-select (array) properties in an elicitation form.
Source code in src/aclientp/schema/elicitation.py
default
class-attribute
instance-attribute
¶
Default selected values.
description
class-attribute
instance-attribute
¶
Human-readable description.
max_items
class-attribute
instance-attribute
¶
Maximum number of items to select.
min_items
class-attribute
instance-attribute
¶
Minimum number of items to select.
title
class-attribute
instance-attribute
¶
Optional title for the property.
NewSessionRequest
¶
Bases: SessionSetupRequest
Request parameters for creating a new session.
See protocol docs: Creating a Session
Source code in src/aclientp/schema/client_requests.py
NewSessionResponse
¶
Bases: Response
Response from creating a new session.
See protocol docs: Creating a Session
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | None = None
**Configuration options for this session.
modes
class-attribute
instance-attribute
¶
modes: SessionModeState | None = None
Initial mode state if supported by the Agent
See protocol docs: Session Modes
session_id
instance-attribute
¶
Unique identifier for the created session.
Used in all subsequent requests for this conversation.
Notice
¶
Bases: AnnotatedObject
Fire-and-forget information for the user.
Only sent if the client advertised session.notices.
Source code in src/aclientp/schema/session_updates.py
description
class-attribute
instance-attribute
¶
Optional plain-text detail or guidance.
NoticeCapabilities
¶
Bases: AnnotatedObject
Client support for presenting live notice session updates to the user.
Source code in src/aclientp/schema/capabilities.py
NumberPropertySchema
¶
Bases: AnnotatedObject
Schema for number (floating-point) properties in an elicitation form.
Source code in src/aclientp/schema/elicitation.py
PermissionOption
¶
Bases: AnnotatedObject
An option presented to the user when requesting permission.
Source code in src/aclientp/schema/tool_call.py
PlanCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Client support for ID-addressed plan_update / plan_removed updates.
Source code in src/aclientp/schema/capabilities.py
PlanEntry
¶
Bases: AnnotatedObject
A single entry in the execution plan.
Represents a task or goal that the assistant intends to accomplish as part of fulfilling the user's request. See protocol docs: Plan Entries
Source code in src/aclientp/schema/agent_plan.py
PlanItems
¶
Bases: AnnotatedObject
UNSTABLE: A plan made of structured entries.
Source code in src/aclientp/schema/agent_plan.py
PlanMarkdown
¶
Bases: AnnotatedObject
UNSTABLE: A plan made of raw markdown content.
Source code in src/aclientp/schema/agent_plan.py
PlanRemoved
¶
Bases: AnnotatedObject
UNSTABLE: Remove an ID-addressed plan.
Source code in src/aclientp/schema/session_updates.py
PlanUpdate
¶
Bases: AnnotatedObject
UNSTABLE: Create or replace an ID-addressed plan.
Only sent if the client advertised the plan capability.
Source code in src/aclientp/schema/session_updates.py
PromptCapabilities
¶
Bases: AnnotatedObject
Prompt capabilities supported by the agent in session/prompt requests.
Baseline agent functionality requires support for [ContentBlock::Text]
and [ContentBlock::ResourceContentBlock] in prompt requests.
Other variants must be explicitly opted in to. Capabilities for different types of content in prompt requests.
Indicates which content types beyond the baseline (text and resource links) the agent can process.
See protocol docs: Prompt Capabilities
Source code in src/aclientp/schema/capabilities.py
audio
class-attribute
instance-attribute
¶
Agent supports [ContentBlock::Audio].
embedded_context
class-attribute
instance-attribute
¶
Agent supports embedded context in session/prompt requests.
When enabled, the Client is allowed to include [ContentBlock::Resource]
in prompt requests for pieces of context that are referenced in the message.
image
class-attribute
instance-attribute
¶
Agent supports [ContentBlock::Image].
PromptRequest
¶
Bases: Request
Request parameters for sending a user prompt to the agent.
Contains the user's message and any additional context.
See protocol docs: User Message
Source code in src/aclientp/schema/client_requests.py
prompt
instance-attribute
¶
The blocks of content that compose the user's message.
As a baseline, the Agent MUST support [ContentBlock::Text] and
[ContentBlock::ResourceContentBlock],
while other variants are optionally enabled via [PromptCapabilities].
The Client MUST adapt its interface according to [PromptCapabilities].
The client MAY include referenced pieces of context as either
[ContentBlock::Resource] or [ContentBlock::ResourceContentBlock].
When available, [ContentBlock::Resource] is preferred
as it avoids extra round-trips and allows the message to include
pieces of context from sources the agent may not have access to.
PromptResponse
¶
Bases: Response
Response from processing a user prompt.
See protocol docs: Check for Completion
Source code in src/aclientp/schema/agent_responses.py
PromptSuggestion
¶
Bases: AnnotatedObject
UNSTABLE: A prompt the client can offer to the user.
Source code in src/aclientp/schema/session_updates.py
PromptSuggestionsAudioCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Prompt suggestions may include audio content blocks.
Source code in src/aclientp/schema/capabilities.py
PromptSuggestionsCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Client support for prompt_suggestions_update session updates.
Text and resource link content are always allowed.
Source code in src/aclientp/schema/capabilities.py
audio
class-attribute
instance-attribute
¶
audio: PromptSuggestionsAudioCapabilities | None = None
Whether prompt suggestions may include audio content blocks.
embedded_context
class-attribute
instance-attribute
¶
embedded_context: PromptSuggestionsEmbeddedContextCapabilities | None = None
Whether prompt suggestions may include resource content blocks.
image
class-attribute
instance-attribute
¶
image: PromptSuggestionsImageCapabilities | None = None
Whether prompt suggestions may include image content blocks.
PromptSuggestionsEmbeddedContextCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Prompt suggestions may include resource content blocks.
Source code in src/aclientp/schema/capabilities.py
PromptSuggestionsImageCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Prompt suggestions may include image content blocks.
Source code in src/aclientp/schema/capabilities.py
PromptSuggestionsUpdate
¶
Bases: AnnotatedObject
UNSTABLE: Suggested next prompts, replacing any previous suggestions.
Only sent if the client advertised session.prompt_suggestions.
Source code in src/aclientp/schema/session_updates.py
suggestions
instance-attribute
¶
suggestions: Sequence[PromptSuggestion]
The suggestions the Client can offer, ordered most likely first.
ProviderCurrentConfig
¶
Bases: AnnotatedObject
Current effective non-secret routing config of a provider.
Source code in src/aclientp/schema/providers.py
ProviderInfo
¶
Bases: AnnotatedObject
A configurable provider with its current routing info, suitable for UI display.
Source code in src/aclientp/schema/providers.py
current
class-attribute
instance-attribute
¶
current: ProviderCurrentConfig | None = None
Current effective config. None means the provider is disabled.
required
instance-attribute
¶
Whether this provider is mandatory. Clients must not call providers/disable for it.
supported
instance-attribute
¶
supported: Sequence[LlmProtocol]
Supported protocol types for this provider.
ProvidersCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Support for providers/list, providers/set and providers/disable.
Source code in src/aclientp/schema/capabilities.py
ProxySuccessorNotification
¶
Bases: AnnotatedObject
A notification wrapped for delivery to the proxy's successor.
Source code in src/aclientp/schema/proxy.py
ProxySuccessorRequest
¶
Bases: AnnotatedObject
A request wrapped for delivery to the proxy's successor.
The result is the wrapped request's result, forwarded unchanged.
field_meta belongs to the envelope and is hop-local.
Source code in src/aclientp/schema/proxy.py
ReadTextFileRequest
¶
Bases: BaseAgentRequest
Request to read content from a text file.
Only available if the client supports the fs.readTextFile capability.
Source code in src/aclientp/schema/agent_requests.py
ReadTextFileResponse
¶
Bases: Response
Response containing the contents of a text file.
Source code in src/aclientp/schema/client_responses.py
ReleaseTerminalRequest
¶
Bases: BaseAgentRequest
Request to release a terminal and free its resources.
Source code in src/aclientp/schema/agent_requests.py
ReleaseTerminalResponse
¶
RequestPermissionRequest
¶
Bases: BaseAgentRequest
Request for user permission to execute a tool call.
Sent when the agent needs authorization before performing a sensitive operation.
See protocol docs: Requesting Permission
Source code in src/aclientp/schema/agent_requests.py
options
instance-attribute
¶
options: Sequence[PermissionOption]
Available permission options for the user to choose from.
tool_call
instance-attribute
¶
tool_call: ToolCallUpdate
Details about the tool call requiring permission.
RequestPermissionResponse
¶
Bases: Response
Response to a permission request.
Source code in src/aclientp/schema/client_responses.py
outcome
instance-attribute
¶
outcome: RequestPermissionOutcome
The user's decision on the permission request.
allowed
classmethod
¶
Create a response indicating that the permission request was allowed.
Source code in src/aclientp/schema/client_responses.py
denied
classmethod
¶
Create a response indicating that the permission request was denied.
RequiresActionStateUpdate
¶
Bases: AnnotatedObject
UNSTABLE: Foreground work is blocked on user action.
Source code in src/aclientp/schema/session_updates.py
ResourceContentBlock
¶
Bases: BaseContentBlock
References to resources that the agent can access.
All agents MUST support resource links in prompts.
Source code in src/aclientp/schema/content_blocks.py
ResumeSessionRequest
¶
Bases: SessionSetupRequest
Request parameters for resuming an existing session.
Resumes an existing session without returning previous messages (unlike session/load).
mcp_servers is the complete client-provided set.
Only available if the Agent supports the session.resume capability.
Source code in src/aclientp/schema/client_requests.py
ResumeSessionResponse
¶
Bases: Response
Response from resuming an existing session.
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | None = None
The full list of config options with updated values.
modes
class-attribute
instance-attribute
¶
modes: SessionModeState | None = None
Initial mode state if supported by the Agent
See protocol docs: Session Modes
create
classmethod
¶
create(
config_options: Sequence[SessionConfigOption] | None = None,
modes: Sequence[SessionMode] | None = None,
current_mode: str | None = None,
) -> Self
Create a response with the given config options and modes.
Source code in src/aclientp/schema/agent_responses.py
RunningStateUpdate
¶
Bases: AnnotatedObject
UNSTABLE: Foreground work is in progress.
Source code in src/aclientp/schema/session_updates.py
SelectSessionConfigOption
¶
Bases: BaseSessionConfigOption
A select-type session configuration option.
Single-value selector (dropdown) with a list of options.
Advertised by the agent to describe an available select config option and its current state.
See SessionConfigOptionValueId for the value sent by the client when changing it.
Source code in src/aclientp/schema/config_options.py
current_value
instance-attribute
¶
current_value: SessionConfigValueId
The currently selected value.
type
class-attribute
instance-attribute
¶
Discriminator for the config option type.
SessionAdditionalDirectoriesCapabilities
¶
Bases: AnnotatedObject
Support for additionalDirectories on session lifecycle requests.
Source code in src/aclientp/schema/capabilities.py
SessionArchiveCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Support for session/archive and session/unarchive.
Source code in src/aclientp/schema/capabilities.py
SessionCancelCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Permits the client to cancel a subagent's current work.
Source code in src/aclientp/schema/capabilities.py
SessionCapabilities
¶
Bases: AnnotatedObject
Session capabilities supported by the agent.
As a baseline, all Agents MUST support session/new, session/prompt,
session/cancel, and session/update.
Optionally, they MAY support other session methods and notifications by specifying additional capabilities.
Note: session/load is still handled by the top-level load_session capability.
This will be unified in future versions of the protocol.
See protocol docs: Session Capabilities
Source code in src/aclientp/schema/capabilities.py
additional_directories
class-attribute
instance-attribute
¶
additional_directories: SessionAdditionalDirectoriesCapabilities | None = None
Whether the agent supports additionalDirectories on session lifecycle requests.
archive
class-attribute
instance-attribute
¶
archive: SessionArchiveCapabilities | None = None
UNSTABLE: Whether the agent supports session/archive and session/unarchive.
close
class-attribute
instance-attribute
¶
close: SessionCloseCapabilities | None = None
Whether the agent supports session/close.
delete
class-attribute
instance-attribute
¶
delete: SessionDeleteCapabilities | None = None
Whether the agent supports session/delete.
fork
class-attribute
instance-attribute
¶
fork: SessionForkCapabilities | None = None
UNSTABLE: Whether the agent supports session/fork.
list
class-attribute
instance-attribute
¶
list: SessionListCapabilities | None = None
Whether the agent supports session/list.
options
class-attribute
instance-attribute
¶
options: SessionOptionsCapabilities | None = None
UNSTABLE: Whether the agent supports session/options.
resume
class-attribute
instance-attribute
¶
resume: SessionResumeCapabilities | None = None
Whether the agent supports session/resume.
status
class-attribute
instance-attribute
¶
status: SessionStatusCapabilities | None = None
UNSTABLE: Whether the agent supports session/status.
system_prompt
class-attribute
instance-attribute
¶
system_prompt: SessionSystemPromptCapabilities | None = None
Whether the agent supports systemPrompt on session lifecycle requests.
title
class-attribute
instance-attribute
¶
title: SessionTitleCapabilities | None = None
UNSTABLE: Whether the agent supports session/set_title.
SessionCloseCapabilities
¶
Bases: AnnotatedObject
Capabilities for the session/close method.
By supplying {} it means that the agent supports closing of sessions.
Source code in src/aclientp/schema/capabilities.py
SessionConfigOptionValueBoolean
¶
Bases: AnnotatedObject
A boolean value for setting a config option (type: "boolean").
Sent by the client to change a boolean config option.
See BooleanSessionConfigOption for the option definition advertised by the agent.
Source code in src/aclientp/schema/config_options.py
SessionConfigOptionValueId
¶
Bases: AnnotatedObject
A SessionConfigValueId string value for setting a config option.
This is the default when type is absent on the wire. Unknown type
values with string payloads also gracefully deserialize into this variant.
Sent by the client to change a select config option.
See SelectSessionConfigOption for the option definition advertised by the agent.
Source code in src/aclientp/schema/config_options.py
SessionConfigOptionsCapabilities
¶
Bases: AnnotatedObject
Session configuration option capabilities supported by the client.
Source code in src/aclientp/schema/capabilities.py
boolean
class-attribute
instance-attribute
¶
boolean: BooleanConfigOptionCapabilities | None = None
Whether the client supports boolean session configuration options.
SessionConfigSelectGroup
¶
Bases: AnnotatedObject
A group of possible values for a configuration selector.
Source code in src/aclientp/schema/config_options.py
options
instance-attribute
¶
options: Sequence[SessionConfigSelectOption]
The set of option values in this group.
SessionConfigSelectOption
¶
Bases: AnnotatedObject
A possible value for a configuration selector.
Source code in src/aclientp/schema/config_options.py
description
class-attribute
instance-attribute
¶
Optional description for this option value.
SessionCursorsCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Client support for cursor_update session updates.
{} advertises support. See the
Session Cursors RFD.
Source code in src/aclientp/schema/capabilities.py
SessionDeleteCapabilities
¶
Bases: AnnotatedObject
Capabilities for the session/delete method.
Source code in src/aclientp/schema/capabilities.py
SessionForkCapabilities
¶
Bases: AnnotatedObject
Capabilities for the session/fork method.
UNSTABLE: This capability is not part of the spec yet, and may be removed or changed at any point.
By supplying {} it means that the agent supports forking of sessions.
Source code in src/aclientp/schema/capabilities.py
SessionInfo
¶
Bases: AnnotatedObject
Information about a session returned by session/list.
Source code in src/aclientp/schema/session_state.py
additional_directories
class-attribute
instance-attribute
¶
Additional workspace roots reported for this session. Each path must be absolute.
archived
class-attribute
instance-attribute
¶
UNSTABLE: Whether the session is archived.
title
class-attribute
instance-attribute
¶
Human-readable title for the session.
updated_at
class-attribute
instance-attribute
¶
ISO 8601 timestamp of last activity.
SessionInfoUpdate
¶
Bases: AnnotatedObject
Incremental update to session metadata.
Used to notify clients of changes to session info (title, timestamps) without requiring a full session list refresh.
Fields that are None are not changed. To update a field, set it to a value.
Source code in src/aclientp/schema/session_updates.py
SessionListCapabilities
¶
Bases: AnnotatedObject
Capabilities for the session/list method.
By supplying {} it means that the agent supports listing of sessions.
Source code in src/aclientp/schema/capabilities.py
SessionMessage
¶
Bases: AnnotatedObject
UNSTABLE: A message exchanged between sessions (e.g. parent and subagent).
Upserts by message_id: omitted fields are left unchanged, None clears them.
Source code in src/aclientp/schema/session_updates.py
content
class-attribute
instance-attribute
¶
Replaces all content when non-empty. None or [] clears it.
message_id
instance-attribute
¶
Identifier of this message within the enclosing session's transcript.
recipient_message_id
class-attribute
instance-attribute
¶
On an outgoing view, the message_id of the incoming view in the recipient.
recipient_session_id
class-attribute
instance-attribute
¶
The receiving session.
sender_message_id
class-attribute
instance-attribute
¶
On an incoming view, the message_id of the outgoing view in the sender's transcript.
sender_session_id
class-attribute
instance-attribute
¶
The sending session.
SessionMessageChunk
¶
Bases: AnnotatedObject
UNSTABLE: A content block appended to a session_message.
Source code in src/aclientp/schema/session_updates.py
SessionMessageCursorAnchor
¶
Bases: CursorMessageAnchor
UNSTABLE: The cursor is next to a session-directed message.
Source code in src/aclientp/schema/cursors.py
SessionMode
¶
Bases: AnnotatedObject
A mode the agent can operate in.
See protocol docs: Session Modes
Source code in src/aclientp/schema/session_state.py
SessionModeState
¶
Bases: AnnotatedObject
The set of modes and the one currently active.
Source code in src/aclientp/schema/session_state.py
available_modes
instance-attribute
¶
available_modes: Sequence[SessionMode]
The set of modes that the Agent can operate in.
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
SessionOptionsCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Support for session/options.
Source code in src/aclientp/schema/capabilities.py
SessionOptionsRequest
¶
Bases: Request
UNSTABLE: Request the modes and config options a session would start with.
Only available if the Agent supports the session.options capability.
Source code in src/aclientp/schema/client_requests.py
additional_directories
class-attribute
instance-attribute
¶
Additional workspace roots to resolve options for. Each path must be absolute.
cwd
instance-attribute
¶
The working directory to resolve options for. Must be an absolute path.
session_id
class-attribute
instance-attribute
¶
The session to resolve options for.
SessionOptionsResponse
¶
Bases: Response
UNSTABLE: The modes and config options a session would start with.
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | None = None
The config options the session would start with.
modes
class-attribute
instance-attribute
¶
modes: SessionModeState | None = None
The mode state the session would start with, if the Agent supports modes.
SessionReferenceToolCallContent
¶
Bases: AnnotatedObject
UNSTABLE: Reference to another session, e.g. a subagent spawned by this tool call.
Source code in src/aclientp/schema/tool_call.py
SessionResumeCapabilities
¶
Bases: AnnotatedObject
Capabilities for the session/resume method.
By supplying {} it means that the agent supports resuming of sessions.
Source code in src/aclientp/schema/capabilities.py
SessionSetupRequest
¶
Bases: Request
Fields shared by the session lifecycle requests (new, load, resume, fork).
Source code in src/aclientp/schema/client_requests.py
additional_directories
class-attribute
instance-attribute
¶
Additional workspace roots for this session. Each path must be absolute.
Requires the session_capabilities.additional_directories capability.
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[InitialSessionConfigOption] = Field(default_factory=list)
UNSTABLE: Config option values to apply when the session is set up.
mcp_servers
class-attribute
instance-attribute
¶
List of MCP (Model Context Protocol) servers the agent should connect to.
system_prompt
class-attribute
instance-attribute
¶
system_prompt: SystemPrompt | None = None
System-level instructions for the session.
Requires the session_capabilities.system_prompt capability.
SessionStatusCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Support for session/status.
Source code in src/aclientp/schema/capabilities.py
SessionStatusRequest
¶
Bases: Request
UNSTABLE: Request parameters for checking whether the Agent has a session in memory.
Only available if the Agent supports the session.status capability.
Source code in src/aclientp/schema/client_requests.py
SessionStatusResponse
¶
Bases: Response
UNSTABLE: Response to session/status.
Source code in src/aclientp/schema/agent_responses.py
SessionSystemPromptCapabilities
¶
Bases: AnnotatedObject
Capabilities for client-provided system prompts.
Source code in src/aclientp/schema/capabilities.py
mode
class-attribute
instance-attribute
¶
mode: SessionSystemPromptModeCapabilities | None = None
Delivery modes the agent supports in addition to append.
SessionSystemPromptModeCapabilities
¶
Bases: AnnotatedObject
System prompt delivery modes the agent supports in addition to append.
Source code in src/aclientp/schema/capabilities.py
override
class-attribute
instance-attribute
¶
override: SessionSystemPromptOverrideCapabilities | None = None
Whether the agent supports override mode.
SessionSystemPromptOverrideCapabilities
¶
Bases: AnnotatedObject
Support for the override system prompt mode.
Source code in src/aclientp/schema/capabilities.py
SessionTitleCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Support for session/set_title.
Source code in src/aclientp/schema/capabilities.py
SetProviderRequest
¶
Bases: Request
Configure a provider's routing.
Source code in src/aclientp/schema/providers.py
headers
class-attribute
instance-attribute
¶
Full headers map for this provider (may include authorization headers).
SetProviderResponse
¶
SetSessionConfigOptionRequest
¶
Bases: Request
Request parameters for setting a session configuration option.
Supports both select (string value ID) and boolean config options.
When type is "boolean", value is a bool.
When type is absent or "value_id", value is a string.
See protocol docs: Session Config Options
Source code in src/aclientp/schema/client_requests.py
SetSessionConfigOptionResponse
¶
Bases: Response
Response to session/set_config_option method.
Source code in src/aclientp/schema/agent_responses.py
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] = []
The full list of config options with updated values.
SetSessionModeRequest
¶
Bases: Request
Request parameters for setting a session mode.
Source code in src/aclientp/schema/client_requests.py
SetSessionModeResponse
¶
SetSessionTitleRequest
¶
Bases: Request
UNSTABLE: Request parameters for renaming a session.
Only available if the Agent supports the session.title capability.
Source code in src/aclientp/schema/client_requests.py
SetSessionTitleResponse
¶
Bases: Response
UNSTABLE: Response to session/set_title.
Source code in src/aclientp/schema/agent_responses.py
SseMcpServer
¶
Bases: BaseMcpServer
SSE transport configuration.
Only available when the Agent capabilities indicate mcp_capabilities.sse is true.
Source code in src/aclientp/schema/mcp.py
headers
instance-attribute
¶
headers: Sequence[HttpHeader]
HTTP headers to set when making requests to the MCP server.
type
class-attribute
instance-attribute
¶
SSE transport type.
StdioMcpServer
¶
Bases: BaseMcpServer
Stdio transport configuration.
All Agents MUST support this transport.
Source code in src/aclientp/schema/mcp.py
env
instance-attribute
¶
env: Sequence[EnvVariable]
Environment variables to set when launching the MCP server.
StringPropertySchema
¶
Bases: AnnotatedObject
Schema for string properties in an elicitation form.
When enum_values or one_of is set, this represents a single-select enum.
Source code in src/aclientp/schema/elicitation.py
description
class-attribute
instance-attribute
¶
Human-readable description.
enum
class-attribute
instance-attribute
¶
Enum values for untitled single-select enums.
format
class-attribute
instance-attribute
¶
String format.
max_length
class-attribute
instance-attribute
¶
Maximum string length.
min_length
class-attribute
instance-attribute
¶
Minimum string length.
one_of
class-attribute
instance-attribute
¶
one_of: Sequence[EnumOption] | None = None
Titled enum options for titled single-select enums.
pattern
class-attribute
instance-attribute
¶
Pattern the string must match.
title
class-attribute
instance-attribute
¶
Optional title for the property.
SubagentCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Client support for subagent_update session updates.
Source code in src/aclientp/schema/capabilities.py
SubagentSessionCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities of a subagent session.
Source code in src/aclientp/schema/capabilities.py
cancel
class-attribute
instance-attribute
¶
cancel: SessionCancelCapabilities | None = None
Permits the client to cancel this child's current work without ending the session.
SubagentUpdate
¶
Bases: AnnotatedObject
UNSTABLE: A subagent session started by the parent, or a change to it.
Only sent if the client advertised the subagents capability.
Source code in src/aclientp/schema/session_updates.py
additional_directories
class-attribute
instance-attribute
¶
Additional workspace roots for the child. Each path must be absolute.
capabilities
class-attribute
instance-attribute
¶
capabilities: SubagentSessionCapabilities | None = None
Client-initiated session mutations permitted for this subagent session.
cwd
class-attribute
instance-attribute
¶
The child's working directory. Must be an absolute path.
description
class-attribute
instance-attribute
¶
The parent's description of the child's role or purpose.
session_id
instance-attribute
¶
The opaque session ID identifying the child in all ACP messages.
state
class-attribute
instance-attribute
¶
state: StateUpdate | None = None
Current state snapshot for the child session.
title
class-attribute
instance-attribute
¶
The parent's human-readable display title for this child.
SystemPrompt
¶
Bases: AnnotatedObject
Client-provided system-level instructions for a session.
Only allowed if the Agent advertises session_capabilities.system_prompt.
Source code in src/aclientp/schema/client_requests.py
mode
instance-attribute
¶
mode: SystemPromptMode
How the Agent combines content with its own instructions.
TerminalExitStatus
¶
Bases: AnnotatedObject
Exit status of a terminal command.
Source code in src/aclientp/schema/terminal.py
TerminalOutputRequest
¶
Bases: BaseAgentRequest
Request to get the current output and status of a terminal.
Source code in src/aclientp/schema/agent_requests.py
TerminalOutputResponse
¶
Bases: Response
Response containing the terminal output and exit status.
Source code in src/aclientp/schema/client_responses.py
exit_status
class-attribute
instance-attribute
¶
exit_status: TerminalExitStatus | None = None
Exit status if the command has completed.
TerminalToolCallContent
¶
Bases: AnnotatedObject
Embed a terminal created with terminal/create by its id.
The terminal must be added before calling terminal/release.
See protocol docs: Terminal
Source code in src/aclientp/schema/tool_call.py
TextContentBlock
¶
Bases: BaseContentBlock
Text content.
May be plain text or formatted with Markdown.
All agents MUST support text content blocks in prompts. Clients SHOULD render this text as Markdown.
Source code in src/aclientp/schema/content_blocks.py
TextResourceContents
¶
Bases: BaseResourceContents
Text-based resource contents.
Source code in src/aclientp/schema/content_blocks.py
TitledMultiSelectItems
¶
Bases: AnnotatedObject
Items definition for titled multi-select enum properties.
Source code in src/aclientp/schema/elicitation.py
ToolCallCursorAnchor
¶
Bases: AnnotatedObject
UNSTABLE: The cursor is next to a tool call.
Source code in src/aclientp/schema/cursors.py
position
instance-attribute
¶
position: CursorAnchorPosition
On which side of the tool call the cursor is.
ToolCallLocation
¶
Bases: AnnotatedObject
A file location being accessed or modified by a tool.
Enables clients to implement "follow-along" features that track which files the agent is working with in real-time. See protocol docs: Following the Agent
Source code in src/aclientp/schema/tool_call.py
line
class-attribute
instance-attribute
¶
Optional 1-based line number within the file.
Defaults to 0 (unspecified) rather than None: some clients only render clickable paths when the field is present.
ToolCallProgress
¶
Bases: AnnotatedObject
Update on the status or results of a tool call.
Source code in src/aclientp/schema/session_updates.py
content
class-attribute
instance-attribute
¶
Replace the content collection.
locations
class-attribute
instance-attribute
¶
locations: Sequence[ToolCallLocation] | None = None
Replace the locations collection.
name
class-attribute
instance-attribute
¶
Update the programmatic name of the tool being invoked.
raw_output
class-attribute
instance-attribute
¶
Update the raw output.
session_update
class-attribute
instance-attribute
¶
Tool call update.
status
class-attribute
instance-attribute
¶
Update the execution status.
title
class-attribute
instance-attribute
¶
Update the human-readable title.
ToolCallStart
¶
Bases: AnnotatedObject
Notification that a new tool call has been initiated.
Source code in src/aclientp/schema/session_updates.py
content
class-attribute
instance-attribute
¶
Content produced by the tool call.
kind
class-attribute
instance-attribute
¶
The category of tool being invoked.
Helps clients choose appropriate icons and UI treatment.
locations
class-attribute
instance-attribute
¶
locations: Sequence[ToolCallLocation] | None = None
File locations affected by this tool call.
Enables "follow-along" features in clients.
name
class-attribute
instance-attribute
¶
Programmatic name of the tool being invoked.
raw_input
class-attribute
instance-attribute
¶
Raw input parameters sent to the tool.
raw_output
class-attribute
instance-attribute
¶
Raw output returned by the tool.
session_update
class-attribute
instance-attribute
¶
Notification that a new tool call has been initiated.
status
class-attribute
instance-attribute
¶
Current execution status of the tool call.
tool_call_id
instance-attribute
¶
Unique identifier for this tool call within the session.
ToolCallUpdate
¶
Bases: AnnotatedObject
Details about the tool call requiring permission.
Source code in src/aclientp/schema/tool_call.py
content
class-attribute
instance-attribute
¶
Replace the content collection.
locations
class-attribute
instance-attribute
¶
locations: Sequence[ToolCallLocation] | None = None
Replace the locations collection.
name
class-attribute
instance-attribute
¶
Programmatic name of the tool being invoked.
raw_output
class-attribute
instance-attribute
¶
Update the raw output.
status
class-attribute
instance-attribute
¶
Update the execution status.
title
class-attribute
instance-attribute
¶
Update the human-readable title.
UnarchiveSessionRequest
¶
Bases: Request
UNSTABLE: Request parameters for unarchiving a session.
Only available if the Agent supports the session.archive capability.
Source code in src/aclientp/schema/client_requests.py
UnarchiveSessionResponse
¶
UnknownCursorAnchor
¶
Bases: AnnotatedObject
UNSTABLE: A cursor anchored to a custom or future kind of entity.
The raw kind is kept in type; values starting with _ are extensions.
A Client that does not recognize it cannot place the cursor.
Source code in src/aclientp/schema/cursors.py
UnknownStateUpdate
¶
Bases: AnnotatedObject
UNSTABLE: The Agent cannot currently determine foreground activity.
Also used for custom or future states, whose raw value is kept in state.
Source code in src/aclientp/schema/session_updates.py
UntitledMultiSelectItems
¶
Bases: AnnotatedObject
Items definition for untitled multi-select enum properties.
Source code in src/aclientp/schema/elicitation.py
Usage
¶
Bases: AnnotatedObject
UNSTABLE: Token usage information for a prompt turn.
Source code in src/aclientp/schema/session_updates.py
cached_read_tokens
class-attribute
instance-attribute
¶
Total cache read tokens.
cached_write_tokens
class-attribute
instance-attribute
¶
Total cache write tokens.
input_tokens
class-attribute
instance-attribute
¶
Total input tokens across all turns.
output_tokens
class-attribute
instance-attribute
¶
Total output tokens across all turns.
thought_tokens
class-attribute
instance-attribute
¶
Total thought/reasoning tokens.
total_tokens
class-attribute
instance-attribute
¶
Sum of all token types across session.
UsageUpdate
¶
Bases: AnnotatedObject
Context window and cost update for a session.
Source code in src/aclientp/schema/session_updates.py
UserMessageChunk
¶
UserMessageCursorAnchor
¶
Bases: CursorMessageAnchor
UNSTABLE: The cursor is next to a user message.
Source code in src/aclientp/schema/cursors.py
WaitForTerminalExitRequest
¶
Bases: BaseAgentRequest
Request to wait for a terminal command to exit.
Source code in src/aclientp/schema/agent_requests.py
WaitForTerminalExitResponse
¶
Bases: Response
Response containing the exit status of a terminal command.
Source code in src/aclientp/schema/client_responses.py
WriteTextFileRequest
¶
Bases: BaseAgentRequest
Request to write content to a text file.
Only available if the client supports the fs.writeTextFile capability.