Aki Wijesundara
Manu JayawardanaThe path from a single-agent loop to a full multi-agent system with MCP and A2A.
A chatbot does input to output. An agent does think, act, observe, repeat.
One agent with fifteen or more tools breaks. Split by domain, each agent gets a focused job, short instructions, and limited tools.
Agent Development Kit. Google's open-source framework for building and deploying AI agents.
Python, TypeScript, Go, Java.
Gemini, Claude, Ollama, LiteLLM, or any model.
Locally, on Cloud Run, GKE, or Vertex AI.
Both open protocols that matter for production agent systems.
Tools are plain Python functions. ADK wraps them automatically.
The root agent reads each sub-agent's description and decides who handles the query.
description and delegates automatically.Building the multi-agent customer support system from the diagram.
In Demo 1, we hardcoded tools as Python functions. In reality, agents need databases, SaaS platforms, APIs. MCP is the standard.
One universal connector instead of a custom cable for every device.
Your agent discovers tools at runtime through a client-server protocol.
McpToolset.No hardcoded database functions. The agent discovers tools from the MCP server automatically.
Pre-built MCP servers in the ecosystem.
Supabase, Spanner, AlloyDB, Postgres (MCP Toolbox).
Asana (30+ tools), Atlassian (Jira + Confluence).
BigQuery, Bigtable, Cloud API Registry.
Imagen, Veo, Chirp 3 HD, Lyria (Genmedia MCP).
Local filesystem access, document reading.
Any API via Apigee or your own MCP server.
tool_filter to whitelist only the tools the agent needs. Security in production.The Billing Agent now connects to a real Supabase database via MCP.
customers, orders, support_tickets.McpToolset.MCP connects agents to tools. But what connects agents to other agents across systems? A2A is the open standard.
Giving an agent a toolkit.
Teammates in the same room.
Calling a colleague at another office.
Two steps: expose and consume.
Make your agent available on the network.
Use someone else's agent.
Every A2A agent has an Agent Card. A JSON file describing what it can do.
An API spec, but for agents. ADK auto-generates Agent Cards when you use to_a2a().
Two sides of the same protocol.
Where agent-to-agent communication makes sense.
Order Agent ↔ Inventory Agent ↔ Shipping Agent ↔ Payment Agent. Each an independent service, A2A as the communication layer.
Your support agent calls a partner's warranty verification agent. You do not know their tech stack.
Python orchestrator talks to a Java compliance agent and a Go data processing agent. A2A standardizes communication.
A financial data provider exposes real-time stock prices through an A2A agent. Your advisor agent consumes it.
A separate Shipping Agent that our support system talks to via A2A.
to_a2a().RemoteA2aAgent.Three layers. One system.
A decision guide for the three patterns.
Everything together in one demo.
Before you ship: test. When you ship: pick the right target.
Build a Multi-Agent Customer Support System with MCP and A2A.
Create a Supabase project with customers, orders, support_tickets tables. Seed with 10+ records per table.
Root router + at least 2 specialist sub-agents. At least one connected to Supabase via MCP.
Separate service with check_return_eligibility + initiate_return. Exposed via to_a2a().
Connect Returns Agent via RemoteA2aAgent. Test 3 scenarios: billing (MCP), returns (A2A), escalation.
Everything you need to build with ADK, MCP, and A2A.
How agents access tools and data.
How agents work together locally.
How agents collaborate across boundaries.
Terms you'll hear over the coming months. Awareness only, no demos, not required for homework.
Five layers, stacked. Today's session sat at the Loop and Graph layers.
| Layer | What you engineer | Your role | Core question |
|---|---|---|---|
| Prompt | The single request | Operator | Am I asking well? |
| Context | What the model sees | Editor | Does it have the right information? |
| Harness | Tools, memory, scaffolding | Toolmaker | Can it act and remember? |
| Loop | The cycle one agent repeats | System designer | When does it check its work and stop? |
| Graph | Coordination between many agents | Org designer | Who does what, in what order, sharing what state? |
Three ideas: nodes, edges, and the state that flows between them.
Units that do work, one job each. A specialised agent or a plain deterministic step.
The routing between nodes: straight, conditional, fan-out, fan-in.
The object travelling along the edges that every node reads from and writes to.
SequentialAgent is a straight edge, ParallelAgent is fan-out then fan-in, LoopAgent is an edge back to itself, and an LlmAgent with sub_agents is a conditional edge decided at runtime.Short answer: the mechanics are not new. Directed graphs, state machines, and agent-to-agent protocols predate the term by years.
Replied that he didn't really know what graph engineering was and still doesn't, but it's basically just LangGraph.
Dismissed it as slop.
Three different things get called "loop". The ReAct cycle inside one agent (Section 1). ADK's LoopAgent, a refinement pattern. And loop engineering, the third one, covered here.
Boris Cherny, head of Claude Code at Anthropic, says he doesn't prompt Claude anymore. He has loops running that prompt Claude and figure out what to do. His job is to write loops.
Scheduled discovery and triage. The heartbeat.
So parallel agents don't collide on the same files.
Project knowledge written down instead of guessed every session.
Which are MCP. The thing you learned in Section 4.
So the one who writes isn't the one who checks. Same principle as router plus specialists.
A file or board outside the conversation, because the model forgets everything between runs.
Token cost blows up fast, and verification stays with you. A loop running unattended is also a loop making mistakes unattended. "Done" is a claim, not a proof.
Two layers beneath the loop.
What makes a single agent able to act at all.
ADK gave you most of this for free today, which is why we didn't have to talk about it.