DEV Community

xbill for Google Developer Experts

Posted on • Originally published at xbill999.Medium on

Running the ADK Visual Builder on an AWS EC2 VM

Leveraging the Google Agent Development Kit (ADK) and the underlying Gemini LLM to build low code in the Python programming language deployed securely on the Amazon AWS Cloud platform.

Amazon EC2 Instance Configuration

To configure your EC2 Instance with the base system tools- this article provides a reference:

Cross Cloud Agent Development with the Google ADK and Amazon EC2

The key step is to verify that port 8000 is open for Internet traffic to allow access to the ADK:

✦ The AWS configuration for instance i-03456018d00d13504 confirms that port 8000 is open to external traffic.

   1. Security Group (sg-079649e89ed485925): A TCP rule allows traffic on port 8000 from all sources (0.0.0.0/0).
   2. Network ACL: The subnet's NACL allows all inbound and outbound traffic (0.0.0.0/0 on all protocols).

Enter fullscreen mode Exit fullscreen mode

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:

admin@ip-172-31-70-211:~$ python --version
Python 3.13.12
admin@ip-172-31-70-211:~$ 
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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

admin@ip-172-31-70-211:~$ gemini

  ▝▜▄ Gemini CLI v0.33.1
    ▝▜▄
   ▗▟▀ Logged in with Google /auth
  ▝▀ Gemini Code Assist Standard /upgrade
Enter fullscreen mode Exit fullscreen mode

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:

GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

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 Development Kit (ADK)

Where do I start?

The strategy for starting low code agent development is a incremental step by step approach.

The agents in the demo are based on the original code lab:

Create and deploy low code ADK (Agent Deployment Kit) agents using ADK Visual Builder | Google Codelabs

First, the basic development environment is setup with the required system variables, and a working Gemini CLI configuration.

Then, a minimal ADK Agent is built with the visual builder. Next — the entire solution is deployed to Google Cloud Run.

Setup the Basic Environment

At this point you should have a working Python environment and a working Gemini CLI installation. The next step is to clone the GitHub samples repository with support scripts:

cd ~
git clone https://github.com/xbill9/adkui
Enter fullscreen mode Exit fullscreen mode

Then run init.sh from the cloned directory.

The script will attempt to determine your shell environment and set the correct variables:

source init.sh
pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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.

Verify The ADK Installation

To verify the setup, run the ADK CLI with Agent1:

admin@ip-172-31-70-211:~/adkui$ adk run Agent1
Log setup complete: /tmp/agents_log/agent.20260313_141019.log
To access latest log: tail -F /tmp/agents_log/agent.latest.log
/home/admin/.pyenv/versions/3.13.12/lib/python3.13/site-packages/google/adk/cli/utils/agent_loader.py:248: UserWarning: [EXPERIMENTAL] _load_from_yaml_config: This feature is experimental and may change or be removed in future versions without notice. It may introduce breaking changes at any time.
  if root_agent := self._load_from_yaml_config(actual_agent_name, agents_dir):
/home/admin/.pyenv/versions/3.13.12/lib/python3.13/site-packages/google/adk/features/_feature_decorator.py:81: UserWarning: [EXPERIMENTAL] feature FeatureName.AGENT_CONFIG is enabled.
  check_feature_enabled()
/home/admin/.pyenv/versions/3.13.12/lib/python3.13/site-packages/google/adk/cli/cli.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/admin/.pyenv/versions/3.13.12/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__ ()
Running agent Agent1, type exit to exit.
[user]: what is the weather in Hoboken NJ
[Agent1]: The weather in Hoboken, NJ, is currently cloudy with a temperature of approximately 36-38°F (2-3°C), feeling like 31-33°F (0-0°C). There is a 10% chance of snow, though some forecasts indicate a higher chance of snow (70-80%) this evening, with skies clearing later.

The forecast for today (Friday, March 13, 2026) in Hoboken indicates cloudy conditions during the day, becoming clear at night. Temperatures are expected to range between 30°F (-1°C) and 42°F (6°C).


Running the ADK Web Interface

First- start the ADK interface:

admin@ip-172-31-70-211:~/adkui$ adk web --host 0.0.0.0
2026-03-13 14:14:12,212 - INFO - service_factory.py:266 - Using in-memory memory service
2026-03-13 14:14:12,212 - INFO - local_storage.py:84 - Using per-agent session storage rooted at /home/admin/adkui
2026-03-13 14:14:12,213 - INFO - local_storage.py:110 - Using file artifact service at /home/admin/adkui/.adk/artifacts
/home/admin/.pyenv/versions/3.13.12/lib/python3.13/site-packages/google/adk/cli/fast_api.py:192: 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/admin/.pyenv/versions/3.13.12/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 [6733]
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)

Enter fullscreen mode Exit fullscreen mode

Connecting to the ADK

First — validate your public IP address:

admin@ip-172-31-70-211:~/adkui$ gemini

  ▝▜▄ Gemini CLI v0.33.1
    ▝▜▄
   ▗▟▀ Logged in with Google /auth
  ▝▀ Gemini Code Assist Standard /upgrade

 > what is my public IP
