DEV Community

xbill for AWS Community Builders

Posted on • Originally published at xbill999.Medium on

Cross Cloud ADK Visual Builder with Amazon Lightsail and Gemini CLI

Leveraging the Google Agent Development Kit (ADK) and the underlying Gemini LLM to build low code apps with the Python programming language deployed to the Lightsail container service on AWS.

Aren’t There a Billion Python MCP 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 minimal viable basic working MCP stdio server that can be run locally without any unneeded extra code or extensions.

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:

Welcome to Python.org

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:~/gemini-cli-aws/mcp-lightsail-python-aws$ python --version
Python 3.13.12
Enter fullscreen mode Exit fullscreen mode

Amazon Lightsail

Amazon Lightsail is an easy-to-use virtual private server (VPS) provider and cloud platform designed by AWS for simpler workloads, offering developers pre-configured compute, storage, and networking for a low, predictable monthly price. It is ideal for hosting small websites, simple web apps, or creating development environments.

More information is available on the official site here:

Amazon's Simple Cloud Server | Amazon Lightsail

And this is the direct URL to the console:

https://lightsail.aws.amazon.com/ls/webapp/home/containers
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-cli-aws/mcp-lightsail-python-aws$ gemini

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

? for shortcuts 
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 shift+tab to accept edits 3 GEMINI.md files | 1 MCP server
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 > Type your message or @path/to/file
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ~/.../mcp-lightsail-python-aws (main*) no sandbox (see /docs) /model Auto (Gemini 3) | 239.8 MB
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

Docker Version Management

The AWS Cli tools and Lightsail extensions need current version of Docker. If your environment does not provide a recent docker tool- the Docker Version Manager can be used to downlaod the latest supported Docker:

Install

AWS CLI

The AWS CLI provides a command line tool to directly access AWS services from your current environment. Full details on the CLI are available here:

Install Docker, AWS CLI, and the Lightsail Control plugin for containers

Lightsail Control Plugin

The Lightsail Plugin allows the AWS CLI tools to interact with Lightsail. The full GitHub repo is available here:

GitHub - aws/lightsailctl: Amazon Lightsail CLI Extensions

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)

This seems like a lot of Configuration!

Getting the key tools in place is the first step to working across Cloud environments. For a deeper dive- a project with a similar setup can be found here:

MCP Development with Amazon Lightsail and Gemini CLI

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/gemini-cli-aws/adkui-lightsail
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
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 locally with Agent1:

xbill@penguin:~/gemini-cli-aws/adkui-lightsail$ adk run Agent1
Log setup complete: /tmp/agents_log/agent.20260322_094639.log
To access latest log: tail -F /tmp/agents_log/agent.latest.log
/home/xbill/.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/xbill/.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/xbill/.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/xbill/.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 Trenton NJ
[Agent1]: The weather in Trenton, NJ is currently mostly sunny with a temperature of 51°F (11°C), though it feels like 47°F (9°C). The humidity is around 78%, and there is about a 1% chance of rain.

The forecast for today, Sunday, March 22, 2026, includes light rain during the day and night, with a 10% chance of rain during the day and a 75% chance at night. Temperatures are expected to range between 43°F (6°C) and 72°F (22°C). The humidity will be around 66%.


Deploying to Amazon Lightsail

The first step is to refresh the AWS credentials in the current build environment:

xbill@penguin:~/gemini-cli-aws/mcp-lightsail-python-aws$ aws login --remote
Enter fullscreen mode Exit fullscreen mode

Then a utility script caches the credentials on the local system for building:

xbill@penguin:~/gemini-cli-aws/adkui-lightsail$ source save-aws-creds.sh 
Exporting AWS credentials...
Successfully saved credentials to .aws_creds
The Makefile will now automatically use these for deployments.
xbill@penguin:~/gemini-cli-aws/adkui-lightsail$ 
Enter fullscreen mode Exit fullscreen mode

Run the deploy version on the local system:

xbill@penguin:~/gemini-cli-aws/adkui-lightsail$ make deploy
./deploy-lightsail.sh
Loading AWS credentials from .aws_creds...
Building Docker image...
[+] Building 13.0s (12/12) FINISHED docker:default
 => [internal] load build definition from Dockerfile 0.0s 0.0s
Enter fullscreen mode Exit fullscreen mode

You can validate the final result by checking the messages:

xbill@penguin:~/gemini-cli-aws/adkui-lightsail$ make lightsail-status
-------------------------------------
| GetContainerServices |
+-------------+-------------+-------+
| Deployment | State | URL |
+-------------+-------------+-------+
| ACTIVE | DEPLOYING | None |
+-------------+-------------+-------+
Enter fullscreen mode Exit fullscreen mode

Once the container is deployed:

xbill@penguin:~/gemini-cli-aws/mcp-lightsail-python-aws$ make status
Checking AWS Lightsail service status for mcp-lightsail-python-aws...
--------------------------------------------
| GetContainerServices |
+-------------+--------+-----------+-------+
| Deployment | Power | State | URL |
+-------------+--------+-----------+-------+
| ACTIVE | nano | RUNNING | None |
+-------------+--------+-----------+-------+
Enter fullscreen mode Exit fullscreen mode

You can then get the endpoint:

xbill@penguin:~/gemini-cli-aws/adkui-lightsail$ make endpoint
https://agent-service.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/
xbill@penguin:~/gemini-cli-aws/adkui-lightsail$ 
Enter fullscreen mode Exit fullscreen mode

The service will be visible in the AWS Lightsail console:

https://lightsail.aws.amazon.com/ls/webapp/us-east-1/container-services/agent-service/deployments

Running the ADK Web Interface

Start a connection to the Lightsail Deployed ADK:

https://agent-service.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/
Enter fullscreen mode Exit fullscreen mode

This will bring up the ADK UI. Select the sub-agent “Agent1”:

Run a Second 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:

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 Lightsail deployment in 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)