liveBook · Manning

A2A task lifecycle

As explained in Build a Multi-Agent System (from Scratch)

The A2A task lifecycle is the sequence of interactions and state changes involved in requesting and executing an agent task.

An A2A task begins when a client sends a server a Message containing instructions for a remote agent. The agent performs the task to completion or another terminal state, such as failure or cancellation, and the server returns a stateful Task that later interactions can reference by ID. section 10.1.3

The lifecycle uses four related elements:

  • A Message contains one or more Parts; each Part holds text, raw bytes, a file URI, or JSON. section 10.1.3
  • A Task contains zero or more Artifacts and can be referenced in a later Message using its task ID. section 10.1.3

Hailstone task

A client can send a Message with one text Part: “Compute the Hailstone sequence starting at 6.” section 10.1.3

Figure 10.6 A sequence diagram of the task lifecycle, overlaid with the A2A elements

Use the sequence diagram to follow the task interactions and see where Message, Part, Task, and Artifact fit. section 10.1.3

How Build a Multi-Agent System (from Scratch) covers it

How deep it goes
Defines the core elements and request flow, but does not show implementation code in the available description.
Examples
Uses a text instruction to compute the Hailstone sequence starting at 6.
What you can do after
Understand how a client initiates a task and references its stateful Task in later interactions.
How it connects
Connects messages, parts, tasks, artifacts, and agent cards within A2A task execution.

This explainer was generated by Manning's knowledge graph from the text of Build a Multi-Agent System (from Scratch). The section links point to the parts of the book it draws on.