✦ I will use curl to fetch your public IP address from ifconfig.me.

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ Shell curl -s ifconfig.me [current working directory /home/admin/adkui] (Fetch public IP address using ifconfig.me) │
│ │
│ 3.236.173.161 │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ Your public IP address is 3.236.173.161.
Enter fullscreen mode Exit fullscreen mode

Then start a connection on port 8000:

http://3.236.173.161:8000/dev-ui/
Enter fullscreen mode Exit fullscreen mode

This will bring up the ADK UI:

Run a Sub Agent

Connect to the ADK and select “Agent2”. Give the Agent this prompt:

Create an image of a cat.
Enter fullscreen mode Exit fullscreen mode

The sub agent will then generate the cat image:

Visual Build an Agent

To use the ADK visual builder- select the pencil Icon next to Agent 2. You can drill down into the Agent design:

Run a more Complex Agent

The final agent — Agent3 is a more complex agent that uses image generation to generate comic panels.

Swtich to Agent3 and use the following prompt:

Create a Comic Book based on the following story,

Title: The Story of Momotaro

The story of Momotaro (Peach Boy) is one of Japan's most famous and beloved folktales. It is a classic "hero's journey" that emphasizes the virtues of courage, filial piety, and teamwork.

The Miraculous Birth
Long, long ago, in a small village in rural Japan, lived an elderly couple. They were hardworking and kind, but they were sad because they had never been blessed with children.

One morning, while the old woman was washing clothes by the river, she saw a magnificent, giant peach floating downstream. It was larger than any peach she had ever seen. With great effort, she pulled it from the water and brought it home to her husband for their dinner.

As they prepared to cut the fruit open, the peach suddenly split in half on its own. To their astonishment, a healthy, beautiful baby boy stepped out from the pit.

"Don't be afraid," the child said. "The Heavens have sent me to be your son."

Overjoyed, the couple named him Momotaro (Momo meaning peach, and Taro being a common name for an eldest son).

The Call to Adventure
Momotaro grew up to be stronger and kinder than any other boy in the village. During this time, the village lived in fear of the Oni—ogres and demons who lived on a distant island called Onigashima. These Oni would often raid the mainland, stealing treasures and kidnapping villagers.

When Momotaro reached young adulthood, he approached his parents with a request. "I must go to Onigashima," he declared. "I will defeat the Oni and bring back the stolen treasures to help our people."

Though they were worried, his parents were proud. As a parting gift, the old woman prepared Kibi-dango (special millet dumplings), which were said to provide the strength of a hundred men.

Gathering Allies
Momotaro set off on his journey toward the sea. Along the way, he met three distinct animals:

The Spotted Dog: The dog growled at first, but Momotaro offered him one of his Kibi-dango. The dog, tasting the magical dumpling, immediately swore his loyalty.

The Monkey: Further down the road, a monkey joined the group in exchange for a dumpling, though he and the dog bickered constantly.

The Pheasant: Finally, a pheasant flew down from the sky. After receiving a piece of the Kibi-dango, the bird joined the team as their aerial scout.

Momotaro used his leadership to ensure the three animals worked together despite their differences, teaching them that unity was their greatest strength.

The Battle of Onigashima
The group reached the coast, built a boat, and sailed to the dark, craggy shores of Onigashima. The island was guarded by a massive iron gate.

The Pheasant flew over the walls to distract the Oni and peck at their eyes.

The Monkey climbed the walls and unbolted the Great Gate from the inside.

The Dog and Momotaro charged in, using their immense strength to overpower the demons.

The Oni were caught off guard by the coordinated attack. After a fierce battle, the King of the Oni fell to his knees before Momotaro, begging for mercy. He promised to never trouble the villagers again and surrendered all the stolen gold, jewels, and precious silks.

The Triumphant Return
Momotaro and his three companions loaded the treasure onto their boat and returned to the village. The entire town celebrated their homecoming.

Momotaro used the wealth to ensure his elderly parents lived the rest of their lives in comfort and peace. He remained in the village as a legendary protector, and his story was passed down for generations as a reminder that bravery and cooperation can overcome even the greatest evils.
Enter fullscreen mode Exit fullscreen mode

This will start the agent process:

Finally when the process is complete:

#go to the project folder
cd ~/adkui

#Go to the output folder
cd ~/adkui/output

#start local web server
python -m http.server 8000
Enter fullscreen mode Exit fullscreen mode

Then verify the Agent output on the external URL:

http://3.236.173.161:8000/comic.html
Enter fullscreen mode Exit fullscreen mode

This will present the final comic:

Summary

The Agent Development Kit was used to visually define a basic agent and added the Google Search Tool. This Agent was tested locally with the CLI and then with the ADK web tool. Then, several sample ADK agents were run directly from the EC2 instance from AWS. This approach validates that cross cloud tools can be used — even with more complex agents.

Enter fullscreen mode Exit fullscreen mode

Top comments (0)