How budioktaviyan/agentic-kotlin works
This small Kotlin example configures a Koog assistant for current news in Indonesia. The principal workflow starts in main(), runs the agent with a news prompt, and prints the result. The agent is configured with a Google model executor, a user-facing SayToUser tool, and event handlers that log tool calls and completion. Only Main.kt is present as runtime source; framework-internal dispatch details are not shown.
Main entry points: Main.kt News agent
Components 8
Other components
- Invoker
- Program entry
src/main/kotlin/id/kotlin/agent/Main.kt - News agent
src/main/kotlin/id/kotlin/agent/Main.kt - Prompt executor
src/main/kotlin/id/kotlin/agent/Main.kt - Google LLM
- SayToUser tool
- Event handlers
src/main/kotlin/id/kotlin/agent/Main.kt - Console
Connections 8
- Invoker → Program entry: starts
- Program entry → News agent: runs prompt
- News agent → Prompt executor: requests completion
- Prompt executor → Google LLM: uses client
- News agent → SayToUser tool: registers tool
- News agent → Event handlers: handles events
- Event handlers → Console: logs events
- Program entry → Console: prints result