English
What problem does this solve?
Real operations need more than one skill at once: check the time, draft a greeting, look up a record, send a notification. Building one giant agent that knows how to do everything is brittle — every new capability means retraining or re-prompting the whole thing. The alternative is a set of small, single-purpose agents plus a router that knows who to call. This walkthrough continues studying the open-source theailanguage/a2a_samples reference implementation.
How the mechanism works
Three agents make up this demo: TellTimeAgent (only knows the time), GreetingAgent (writes greetings, but needs the time first), and an Orchestrator that talks to the user. On startup, the Orchestrator reads a small registry file of agent URLs and calls each one's discovery endpoint to build a live map of who exists and what they can do.
The Orchestrator does not use hard-coded if/else routing. It gives the LLM two tools — list known agents, and delegate a task to a named agent — and lets the model itself decide the plan. Ask for the time and it delegates straight to TellTimeAgent. Ask for a greeting and it delegates to GreetingAgent, which in turn calls TellTimeAgent on its own before composing a reply — one request triggering a two-hop chain.
Trade-offs and alternatives
The benefit is real modularity: adding a fourth agent means adding one line to a registry file, not touching the Orchestrator's code. The trade-off is that routing decisions now depend on an LLM call, which adds latency and a small chance of a wrong routing choice compared to deterministic if/else logic.
The alternative — one monolithic agent with every capability baked in — scales worse as the number of skills grows, and makes it harder to develop, test, or replace one capability independently of the others.
Conclusion
Small agents plus a registry plus LLM-driven delegation is a pattern that scales by addition, not by rewriting. It is also the shape most production multi-agent systems converge on once they outgrow a single do-everything bot.