Back to Adk Python

SKILL

.agents/skills/adk-setup/SKILL.md

2.0.0b12.2 KB
Original Source

Set up the local development environment for ADK Python.

Prerequisites

Check the following before proceeding:

  1. Python 3.11+

    bash
    python3 --version
    
  2. uv package manager (required — do not use pip/venv directly)

    bash
    uv --version
    

    If not installed:

    bash
    curl -LsSf https://astral.sh/uv/install.sh | sh
    

Setup Steps

Run these commands from the project root:

  1. Create and activate a virtual environment:

    bash
    uv venv --python "python3.11" ".venv"
    source .venv/bin/activate
    
  2. Install all dependencies for development:

    bash
    uv sync --all-extras
    
  3. Install development tools:

    bash
    uv tool install pre-commit
    uv tool install tox --with tox-uv
    
  4. Install addlicense (requires Go):

    bash
    go version && go install github.com/google/addlicense@latest
    

    [!NOTE] If Go is not installed, tell the user: "Go is required for the addlicense tool. Please install Go from https://go.dev/dl/ and then re-run the adk-setup skill to complete the setup."

  5. Set up pre-commit hooks:

    bash
    pre-commit install
    
  6. Verify everything works by running tests locally:

    bash
    pytest tests/unittests -n auto
    

Key Commands Reference

TaskCommand
Run unit tests (Fast)pytest tests/unittests
Run tests across all Python versionstox
Format codebasepre-commit run --all-files
Run tests in parallelpytest tests/unittests -n auto
Run specific test filepytest tests/unittests/agents/test_llm_agent.py
Launch web UIadk web path/to/agents_dir
Run agent via CLIadk run path/to/my_agent
Build wheeluv build