A simple AI agent built with Google's Agent Development Kit (ADK) that can decrypt messages, inspired by the codebreakers of Bletchley Park.
This project was created for the Google's Agent Development Kit introductory workshop for the event "Build with AI" at GDG Bletchley Park.
- Simple & Educational: A clear, easy-to-understand example of a multi-tool AI agent.
- Multi-Tool Logic: Demonstrates how an agent can use one tool to get information (a key) and pass it to another tool to perform an action (decrypt a message).
- Enigma themed: The agent is styled as a "codebreaker" with a bit of personality in its responses. Because we are at Bletchley Park!
- Built with Google's ADK: A great starting point for anyone looking to learn the fundamentals of the Agent Development Kit.
To run this agent on your local machine, follow these steps.
Create a new Python virtual environment (note: Python 3.11 is preferred, otherwise you should use the --ignore-requires-python parameter in pip3 install):
Google Cloud SDK installed and authenticated.
- Create & Activate Virtual Environment (Recommended):
# Create
python -m venv .venv
# Activate (each new terminal)
# macOS/Linux: source .venv/bin/activate
# Windows CMD: .venv\Scripts\activate.bat
# Windows PowerShell: .venv\Scripts\Activate.ps1- Install the ADK:
pip install google-adk- Install the Google Cloud CLI: https://cloud.google.com/sdk/docs/install
- Run and follow the instructions:
gcloud init- Get an API key from Google AI Studio.
- Open the .env file located inside (enigma_cracker/) and copy-paste the following code.
GOOGLE_GENAI_USE_VERTEXAI=FALSE
GOOGLE_API_KEY=PASTE_YOUR_ACTUAL_API_KEY_HERE- Run the web interface:
- Navigate to the directory that contains the enigma_cracker folder.
- Run the following command:
adk web- Open http://127.0.0.1:8000 in your browser.
- Test the agent:
- Write an encrypted message, like: KHOOR
The cracker_agent has a simple, three-step mission:
- It calls the get_daily_setting tool to get the secret decryption key (which is hardcoded to 3).
- It then calls the decrypt_message tool, passing it the user's message and the key it just retrieved.
- Finally, it presents the decrypted message back to the user!