koog / simple-examples
CLAUDE.md4.6k starsChanged 7 months agoApache-2.0View on GitHub
This is the simple-examples project within the Koog Framework repository. It contains executable examples demonstrating various AI agent patterns and capabilities, from basic calculator agents to advanced features like persistence, streaming, and agent-to-agent communication. Examples require API keys for LLM providers. Configure them via: Each example has a dedicated Gradle task: All available tasks follow the pattern runExample*. See build.gradle.kts for the complete list. This project uses Gradle composite build to depend on the parent Koog framework (settings.gradle.kts:). Changes in…
Trending
More talk lately.about the whole repository
Who's talking about JetBrains/koog
- A Hacker News story“Koog, a Kotlin-based framework to build and run Al agents in idiomatic Kotlin”Hacker News · May 22, 2025 · 79 points
- @johnoreilly.dev“Yay, just created my first (very basic) AI Agent using the new Koog framework (github.com/JetBrains/koog) …”Bluesky · Jun 10, 2025 · 21 likes
- @vadim-briliantov.bsky.social“If for some reason you haven’t seen it yet, we released Koog — one of the most advanced frameworks for …”Bluesky · Sep 7, 2025 · 19 likes
- @johnoreilly.dev“Koog: a Kotlin-based framework designed to build and run AI agents entirely in idiomatic Kotlin (just …”Bluesky · May 22, 2025 · 17 likes
- @johnoreilly.dev“Inspired by proandroiddev.com/building-age... I updated the Koog agent (github.com/JetBrains/koog) in …”Bluesky · Aug 17, 2025 · 6 likes
The biggest 5 of 59 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 59
Talked about on GitHub, Bluesky and Hacker News (59 times).
On GitHub · 46
- Jul 31, 2025Adding missing watchos targets — oshai/kotlin-logging2 reactions · 5 comments
- Sep 7, 2026build(deps): bump the koog group with 2 updates — edjchapman/HelloDave1 reaction · 1 comment
- Jul 27, 2026build(deps): bump the koog group with 2 updates — edjchapman/HelloDave1 reaction · 1 comment
- Jul 20, 2026build(deps): bump ai.koog:koog-agents from 1.0.0 to 1.1.1 — Yuonsa/CommitGenius1 reaction · 1 comment
- Dec 23, 2025Bump ai.koog:koog-agents from 0.5.4 to 0.6.0 — Marko-Veljovic/Memoriori1 reaction · 1 comment
41 more on GitHub
- Oct 29, 2025Refactoring to Multiplatform Protocol with KMP — phodal/auto-dev1 reaction
- Sep 15, 2025Duplicate LibVersionKt causing Android build failure — modelcontextprotocol/kotlin-sdk1 reaction · 2 comments
- Oct 5, 2026build(deps): Bump ai.koog:koog-agents from 0.8.0 to 1.3.0 — geoknoesis/kastor0 reactions
- Oct 3, 2026agent-skills.github.jetbrains.koog: 1.2.0 → 1.3.0 — sudosubin/agents.nix0 reactions
- Oct 3, 2026build(deps): bump the all-dependencies group with 14 updates — storytellerF/A0 reactions
- Oct 3, 2026Bump ai.koog:agents-tools from 1.2.0 to 1.3.0 in the koog group — T45K/koog-google-search-tool0 reactions · 1 comment
- Oct 1, 2026Bump the gradle group with 2 updates — siarhei-luskanau/koog-models0 reactions
- Sep 28, 2026agent-skills.github.jetbrains.koog: init at 1.2.0 — sudosubin/agents.nix0 reactions
- Sep 28, 2026Bump ai.koog:koog-agents from 1.2.0 to 1.3.0 — myda-chi/frictionless0 reactions
- Sep 28, 2026chore(deps): bump ai.koog:koog-agents from 1.2.0 to 1.3.0 in /android — kaeawc/auto-mobile0 reactions · 1 comment
- Sep 26, 2026Bump ai.koog:http-client-ktor from 1.2.0 to 1.3.0 — UgaiSoftwares/ACPSample0 reactions
- Sep 26, 2026Bump ai.koog:agents-features-trace from 1.2.0 to 1.3.0 — UgaiSoftwares/ACPSample0 reactions · 1 comment
- Sep 24, 2026release: update Package.swift for 1.3.0 — JetBrains/koog-spm0 reactions
- Sep 5, 2026Bump ai.koog:agents-features-trace from 1.1.1 to 1.2.0 — UgaiSoftwares/ACPSample0 reactions · 1 comment
- Sep 5, 2026Bump ai.koog:http-client-ktor from 1.1.1 to 1.2.0 — UgaiSoftwares/ACPSample0 reactions
- Sep 5, 2026Bump ai.koog:agents-tools from 1.1.1 to 1.2.0 in the koog group — T45K/koog-google-search-tool0 reactions · 1 comment
- Sep 1, 2026build(deps): bump ai.koog:koog-agents from 0.8.0 to 1.2.0 in /examples/demo-compose-app — secure-workflows/koog0 reactions · 1 comment
- Aug 31, 2026chore(deps): bump koogVersion from 1.1.1 to 1.2.0 — elenavanengelenmaslova/mocknest-serverless0 reactions · 2 comments
- Aug 27, 2026build(deps): bump ai.koog:koog-agents from 0.6.0 to 1.1.1 in /app — rishabhpandey139/Summora-AI0 reactions
- Jul 24, 2026Koog MkDocs Material icons and nested content tabs are rendered as raw Markdown — BinaryTape/Open-AIDoc0 reactions
- Jul 20, 2026release: update Package.swift for 1.1.1 — JetBrains/koog-spm0 reactions
- May 25, 2026chore: update skills for koog 1.0.0 — javiergbravo/koog-skills-mcp0 reactions
- May 22, 2026Bump ai.koog:koog-agents from 0.7.1 to 1.0.0 — Valentine-456/AICodePlugin0 reactions
- Apr 23, 2026chore: update skills for koog 0.8.0 — javiergbravo/koog-skills-mcp0 reactions
- Apr 7, 2026build(deps): bump ai.koog:koog-agents from 0.6.0 to 0.7.3 in /examples/demo-compose-app — xfqwdsj/koog-fixed-llm-provider0 reactions · 1 comment
- Mar 31, 2026Bump ai.koog:koog-agents-jvm from 0.7.2 to 0.7.3 — Iarylkin/auto-issue0 reactions · 1 comment
- Mar 23, 2026Bump ai.koog:koog-agents-jvm from 0.7.1-rc3 to 0.7.2 — Iarylkin/auto-issue0 reactions · 1 comment
- Mar 23, 2026fix(koog-ktor): parsing timeouts configuration — BLannoo/koog0 reactions
- Mar 13, 2026Add Java API to Koog documentation — BLannoo/koog0 reactions · 2 comments
- Mar 9, 2026build(deps): bump ai.koog:koog-agents from 0.6.0 to 0.6.4 in /app — talosross/SummaryYou0 reactions
- Feb 26, 2026chore(deps): bump koog from 0.6.2 to 0.6.3 — phodal/routa.kt0 reactions
- Feb 13, 2026add multi executor and history compression strategy — hernandazevedo/kotlin-ai-agent-koog0 reactions
- Oct 30, 2025Bump ai.koog:koog-agents from 0.4.1 to 0.5.2 — iammohdzaki/Starter-Project-Ktor0 reactions
- Sep 4, 2025Check trending repo: JetBrains/koog — uibm/trending-watcher0 reactions · 1 comment
- Sep 4, 2025Check trending repo: JetBrains/koog — uibm/trending-watcher0 reactions · 1 comment
- Sep 3, 2025Check trending repo: JetBrains/koog — uibm/trending-watcher0 reactions · 1 comment
- Sep 3, 2025Check trending repo: JetBrains/koog — uibm/trending-watcher0 reactions · 1 comment
- Sep 2, 2025Check trending repo: JetBrains/koog — uibm/trending-watcher0 reactions · 1 comment
- Sep 1, 2025Check trending repo: JetBrains/koog — uibm/trending-watcher0 reactions · 1 comment
- Aug 6, 2025[FEAT] Introduce Koog for full agentic capabilities — Open-Distributed-Edge-Agents/EdgeGenAI0 reactions
- Jun 20, 2025Interesting Projects — PenumbraOS/mabl0 reactions
On Bluesky · 12
- Jun 10, 2025Yay, just created my first (very basic) AI Agent using the new Koog framework (github.com/JetBrains/koog) from @jetbrains.com . Agent… — @johnoreilly.dev21 likes and reposts · 1 reply
- Sep 7, 2025If for some reason you haven’t seen it yet, we released Koog — one of the most advanced frameworks for building AI agents! Targeting… — @vadim-briliantov.bsky.social19 likes and reposts
- May 22, 2025Koog: a Kotlin-based framework designed to build and run AI agents entirely in idiomatic Kotlin (just announced at #KotlinConf keynote)… — @johnoreilly.dev17 likes and reposts · 1 reply
- Aug 17, 2025Inspired by proandroiddev.com/building-age... I updated the Koog agent (github.com/JetBrains/koog) in ClimateTraceKMP sample… — @johnoreilly.dev6 likes and reposts
- Jul 3, 2025Did you know that a lot of Kotlin AI libraries are built on top of Ktor? The new Koog library for building agents is doing all its… — @vergauwensimon.bsky.social4 likes and reposts
7 more on Bluesky
- Sep 23, 2026https://github.com/JetBrains/koog more like this: https://agentwire.thecompound.tech/aw/1f6ane — @agentwire.thecompound.tech2 likes and reposts
- Aug 11, 2026Does anyone have experience with this #Kotlin library for building agents? Thoughts? I need Kotlin as it'd like to build an Android app.… — @alexn.org2 likes and reposts · 3 replies
- Oct 4, 2025Trying out new Functional Agents support in Koog 0.5.0 (github.com/JetBrains/koog) ....also have set things up now to invoke population and… — @johnoreilly.dev2 likes and reposts · 1 reply
- Sep 30, 2025More information about Koog here github.com/JetBrains/koog. @vadim-briliantov.bsky.social (Koog Technical Lead) has also been writing a… — @johnoreilly.dev2 likes and reposts · 1 reply
- Sep 10, 2025JetBrains Koog : « We didn’t just port Python concepts to Kotlin. We reimagined what an AI agent framework could be »… — @nfonrose.bsky.social1 likes and repost · 1 reply
- May 26, 2025https://github.com/JetBrains/koog KoogはKotlinでAIエージェントを構築・実行するためのフレームワークです。 自然なKotlinでAIエージェントを構築できます。 外部システムやAPIにアクセスするツールでエージェントを拡張可能です。 — @topickapp.bsky.social1 likes and repost
- May 25, 2025Koog, a Kotlin-based framework to build and run Al agents in idiomatic Kotlin | Discussion — @hackernewsbot.bsky.social1 likes and repost
On Hacker News · 1
- May 22, 2025Koog, a Kotlin-based framework to build and run Al agents in idiomatic Kotlin79 points · 2 comments
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- a2a/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- add-java-code-snippets-in-docsSkill
- split-jvm-nonjvmSkill
- arithmetic-evaluatorSkill
- weather-retrievalSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
All available tasks follow the pattern runExample*.
- Very specific: line 56
Tool Definition: Use @Tool and @LLMDescription annotations on methods in classes extending ToolSet
- Very specific: line 59
Event Handling: Use handleEvents { } to observe tool calls, errors, and completion
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project Overview
This is the simple-examples project within the Koog Framework repository. It contains executable examples demonstrating various AI agent patterns and capabilities, from basic calculator agents to advanced features like persistence, streaming, and agent-to-agent communication.
Environment Setup
Examples require API keys for LLM providers. Configure them via:
Running Examples
Each example has a dedicated Gradle task:
# Run any example
./gradlew runExampleCalculator
./gradlew runExampleStreamingWithTools
./gradlew runExampleRoutingViaGraph
# Build the project
./gradlew assemble
# Run tests
./gradlew testAll available tasks follow the pattern runExample*. See build.gradle.kts for the complete list.
Project Architecture
Composite Build Setup
This project uses Gradle composite build to depend on the parent Koog framework (settings.gradle.kts:). Changes in the main framework are immediately available without publishing.
Key Dependencies
ai.koog:koog-agents- Meta-module with core agent dependenciesai.koog:koog-ktor- Ktor server integrationai.koog:agents-features-sql- SQL persistence featureai.koog:agents-features-a2a-server- Agent-to-agent serverai.koog:agents-features-a2a-client- Agent-to-agent clientai.koog:agents-test- Testing utilities (test scope)
Example Structure
Examples are organized by capability:
- Core patterns:
calculator/,guesser/,tone/- Basic agent patterns with tools and strategies - Agent-to-agent (A2A):
a2a/- Inter-agent communication examples - Advanced features:
memory/,snapshot/,moderation/- Memory, persistence, content filtering - External integration:
websearch/,attachments/,client/- External API integration - Structured output:
structuredoutput/- Schema-based output formatting and streaming - Banking routing:
banking/- Complex multi-agent routing patterns
Common Patterns
- Tool Definition: Use
@Tooland@LLMDescriptionannotations on methods in classes extendingToolSet - Strategy Creation: Define agent behavior as state machine graphs using
strategy { }DSL - Agent Setup: Combine
PromptExecutor, strategy,AIAgentConfig, andToolRegistry - Event Handling: Use
handleEvents { }to observe tool calls, errors, and completion
Example from calculator/Calculator.kt:
val toolRegistry = ToolRegistry {
tool(AskUser)
tools(CalculatorTools().asTools())
}
val agent = AIAgent(
promptExecutor = executor,
strategy = CalculatorStrategy.strategy,
agentConfig = agentConfig,
toolRegistry = toolRegistry
) {
handleEvents { /* ... */ }
}Common Development Tasks
# Build without running tests
./gradlew assemble
# Run a specific example
./gradlew runExampleCalculator
# Run tests
./gradlew test
# Clean build artifacts
./gradlew cleanDoes 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.

