Agentic Engineering from First Principles All chaptersLecturesLabDownload the book
Part IV · Agents Working Together

Chapter 21: Agent-to-Agent Communication

Central questionHow can independently implemented agents discover capabilities, delegate work, exchange status and artifacts, and preserve trust across a system boundary?

Lecture

Chapter principle

A communication protocol can standardize exchange. It cannot create shared meaning, or trust, by itself.

Key takeaways

Experiments

Every experiment in the book is small, runnable and printed with its real output. In the Lab you can replay a recorded real run of each one, with no programming, and watch what the model and the agent do.

Experiment 37: Agent-to-agent communication

How do agents owned by different teams work together safely?

A coordinator needs research from a remote agent that another team owns. It learns what the agent can do from its card, then sends a message. The remote agent creates a task, works on it, and returns the result as an artifact. A real model does the remote agent's work and is told to reply with JSON in a fixed schema. The run also retries a message, sends one from an unknown caller, and uses a “drifted” copy of the agent whose instructions lost the schema line. This is a recorded run. The drifted agent's field names may differ in a new run.

All the code for this chapter: github.com/agentic-engineering-book/code

This is Chapter 21 of Agentic Engineering from First Principles: thirty chapters, a case study and fifty-nine executable experiments, from a single model call to controlled, self-improving agents.
Download the bookBrowse all chapters
← Chapter 20: Shared StateChapter 22: Evaluation →