mawa (Multi-Agent Web App) is an experimental project designed to demonstrate and teach how to build a simple web application using the Google Agent Development Kit (ADK). This repository serves primarily as an educational resource, offering a hands-on approach to understanding agent-based systems and their integration into web environments with Google's tools.
While not intended for production use, mawa provides a practical learning environment. Learning new concepts by applying them to familiar problems is a powerful method, and this project aims to facilitate that process for those interested in the Google ADK and multi-agent architectures.
To run mawa locally, follow the instructions below.
Before you begin, ensure you have the following installed:
- Python 3.9+: This project uses modern Python features.
- Poetry: A dependency management and packaging tool for Python. If you don't have it, you can install it by following the instructions on the Poetry website.
-
Clone the repository:
git clone [https://github.com/your-username/mawa.git](https://github.com/your-username/mawa.git) cd mawa -
Install dependencies using Poetry:
poetry install
To enable the application to interact with the Google Gemini API, you need to set up your API key:
-
Navigate to the
src/mawadirectory:cd src/mawa -
Create a new file named
.envin this directory. -
Add the following content to the
.envfile, replacing<your gemini API key>with your actual Google Gemini API key:GOOGLE_GENAI_USE_VERTEXAI=FALSE GOOGLE_API_KEY=<your gemini API key>
Note: You can obtain a Google Gemini API key from the Google AI Studio.
You have two primary methods to run the mawa application: using the ADK web server or directly via PyCharm.
This method utilizes the Google ADK's built-in web server capabilities.
-
Ensure you are in the
srcdirectory:cd src(If you are still in
src/mawa, navigate back one level:cd ..) -
Execute the following command to start the ADK web server:
poetry run adk web
The application should now be accessible in your web browser, typically at
http://localhost:8000.
For developers using PyCharm, you can configure a run configuration to launch the application.
-
Open your project in PyCharm.
-
Create a new Python Run/Debug Configuration:
- Go to
Run->Edit Configurations... - Click the
+icon and selectPython.
- Go to
-
Configure the settings:
- Module name: Select
uvicorn - Parameters: Set to
mawa.main:app --reload --app-dir src - Environment variables: Add
GOOGLE_API_KEY=<your gemini API key>(replace with your actual key). You can click the folder icon to easily add this variable.
- Module name: Select
-
Apply the changes and Run the configuration.
This project is purely for educational purposes and to demonstrate concepts related to the Google Agent Development Kit. It is not designed for production environments and may not follow best practices for security, scalability, or robustness required for such use cases. Use it as a learning tool to explore the capabilities of ADK and multi-agent web applications.