Expand description
Steering a running task: a message to a task that is still working, as a
declared extension (ADR 0036).
§The gap this closes
A2A v1.0.1 defines a follow-up message for a task in an interrupted state
(input-required, auth-required), and says nothing about one sent to a
task that is still working. Without an extension the only ways to change
what a running delegate is doing are to cancel it and start again, losing
its context, or to wait for it to stop.
§Wire shape
Not part of A2A v1.0. It ships as the declared extension
STEERING_EXTENSION_URI:
- The steering message is an ordinary
SendMessagewhose message names the running task intaskIdand lists the URI inMessage.extensions(declare). Nothing else marks it. An agent that does not take steering, or a peer that does not list the URI, is answered as it was before: a message to a working task is refused. - The receipt is the response: the task as it now stands (a
Task), carrying{"delivery": ...}in itsmetadataunderSTEERING_METADATA_KEY(Receipt). It says where the message went (Delivery), never that the executor acted on it. A response without the key was not a steering delivery: the task was not running, and the message was handled as any other message to it.
{
"extensions": ["https://a2a-rust.com/extensions/steering/v1"],
"taskId": "t-1",
"metadata": { "a2a-rust.com/idempotency-key": "8f14e45fceea167a5a36dedd4bea2543" }
}A retry of a steering message needs the idempotency extension’s key
(crate::idempotency), as a retry of a send does: without one a
delivery whose answer was lost, sent again, is delivered twice.
use a2a_protocol_types::message::Message;
use a2a_protocol_types::steering::{declare, declares_extension};
let mut message = Message::user_text("m-1", "use the cheaper index");
assert!(!declares_extension(&message));
declare(&mut message);
assert!(declares_extension(&message));Structs§
- Receipt
- What a steering response says about the message: see the module docs.
Enums§
- Delivery
- Where a steering message went.
Constants§
- STEERING_
EXTENSION_ URI - The extension URI a card declares and a steering message names in
Message.extensions. - STEERING_
METADATA_ KEY - The
Task.metadatakey a receipt travels under.
Functions§
- declare
- Lists
STEERING_EXTENSION_URIinmessage.extensions, once, leaving every other entry where it is. - declares_
extension - Whether
messagelistsSTEERING_EXTENSION_URIin itsextensions: the only thing that makes it a steering message.