agentleFS
JetBrainsKnown publisherJetBrains/koog/examples/simple-examples/CLAUDE.md

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

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 2 mentionsMar 2026: 5 mentionsApr 2026: 2 mentionsMay 2026: 2 mentionsJun 2026: 0 mentionsJul 2026: 4 mentionsAug 2026: 3 mentionsSep 2026: 12 mentionsOct 2026: 5 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the JetBrains/koog repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about JetBrains/koog

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

41 more on GitHub

On Bluesky · 12

7 more on Bluesky

On Hacker News · 1

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
  1. Very specific:

    All available tasks follow the pattern runExample*.

    line 26
  2. Very specific:

    Tool Definition: Use @Tool and @LLMDescription annotations on methods in classes extending ToolSet

    line 56
  3. Very specific:

    Event Handling: Use handleEvents { } to observe tool calls, errors, and completion

    line 59

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 test

All 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 dependencies
  • ai.koog:koog-ktor - Ktor server integration
  • ai.koog:agents-features-sql - SQL persistence feature
  • ai.koog:agents-features-a2a-server - Agent-to-agent server
  • ai.koog:agents-features-a2a-client - Agent-to-agent client
  • ai.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

  1. Tool Definition: Use @Tool and @LLMDescription annotations on methods in classes extending ToolSet
  2. Strategy Creation: Define agent behavior as state machine graphs using strategy { } DSL
  3. Agent Setup: Combine PromptExecutor, strategy, AIAgentConfig, and ToolRegistry
  4. 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 clean

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.