Skip to content

boldbat/ADK-Demo-07

Repository files navigation

ADK Demo

A demonstration project showcasing Google's Agent Development Kit (ADK) with practical examples of AI agents for weather information and code generation.

Overview

This project contains two main agent implementations:

  1. Weather Agent - An interactive weather assistant that provides mock weather information for various cities
  2. Code Agent - A multi-stage code generation pipeline that writes, reviews, and refactors Python code

Features

  • Interactive Weather Agent: Provides weather information for cities including London, Paris, Tokyo, Colombo, and Boralesgamuwa
  • Code Generation Pipeline: Sequential agent workflow for code writing, reviewing, and refactoring
  • Google ADK Integration: Built using Google's Agent Development Kit with Gemini models
  • Mock Data: Uses mock weather data for demonstration purposes

Project Structure

/
├── weather_agent/
│   ├── __init__.py
│   └── agent.py              # Weather agent implementation
├── code_agent/
│   ├── __init__.py
│   └── agent.py              # Code generation agent pipeline
├── weather_agent_completed.py # Complete weather agent example
├── weather_agent_starter.py   # Starter template for weather agent
├── pyproject.toml             # Project configuration
├── requirements.txt           # Dependencies
└── README.md                  # This file

Prerequisites

  • Python 3.13 or higher
  • Google Cloud API access with appropriate credentials
  • Google ADK library

Installation

  1. Clone the repository:

    git clone https://github.com/boldbat/ADK-Demo.git
    cd ADK-Demo
  2. Install dependencies:

    pip install -r workshop_adk/requirements.txt

    Or using uv:

    cd workshop_adk
    uv sync

Configuration

Set up your Google API credentials:

export GOOGLE_API_KEY="your-api-key-here"

Usage

Running the Weather Agent

Run the interactive weather agent:

cd workshop_adk
python weather_agent_completed.py

Example interactions:

  • "What's the weather in London?"
  • "Weather in Colombo?"
  • "How's the weather in Boralesgamuwa?"

Code Agent

The code agent can be imported and used programmatically:

from code_agent.agent import root_agent
# Use the agent for code generation tasks

Agent Details

Weather Agent

  • Model: Gemini
  • Tools: get_weather(city: str) function
  • Supported Cities: London, Paris, Tokyo, Colombo, Boralesgamuwa
  • Context: Optimized for Sri Lankan users

Code Agent Pipeline

  • Code Writer Agent: Generates Python code from specifications
  • Code Reviewer Agent: Reviews code for correctness, readability, and best practices
  • Code Refactorer Agent: Applies review feedback to improve the code
  • Sequential Execution: Agents run in pipeline order

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

  • Built with Google's Agent Development Kit (ADK)
  • Uses Google's Gemini language models
  • Inspired by practical AI agent use cases

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages