This collection provides ready-to-use sample agents built as native Android applications on top of ADK Kotlin. Each sample is a complete Android app that demonstrates how to integrate ADK agents into a mobile experience using Jetpack Compose.
Follow these steps to set up and run the sample agents:
-
Prerequisites:
- Install ADK Kotlin: Follow the Build ADK agents for Android for project configuration and dependency setup.
- Android Studio (latest stable release) with Android SDK (compileSdk 34+, minSdk 26+).
- Java 17 or later.
- Set Up API Key: Each sample requires a Gemini API key. You can
create a key in Google AI Studio on the
API Keys page. Provide it
via the
GOOGLE_API_KEYenvironment variable or inlocal.properties.
-
Clone this repository:
To start working with the ADK Android samples, first clone the public
adk-samplesrepository:git clone https://github.com/google/adk-samples.git cd adk-samples/android -
Explore the Agents:
- Navigate to the
agents/directory. - Browse the subdirectories. Each contains a complete Android
application with its own
README.md.
- Navigate to the
-
Run an Agent:
- Choose an agent from the
agents/directory. - Open the agent's directory as a project in Android Studio (e.g.,
agents/fun-facts). - Follow the instructions in that agent's
README.mdfile for specific setup and running the app.
- Choose an agent from the
Notes:
These agents have been built and tested using Google models. You can test these samples with other models as well. Please refer to ADK Tutorials to use other models for these samples.
.
├── android # Contains all the Android sample code
│ ├── agents # Contains individual agent samples
│ │ ├── agent1 # Specific agent directory (complete Android app)
│ │ │ └── README.md # Agent-specific instructions
│ │ ├── agent2
│ │ │ └── README.md
│ │ ├── ...
│ └── README.md # This file (Repository overview)