Crate agent_client_protocol Copy item path Source AgentCapabilities Capabilities supported by the agent. AgentMethodNames Names of all methods that agents handle. AgentSide Marker type representing the agent side of an ACP connection. AgentSideConnection An agent-side connection to a client. 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. AuthMethod Describes an available authentication method. AuthMethodId AuthenticateRequest Request parameters for the authenticate method. AuthenticateResponse Response to the authenticate method. AvailableCommand Information about a command. AvailableCommandsUpdate Available commands are ready or have changed BlobResourceContents Binary resource contents. CancelNotification Notification to cancel ongoing operations for a session. ClientCapabilities Capabilities supported by the client. ClientMethodNames Names of all methods that clients handle. ClientSide Marker type representing the client side of an ACP connection. ClientSideConnection A client-side connection to an agent. Content Standard content block (text, images, resources). ContentChunk A streamed item of content CreateTerminalRequest Request to create a new terminal and execute a command. CreateTerminalResponse Response containing the ID of the created terminal. CurrentModeUpdate The current mode of the session has changed Diff A diff representing file modifications. EmbeddedResource The contents of a resource, embedded into a prompt or tool call result. 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. FileSystemCapability Filesystem capabilities supported by the client.
File system capabilities that a client may support. HttpHeader An HTTP header to set when making requests to the MCP server. 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 MCP implementation, with an optional
title for UI representation. InitializeRequest Request parameters for the initialize method. InitializeResponse Response to the initialize method. JsonRpcMessage A message (request, response, or notification) with "jsonrpc": "2.0" specified as
required by JSON-RPC 2.0 Specification . KillTerminalCommandRequest Request to kill a terminal command without releasing the terminal. KillTerminalCommandResponse Response to terminal/kill command method LoadSessionRequest Request parameters for loading an existing session. LoadSessionResponse Response from loading an existing session. McpCapabilities MCP capabilities supported by the agent McpServerHttp HTTP transport configuration for MCP. McpServerSse SSE transport configuration for MCP. McpServerStdio Stdio transport configuration for MCP. NewSessionRequest Request parameters for creating a new session. NewSessionResponse Response from creating a new session. Notification PermissionOption An option presented to the user when requesting permission. PermissionOptionId Unique identifier for a permission option. Plan An execution plan for accomplishing complex tasks. PlanEntry A single entry in the execution plan. PromptCapabilities Prompt capabilities supported by the agent in session/prompt requests. PromptRequest Request parameters for sending a user prompt to the agent. PromptResponse Response from processing a user prompt. ProtocolVersion Protocol version identifier. RawIncomingMessage RawValue Reference to a range of bytes encompassing a single valid JSON value in the
input data. ReadTextFileRequest Request to read content from a text file. ReadTextFileResponse Response containing the contents of a text file. ReleaseTerminalRequest Request to release a terminal and free its resources. ReleaseTerminalResponse Response to terminal/release method Request RequestPermissionRequest Request for user permission to execute a tool call. RequestPermissionResponse Response to a permission request. ResourceLink A resource that the server is capable of reading, included in a prompt or tool call result. SelectedPermissionOutcome The user selected one of the provided options. SessionCapabilities Session capabilities supported by the agent. SessionId A unique identifier for a conversation session between a client and agent. SessionMode A mode the agent can operate in. SessionModeId Unique identifier for a Session Mode. SessionModeState The set of modes and the one currently active. SessionNotification Notification containing a session update from the agent. SetSessionModeRequest Request parameters for setting a session mode. SetSessionModeResponse Response to session/set_mode method. StreamMessage A message that flows through the RPC stream. StreamReceiver A receiver for observing the message stream. Terminal Embed a terminal created with terminal/create by its id. TerminalExitStatus Exit status of a terminal command. TerminalId TerminalOutputRequest Request to get the current output and status of a terminal. TerminalOutputResponse Response containing the terminal output and exit status. TextContent Text provided to or from an LLM. TextResourceContents Text-based resource contents. ToolCall Represents a tool call that the language model has requested. ToolCallId Unique identifier for a tool call within a session. ToolCallLocation A file location being accessed or modified by a tool. ToolCallUpdate An update to an existing tool call. ToolCallUpdateFields Optional fields that can be updated in a tool call. UnstructuredCommandInput All text that was typed after the command name is provided as input. WaitForTerminalExitRequest Request to wait for a terminal command to exit. WaitForTerminalExitResponse Response containing the exit status of a terminal command. WriteTextFileRequest Request to write content to a text file. WriteTextFileResponse Response to fs/write_text_file 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. 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. EmbeddedResourceResource Resource content that can be embedded in a message. ErrorCode Predefined error codes for common JSON-RPC and ACP-specific errors. IncomingMessage MaybeUndefined Similar to Option, but it has three states, undefined, null and x. McpServer Configuration for connecting to an MCP (Model Context Protocol) server. OutgoingMessage 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. RequestId JSON RPC Request Id RequestPermissionOutcome The outcome of a permission request. Response Role The sender or recipient of messages and data in a conversation. SessionUpdate Different types of updates that can be sent during session processing. StopReason Reasons why an agent stops processing a prompt turn. StreamMessageContent The content of a stream message. StreamMessageDirection The direction of a message in the RPC stream. ToolCallContent Content produced by a tool call. ToolCallStatus Execution status of a tool call. ToolKind Categories of tools that can be invoked. AGENT_METHOD_NAMES Constant containing all agent method names. CLIENT_METHOD_NAMES Constant containing all client method names. Agent Defines the interface that all ACP-compliant agents must implement. Client Defines the interface that ACP-compliant clients must implement. IntoMaybeUndefined Utility trait for builder methods for optional values.
This allows the caller to either pass in the value itself without wrapping it in Some,
or to just pass in an Option if that is what they have, or set it back to undefined. IntoOption Utility trait for builder methods for optional values.
This allows the caller to either pass in the value itself without wrapping it in Some,
or to just pass in an Option if that is what they have. MessageHandler Side Meta Value attached to a given ACP type on the _meta field. Result