Welcome to the Koog Framework Examples collection! This directory contains multiple example projects showcasing various AI agent implementations and patterns using the Koog framework for Kotlin.
This examples directory hosts several independent projects, each demonstrating different aspects of the Koog framework:
A comprehensive collection of runnable Koog framework examples ranging from basic concepts to advanced features.
Key Examples:
- Calculator agents with tool calling
- Banking assistant with routing capabilities
- Error fixing and code analysis agents
- Structured output and streaming examples
- OpenTelemetry integration and tracing
- Memory and persistence patterns
- … and more
➡️ View all examples and run instructions →
A complete Kotlin Multiplatform application built with Compose Multiplatform that demonstrates Koog integration in mobile and desktop environments.
Features:
- Calculator Agent: Arithmetic operations with tool calling
- Weather Agent: Weather information retrieval
- Settings Management: API key configuration
- Modern UI: Jetpack Compose interface
- Cross-platform: Android, iOS, and Desktop support
➡️ Setup and run instructions →
An advanced trip planning agent demonstrating complex multi-API integration:
- Natural language conversation interface
- Google Maps and weather API integration
- Iterative planning with user feedback
- MCP (Model Context Protocol) integration
- Multi-LLM executor support
A Spring Boot application showcasing Koog integration in Java environments:
- REST API for chat interactions
- Reactive programming patterns
- OpenAI GPT-4 integration via Koog
- Configurable AI persona
Interactive Jupyter notebooks for hands-on learning with the Koog framework. Each notebook provides step-by-step tutorials with executable examples:
| Notebook | Description |
|---|---|
| Calculator.ipynb | Basic calculator agent with tool calling |
| Banking.ipynb | Banking assistant with routing capabilities |
| Chess.ipynb | Chess-playing agent with choice selection |
| Attachments.ipynb | Using structured Markdown and attachments |
| BedrockAgent.ipynb | AWS Bedrock integration |
| OpenTelemetry.ipynb | Tracing and observability |
| Langfuse.ipynb | Export traces to Langfuse |
| Weave.ipynb | W&B Weave integration |
| ...and more | Additional notebooks for various features |
- 🔍 Explore Examples: Start with
simple-examplesfor comprehensive runnable examples - 📱 Mobile Development: Try
demo-compose-appfor multiplatform applications - 📓 Interactive Learning: Open notebooks in IntelliJ IDEA for hands-on tutorials
- 🌐 Advanced Integration: Explore specialized projects like trip-planning or Spring Boot
-
Open in IntelliJ IDEA:
- IntelliJ IDEA has built-in Kotlin Notebook support
- Navigate to
notebooksdirectory - Open any
.ipynbfile
-
Set up environment variables:
# macOS/Linux export OPENAI_API_KEY=your_openai_key export ANTHROPIC_API_KEY=your_anthropic_key # Windows set OPENAI_API_KEY=your_openai_key set ANTHROPIC_API_KEY=your_anthropic_key
Each project has a dedicated README with instructions
- Java 17+
- Kotlin 1.9+
- API Keys for your chosen AI providers
This project is licensed under the Apache License 2.0.