Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RjfyTgmERTWLqzafu34Cth
1.1 KiB
1.1 KiB
adk
Companion code for Google Agent Development Kit (ADK) for Java: Your First Multi-Agent App on
ankurm.com. Two LlmAgents in a SequentialAgent: a researcher that calls a tool and
saves its answer to session state, and a writer whose instruction reads that state.
There is no Gemini key here. ScriptedLlm is a small BaseLlm that behaves like a tool-calling model, so the
agents, the tool call, the session and the state hand-off all run for real while the model is the one
scripted part.
mvn test -pl adk # rewrites output/*.txt
| File | Role |
|---|---|
OrderTools |
The tool: a public static method with @Schema parameter annotations |
ScriptedLlm |
The stand-in model; records every LlmRequest it receives |
SupportPipeline |
The two agents and the SequentialAgent that runs them |
SupportPipelineTest |
Three tests; each writes output/NN-*.txt. Map entries inside tool results print in a different order from run to run, so compare content, not line order |
Verified against com.google.adk:google-adk 1.11.0, JDK 25, JUnit 6.1.3.