adk-kotlin-agent-builder
Skill307 starsChanged 53 days agoApache-2.0View on GitHub
Builds ADK Kotlin agents: LlmAgent with instructions and tools, @Tool function tools generated by KSP, hand-written tools, agent-as-tool and MCP, Sequential / Parallel / Loop agents and LLM transfer between sub-agents, callbacks and plugins, session state, artifacts, long-running and confirmation-gated tools, running with InMemoryRunner, and unit tests with a fake Model. Use when asked to create an agent, add or fix a tool, branch or loop between agents, run steps in parallel, pause for user approval, read or write session state, or test an agent. Don't use for build, dependency and CI questions (use adk-kotlin-setup).
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adk-kotlin-setupSkill
- root-only-skillSkill
- skill1Skill
- skill2Skill
- mismatchedSkill
- skill-unauthorizedSkill
- valid-skillSkill
- mismatchedSkill
- skill1Skill
- echo_skillSkill
- py_skillSkill
- cast-fireballSkill
- summon-familiarSkill
- cast-fireballSkill
- summon-familiarSkill
- translateSkill
- cast-fireballSkill
- summon-familiarSkill
- translateSkill
The file
Files
ADK Kotlin Agent Builder
Checked against main after release 1.1.0 (September 2026).
The references teach patterns and the rules behind most failures; they are not an API listing. The API is close to adk-python but not identical. If a symbol does not resolve, read core/src/*/kotlin/com/google/adk/kt/ (JVM- and Android-only APIs such as MCP and the persistent session services live outside commonMain) rather than guessing a neighbouring name. When a reference and the code disagree, the code is right.
References
| Task | Reference |
| First agent, running it, reading events, streaming | getting-started.md |
| The rules that cause most runtime failures | best-practices.md |
@Tool, hand-written tools, agent-as-tool, MCP, long-running and confirmation-gated tools | tools.md |
| Sequential, parallel and loop agents, LLM transfer | workflow-agents.md |
| Callbacks and plugins | callbacks-and-plugins.md |
| State, sessions, artifacts, memory | state-sessions-artifacts.md |
| Tests with a fake model | testing.md |
For Java callers, copy the patterns in examples/java/, a javac-only module that keeps the Java surface working.
Coming from adk-python
| Python | Kotlin |
LlmAgent(instruction="...") | LlmAgent(instruction = Instruction("...")) |
FunctionTool(func) | @Tool on the function (KSP generates the tool), or subclass FunctionTool |
tool_context.state[k] = v | context.updateState(k, v); read with context.state[k] |
ToolContext, CallbackContext | Context |
BaseToolset | Toolset |
LongRunningFunctionTool | isLongRunning = true, or @Tool(isLongRunning = true) |
output_schema=MyModel | outputSchema = Schema(...), built by hand |
runner.run_async(...) | runner.runAsync(...), a Flow<Event> |
event.is_final_response() | event.isFinalResponse |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

