Skip to content

arcana261/google-adk-learning-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google ADK Learning Playground

A Python project for learning and experimenting with Google's Agent Development Kit (ADK) using Claude API as the LLM provider.

Features

  • Python 3.10+ support
  • Poetry for dependency management
  • Google ADK integration
  • Claude API (Anthropic) as the LLM provider
  • Example agents demonstrating basic and advanced features
  • Tool integration examples

Prerequisites

  • Python 3.10 or higher
  • Poetry package manager
  • Anthropic API key (Claude API)

Installation

  1. Clone the repository:
git clone <your-repository-url>
cd google-adk-learning-playground
  1. Install dependencies using Poetry:
poetry install
  1. Set up your environment variables:
cp .env.example .env
  1. Edit .env and add your Anthropic API key:
ANTHROPIC_API_KEY=your_api_key_here

You can get your API key from Anthropic Console.

Usage

Running the Simple Agent Example

The simple agent demonstrates basic conversation capabilities:

poetry run python google_adk_playground/simple_agent.py

This example shows:

  • How to initialize an agent with Claude API
  • Basic conversation flow
  • Context maintenance across messages

Running the Tool Agent Example

The tool agent demonstrates how to use custom tools:

poetry run python google_adk_playground/tool_agent.py

This example shows:

  • How to define custom tools
  • Tool registration with the agent
  • Agent using tools to answer queries
  • Available tools:
    • get_current_time: Returns the current date and time
    • calculate_sum: Calculates the sum of two numbers

Project Structure

google-adk-learning-playground/
├── google_adk_playground/
│   ├── __init__.py
│   ├── simple_agent.py       # Basic agent example
│   └── tool_agent.py          # Agent with custom tools
├── pyproject.toml             # Poetry configuration
├── .env.example               # Environment variables template
├── README.md                  # This file
└── CLAUDE.md                  # Project context for Claude Code

Google ADK Overview

Google Agent Development Kit (ADK) is a framework for building AI agents. Key features include:

  • LLM Integration: Support for various LLM providers (we're using Claude)
  • Tool System: Easy integration of custom tools and functions
  • Agent Orchestration: Built-in support for multi-agent systems
  • State Management: Persistent conversation context
  • Extensibility: Plugin system for custom behaviors

Claude API Configuration

This project uses Claude API (from Anthropic) as the LLM provider. The default model is claude-sonnet-4-20250514, which offers:

  • Strong reasoning capabilities
  • Fast response times
  • Good balance of quality and cost
  • Extended context window

You can change the model in the agent configuration by modifying the model parameter in the agent creation.

Development

Adding a New Example

  1. Create a new Python file in the google_adk_playground/ directory
  2. Import necessary modules from google.adk and anthropic
  3. Follow the pattern from existing examples
  4. Update this README with usage instructions

Running with Poetry

All commands should be run using Poetry to ensure the correct virtual environment:

poetry run python <script_name.py>

Installing Additional Dependencies

poetry add <package-name>

Resources

License

This is a learning playground project. Feel free to use and modify as needed.

Contributing

This is a personal learning project, but suggestions and improvements are welcome!

Troubleshooting

API Key Issues

If you encounter authentication errors:

  1. Ensure your .env file exists and contains a valid API key
  2. Check that the API key is correctly formatted
  3. Verify the key is active in your Anthropic console

Dependency Issues

If you encounter dependency conflicts:

poetry update

Python Version Issues

Ensure you're using Python 3.10 or higher:

python --version

If needed, use pyenv or similar tools to manage Python versions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages