liveBook · Manning

Agent executor

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

AgentExecutor is an A2A SDK abstract class that handles agent execution requests and cancellation.

AgentExecutor is an abstract A2A SDK class that accepts requests and executes them. A server calls its execute() method to handle a request and delegate work to an agent. section 10.3 section 10.3.1

An executor’s task flow centers on two required methods:

  • Implement execute() to handle the request, create or use an A2A Task, and run the wrapped agent. section 10.3.1
  • Use TaskUpdater to publish status updates and the final result as an A2A Artifact. section 10.3.1
  • Implement cancel() for in-flight work; many Python examples instead raise an unsupported-operation error. section 10.3.1

Wrapping LLMAgent

LLMAgentA2AExecutor wraps an LLMAgent. Its execution flow submits and starts a task, delegates execution to the agent, and publishes updates and a final result. section 10.3.1

Figure 10.12 The sequence of interactions between an A2A server and an A2A AgentExecutor with a TaskUpdater for performing tasks

Follow the sequence of interactions between the A2A server, executor, and TaskUpdater during task execution. section 10.3.1

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

How deep it goes
Defines execute() and cancel(), then traces task creation, status updates, delegation, and result publication; cancellation often remains unsupported.
Examples
Wraps LLMAgent and publishes task submission, start, progress or error updates, and a final artifact.
What you can do after
Build a Python A2A executor that delegates requests to an LLMAgent and publishes task updates and results.
How it connects
Connects A2A tasks and artifacts with TaskUpdater, LLMAgent, and the A2A server request handler.

Related concepts

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.