Author: Darren Lester
- Repo Overview
- Quick Start: Local Development
- Associated Articles
- Developing With This Repo
- Application Design
- Container Architecture & Local Dev
- Cloud Infrastructure & Deployment
- Testing
- Historical Notes About This Repo
Rickbot is a multi-personality chatbot built using Google Gemini, the Agent Development Kit (ADK), Gemini CLI, and the Google Agent-Starter-Pack. It has many personalities, such as Rick Sanchez (Rick and Morty), Yoda, The Donald, Jack Burton (Big Trouble in Little China), and Dazbot.
The original Rickbot repo is here. The intent with this repo is to demonstrate leveraging some additional tools in order to evolve the first Rickbot iteration. In particular:
- Updating the original Rickbot to make use of the Google Agent Development Kit (ADK)
- Creating the initial project folder, GitHub repo and CI/CD using the Agent-Starter-Pack.
- Adding new capabilities to Rickbot.
- Using Gemini CLI to help with the overall migration journey.
To get the application running on your local machine, follow these three steps:
- Configure Environment:
source scripts/setup-env.sh - Start the Backend:
In your first terminal:
make api
- Start the Frontend:
In a second terminal:
cd src/nextjs_fe && npm install && npm run dev
For advanced local setup (Docker, Streamlit, etc.), refer to the Container & Local Dev Guide.
See my Medium articles which are intended to supplement this Rickbot repo:
- Creating a Rick & Morty Chatbot with Google Cloud and the Gen AI SDK
- Adding Authentication and Authorisation to our Rickbot Streamlit Chatbot with OAuth and the Google Auth Platform
- Building the Rickbot Multi-Personality Agentic Application using Gemini CLI, Google Agent-Starter-Pack and the Agent Development Kit (ADK)
- Updating the Rickbot Multi-Personality Agentic Application - Integrate Agent Development Kit (ADK) using Gemini CLI
- Guided Implementation of Agent Development Kit (ADK) with the Rickbot Multi-Personality Application (Series)
- Productionising the Rickbot ADK Application and More Gemini CLI Tips
- Get Schwifty with the FastAPI: Adding a REST API to our Agentic Application (with Google ADK)
- Give Your AI Agents Deep Understanding — Creating a Multi-Agent ADK Solution: Design Phase
- Using the Loop Pattern to Make My Multi-Agent Solution More Robust (with Google ADK)
DO THIS STEP BEFORE EACH DEV SESSION
To configure your shell for a development session, source the scripts/setup-env.sh script. This will handle authentication, set the correct Google Cloud project, install dependencies, and activate the Python virtual environment.
### Prereqs ###
# If running on WSL, consider first installing wslu
# For the Staging/Dev environment (default)
source scripts/setup-env.sh
# For the Production environment
source scripts/setup-env.sh --target-env PROD
# If authentication is not required
source scripts/setup-env.sh --noauthNote that you can automate loading the setup-env.sh script by installing direnv, and then including the .envrc in the project folder. E.g.
sudo apt install direnv
# Add eval "$(direnv hook bash)" to your .bashrc
echo "eval \"\$(direnv hook bash)\"" >> ~/.bashrc
# Then, from this project folder:
direnv allow| Command | Description |
|---|---|
source scripts/setup-env.sh |
Setup Google Cloud project and auth with Dev/Staging. Parameter options:[--noauth] [-t|--target-env <DEV|PROD>] |
make install |
Install all required dependencies using uv |
make playground |
Launch ADK UI for testing agent locally and remotely. This runs uv run adk web src |
make api |
Launch the FastAPI backend:uv run fastapi dev src/main.py |
make streamlit |
Run Streamlit FE:MOCK_AUTH_USER="mock.user@example.com" uv run streamlit run src/streamlit_fe/app.py |
make docker-adk |
Launch ADK UI in Docker |
make docker-streamlit |
Run Streamlit FE in Docker |
make docker-frontend |
Launch React Frontend in Docker |
make docker-backend |
Launch API and Backend in Docker |
make docker-front-and-back |
Launch all services (frontend + backend) in Docker |
make docker-unified |
Launch Unified Container (Frontend + Backend in one) |
make docker-clean |
Remove any orphaned containers |
make test |
Run unit tests |
make test-all |
Run unit and integration tests (takes a little longer) |
make test-ui |
Run frontend UI tests (equivalent to npm test in src/nextjs_fe) |
make lint |
Run code quality checks (codespell, ruff, mypy) |
make terraform |
Plan Terraform, prompt for authorisation, then apply |
uv run jupyter lab |
Launch Jupyter notebook |
For full command options and usage, refer to the Makefile.
The notebooks/ directory contains Jupyter notebooks used for development and management tasks that are not part of the core application deployment.
The notebooks/file_search_store.ipynb notebook is used to manage the File Search Store for the Rickbot agent. This store is used for RAG (Retrieval Augmented Generation) to provide specific personas with access to reference documents.
Note
The File Search Store is a feature of the Gemini Developer API. It is compatible with the google-genai SDK (version >= 1.49.0) but does not currently work with Vertex AI. Therefore, this notebook enables specific environment configurations to interact with the Gemini Developer API directly for store management.
- All tests are in the
src/testsfolder. - The tests and how to run them are documented in
docs/testing.md.
With ADK CLI:
uv run adk run src/rickbot_agentWith ADK Web GUI:
# Last param is the location of the agents
uv run adk web src
# Or we can use the Agent Starter Git make aliases
make install && make playgroundFor detailed instructions on running individual components (Next.js, FastAPI, Streamlit) or the full orchestration in Docker, see the Container Architecture & Local Dev guide.
The new React-based UI (Next.js) is located in src/nextjs_fe. It connects to the FastAPI backend (make api) to provide a modern, chat-based interface.
- Node.js (v18 or later)
- Python backend running (
make api)
Open your browser to http://localhost:3000.
- Dynamic Personas: The UI fetches available personalities (Rick, Yoda, etc.) directly from the backend API (
/personas). - Streaming Responses: Uses Server-Sent Events (SSE) for real-time streaming of agent responses.
- Interactive Tool Visibility: Real-time visual feedback on agent actions, displaying specific tool usage (e.g., Google Search) with icons and status indicators.
- File Uploads: Supports uploading images and text files for multimodal interactions.
Detailed information regarding the system architecture, design decisions, and cloud deployment procedures has been moved to specialized documentation:
- Application Design (docs/design.md): Architectural rationales, persona logic, and storage strategies.
- Deployment Guide (deployment/README.md): Google Cloud infrastructure, CI/CD pipelines, Secret Manager, and environment variables.
- Container Technicals (docs/containers.md): Docker build stages, local container execution, and troubleshooting.
- Testing (docs/testing.md): Unit, integration, and UI testing procedures.
This project, its GitHub repo, and associated CI/CD pipeline were initially setup using the Agent Starter Kit. Much of the original template files have since been removed from the project. But this section has been retained to provide an overview of this process. But do read this article for a more detailed walkthrough.
