Create a small runnable JVM program before adding tools.
1. Build configuration
Use a compatible JDK, Gradle and current ADK Kotlin dependencies from the supported setup. Keep cloud credentials in the runtime environment and outside source control.
2. Agent identity and instructions
Give the agent a narrow purpose and an explicit output expectation. Separate its name and description from task instructions and user input.
3. Runner and events
A runner executes the agent and emits events. Consume events without assuming each event is a complete user-facing answer; distinguish intermediate activity from final output.
Worked scenario
A single user input produces both a tool-related event and a final message. Printing every event as an answer would confuse the user.
Apply it
Create a minimal agent, record event categories and expose only the final user-facing result.
Check your understanding
You can trace one input through the runner to its final response. Explain the decision and show evidence from your implementation or design. If you cannot demonstrate it yet, revisit the relevant section before continuing.