Updating Google's Multi-Agent Codelab for ADK 2.0 and A2A 1.x A developer updated Google's "Building a Multi-Agent System" codelab to google-adk 2.15 and a2a-sdk 1.3, running on current Python and deployed to Cloud Run. The agent code itself was unchanged; the work centered on A2A serving and packaging, including ADK 2.0's new per-folder route mounting (which moves agent cards to /a2a//.well-known/agent-card.json), a2a-sdk 1.x's new agent-card shape and extra serving package, and fastapi's Python 3.11 requirement. The revised codelab ran end to end in Cloud Shell, locally and on Cloud Run. This article provides a step by step guide to updating Google's "Building a Multi-Agent System" codelab for ADK 2.0 and later. Four agents research a topic, judge the research and write a course, and the orchestrator reaches the other three over A2A. The update moves them to google-adk 2.15 and a2a-sdk 1.3, runs them on the latest Python, and deploys them to Cloud Run. https://github.com/xbill9/multi-agent-loop https://github.com/xbill9/multi-agent-loop The agent code moved to ADK 2.0 unchanged; every change sits in the code that serves the agents over A2A, and in packaging. ADK 2.0 mounts an agent's A2A routes under its folder name, a2a-sdk 1.x sends agent cards in a new shape and needs an extra package to serve them, and current fastapi needs Python 3.11. With those handled, the whole codelab ran end to end in Cloud Shell, locally and on Cloud Run. The updated codelab: https://xbill9.github.io/multi-agent-loop/building-a-multi-agent-system-adk2/ https://xbill9.github.io/multi-agent-loop/building-a-multi-agent-system-adk2/ | Agent | Built with | Role | Local port | |---|---|---|---| | Researcher | ADK Agent | Gathers information on the topic with Google Search | 8001 | | Judge | ADK Agent with output schema | Returns pass or fail and feedback as a Pydantic model | 8002 | | Content builder | ADK Agent | Writes the course module from approved research | 8003 | | Orchestrator | SequentialAgent , LoopAgent , RemoteA2aAgent | Loops researcher and judge up to three times, then calls the content builder | 8004 | | Course creator | FastAPI web app | Streams the orchestrator's progress and shows the course | 8000 | Each agent is its own service. The orchestrator reads each remote agent's card from /a2a/agent/.well-known/agent-card.json and sends it messages over A2A. A custom BaseAgent , the escalation checker, ends the loop when the judge passes. The repository holds two copies of the code: codelab-starter/ , where the agent files carry TODO comments for attendees, and codelab-complete/ , the finished version. One requirements.txt covers all four agents and the web app: cd multi-agent-loop/codelab-starter python3 -m pip install -r requirements.txt adk --version adk, version 2.15.0 The pins are lower bounds at the newest releases, with no upper caps: a2a-sdk http-server =1.3.1 fastapi =0.165.0 google-adk =2.15.0 google-cloud-logging =3.17.1 google-genai =2.34.0 httpx =0.28.1 httpx sse =0.4.3 opentelemetry-exporter-gcp-trace =1.15.0 uvicorn =0.54.0 google-adk 2.15.0 declares google-genai =2.34,<3 , so google-genai =2.34.0 lets pip pick the newest release ADK accepts. In Cloud Shell, which runs Python 3.12.3, pip installs into ~/.local because Cloud Shell's pip configuration sets break-system-packages . pip then lists conflicts with tools Cloud Shell has preinstalled; the codelab uses none of them. The same install runs on the workstation's Python 3.14.7. /a2a/agent ADK 2.0 treats a folder that contains agent.py as a single agent and takes the agent's name from the folder: 242: is single agent = is single agent directory agents path 247: single agent name = agents path.name 248: agents dir = str agents path.parent 503: prefix=f"/a2a/{app name}", Each agent starts from its own folder with adk app.py ... --a2a . , so with get fast api app a2a=True the researcher's card moves to /a2a/researcher/.well-known/agent-card.json and /a2a/agent/... answers 404. The orchestrator, the deploy script and the codelab all address /a2a/agent . shared/adk app.py now builds the agent card and mounts the A2A routes itself, at a fixed prefix: php A2A PREFIX = "/a2a/agent" def mount a2a app: typing.Any, agents dir: str - None: sys.path.insert 0, os.path.abspath agents dir agent = importlib.import module "agent" .root agent if isinstance agent, App : agent = agent.root agent card = asyncio.run AgentCardBuilder agent=agent, rpc url=f"http://127.0.0.1{A2A PREFIX}", capabilities=AgentCapabilities streaming=True , .build runner = Runner app name=agent.name, agent=agent, session service=InMemorySessionService , artifact service=InMemoryArtifactService , memory service=InMemoryMemoryService , compat.attach a2a routes to app app, agent card=card, agent executor=A2aAgentExecutor runner=runner , task store=InMemoryTaskStore , push config store=InMemoryPushNotificationConfigStore , prefix=A2A PREFIX, get fast api app is called without a2a=True , and mount a2a app, agents dir runs right after it. The cards are back at the same path for every agent: 8001 researcher 'http://localhost:8001/a2a/agent' 8002 judge 'http://localhost:8002/a2a/agent' 8003 content builder 'http://localhost:8003/a2a/agent' a2a-sdk 1.x builds agent cards as protobuf messages, so the card has no model dump json . ADK's own helper writes either version to a dict: card json = json.dumps compat.a2a to dict agent card , indent=2 The card lists its endpoints under supportedInterfaces : {"name": "researcher", "supportedInterfaces": {"url": "http://127.0.0.1/a2a/researcher", "protocolBinding": "JSONRPC", "protocolVersion": "1.0"} , "capabilities": {"streaming": true}} The codelab's middleware rewrites the card's address to the host the request came in on, which is what lets one card work on localhost and behind Cloud Run. It now rewrites both shapes: a2a-sdk 0.3.x keeps the endpoint in "url"; 1.x keeps one per entry in "supportedInterfaces". if "url" in card: card "url" = rewrite card "url" for iface in card.get "supportedInterfaces", : if "url" in iface: iface "url" = rewrite iface "url" a2a.utils.constants in 1.3.1 defines only AGENT CARD WELL KNOWN PATH , so the two older card paths the middleware also matches, /.well-known/agent.json and /agent/authenticatedExtendedCard , are local constants. adk run In ADK 2.0, adk run takes the message as an argument: Usage: adk run OPTIONS AGENT QUERY So each agent can be checked in one command before the system is wired together: adk run agents/judge "Topic: Tokyo. Findings: Tokyo is a city." judge : {"status":"fail","feedback":"The finding 'Tokyo is a city' is far too brief and lacks the depth necessary to create a high-quality course. ... adk run agents/researcher "Find the population of Tokyo in 2020" researcher : The population of Tokyo in 2020 was approximately 14,047,594 people. run local.sh starts the agents with python3 and the web app with python3 -m uvicorn : ./run local.sh In Cloud Shell all five ports were listening 9 seconds after start. One prompt to the web app's stream endpoint: curl -sN -X POST http://localhost:8000/api/chat stream \ -H "Content-Type: application/json" \ -d '{"message": "Create a short course about the history of coffee", "user id": "cs"}' Counter {'progress': 24, 'result': 1} chars 36020 h2 42 24 progress events, then one course of 36,020 characters with 42 sections. requires-python = " =3.11" for the Container Build The agents run locally with pip, and the Dockerfiles install with uv sync . uv resolves for every Python version requires-python allows, so =3.10 fails against fastapi 0.165 in Cloud Build even though the container runs Python 3.12: error: No solution found when resolving dependencies for split markers: python full version == '3.10. ' cause: Because the requested Python version =3.10 does not satisfy Python =3.11 and fastapi==0.165.0 depends on Python =3.11, we can conclude that fastapi==0.165.0 cannot be used. Every pyproject.toml now has requires-python = " =3.11" , with no upper bound, and uv lock in each agent folder refreshes the lock files. uv lock only resolves and creates no virtual environment. a2a-sdk http-server for the A2A Routes a2a-sdk 1.x imports sse-starlette when the A2A server routes load, and ships it only in extras: sse-starlette; extra == 'all' sse-starlette; extra == 'fastapi' sse-starlette; extra == 'http-server' A container built from plain a2a-sdk stops at startup: File "/opt/venv/lib/python3.12/site-packages/a2a/compat/v0 3/jsonrpc adapter.py", line 6, in