JetBrains/koog
Koog is a JVM (Java and Kotlin) framework for building predictable, fault-tolerant and enterprise-ready AI agents across all platforms – from backend services to Android and iOS, JVM, and even in-browser environments. Koog is based on our AI products expertise and provides proven solutions for complex LLM and AI problems
What it solves
Koog 是一个用于构建 AI 代理的框架,允许开发者使用惯用的 Kotlin 和 Java API 创建能够与工具交互、管理复杂工作流并与用户沟通的代理。它提供类型安全的方式将 LLM 集成到基于 JVM 的应用程序中,同时确保可靠性和可扩展性。
How it works
Koog 使用可组合的架构和 Kotlin DSL 来定义代理行为。它支持广泛的 LLM 提供商(包括 Google、OpenAI、Anthropic 和 Ollama),并允许在模型之间无缝切换。框架内置历史压缩、状态持久化以提升容错能力,以及基于向量嵌入的 RAG 知识检索功能。
Who it’s for
它面向希望在企业应用(如 Spring Boot、Ktor 等框架)中构建 AI 代理并嵌入使用的 JVM 与 Kotlin 开发者。
Highlights
- Multiplatform Support: Deploy agents across JVM, JS, WasmJS, Android, and iOS.
- Agentic Capabilities: Support for parallel tool calls, Model Context Protocol (MCP) integration, and flexible graph-based workflows.
- Observability: Built-in OpenTelemetry exporters for monitoring with tools like Langfuse and W&B Weave.
- Reliability: Built-in retries and agent state persistence to recover from failures.
- RAG Integration: Native support for knowledge retrieval and memory via vector embeddings.