#[non_exhaustive]pub enum AgentRequest {
RequestPermissionRequest(RequestPermissionRequest),
CreateElicitationRequest(CreateElicitationRequest),
ConnectMcpRequest(ConnectMcpRequest),
MessageMcpRequest(MessageMcpRequest),
DisconnectMcpRequest(DisconnectMcpRequest),
ExtMethodRequest(ExtRequest),
}unstable_protocol_v2 only.Expand description
All possible requests that an agent can send to a client.
This enum is used internally for routing RPC requests. You typically won’t need to use this directly.
This enum encompasses all method calls from agent to client.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RequestPermissionRequest(RequestPermissionRequest)
Requests permission from the user for a tool call operation.
Called by the agent when it needs user authorization before executing a potentially sensitive operation. The client should present the options to the user and return their decision.
If the client cancels the prompt turn via session/cancel, it MUST
respond to this request with RequestPermissionOutcome::Cancelled.
See protocol docs: Requesting Permission
CreateElicitationRequest(CreateElicitationRequest)
unstable_elicitation only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Requests structured user input via a form or URL.
ConnectMcpRequest(ConnectMcpRequest)
unstable_mcp_over_acp only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Opens an MCP-over-ACP connection.
MessageMcpRequest(MessageMcpRequest)
unstable_mcp_over_acp only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Exchanges an MCP-over-ACP message.
DisconnectMcpRequest(DisconnectMcpRequest)
unstable_mcp_over_acp only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Closes an MCP-over-ACP connection.
ExtMethodRequest(ExtRequest)
Handles extension method requests from the agent.
Allows the Agent to send an arbitrary request that is not part of the ACP spec. Extension methods provide a way to add custom functionality while maintaining protocol compatibility.
See protocol docs: Extensibility
Implementations§
Trait Implementations§
Source§impl Clone for AgentRequest
impl Clone for AgentRequest
Source§fn clone(&self) -> AgentRequest
fn clone(&self) -> AgentRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentRequest
impl Debug for AgentRequest
Source§impl<'de> Deserialize<'de> for AgentRequest
impl<'de> Deserialize<'de> for AgentRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl IntoV1 for AgentRequest
impl IntoV1 for AgentRequest
Source§impl JsonSchema for AgentRequest
impl JsonSchema for AgentRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more