Leveraging the Google Agent Development Kit (ADK) and the underlying Gemini LLM to build Multi-Agent Applications with A2A protocol support using the Python programming language deployed to Azure App Service.
Aren’t There a Billion Python ADK Demos?
Yes there are.
Python has traditionally been the main coding language for ML and AI tools. The goal of this article is to provide a multi-agent test bed for building, debugging, and deploying multi-agent applications.
What you talkin ‘bout Willis?
So what is different about this lab compared to all the others out there?
This is one of the first deep dives into a Multi-Agent application leveraging the advanced tooling of Gemini CLI. The starting point for the demo was an existing Codelab- which was updated and re-engineered with Gemini CLI.
The original Codelab- is here:
Building a Multi-Agent System | Google Codelabs
What Is Python?
Python is an interpreted language that allows for rapid development and testing and has deep libraries for working with ML and AI:
Python Version Management
One of the downsides of the wide deployment of Python has been managing the language versions across platforms and maintaining a supported version.
The pyenv tool enables deploying consistent versions of Python:
GitHub - pyenv/pyenv: Simple Python version management
As of writing — the mainstream python version is 3.13. To validate your current Python:
python --version
Python 3.13.13
Azure App Service
Azure App Service is a fully managed Platform-as-a-Service (PaaS) that enables developers to build, deploy, and scale web applications, APIs, and mobile backends quickly. It supports multiple languages (.NET, Java, Node.js, Python, PHP) on Windows or Linux, offering built-in CI/CD, auto-scaling, and high security.
https://azure.microsoft.com/en-us/products/app-service
Why would I want Gemini CLI with Azure? Isn’t that a Google Thing?
Yes- Gemini CLI leverages the Google Cloud console and Gemini models but it is also open source and platform agnostic. Many applications are already cross-cloud so this enables familiar tools to be run natively on Microsoft Azure.
Azure App Services Configuration
To configure your Azure Service with the base system tools- this article provides a reference:
MCP Development with Python, and the Azure App Service
Why would I want Gemini CLI with Azure? Isn’t that a Google Thing?
Yes- Gemini CLI leverages the Google Cloud console and Gemini models but it is also open source and platform agnostic. Many applications are already cross-cloud so this enables familiar tools to be run natively on Microsoft Azure.
Gemini CLI
If not pre-installed you can download the Gemini CLI to interact with the source files and provide real-time assistance:
npm install -g @google/gemini-cli
Testing the Gemini CLI Environment
Once you have all the tools and the correct Node.js version in place- you can test the startup of Gemini CLI. You will need to authenticate with a Key or your Google Account:
▝▜▄ Gemini CLI v0.33.1
▝▜▄
▗▟▀ Logged in with Google /auth
▝▀ Gemini Code Assist Standard /upgrade no sandbox (see /docs) /model Auto (Gemini 3) | 239.8 MB
Node Version Management
Gemini CLI needs a consistent, up to date version of Node. The nvm command can be used to get a standard Node environment:
Agent Development Kit
The Google Agent Development Kit (ADK) is an open-source, Python-based framework designed to streamline the creation, deployment, and orchestration of sophisticated, multi-agent AI systems. It treats agent development like software engineering, offering modularity, state management, and built-in tools (like Google Search) to build autonomous agents.
The ADK can be installed from here:
Agent Skills
Gemini CLI can be customized to work with ADK agents. Both an Agent Development MCP server, and specific Agent skills are available.
More details are here:
To get the Agent Skills in Gemini CLI:
> /skills list
Available Agent Skills:
- adk-cheatsheet
MUST READ before writing or modifying ADK agent code. ADK API quick reference for Python — agent types, tool definitions, orchestration
patterns, callbacks, and state management. Includes an index of all ADK documentation pages. Do NOT use for creating new projects (use
adk-scaffold).
- adk-deploy-guide
MUST READ before deploying any ADK agent. ADK deployment guide — Agent Engine, Cloud Run, GKE, CI/CD pipelines, secrets, observability, and
production workflows. Use when deploying agents to Google Cloud or troubleshooting deployments. Do NOT use for API code patterns (use
adk-cheatsheet), evaluation (use adk-eval-guide), or project scaffolding (use adk-scaffold).
- adk-dev-guide
ALWAYS ACTIVE — read at the start of any ADK agent development session. ADK development lifecycle and mandatory coding guidelines —
spec-driven workflow, code preservation rules, model selection, and troubleshooting.
- adk-eval-guide
MUST READ before running any ADK evaluation. ADK evaluation methodology — eval metrics, evalset schema, LLM-as-judge, tool trajectory
scoring, and common failure causes. Use when evaluating agent quality, running adk eval, or debugging eval results. Do NOT use for API code
patterns (use adk-cheatsheet), deployment (use adk-deploy-guide), or project scaffolding (use adk-scaffold).
- adk-observability-guide
MUST READ before setting up observability for ADK agents or when analyzing production traffic, debugging agent behavior, or improving agent
performance. ADK observability guide — Cloud Trace, prompt-response logging, BigQuery Agent Analytics, third-party integrations, and
troubleshooting. Use when configuring monitoring, tracing, or logging for agents, or when understanding how a deployed agent handles real
traffic.
- adk-scaffold
MUST READ before creating or enhancing any ADK agent project. Use when the user wants to build a new agent (e.g. "build me a search agent")
or enhance an existing project (e.g. "add CI/CD to my project", "add RAG").
and the ADK documentation:
> /mcp list
Configured MCP servers:
🟢 adk-docs-mcp (from adk-docs-ext) - Ready (2 tools)
Tools:
- mcp_adk-docs-mcp_fetch_docs
- mcp_adk-docs-mcp_list_doc_sources
Where do I start?
The strategy for starting multi agent development is a incremental step by step approach.
First, the basic development environment is setup with the required system variables, and a working Gemini CLI configuration.
Then, ADK Multi-Agent is built, debugged, and tested locally. Finally — the entire solution is deployed to Azure App Service.
Setup the Basic Environment
At this point you should have a working Python environment and a working Gemini CLI installation. All of the relevant code examples and documentation is available in GitHub.
The next step is to clone the GitHub repository to your local environment:
cd ~
git clone https://github.com/xbill9/gemini-cli-azure
cd multi-appservice
Then run init2.sh from the cloned directory.
The script will attempt to determine your shell environment and set the correct variables:
source init2.sh
If your session times out or you need to re-authenticate- you can run the set_env.sh script to reset your environment variables:
source set_env.sh
Variables like PROJECT_ID need to be setup for use in the various build scripts- so the set_env script can be used to reset the environment if you time-out.
Finally install the packages and dependencies:
make install
Verify The ADK Installation
To verify the setup, run the ADK CLI locally with the researcher agent:
xbill@penguin:~/gemini-cli-azure/multi-appservice/agents$ adk run researcher
/home/xbill/.pyenv/versions/3.13.13/lib/python3.13/site-packages/authlib/_joserfc_helpers.py:8: AuthlibDeprecationWarning: authlib.jose module is deprecated, please use joserfc instead.
It will be compatible before version 2.0.0.
from authlib.jose import ECKey
/home/xbill/.pyenv/versions/3.13.13/lib/python3.13/site-packages/google/adk/features/_feature_decorator.py:72: UserWarning: [EXPERIMENTAL] feature FeatureName.PLUGGABLE_AUTH is enabled.
check_feature_enabled()
Log setup complete: /tmp/agents_log/agent.20260502_110602.log
To access latest log: tail -F /tmp/agents_log/agent.latest.log
{"asctime": "2026-05-02 11:06:02,580", "name": "root", "levelname": "INFO", "message": "Logging initialized for researcher", "filename": "logging_config.py", "lineno": 54, "service": "researcher", "log_level": "INFO"}
{"asctime": "2026-05-02 11:06:02,582", "name": "researcher.agent", "levelname": "INFO", "message": "Initialized researcher agent with model: gemini-2.5-flash", "filename": "agent.py", "lineno": 85}
{"asctime": "2026-05-02 11:06:02,584", "name": "google_adk.google.adk.cli.utils.envs", "levelname": "INFO", "message": "Loaded .env file for researcher at /home/xbill/gemini-cli-azure/multi-appservice/.env", "filename": "envs.py", "lineno": 83}
{"asctime": "2026-05-02 11:06:02,584", "name": "google_adk.google.adk.cli.utils.local_storage", "levelname": "INFO", "message": "Using per-agent session storage rooted at /home/xbill/gemini-cli-azure/multi-appservice/agents", "filename": "local_storage.py", "lineno": 84}
{"asctime": "2026-05-02 11:06:02,585", "name": "google_adk.google.adk.cli.utils.local_storage", "levelname": "INFO", "message": "Using file artifact service at /home/xbill/gemini-cli-azure/multi-appservice/agents/researcher/.adk/artifacts", "filename": "local_storage.py", "lineno": 110}
{"asctime": "2026-05-02 11:06:02,585", "name": "google_adk.google.adk.cli.utils.service_factory", "levelname": "INFO", "message": "Using in-memory memory service", "filename": "service_factory.py", "lineno": 266}
{"asctime": "2026-05-02 11:06:02,599", "name": "google_adk.google.adk.cli.utils.local_storage", "levelname": "INFO", "message": "Creating local session service at /home/xbill/gemini-cli-azure/multi-appservice/agents/researcher/.adk/session.db", "filename": "local_storage.py", "lineno": 60}
Running agent researcher, type exit to exit.
Test The ADK Web Interface
This tests the ADK agent interactions with a browser:
xbill@penguin:~/gemini-cli-azure/multi-appservice/agents$ adk web --host 0.0.0.0
/home/xbill/.pyenv/versions/3.13.13/lib/python3.13/site-packages/authlib/_joserfc_helpers.py:8: AuthlibDeprecationWarning: authlib.jose module is deprecated, please use joserfc instead.
It will be compatible before version 2.0.0.
from authlib.jose import ECKey
/home/xbill/.pyenv/versions/3.13.13/lib/python3.13/site-packages/google/adk/features/_feature_decorator.py:72: UserWarning: [EXPERIMENTAL] feature FeatureName.PLUGGABLE_AUTH is enabled.
check_feature_enabled()
2026-05-02 11:08:08,960 - INFO - service_factory.py:266 - Using in-memory memory service
2026-05-02 11:08:08,960 - INFO - local_storage.py:84 - Using per-agent session storage rooted at /home/xbill/gemini-cli-azure/multi-appservice/agents
2026-05-02 11:08:08,961 - INFO - local_storage.py:110 - Using file artifact service at /home/xbill/gemini-cli-azure/multi-appservice/agents/.adk/artifacts
/home/xbill/.pyenv/versions/3.13.13/lib/python3.13/site-packages/google/adk/cli/fast_api.py:204: UserWarning: [EXPERIMENTAL] InMemoryCredentialService: This feature is experimental and may change or be removed in future versions without notice. It may introduce breaking changes at any time.
credential_service = InMemoryCredentialService()
/home/xbill/.pyenv/versions/3.13.13/lib/python3.13/site-packages/google/adk/auth/credential_service/in_memory_credential_service.py:33: UserWarning: [EXPERIMENTAL] BaseCredentialService: This feature is experimental and may change or be removed in future versions without notice. It may introduce breaking changes at any time.
super(). __init__ ()
INFO: Started server process [7020]
INFO: Waiting for application startup.
+-----------------------------------------------------------------------------+
| ADK Web Server started |
| |
| For local testing, access at http://0.0.0.0:8000. |
+-----------------------------------------------------------------------------+
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
Then use the web interface — either on the local interface 127.0.0.1 or the catch-all web interface 0.0.0.0 -depending on your environment:
Special note for Google Cloud Shell Deployments- add a CORS allow_origins configuration exemption to allow the ADK agent to run:
adk web --host 0.0.0.0 --allow_origins 'regex:.*'
Multi Agent Design
The multi-agent deployment consists of 5 agents:
- Researcher
- Judge
- Orchestrator
- Content Builder
- Course Builder
An overview of the multi-agent system can be found here:
Multi-Agent A2A with the Agent Development Kit(ADK), Cloud Run, Agent Skills, and Gemini CLI
Running/Testing/Debugging Locally
The main Makefile has been extended with extensive targets for managing the agents on the local development environment.
The key targets include:
xbill@penguin:~/gemini-cli-azure/multi-appservice$ make help
Available commands:
--- Local Development ---
install - Install all dependencies for root, agents, and app
start - Start all services locally (alias for start-local)
stop - Stop all local services (alias for stop-local)
run - Start all services locally
status - Show status of local services
local - Show local service URLs
test - Run all tests (pytest)
lint - Run linting checks (ruff)
--- Azure ACI ---
deploy-aci - Deploy all services to Azure Container Instances (ACI)
destroy-aci - Delete ACI resources
status-aci - Show ACI status (alias: az-status)
endpoint-aci - Show ACI service endpoint (alias: endpoint)
test-e2e-aci - Run ACI E2E test
--- Shared Azure ---
az-login - Login to Azure CLI
acr-login - Login to ACR
acr-create - Create/Verify ACR and Resource Group
clean - Remove caches and logs
First check for local running agents:
xbill@penguin:~/gemini-cli-azure/multi-appservice$ make status
Checking status of locally running agents and servers...
--- Network Status ---
No services listening on expected ports (8000-8004, 5173).
--- Process Status ---
No matching processes found.
Then all the agents can be started together:
xbill@penguin:~/gemini-cli-azure/multi-appservice$ make start
Stopping any existing agent and server processes...
Starting all agents in background...
Waiting for sub-agents to start...
All agents started. Logs: researcher.log, judge.log, content_builder.log, orchestrator.log
Starting App Backend in background...
Starting Frontend dev server in background...
All services started. Logs: researcher.log, judge.log, content_builder.log, orchestrator.log, backend.log, frontend.log
Frontend: http://localhost:5173
Backend: http://localhost:8000
xbill@penguin:~/gemini-cli-azure/multi-appservice$ make status
Checking status of locally running agents and servers...
--- Network Status ---
tcp 0 0 0.0.0.0:8004 0.0.0.0:* LISTEN 8177/python3
tcp 0 0 0.0.0.0:8002 0.0.0.0:* LISTEN 7851/python3
tcp 0 0 0.0.0.0:8003 0.0.0.0:* LISTEN 7850/python3
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 8185/python3
tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN 7847/python3
tcp 0 0 0.0.0.0:5173 0.0.0.0:* LISTEN 8410/node
--- Process Status ---
The entire project can be linted and tested as unit:
> make lint
✦ I will run make lint to verify everything is clean.
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ Shell make lint │
│ │
│ ruff check . │
│ All checks passed! │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ The make lint check has passed successfully with no errors or warnings remaining in the codebase! Is there anything
else you would like to do?
And end to end tested:
✓ Shell Running the end-to-end tests for the project. │
│ │
│ Running end-to-end test against http://localhost:8000... │
│ {"type": "progress", "text": "\ud83d\ude80 Connected to backend, starting research..."} │
│ {"type": "progress", "text": "\ud83d\ude80 Starting the course creation pipeline..."} │
│ {"type": "progress", "text": "\ud83d\udd0d Research is starting..."} │
│ {"type": "progress", "text": "\ud83d\udd0d Researcher is gathering information..."} │
│ {"type": "progress", "text": "\u2696\ufe0f Judge is evaluating findings..."} │
│ {"type": "progress", "text": "\u2696\ufe0f Judge is evaluating findings..."} │
│ {"type": "progress", "text": "\u270d\ufe0f Building the final course content..."} │
│ {"type": "progress", "text": "\u270d\ufe0f Content Builder is writing the course..."} │
Then connect to the local front end:
And the entire agent system will run in the local environment:
Local Logging / Debugging
Gemini CLI has full access to the local agent logs for debugging and troubleshooting:
✦ I've analyzed the logs from your e2e run. All agents (researcher, judge, content_builder, orchestrator) and both frontend and backend services
started successfully. The course creation pipeline ran as expected: the orchestrator initiated the "history of the internet" course, the researcher
gathered information, the judge approved it, and the content builder generated the course content.
Deploying to Azure App Service
The project level Makefile has targets for managing the Agent deployment to serverless endpoints:
xbill@penguin:~/gemini-cli-azure/multi-appservice$ az login
A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`.
A utility script check the deployment to Azure App Service:
> make status-as
✦ I will run the make status-as command to show you the current status of your App Services.
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ Shell make status-as │
│ │
│ ./appservice/status-appservice.sh │
│ === Azure App Service Status === │
│ Resource Group: adk-rg-as │
│ Filtering for: adk-penguin-* │
│ --- adk-penguin-full --- │
│ State HostNames │
│ ------- ---------------------------------- │
│ Running adk-penguin-full.azurewebsites.net │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ The make status-as command confirms that your single-container deployment (adk-penguin-full) is currently Running.
You can then deploy the services:
> make deploy
✦ I am starting the deployment of the multi-agent microservices architecture to Azure App Service. This process builds
multiple containers and deploys several web apps, so it might take a few minutes.
And check the endpoint:
> make endpoint-as
The public endpoint for your application is:
https://adk-penguin-full.azurewebsites.net
The service will be visible in the Azure console:
Test End to End in App Service
The entire agent system is tested on the remote Azure endpoint:
✦ The make endpoint-appservice command has successfully retrieved and displayed the public URL for the Azure Container App.
> make e2e-test-appservice
│ E2E Test Completed successfully! │
│ make[1]: Leaving directory '/home/xbill/gemini-cli-azure/multi-appservice' │
│ Output too long and was saved to: │
│ /home/xbill/.gemini/tmp/multi-appservice/tool-outputs/session-7a0ea6eb-af02-462d-b737-692bcda1caa3/run_shell_comm │
│ and_w9nn9sur.txt │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ The End-to-End test against your Azure App Service deployment completed successfully! The multi-agent pipeline
successfully researched and generated a course on the history of the internet.
Running the Web Interface
Start a connection to the Cloud Run deployed app:
https://adk-penguin-full.azurewebsites.net
Then connect to the app :
Then use online course generator:
Final Gemini CLI Code Review
As a final step — Gemini CLI was used for a full code review of the project:
Overall Code Review Summary
After reviewing the app and agents directories, I can say this is an exceptionally well-engineered multi-agent system.
High-Level Architecture:
The architecture is sophisticated and effective. The use of a main orchestrator to manage a pipeline of specialized agents (researcher, judge,
content_builder) is a strong and scalable pattern. The inclusion of a research-and-refine loop with the judge agent is a standout feature that
significantly enhances the quality of the final output.
Key Strengths:
1. Expert ADK Usage: The project demonstrates a deep understanding of the Google ADK, using advanced features like SequentialAgent, LoopAgent,
RemoteA2aAgent, structured Pydantic outputs, and agent callbacks to their full potential.
2. Excellent Prompt Engineering: The instruction prompts for all agents are clear, specific, and well-crafted. This is the foundation of the
system's success.
3. Robust State Management: The custom StateCapturer agent is a brilliant, reusable utility that cleanly handles the flow of information between
agents.
4. Production-Ready Features: The system includes production-grade features like environment-aware authentication for service-to-service calls,
robust error handling, and detailed logging.
Summary
The Agent Development Kit (ADK) was used to build a multi-agent system with A2A support using the Gemini Flash LLM Model. This application was tested locally with Gemini CLI and then deployed to Azure App Service. Several key take-aways and lessons learned were summarized from debugging and testing the multi-agent system- including deep log reviews. Finally, Gemini CLI was used for a complete project code review.








Top comments (0)