Skip to main content

Module v2

Module v2 

Source
Available on crate feature unstable_protocol_v2 only.
Expand description

Agent Client Protocol v2 draft schema types.

Modules§

conversion
Explicit conversion helpers for experimenting with ACP v2 while SDKs still speak v1.

Structs§

AgentAuthCapabilities
Authentication-related capabilities supported by the agent.
AgentCapabilities
Capabilities supported by the agent.
AgentMessage
An agent message upsert.
AgentMethodNames
Names of all methods that agents handle.
AgentThought
An agent thought or reasoning message upsert.
Annotations
Optional annotations for the client. The client can use annotations to inform how objects are used or displayed
AudioContent
Audio provided to or from an LLM.
AuthCapabilities
UNSTABLE
AuthEnvVar
UNSTABLE
AuthMethodAgent
Agent handles authentication itself.
AuthMethodEnvVar
UNSTABLE
AuthMethodId
Typed identifier used for auth method values on the wire.
AuthMethodTerminal
UNSTABLE
AvailableCommand
Information about a command.
AvailableCommandsUpdate
Available commands are ready or have changed
BlobResourceContents
Binary resource contents.
BooleanPropertySchema
Schema for boolean properties in an elicitation form.
CancelRequestNotification
Notification to cancel an ongoing request.
CancelSessionNotification
Notification to cancel ongoing operations for a session.
ClientCapabilities
Capabilities supported by the client.
ClientMethodNames
Names of all methods that clients handle.
CloseSessionRequest
Request parameters for closing an active session.
CloseSessionResponse
Response from closing a session.
CompleteElicitationNotification
UNSTABLE
ConfigOptionUpdate
Session configuration options have been updated.
ConnectMcpRequest
UNSTABLE
ConnectMcpResponse
UNSTABLE
Content
Standard content block (text, images, resources).
ContentChunk
A streamed item of message content.
Cost
Cost information for a session.
CreateElicitationRequest
UNSTABLE
CreateElicitationResponse
UNSTABLE
DeleteSessionRequest
Request parameters for deleting an existing session from session/list.
DeleteSessionResponse
Response from deleting a session.
Diff
File changes produced by a tool call.
DiffChange
One file-level change described by a Diff.
DiffPatch
Renderable patch text.
DiffPathChange
Operation metadata for add, delete, and modify changes.
DiffPathPairChange
Operation metadata for move and copy changes.
DisconnectMcpRequest
UNSTABLE
DisconnectMcpResponse
UNSTABLE
ElicitationAcceptAction
UNSTABLE
ElicitationCapabilities
UNSTABLE
ElicitationFormCapabilities
UNSTABLE
ElicitationFormMode
UNSTABLE
ElicitationId
UNSTABLE
ElicitationRequestScope
UNSTABLE
ElicitationSchema
Type-safe elicitation schema for requesting structured user input.
ElicitationSessionScope
UNSTABLE
ElicitationUrlCapabilities
UNSTABLE
ElicitationUrlMode
UNSTABLE
EmbeddedResource
The contents of a resource, embedded into a prompt or tool call result.
EnumOption
A titled enum option with a const value, human-readable title, and optional description.
EnvVariable
An environment variable to set when launching an MCP server.
Error
JSON-RPC error object.
ExtNotification
Allows the Agent to send an arbitrary notification that is not part of the ACP spec. Extension notifications provide a way to send one-way messages for custom functionality while maintaining protocol compatibility.
ExtRequest
Allows for sending an arbitrary request that is not part of the ACP spec. Extension methods provide a way to add custom functionality while maintaining protocol compatibility.
ExtResponse
Allows for sending an arbitrary response to an ExtRequest that is not part of the ACP spec. Extension methods provide a way to add custom functionality while maintaining protocol compatibility.
ForkSessionRequest
UNSTABLE
ForkSessionResponse
UNSTABLE
GeneralMethodNames
Names of all methods that agents handle.
HttpHeader
An HTTP header to set when making requests to the MCP server.
Icon
An optionally-sized icon that can be displayed in a user interface.
IdleStateUpdate
The agent is not currently processing work in the session.
ImageContent
An image provided to or from an LLM.
Implementation
Metadata about the implementation of the client or agent. Describes the name and version of an ACP implementation, with an optional title for UI representation.
InitializeRequest
Request parameters for the initialize method.
InitializeResponse
Response to the initialize method.
IntegerPropertySchema
Schema for integer properties in an elicitation form.
JsonRpcBatch
A non-empty JSON-RPC 2.0 batch message.
JsonRpcMessage
A message (request, response, or notification) with "jsonrpc": "2.0" specified as required by JSON-RPC 2.0 Specification.
ListSessionsRequest
Request parameters for listing existing sessions.
ListSessionsResponse
Response from listing sessions.
LoginAuthRequest
Request parameters for the auth/login method.
LoginAuthResponse
Response to the auth/login method.
LogoutAuthRequest
Request parameters for the auth/logout method.
LogoutAuthResponse
Response to the auth/logout method.
McpAcpCapabilities
UNSTABLE
McpCapabilities
MCP capabilities supported by the agent for session lifecycle requests.
McpConnectionId
UNSTABLE
McpHttpCapabilities
Capabilities for HTTP MCP server transports.
McpServerAcp
UNSTABLE
McpServerAcpIdunstable_mcp_over_acp
UNSTABLE
McpServerHttp
HTTP transport configuration for MCP.
McpServerStdio
Stdio transport configuration for MCP.
McpStdioCapabilities
Capabilities for stdio MCP server transports.
MessageId
Unique identifier for a message within a session.
MessageMcpNotification
UNSTABLE
MessageMcpRequest
UNSTABLE
MessageMcpResponse
UNSTABLE
MultiSelectPropertySchema
Schema for multi-select (array) properties in an elicitation form.
NewSessionRequest
Request parameters for creating a new session.
NewSessionResponse
Response from creating a new session.
Notification
A JSON-RPC notification object.
NumberPropertySchema
Schema for number (floating-point) properties in an elicitation form.
OtherAuthMethod
Custom or future authentication method payload.
OtherAvailableCommandInput
Custom or future command input specification.
OtherContentBlock
Custom or future content block payload.
OtherDiffChange
Custom or future file operation payload.
OtherElicitationAction
Custom or future elicitation action payload.
OtherElicitationMode
Custom or future elicitation mode payload.
OtherElicitationPropertySchema
Custom or future elicitation property schema payload.
OtherMcpServer
Custom or future MCP server transport payload.
OtherMultiSelectItems
Custom or future typed item schema for multi-select properties.
OtherPlanUpdateContent
Custom or future plan update content payload.
OtherReplayFrom
Custom or future replay cursor payload.
OtherRequestPermissionOutcome
Custom or future permission outcome payload.
OtherRequestPermissionSubject
Custom or future permission subject payload.
OtherSessionConfigKind
Custom or future session configuration option payload.
OtherSessionConfigOptionValue
Custom or future session configuration option value payload.
OtherSessionUpdate
Custom or future session update payload.
OtherStateUpdate
Custom or future session state payload.
OtherToolCallContent
Custom or future tool call content payload.
PermissionOption
An option presented to the user when requesting permission.
PermissionOptionId
Unique identifier for a permission option.
PlanEntry
A single entry in the execution plan.
PlanId
Unique identifier for a plan within a session.
PlanItems
A plan represented as structured entries.
PlanUpdate
A content update for a plan identified by ID.
PromptAudioCapabilities
Capabilities for audio content in prompt requests.
PromptCapabilities
Prompt capabilities supported by the agent in session/prompt requests.
PromptEmbeddedContextCapabilities
Capabilities for embedded context in prompt requests.
PromptImageCapabilities
Capabilities for image content in prompt requests.
PromptRequest
Request parameters for sending a user prompt to the agent.
PromptResponse
Response acknowledging that a user prompt was accepted.
RawValue
Reference to a range of bytes encompassing a single valid JSON value in the input data.
ReplayFromStart
Inclusive replay cursor requesting replay from the start of the conversation.
Request
A JSON-RPC request object.
RequestPermissionRequest
Request for user permission to proceed with an operation.
RequestPermissionResponse
Response to a permission request.
RequiresActionStateUpdate
The agent is waiting on user action before it can continue.
ResourceLink
A resource that the server is capable of reading, included in a prompt or tool call result.
ResumeSessionRequest
Request parameters for resuming an existing session.
ResumeSessionResponse
Response from resuming an existing session.
RunningStateUpdate
The agent is actively processing work in the session.
SelectedPermissionOutcome
The user selected one of the provided options.
SessionAdditionalDirectoriesCapabilities
Capabilities for additional session directories support.
SessionCapabilities
Session capabilities supported by the agent.
SessionConfigBoolean
A boolean on/off toggle session configuration option payload.
SessionConfigGroupId
Unique identifier for a session configuration option value group.
SessionConfigId
Unique identifier for a session configuration option.
SessionConfigOption
A session configuration option selector and its current state.
SessionConfigSelect
A single-value selector (dropdown) session configuration option payload.
SessionConfigSelectGroup
A group of possible values for a session configuration option.
SessionConfigSelectOption
A possible value for a session configuration option.
SessionConfigValueId
Unique identifier for a session configuration option value.
SessionDeleteCapabilities
Capabilities for the session/delete method.
SessionForkCapabilities
UNSTABLE
SessionId
A unique identifier for a conversation session between a client and agent.
SessionInfo
Information about a session returned by session/list
SessionInfoUpdate
Update to session metadata. All fields are optional to support partial updates.
SetSessionConfigOptionRequest
Request parameters for setting a session configuration option.
SetSessionConfigOptionResponse
Response to session/set_config_option method.
StringMultiSelectItems
String item schema for multi-select enum properties.
StringPropertySchema
Schema for string properties in an elicitation form.
TerminalAuthCapabilities
UNSTABLE
TextCommandInput
All text that was typed after the command name is provided as input.
TextContent
Text provided to or from an LLM.
TextResourceContents
Text-based resource contents.
TitledMultiSelectItems
Items definition for titled multi-select enum properties.
ToolCallContentChunk
A streamed item of tool-call content.
ToolCallId
Unique identifier for a tool call within a session.
ToolCallLocation
A file location being accessed or modified by a tool.
ToolCallPermissionSubject
Permission request details for a tool call.
ToolCallUpdate
Represents an upsert for a tool call that the language model has requested.
UpdateSessionNotification
Notification containing a session update from the agent.
Usage
UNSTABLE
UsageUpdate
Context window and cost update for a session.
UserMessage
A user message upsert.

