pub enum TaskState {
Submitted,
Working,
InputRequired,
Completed,
Failed,
Canceled,
Rejected,
AuthRequired,
Unknown,
}Expand description
Lifecycle state of an A2A task.
The state machine progresses roughly as:
Submitted → Working → Completed (success) or Failed (error).
InputRequired pauses processing until the caller sends more data.
Terminal states (Completed, Failed, Canceled, Rejected) cannot be resumed.
Variants§
Submitted
Task has been received and queued but processing has not started.
Working
The agent is actively processing the task.
InputRequired
Processing is paused; the agent needs more input from the caller.
Completed
Task finished successfully. Terminal state.
Failed
Task encountered an unrecoverable error. Terminal state.
Canceled
Task was canceled by the caller. Terminal state.
Rejected
Task was rejected by the agent (e.g., policy violation). Terminal state.
AuthRequired
The agent requires authentication before proceeding.
Unknown
State could not be determined (e.g., deserialization of a future protocol version).