Build a multi-agent system | Hands On AI (Part 1)
By Google Cloud Tech
Key Concepts
- MCP (Model Context Protocol): A universal standard protocol that allows AI agents to connect to external tools, databases, and data sources.
- ADK (Agent Development Kit): A framework for building, orchestrating, and managing AI agents, including specialized workflow patterns.
- Agent-to-Agent (A2A) Protocol: A communication framework enabling agents to interact across organizational or system boundaries.
- Workflow Patterns:
- Sequential: Agents execute tasks in a specific, ordered chain.
- Parallel: Multiple agents execute tasks simultaneously to improve latency and performance.
- Loop: Agents repeat a set of logic until a specific condition or threshold is met.
- Cloud Run: A serverless platform used to deploy and host the MCP servers and agent services.
- Artifact Registry: A service for hosting and managing container images used in deployment.
1. Multi-Agent System Architecture
The system is structured in three distinct layers:
- Tooling Layer (Bottom): Comprised of MCP servers that act as adapters between the agent and the external world (APIs, databases, or general functions).
- Domain Workflow Layer (Middle): Where ADK agents are defined using specific workflow patterns (Sequential, Parallel, Loop) to handle specialized tasks.
- Orchestrator Layer (Top): The root agent that manages the overall system, utilizing the A2A protocol to coordinate between different agents.
2. MCP Server Implementation
The lab demonstrates three ways to build MCP servers:
- External API MCP: Wraps external APIs to provide agents with real-world data (e.g., currency exchange rates or specific game mechanics).
- General Function MCP: Executes deterministic logic, such as mathematical calculations, which are often more reliable when offloaded from the LLM.
- Database Toolbox MCP: Uses a declarative YAML-based configuration to connect to databases (e.g., Cloud SQL). This normalizes database interactions, accelerating development velocity compared to writing custom authentication and query logic.
3. Step-by-Step Development Process
- Environment Setup: Activate Google Cloud Shell, authenticate via
gcloud auth list, and clone the necessary GitHub repositories (Architect and Dungeon). - Infrastructure Provisioning: Use scripts to create a project, link billing, and enable essential APIs (SQL Admin, Storage, Cloud Build).
- Deployment: Use
gcloud builds submitwith acloudbuild.yamlfile to build container images, push them to the Artifact Registry, and deploy them to Cloud Run. - Tool Integration: Define tools either imperatively (Python functions with decorators) or declaratively (YAML configuration files).
- Testing: Use
ADK runfor terminal-based testing andADK webfor a full-featured UI to interact with agents, visualize responses, and debug traces.
4. Key Arguments and Perspectives
- Deterministic vs. Probabilistic: The presenters argue that while LLMs (like Gemini) are powerful for reasoning, they should delegate math and data retrieval to deterministic tools (MCP servers) to ensure accuracy.
- Declarative vs. Imperative: The lab highlights two ways to define tools: writing Python code (imperative) or using YAML configuration (declarative). Both have distinct benefits depending on the developer's preference and the complexity of the integration.
- Parallelization for Performance: Parallel agents are recommended for tasks without dependencies (e.g., searching multiple data sources simultaneously) to reduce latency and improve user experience.
5. Notable Quotes
- "MCP server is like this universal adapter... it allows you to do a complex design and it's a standard protocol for agent to communicate with the tooling." — Annie
- "In Google Cloud, almost all actions occur under an identity... if you want to be logging or deploying, you have to make sure that your default service account has the ability to actually write logs or to deploy." — Io
6. Synthesis and Conclusion
This lab provides a foundational understanding of building a modular, multi-agent system using the ADK and MCP standards. By separating the "brain" (LLM) from the "tools" (MCP servers) and organizing agent behavior through structured workflows (Sequential, Parallel, Loop), developers can create robust, scalable AI applications. The session successfully demonstrated how to deploy these components to a serverless environment (Cloud Run) and test them via a dedicated web interface, setting the stage for advanced agent-to-agent communication and "boss fight" scenarios in the concluding part of the series.
Chat with this Video
AI-PoweredLoad the transcript when you're ready to chat so the initial page stays lighter.
Related Videos

Stanford CS153 Frontier Systems | Building the Frontier Ecosystem
Stanford Online

'Things are going to be okay, in Canada and the U.S.': Thorne
BNN Bloomberg

I'M OUT: The $11 Trillion AI Bubble is Breaking!
Steven Van Metre

South Korea bets big on AI with nearly a trillion dollars of investment • FRANCE 24 English
FRANCE 24 English

The Bubble is Bursting... (Emergency Update)
Bravos Research

The AI Bubble Just Ended - Without Popping
Heresy Financial

AI Market Volatility, Europe Heat Wave, Venezuela Quakes Damage | Bloomberg This Weekend: June 27
Bloomberg Television