Enums§

AgentNotification
All possible notifications that an agent can send to a client.
AgentRequest
All possible requests that an agent can send to a client.
AgentResponse
All possible responses that an agent can send to a client.
AuthMethod
Describes an available authentication method.
AvailableCommandInput
The input specification for a command.
ClientNotification
All possible notifications that a client can send to an agent.
ClientRequest
All possible requests that a client can send to an agent.
ClientResponse
All possible responses that a client can send to an agent.
ContentBlock
Content blocks represent displayable information in the Agent Client Protocol.
DiffChangeOperation
File operation for a DiffChange.
DiffFileType
Kind of file content represented by a diff change.
DiffPatchFormat
Text patch format used by DiffPatch.
ElicitationAction
UNSTABLE
ElicitationContentValue
Allowed wire representations for ElicitationContentValue.
ElicitationMode
UNSTABLE
ElicitationPropertySchema
Property schema for elicitation form fields.
ElicitationSchemaType
Type discriminator for elicitation schemas.
ElicitationScope
UNSTABLE
EmbeddedResourceResource
Resource content that can be embedded in a message.
ErrorCode
Predefined error codes for common JSON-RPC and ACP-specific errors.
IconTheme
Theme an icon is designed for.
McpServer
Configuration for connecting to an MCP (Model Context Protocol) server.
MultiSelectItems
Items for a multi-select (array) property schema.
PermissionOptionKind
The type of permission option being presented to the user.
PlanEntryPriority
Priority levels for plan entries.
PlanEntryStatus
Status of a plan entry in the execution flow.
PlanUpdateContent
Updated content for a plan.
ProtocolLevelNotification
General protocol-level notifications that all sides are expected to implement.
ReplayFrom
Inclusive cursor describing where replayed session history should begin.
RequestId
JSON RPC Request Id
RequestPermissionOutcome
The outcome of a permission request.
RequestPermissionSubject
The operation requiring permission.
Role
The sender or recipient of messages and data in a conversation.
SessionConfigKind
Type-specific session configuration option payload.
SessionConfigOptionCategory
Semantic category for a session configuration option.
SessionConfigOptionValue
The value to set for a session configuration option.
SessionConfigSelectOptions
Possible values for a session configuration option.
SessionUpdate
Different types of updates that can be sent during session processing.
StateUpdate
The agent’s session state has changed.
StopReason
Reasons why an agent stops active session work.
StringFormat
String format types for string properties in elicitation schemas.
ToolCallContent
Content produced by a tool call.
ToolCallStatus
Execution status of a tool call.
ToolKind
Categories of tools that can be invoked.

Constants§

AGENT_METHOD_NAMES
Constant containing all agent method names.
CLIENT_METHOD_NAMES
Constant containing all client method names.
PROTOCOL_LEVEL_METHOD_NAMES
Constant containing all agent method names.

Type Aliases§

Meta
Value attached to a given ACP type on the _meta field.
Response
JSON-RPC response envelope using this protocol version’s error type.
Result
Convenience result type using this protocol version’s error type.