pub enum A2aCommands {
Serve {
host: String,
port: u16,
base_url: Option<String>,
enable_push: bool,
},
Discover {
agent_url: String,
},
SendTask {
agent_url: String,
message: String,
stream: bool,
context_id: Option<String>,
},
ListTasks {
agent_url: String,
context_id: Option<String>,
limit: u32,
},
GetTask {
agent_url: String,
task_id: String,
},
CancelTask {
agent_url: String,
task_id: String,
},
}Expand description
A2A Protocol commands
Variants§
Serve
Serve VT Code as an A2A agent (requires a2a-server feature)
Starts an HTTP server exposing A2A endpoints:
- /.well-known/agent-card.json - Agent discovery
- /a2a - JSON-RPC endpoint for task management
- /a2a/stream - Server-Sent Events streaming
Examples: vtcode a2a serve –port 8080 vtcode a2a serve –host 0.0.0.0 –port 8080
Fields
Discover
Discover and display information about a remote A2A agent
Fetches and displays the agent card from the remote agent, showing capabilities, skills, and supported features.
Examples: vtcode a2a discover https://agent.example.com vtcode a2a discover https://localhost:8080
SendTask
Send a task to a remote A2A agent
Sends a message to a remote agent and returns the task result. The agent will process the request and return structured results.
Examples: vtcode a2a send-task https://agent.example.com “Help me refactor this code” vtcode a2a send-task https://localhost:8080 “Explain this error message”
Fields
ListTasks
List active tasks in a running A2A agent
Queries a remote A2A agent for its current and recent tasks.
Examples: vtcode a2a list-tasks https://agent.example.com vtcode a2a list-tasks https://localhost:8080 –context-id my-conversation
Fields
GetTask
Get details about a specific task
Retrieves the current status, artifacts, and history of a task.
Examples: vtcode a2a get-task https://agent.example.com task-123 vtcode a2a get-task https://localhost:8080 task-456
CancelTask
Cancel a running task
Requests cancellation of a task that is currently being processed.
Examples: vtcode a2a cancel-task https://agent.example.com task-123
Trait Implementations§
Source§impl Clone for A2aCommands
impl Clone for A2aCommands
Source§fn clone(&self) -> A2aCommands
fn clone(&self) -> A2aCommands
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 A2aCommands
impl Debug for A2aCommands
Source§impl FromArgMatches for A2aCommands
impl FromArgMatches for A2aCommands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for A2aCommands
impl Subcommand for A2aCommands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand