This repository provides a collection of sample AI agents and reference implementations for both Python and Java. It is designed to help developers understand, customize, and deploy various agent-based solutions using the Agent Development Kit (ADK). Each agent is organized as an independent project with its own documentation, code, and deployment resources. Common utilities and shared modules are also included for reuse and extension.
- Clone the repository:
git clone https://github.com/caron14/adk-samples.git- Navigate to the project directory:
cd adk-samples- Install the required dependencies:
uv syncThe dependency for development can be installed:
uv sync --extra dev- Set up the environment variables:
Create a
.envfile in the root directory and add the following variables:GOOGLE_GENAI_USE_VERTEXAI=TRUE GOOGLE_CLOUD_PROJECT=YOUR_PROJECT_ID GOOGLE_CLOUD_LOCATION=LOCATION
- If you are using Google Cloud Vertex AI, ensure you have the necessary permissions and have set up your Google Cloud project as described in the Set up the model section below.
If you are using a different model, adjust the environment variables accordingly.
For example, if you are using OpenAI, you might need to set
OPENAI_API_KEYand other relevant variables.ROOT_AGENT_MODEL='your-root-agent-model-id' # ex. 'gemini-2.0-flash-lite-001' SPECIFIC_AGENT_MODEL='your-specific-agent-model-id' # ex. 'gemini-2.0-flash-lite-001'
- Run the agent:
python -m agents.<agent_name>
pylint/balck/isort/mypy/pytest
uv run pylint $(git ls-files '*.py')
uv run black .
uv run isort .
uv run mypy .
uv run pytest Test the black formatter to ensure the CI pipeline will pass:
uv run black --check --diff .uv run pytest -qPrompting Guide by OpenAI