Installing ADK¶
Create & activate virtual environment¶
We recommend creating a virtual Python environment using venv:
Now, you can activate the virtual environment using the appropriate command for your operating system and environment:
# Mac / Linux
source .venv/bin/activate
# Windows CMD:
.venv\Scripts\activate.bat
# Windows PowerShell:
.venv\Scripts\Activate.ps1
Install ADK¶
(Optional) Verify your installation:
You can either use maven or gradle to add the google-adk
and google-adk-dev
package.
google-adk
is the core Java ADK library. Java ADK also comes with a pluggable example SpringBoot server to run your agents seamlessly. This optional
package is present as part of google-adk-dev
.
If you are using maven, add the following to your pom.xml
:
<dependencies>
<!-- The ADK Core dependency -->
<dependency>
<groupId>com.google.adk</groupId>
<artifactId>google-adk</artifactId>
<version>0.2.0</version>
</dependency>
<!-- The ADK Dev Web UI to debug your agent (Optional) -->
<dependency>
<groupId>com.google.adk</groupId>
<artifactId>google-adk-dev</artifactId>
<version>0.2.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
Here's a complete pom.xml file for reference.
If you are using gradle, add the dependency to your build.gradle:
dependencies {
implementation 'com.google.adk:google-adk:0.2.0'
implementation 'com.google.adk:google-adk-dev:0.2.0'
}
You should also configure Gradle to pass -parameters
to javac
. (Alternatively, use @Schema(name = "...")
).
Next steps¶
- Try creating your first agent with the Quickstart