Most of the Google ADK sample are built with Python. Here is a simple Java ADK quick start code.

Github repo: https://github.com/andyyngo/ADK-agent-example

This guide explains how to use the ADK agent example repository.

Prerequisites

  • Java 11+
  • Google API credentials for Gemini model access

Setup and Installation

  1. Clone the repository and navigate to the directory:
    1
    2
    
    git clone https://github.com/andyyngo/ADK-agent-example.git
    cd ADK-agent-example
    
  2. Set up your Google API key:
    • For Linux/Mac:
      1
      2
      
      export GOOGLE_GENAI_USE_VERTEXAI=FALSE
      export GOOGLE_API_KEY=<Your key>
      

Running the Agent

  • Start the interactive CLI:
    1
    
    ./gradlew run