Releases: JetBrains/koog
1.0.0
This is the first stable release of Koog. The 1.0 line establishes a long-term-supported surface across the framework: modules are split into stable and beta streams so production code can pin to APIs that won't break without a deprecation cycle, every previously deprecated API has been removed, and the graph DSL's node names are finalized. Alongside that, 1.0 lands a redesigned Java interop layer, decouples HTTP transport from Ktor, brings OpenTelemetry to Kotlin Multiplatform, and adds Anthropic prompt caching.
Major Features
Stable / Beta module split
- Modules now ship under two streams — stable and beta — so production code can pin to APIs that won't break without a deprecation cycle (#2011, #2000).
- All previously
@DeprecatedAPIs have been removed across event handlers, pipeline, agent/strategy/DSL, tools, persistence, executors, MCP, models, Spring autoconfig, and RAG utilities. The 1.0 line carries no deprecated surface (#2001).
Java interop, redesigned
- Uniform blocking API: All Java-facing entry points follow one pattern —
xxxBlockingin Kotlin, plainxxxfrom Java. ExplicitExecutorService/Executorparameters are gone; the agent's configured dispatcher is used instead (#2005). - Deadlock-free reentrant calls: Kotlin → Java → Kotlin call chains on a single-threaded executor no longer deadlock — the reentrant dispatch is detected and skipped (#1945, KG-750).
Graph DSL, finalized
- The
String-input nodes (nodeLLMRequest,nodeLLMRequestOnlyCallingTools,nodeLLMRequestWithoutTools,nodeLLMRequestForceOneTool,nodeLLMRequestMultipleChoices,nodeLLMRequestStreaming,nodeLLMRequestStructured) keep their original names; theMessage.User-input variants now use anodeLLMSendMessage*prefix. nodeExecuteToolsreturnsReceivedToolResultsdirectly — connect it tonodeLLMSendMessage/nodeLLMSendToolResults*instead of relying on the old auto-writeback behavior.- New
nodeLLMModerateText(name, moderatingModel, includeCurrentPrompt)accepts plainStringinput alongside the existingnodeLLMModerateMessage(Message.User)(#2035).
Memory and persistence
AIAgentStoragein checkpoints: Custom key-value data is now saved and restored alongside agent checkpoints; a newrunFromCheckpointAPI restores execution without requiring the Persistence feature (#1998, #1828).- Persistence for planner agents: Planner-based agents now support checkpoint/restore (#1786, KG-673).
- Amazon Bedrock AgentCore as
LongTermMemory: Managed vector-memory backend on Bedrock (#1855, KG-603). LongTermMemoryreliability: Storage errors no longer silently swallowed — newFailurePolicyplus a fix for double-ingestion during active sessions. Feature promoted from experimental (#1963).
HTTP transport, decoupled from Ktor
- Pluggable HTTP factory: LLM clients now take a
KoogHttpClient.Factoryinstead of a KtorHttpClient. A Ktor-backed default is auto-discovered on JVM/Android; users can plug in Java's HTTP client, OkHttp, or Spring'sRestClientwithout touching Koog internals (#2006, #1948, KG-821, KG-818). - Ollama on
KoogHttpClient: Ollama now routes streaming, headers, and endpoint config through the same abstraction as every other provider (#1993, KG-833).
OpenTelemetry on every target
- Multiplatform OpenTelemetry: Langfuse, Weave, and DataDog now run on every Koog target via a Ktor-based OTLP/JSON exporter, not just JVM (#1942, KG-785). Please note: the WasmJS target is not included for now (please see KG-846 for more details).
- Built-in metrics: Agents emit standard
gen_ai.client.token.usage,gen_ai.client.operation.duration, and a customgen_ai.client.tool.countmetric — plug straight into existing Prometheus/Grafana stacks (#1381, KG-136).
Anthropic prompt caching
- Automatic and explicit cache control: End-to-end caching support — automatic on requests, explicit breakpoints on messages, cache tokens in usage metrics. Cuts cost and latency for agents that re-send long system prompts (#1812, KG-707).
New providers
- LiteRT LLM client: New client for running Google's LiteRT models locally (#1980).
- Oracle Database
ChatHistoryProviderfor Oracle-standardized deployments (#1851, KG-772).
Improvements
- New models: Anthropic Opus 4.7 (#1861), OpenAI GPT-5.5 and GPT-5.5 Pro (#1913), DeepSeek V4 Flash and Pro (#1914), additional Bedrock models — Kimi K 2.5, MiniMax 2.5, Gemma 3, GPT OSS (#1902), and Ollama gpt-oss / qwen3.5 (#1292).
ToolCallMetadataside channel: Tools can now receive per-call context (trace IDs, correlation IDs, feature flags, the liveAIAgentContext) without polluting their LLM-visible argument schema. Features can contribute metadata viaAIAgentPipeline.provideToolCallMetadata, with caller-supplied values winning on key collision (#1886, #1777).- Planners moved to a dedicated module:
GOAPPlannerandSimpleLLMPlannernow live in a separateagents:agents-plannersmodule, and a simplerAIAgentPlannerStrategy.create(name, planner)factory replaces the old builder. Agents that don't use planning no longer pay the dependency cost (#1997). - MCP SDK upgrade with Streamable HTTP: MCP kotlin-sdk upgraded from 0.8.1 to 0.11.1; Streamable HTTP is now the primary transport for both MCP client and server (#1870, KG-792, KG-756, KG-755, KG-49).
RetrieveFactsFromHistoryextracted from AgentMemory: ThisHistoryCompressionStrategynow lives outside the AgentMemory feature so it can be used independently. The oldAgentMemoryfeature is removed in favor of the more capableLongTermMemory(#1927).- OpenTelemetry GenAI semantic conventions update: Aligned with the latest spec — content is carried via
gen_ai.input.messages/gen_ai.output.messagesattributes instead of deprecated per-message events; moderation results moved to a Koog custom attributekoog.moderation.result(#1967, KG-826). KoogClockmigration: Internal time APIs now use aKoogClockabstraction instead ofkotlin.time.Clock, enabling virtual-time testing and consistent clock behavior across platforms (#1925).- Minimum Java version raised to 17: Aligns the runtime requirement with documentation and modern toolchain expectations (#1931).
- Factory functions replace
invokeconstructors:AIAgent,AIAgentService,ToolRegistry,RollbackToolRegistry, andAIAgentPlannerStrategynow use top-level factory functions. Usage syntax (A(...)) is unchanged for normal callers (#1882). - Agent pipeline cleanup: Pipeline event contexts now expose the
AIAgentinstance directly instead of separateagentId/configfields; parameter order is harmonized across pipeline interfaces (#1991, KG-807).
Bug Fixes
Highlights below — see the 1.0.0-preview entry for the full per-PR list.
- Streaming hardening across providers (#1844, #1775, #1887, #1237, #1888, KG-811, #1884, #1878, #2012, #1978, #1868, #1865, #1866, #1369, KG-626): Ollama (
Flow invariant is violatedfrom cross-dispatcher emission,text/plainJSON responses, tool-call-before-text ordering), OpenAI (additional_propertiesleak underJsonNamingStrategy.SnakeCase, decode failures wrapped inLLMClientException, keepalive frames honored), Google (reasoning vs. plain text in streaming), and OpenRouter (tool calls during streaming) all now behave consistently end-to-end. - Error propagation through the pipeline (#1918, KG-815, #1548, KG-704, #2037, KG-845, #2024, KG-844): Pipeline failure hooks now receive the original
Throwableinstead of a stringifiedAIAgentError— fixes a latenterror.typemislabel in OpenTelemetry spans, and reflective tool failures surface the real exception message instead of"Unknown error".LLMCallFailedContext.eventTypenow reportsLLMCallFailed(wasLLMCallStarting);LLMCallFailedEvent/LLMStreaming/SubgraphExecutionare registered for remote event serialization. - OpenTelemetry stability (#1435, KG-675, #1969, KG-808, #1547, KG-703, #1856, #1850): Failed LLM requests no longer crash the feature — failures are signaled via span ERROR status and
error.type.SpanAdapter.onBeforeSpanFinishednow runs on fully populated spans, so Langfuse and Weave adapters see the same data the SDK exports. Langfuse trace-level attributes (langfuse.environment, etc.) are set on every span, not justinvoke_agent. The hardcoded JVM shutdown hook is gone — opt in viasetShutdownOnAgentClose(defaultfalse). - Persistence & subgraph correctness (#2044, #1971, #2039):
Persistence.runFromCheckpointskips tools that are no longer registered instead of throwing.subgraphWithTask/subtaskno longer drop tool results when the finish tool is called alongside other tools.PromptAugmenterimplementations (SystemPromptAugmenter,UserPromptAugmenter,AgentcorePromptAugmenter) append a newMessagePartto the existingMessageafter theMessage/MessagePartrefactor. - Tool / concurrency / security (#1883, #1881, #1871, #1965):
@Tool(customName = ...)is honored inToolSet.asTools().withPromptuses a write lock (was read lock — could race with concurrent prompt mutations). Anthropic API key is masked in Spring Boot autoconfiguration logs (security fix).
Breaking Changes
The 1.0 release is the stable baseline. Highlights below — for the full per-API list (constructor signatures, parameter renames, removed members), see the 1.0.0-preview entry.
- All
@DeprecatedAPIs removed (#2001): no deprecated members survive into 1.0. Includes a typo-spelling fixPersistency*→Persistence*across the storage providers (update imports). OldAIAgentPipeline/AIAgentPipelineImplare gone — useAIAgentPipelineAPI/AIAgentGraphPipeline/AIAgentPlannerPipeline. Retired models: `AnthropicModels.Ha...
1.0.0-preview3
A follow-up to 1.0.0-preview2 focused on final fixes in the Persistence API.
Bug Fixes
Persistence.runFromCheckpointnow skips tools that are no longer registered instead of throwing while restoring the state of the agent (#2044).
1.0.0-preview2
A follow-up to 1.0.0-preview focused on finishing the 1.0 API cleanup. All previously deprecated APIs are now gone, the graph DSL's node names are settled, and a few late-breaking event/augmenter bugs from the preview window are fixed.
Bug Fixes
LLMCallFailedContext.eventTypereportedLLMCallStarting: The failed-call event context advertised the wrong lifecycle type, so listeners filtering byeventTypesaw failures as starts. Now correctly emitsLLMCallFailed(#2037, KG-845).LLMCallFailedEventmissing from remote event serialization: The event wasn't registered in the polymorphic feature-message module, so it never made it across the trace transport. Added registration plus trace-format branches for the previously missingLLMStreamingandSubgraphExecutionevents (#2024, KG-844).PromptAugmenterimplementations after theMessage/MessagePartrefactor:SystemPromptAugmenter,UserPromptAugmenter, andAgentcorePromptAugmenternow append a newMessagePartto an existingMessageinstead of constructing a fresh message, and share a commonSECTION_SEPARATORconstant for consistent layout (#2039).
Breaking Changes
-
All
@DeprecatedAPIs removed (#2001). The 1.0 line carries no deprecated surface. Notable removals:- Event handlers:
Deprecated*EventHandlerContextclasses (agent, LLM, node, tool, strategy) and the oldStrategyEventContext. Use the currentAIAgentPipelineAPI/AIAgentGraphPipelineAPI/AIAgentPlannerPipelineAPIevent contexts. - Pipeline: the old
AIAgentPipeline/AIAgentPipelineImplare gone; surviving APIs live onAIAgentPipelineAPI/AIAgentGraphPipeline/AIAgentPlannerPipeline. - Agent / strategy / DSL: deprecated members on
AIAgentService,AIAgentTool,GraphAIAgent,AIAgentContext,AIAgentGraphContext,AIAgentGraphStrategy,AIAgentNode,AIAgentNodeDelegate,AIAgentParallelNodesMergeContext,AIAgentSubgraphBuilder, and the deprecatedAIAgentConfigconstructors. - Tools: deprecated entry points on
Tool,SimpleTool,ToolArgs,ToolResult, plusReceivedToolResultlegacy fields. - Persistence: typo-spelling fix —
PersistencyStorageProvider/FilePersistencyStorageProvider/JVMFilePersistencyStorageProviderrenamed toPersistence*(update imports). DeprecatedPersistencefeature shims,PersistenceFeatureConfigmembers, and the H2/SQLCheckpoint*BackwardCompatibilityTestpaths are removed.AgentCheckpointDatalegacy fields are gone. - Executors: deprecated members on
DefaultMultiLLMPromptExecutor,SingleLLMPromptExecutor, and the JVMSimplePromptExecutorsshims. - MCP: deprecated overloads on
McpServerandMcpToolRegistryProvider. - Models:
AnthropicModels.Haiku_3andBedrockModels.AnthropicClaude3Haiku, plus deprecated Google and DeepSeek model entries. - Spring autoconfig: deprecated members on the Anthropic / DeepSeek / Google / Mistral / Ollama / OpenAI / OpenRouter auto-configurations.
- RAG / utilities: deprecated members on
SearchStorage,EmbeddingStorage,ModelInfo,DummyAIAgentContext.
- Event handlers:
-
Graph DSL node names settled (#2035). The
WithUserTextsuffix introduced in1.0.0-previewis gone —String-input nodes recover their original names, and theMessage.User-input variants move to aSendMessage*prefix:nodeLLMRequestWithUserText→nodeLLMRequest(takesString); theMessage.Useroverload from preview is nownodeLLMSendMessage.- Same pattern for the other variants:
nodeLLMRequestOnlyCallingTools,nodeLLMRequestWithoutTools,nodeLLMRequestForceOneTool,nodeLLMRequestMultipleChoices,nodeLLMRequestStreaming,nodeLLMRequestStructured— theString-input forms keep these names;Message.User-input forms are renamed tonodeLLMSendMessage*. nodeExecuteToolsnow returnsReceivedToolResults(previously namednodeExecuteToolsAndGetResults). The oldnodeExecuteToolsthat wrote results back into the LLM session and returnedMessage.Useris removed — connect the newnodeExecuteToolsdirectly tonodeLLMSendMessage/nodeLLMSendToolResults*instead.- New
nodeLLMModerateText(name, moderatingModel, includeCurrentPrompt)accepts plainStringinput alongside the existingnodeLLMModerateMessage(Message.User).
-
Promptclass moved out of thedslpackage (#2022).ai.koog.prompt.dsl.Promptis nowai.koog.prompt.Prompt. Theprompt { ... }DSL builder stays inai.koog.prompt.dsl— only the type import changes. -
Dependency ABI cleanup (#2007).
oshai.kotlin.loggingis no longer in the:prompt-executor-clientspublic API (api→implementation). Consumers that importedKLoggertransitively must add their ownimplementation(libs.oshai.kotlin.logging).oshai-loggingupgraded7.0.7→8.0.01— 8.x has API refactors; update yourKLoggerusage if affected.ktor.server.sseis no longer transitively exposed by:agents-features-tokenizer/:agents-features-trace. Depend on it directly if you used it through these modules.- Internal:
ktor33.2.2→3.3.3,kotlinx-io0.7.0→0.9.0.android.useAndroidX=trueis now enabled (required byokhttp-androidtransitive from ktor 3.3.3).
1.0.0-preview
This release marks Koog's transition toward a stable 1.0 API. The library is now split into "stable" and "beta" modules, so production code can pin to APIs that won't break unexpectedly while experimental features continue to evolve. Alongside that, this release lands a redesigned Java interop layer, decouples HTTP transport from Ktor, brings OpenTelemetry to Kotlin Multiplatform, and adds Anthropic prompt caching.
Major Features
Stable / Beta module split
- Versioning by stability: Modules now ship under two streams — stable (
1.0.0-preview) and beta (1.0.0-beta-preview) — so production code can pin to APIs that won't break without a deprecation cycle (#2011, #2000).
Java interop, redesigned
- Uniform blocking API: All Java-facing entry points now follow one pattern —
xxxBlockingin Kotlin, plainxxxfrom Java. ExplicitExecutorService/Executorparameters are gone; the agent's configured dispatcher is used instead (#2005). - Deadlock-free reentrant calls: Kotlin → Java → Kotlin call chains on a single-threaded executor no longer deadlock — the reentrant dispatch is detected and skipped (#1945, KG-750).
HTTP transport, decoupled from Ktor
- Pluggable HTTP factory: LLM clients now take a
KoogHttpClient.Factoryinstead of a default KtorHttpClient. A Ktor-backed default is auto-discovered on JVM/Android whenkoog-agents-additionsis used; users can plug in Java's HTTP client, OkHttp, or Ktor without touching Koog internals (#2006, #1948, KG-821, KG-818). - Ollama on
KoogHttpClient: Ollama now routes streaming, headers, and endpoint config through the same abstraction as every other provider (#1993, KG-833).
OpenTelemetry on every target
- Multiplatform OpenTelemetry: Langfuse, Weave, and DataDog now run on every Koog target via a Ktor-based OTLP/JSON exporter, not just JVM (#1942, KG-785).
- Built-in metrics: Agents emit standard
gen_ai.client.token.usage,gen_ai.client.operation.duration, and a customgen_ai.client.tool.countmetric — plug straight into existing Prometheus/Grafana stacks (#1381, KG-136).
Anthropic prompt caching
- Automatic and explicit cache control: End-to-end caching support — automatic on requests, explicit breakpoints on messages, cache tokens in usage metrics. Cuts cost and latency for agents that re-send long system prompts (#1812, KG-707).
Memory and persistence
AIAgentStoragein checkpoints: Custom key-value data is now saved and restored alongside agent checkpoints; a newrunFromCheckpointAPI restores execution without requiring the Persistence feature (#1998, #1828).- Persistence for planner agents: Planner-based agents now support checkpoint/restore (#1786, KG-673).
- Amazon Bedrock AgentCore as
LongTermMemory: Managed vector-memory backend on Bedrock (#1855, KG-603). LongTermMemoryreliability: Storage errors no longer silently swallowed — newFailurePolicyplus a fix for double-ingestion during active sessions. Feature promoted from experimental (#1963).
New providers
- LiteRT LLM client: New client for running Google's LiteRT models locally (#1980).
- Oracle Database
ChatHistoryProviderfor Oracle-standardized deployments (#1851, KG-772).
Improvements
- New models: Anthropic Opus 4.7 (#1861), OpenAI GPT-5.5 and GPT-5.5 Pro (#1913), DeepSeek V4 Flash and Pro (#1914), additional Bedrock models — Kimi K 2.5, MiniMax 2.5, Gemma 3, GPT OSS (#1902), and Ollama gpt-oss / qwen3.5 (#1292).
ToolCallMetadataside channel: Tools can now receive per-call context (trace IDs, correlation IDs, feature flags, the liveAIAgentContext) without polluting their LLM-visible argument schema. Features can contribute metadata viaAIAgentPipeline.provideToolCallMetadata, with caller-supplied values winning on key collision (#1886, #1777).- Planners moved to a dedicated module:
GOAPPlannerandSimpleLLMPlannernow live in a separateagents:agents-plannersmodule, and a simplerAIAgentPlannerStrategy.create(name, planner)factory replaces the old builder. Agents that don't use planning no longer pay the dependency cost (#1997). - MCP SDK upgrade with Streamable HTTP: MCP kotlin-sdk upgraded from 0.8.1 to 0.11.1; Streamable HTTP is now the primary transport for both MCP client and server (#1870, KG-792, KG-756, KG-755, KG-49).
RetrieveFactsFromHistoryextracted from AgentMemory: ThisHistoryCompressionStrategynow lives outside the AgentMemory feature so it can be used independently. The oldAgentMemoryfeature is removed in favor of the more capableLongTermMemory(#1927).- OpenTelemetry GenAI semantic conventions update: Aligned with the latest spec — content is carried via
gen_ai.input.messages/gen_ai.output.messagesattributes instead of deprecated per-message events; moderation results moved to a Koog custom attributekoog.moderation.result(#1967, KG-826). KoogClockmigration: Internal time APIs now use aKoogClockabstraction instead ofkotlin.time.Clock, enabling virtual-time testing and consistent clock behavior across platforms (#1925).- Ollama
thinkparameter from prompt params: Thethinkflag is now sourced fromprompt.paramsinstead of being hard-coded, so callers can control reasoning behavior per prompt (#1615, #1877, KG-736). SearchRequestinterface inLongTermMemory: Replaces the concreteSimilaritySearchRequestso storages can implement keyword, hybrid, or other search types (#1864).- Minimum Java version raised to 17: Aligns the runtime requirement with documentation and modern toolchain expectations (#1931).
- Factory functions replace
invokeconstructors:AIAgent,AIAgentService,ToolRegistry,RollbackToolRegistry, andAIAgentPlannerStrategynow use top-level factory functions instead of companion-objectinvokeoperators. Usage syntax (A(...)) is unchanged for normal callers; only unusual forms likeA.Companion.invoke()are affected (#1882). - Agent pipeline cleanup: Pipeline event contexts now expose the
AIAgentinstance directly instead of separateagentId/configfields, parameter order is harmonized, and KDoc style is unified across pipeline interfaces (#1991, KG-807). - Locks and exception utilities consolidated: Duplicate
RWLockcode moved into a dedicatedagents-utilsmodule (#1893, KG-812).
Bug Fixes
- Spring Boot: Anthropic API key masked in autoconfiguration logs: Previously the key was emitted in plaintext during application startup. Security fix (#1965).
- Ollama streaming
Flow invariant is violated:buildStreamFrameFlownow useschannelFlowso emission works across the dispatched contexts Ktor's streaming HTTP introduces. Most visibly fixes Ollama streaming (#1844, #1775). - Ollama:
text/plainresponses parsed as JSON: Ollama sometimes returns valid JSON withContent-Type: text/plain. The client now registers JSON decoding for that content type too (#1887, #1237). - Ollama: tool calls returned before assistant text: When the model emits both a tool call and a text message, the tool call now comes first — matching OpenAI behavior — so built-in strategies don't terminate prematurely (#1888, KG-811).
- Ollama batch embeddings: Implementation now handles both current and legacy Ollama API response formats (#1885, #1874).
- Ollama embeddings implementation: Aligned with the official Ollama embeddings API (#1854).
- OpenAI:
additional_propertiesno longer leaks into requests:AdditionalPropertiesFlatteningSerializernow recognizes both camelCase and snake_case forms, so theadditionalPropertiesmap is correctly stripped underJsonNamingStrategy.SnakeCaseand no longer trips OpenAI's 400unknown_parametererror (#1884, #1878). - OpenAI: response decoding exceptions wrapped:
AbstractOpenAILLMClientnow wraps decode failures inLLMClientExceptioninstead of letting arbitrary exception types escape (#2012, #1978). - OpenAI / Google: keepalive and reasoning handling in streaming responses: OpenAI streaming now honors keepalive events; Google streaming now correctly distinguishes reasoning content from plain text (#1868, #1865, #1866).
- OpenRouter: streaming with tool calls no longer errors (#1369, KG-626).
- Streaming: blank tool call IDs processed correctly (#1915, #1900).
- Streaming: empty text complete frames filtered out (#1924).
- Reflective tool failures preserve the original exception message: Previously the
InvocationTargetExceptionwrapper hid the real error so agents received"Unknown error"— now the underlying cause is surfaced (#1548, KG-704). @Tool(customName = ...)honored inToolSet.asTools(): Custom tool names declared via the@Toolannotation are now respected when registering viatools(ToolSet)(#1883, #1881).AIAgentErrorcarries atypeparameter: Adds the exception type to the error data class so downstream consumers can branch on it (#1917, KG-814).- Tool/agent event contexts carry the original
Throwable: Pipeline failure hooks (onToolValidationFailed,onToolCallFailed, etc.) now receive a realThrowableinstead of a stringifiedAIAgentError, preserving full exception details and fixing a latenterror.typemislabel in OpenTelemetry spans (#1918, KG-815). - OpenTelemetry: failed LLM requests no longer crash the feature: Failures are signalled via span ERROR status and
error.typeattribute instead of the non-specfinish_reasons=[error](#1435, KG-675). - OpenTelemetry: span adapter hooks run on fully populated spans:
SpanAdapter.onBeforeSpanFinishednow fires after all attributes are set, so Langfuse and Weave adapters see the same data the SDK exports (#1969, KG-808). - OpenTelemetry: Langfuse trace attributes set on every span: Previously only
invoke_agentcarried tra...
0.8.0
Major Features
- Spring AI Integration: Added comprehensive Spring AI support with
ChatMemoryRepositoryandVectorStoreintegration for seamless persistence and retrieval (#1719, #1763) - Amazon Bedrock AgentCore Memory: Introduced
ChatHistoryProviderbacked by Amazon Bedrock AgentCore Memory for managed conversation state (#1758) - DataDog LLM Observability: Added DataDog LLM Observability exporter with response metadata forwarding to inference spans (#1591)
Improvements
- Native structured output for Claude 4.5+: Added JSON Schema support for Claude 4.5+ series models across Anthropic, Bedrock, and Vertex AI providers (#1593)
- Mermaid diagram support for nested subgraphs: Enhanced Mermaid diagram generator to visualize subgraphs and nested subgraphs (#1745)
- RAG-based abstractions:
LongTermMemoryfeature now uses cleaner abstractions fromrag-basefor better modularity (#1785) - LLMClient constructor decoupling: Decoupled
LLMClientconstructors from Ktor for improved flexibility (#1742) - Customizable field names: Added support for customized field names in
AdditionalPropertiesFlatteningSerializer(#1626) - GPT-5.4 models: Added support for GPT-5.4Mini and GPT-5.4Nano models (#1837)
- Google models update: Updated Google models capabilities and deprecated older model versions (#1827)
- Environment creation abstraction: Extracted environment creation into
prepareEnvironmentmethod in agent implementations for better extensibility (#1790) - Reasoning prompt refactoring: Moved reasoning prompt configuration to strategy parameters for better encapsulation (#1789)
- JSON schema capabilities: Added JSON schema capabilities to OpenAI models (#1822)
- Add missing JavaAPI for history compression inside write session: Added
replaceHistoryWithTLDRas non-suspend method of AIAgentWriteSession (#1839)
Bug Fixes
- Agent message handling: Corrected description of Koog agent message handling (#1010)
- History compression with chat memory: Fixed missed prompt messages when chat memory feature is enabled (#1835)
- Reasoning messages: Added IDs for reasoning messages and improved reasoning process to fix status 400 errors from OpenAI (#1779)
- Ollama embedding: Check HTTP status before deserializing Ollama embedding response to prevent parsing errors (#1702)
- Ktor parameter shadowing: Renamed
registerToolsparameter inkoog-ktorto avoidBuilder.build()shadowing (#1705, #1721) - Opus 4.6 token limit: Corrected
maxOutputTokensfrom 1M to 128K for Claude Opus 4.6 (#1825) - Java AIAgentLLMWriteSession: Added Java support for
AIAgentLLMWriteSessioncompress history functionality
Breaking Changes
- LLMProvider singletons restored: Restored
LLMProvidersingletons and fixed reified type inference (potentially breaking for custom provider implementations) (#1800)
Examples
- Spring AI Examples Add comprehensive examples of Koog + Spring AI integration
Documentation
- Java API documentation: Add Java code snippets for Agent Events documentation (#1833)
- DataDog documentation: add DataDog exporter documentation (#1801)
- Java API documentation: Add Java code snippets for tracing feature (#1821)
- Java API documentation: Add missing Java snippets for Persistence (#1818)
- Java API documentation: Add java snippets for model capabilities docs (#1815)
- Java API documentation: Add java snippets for content moderation docs (#1814)
- Java API documentation: Add missing Java snippets for read/write LLM sessions (#1808)
- Java API documentation: Predefined strategies Java snippets (#1796)
- Java API documentation: Update streaming docs with Java snippets (#1792)
- Fixed broken formatting: fix code snippets to remove leaking includes (#1759)
- Improve wording: Update wording in History compression and Predefined nodes and components (#1699)
0.7.3
Published 26 March 2026
New Features
- Bedrock prompt caching: Added
CacheControlproperty on Assistant, User, and System messages within the Prompt and integrated explicit cache blocks in the Bedrock Converse API (#1583)
Bug Fixes
- Agent deadlock fix: Fixed deadlock when
agent.run()is called from withinexecutor.submit— when the agent was invoked from a worker thread of the configuredExecutorService,runBlocking(context)would dispatch the coroutine back onto that executor and park the calling thread (KG-750, #1716) - AIAgentTool for simple agents: Fixed
AIAgentToolto support simple agents that accept primitives as input by introducingAIAgentToolInputwrapper (#1729) - MCP custom transport: Fixed runtime crash when using non-default custom MCP transports in
MCPToolRegistryProvider(#1740) - Anthropic tool error reporting: Added
is_errorflag for failed tool calls in the Anthropic client so the model is properly informed of tool execution failures (#1700) - DeepSeek reasoning with tool calls: Ensured
reasoningContentis preserved and merged with tool calls to satisfy DeepSeek API requirements (#1614)
Breaking Changes
- ToolRegistry.Builder removed: Unified everything under
expect/actualToolRegistryBuilder. Removedtools(Any)overload that was interfering withtools(List)and causing unexpected bugs (#1746)
Build
- Removed stale
coreLibrariesVersionoverride: The convention plugins were settingcoreLibrariesVersion = "2.1.21"which made published POMs declare kotlin-stdlib 2.1.21, mismatching the actual 2.3.x compiler version. Removed the override so the POM picks up the real compiler version (#1697, #1722)
Documentation
- Updated serialization documentation with Java snippets (#1732)
- Added Java implementation for custom subgraphs documentation (KG-770, #1730)
- Added Java implementation for OpenTelemetry, Langfuse, and Weave integration documentation (KG-760, #1696)
- Moved "Chat agent with memory" tutorial under "Chat memory" feature section (#1686)
0.7.2
Published 19 March 2026
Bug Fixes
- Java API for OpenTelemetry extensions: Fixed Java API inside
OpenTelemetryConfigclass annotated with@JavaOverride
that relied on KotlinDurationclass, causing all further attributes to be skipped by the compiler in Langfuse and Weave extensions (KG-754, #1682) - System prompt preservation in agent builder: Fixed
systemPromptmethod in agent builders to preserve previously configured messages, id, and params in the prompt (KG-747, #1671) - LLMParams copy overloads: Added correct
override fun copy()to allLLMParamssubclasses (GoogleParams,AnthropicParams,OpenAIChatParams, etc.) so thatPrompt.withUpdatedParamspreserves provider-specific fields instead of silently dropping them. Also fixedBedrockConverseParams.copy()missing parameters andDashscopeParamsincorrectsuper.copy()call (KG-742, #1668)
Breaking Changes
- Removed
inputparameter fromAIAgentFunctionalContext.subtask: Theinputparameter was not actually used;taskDescriptionis the right way to specify the task. Related methods and builders updated accordingly (#1667)
Documentation
- Started porting rest of the documentation to Java (#1669)
0.7.1
Published 17 March 2026
Major Features
- Java API: Introduced comprehensive Java interoperability across the framework:
- Java API for creating and running agents from pure Java projects (#1185)
- Builder-based Java API for graph strategies (#1581, #1617, #1366)
- Java-friendly API for
AIAgentStoragewith JVM-specific methods (#1600) - Blocking API builders for
PromptExecutorandLLMClientfor Java (#1555, #1604) - Jackson as the default serializer for Java API (#1630)
- Weave and Langfuse integrations now available from Java (#1616)
- Centralized Java/Kotlin time conversion utilities (
TimeUtils,toKotlinDuration, etc.) (#1620)
- Spring AI Integration: Added two new Spring Boot starters (
koog-spring-ai-starter-model-chatandkoog-spring-ai-starter-model-embedding) to integrate Spring AIChatModelandEmbeddingModelimplementations as Koog LLM backends, enabling support for the wide range of providers available in Spring AI (KG-109, #1587) - Chat Memory: Introduced persistent chat memory with multiple storage backend options:
- Long-term Memory: Added
LongTermMemoryfeature that augments prompts with relevant memory records from storage and extracts/ingests new memories from agent conversations (#1490) - Library-Agnostic Serialization API: Introduced a
JSONSerializerabstraction to support pluggable serialization libraries. Two implementations provided:KotlinxSerializer(default) and the newJacksonSerializerin a separateserialization-jacksonmodule. Tools API migrated to this new abstraction (#1588)
Improvements
- OpenTelemetry:
- Planner improvements:
- Added
AIAgentPlannerContextandAIAgentFunctionalContextBasefor better context hierarchy and planner-specific APIs (#1480) - Added planner-specific pipeline interceptors:
onPlanCreationStarting/Completed,onStepExecutionStarting/Completed,onPlanCompletionEvaluationStarting/Completed(KG-672, #1550) - GOAP strategies now have typed input/output and a dedicated
GoapAgentState(#1498)
- Added
- OpenRouter embedding support: Implemented
LLMEmbeddingProviderfor OpenRouter, enabling access to 21+ embedding models (KG-659, #1398) - Swift Package Manager support: Added XCFramework build and distribution infrastructure for iOS/macOS development via SPM (KG-682, #1485)
New LLM Models
- Anthropic Claude Opus 4.6: Added support via Anthropic and Bedrock executors (#1513)
- Google Gemini 3 Flash Preview: New model with extended capabilities and high-speed processing (#1621)
- OpenAI GPT-5.x series: Added GPT-5.1-Codex-Max, GPT-5.2-Codex, GPT-5.3-Codex, GPT-5.4, and GPT-5.4-Pro (#1595)
- Moonshot Kimi K2 Thinking: Added support via the Bedrock Converse API (#1436)
- Ollama thinking support: Added
think=truerequest parameter and streaming reasoning delta support for Ollama models (#1532)
Bug Fixes
- Persistence checkpoints: Fixed last successful node being re-executed when restoring from a checkpoint; changed
lastInputtolastOutputin checkpoint structure (#1308) - Ollama streaming: Fixed Ollama client to use
preparePost(...).executefor proper streaming instead of buffering the full response (#1497) - OpenRouter streaming: Fixed missing
reasoningandreasoningDetailsfields inOpenRouterStreamDeltacausing deserialization errors (#1504) - Dashscope streaming: Fixed tool call argument merging for streaming responses in
DashscopeLLMClient(KG-658, #1590) agents-extdependency leak: Movedagents-extfromcommonMain apitojvmTest implementationinagents-testto prevent transitive compile-time dependency leakage (#1506)- Streaming exception handling:
executeStreamingnow properly propagates exceptions from LLM clients and requiresStreamFrame.Endto signal stream completion (KG-550, #1580) - Debugger feature: Extended to support functional agents in addition to graph-based agents by dispatching appropriate strategy starting events (KG-741, #1637)
Breaking Changes
- Serialization API: All
encode/decodemethods inToolnow accept a secondJSONSerializerparameter. AutomaticToolDescriptorgeneration for primitive argument types (Tool<String, String>) is no longer supported without a custom descriptor.AIAgentFeature.createInitialConfignow takes anagentConfig: AIAgentConfigparameter. JSON types in pipeline events changed fromkotlinx.serializationtoai.koog.serialization(#1588) TypeTokenreplacesKType: Nodes and agent features now work withai.koog.serialization.TypeTokeninstead ofkotlin.reflect.KType. AlltypeOf<Foo>()usages should be replaced withtypeToken<Foo>()(#1581)- Global JSON schema registries removed:
RegisteredStandardJsonSchemaGeneratorsandRegisteredBasicJsonSchemaGeneratorsremoved.getStructuredRequestandStructureFixingParsermoved toai.koog.prompt.executor.modelpackage (KG-698, #1517) LLMDescription.descriptionrenamed tovalue: Thedescriptionfield ofLLMDescriptionhas been renamed tovaluefor Java compatibility (#1607)- Deprecated
kotlinx.datetimeimports replaced withkotlin.timeequivalents (Clock,Instant) (#1533) - Retired Anthropic/Bedrock models: Removed
Sonnet_3_7,Haiku_3_5,Sonnet_3_5, andOpus_3from Anthropic models; removed several AI21, Bedrock, and legacy Anthropic models.Haiku_3marked as deprecated (#1526)
Documentation
- Added documentation for Java API and Java examples (#1610)
- Added documentation for Spring AI integration (KG-109, #1627)
- Added documentation for custom feature creation (#1295)
- Reworked Getting Started, agent types, and Chat Memory tutorials (#1349, #1552)
- Improved Prompts and Planner agent documentation (#1302, #1301)
- Added nightly builds documentation (#1433)
Examples
0.6.4
Major Features
- LLM Client Router: Added support for routing requests across multiple LLM clients with pluggable load balancing strategies. Includes a built-in round-robin router and fallback handling when a provider is unavailable (#1503)
Improvements
- Anthropic models list: Implemented
models()for the Anthropic LLM client, consistent with other supported providers (KG-527, #1460) - Dependency updates: Updated
io.lettuce:lettuce-corefrom6.5.5.RELEASEto7.2.1.RELEASE(#1304)
Breaking Changes
0.6.3
Improvements
- Streaming reasoning support: Models with reasoning capabilities (like Claude Sonnet 4.5 or GPT-o1) now stream their reasoning process in real-time, allowing you to see how the model thinks through problems as it generates responses (KG-592, #1264)
- LLModel API enhancement: LLM clients now return
List<LLModel>instead ofList<String>for improved type safety and direct access to model metadata (#1452) - Multiple event handlers per feature: Features can register multiple handlers for the same event type, enabling more flexible event processing (KG-678, #1446)
- Dependency updates: Updated Kotlin libraries (KG-544, #1475):
Kotlinfrom2.2.21to2.3.10kotlinx-serializationfrom1.8.1to1.10.0kotlinx-datetimefrom0.6.2to0.7.1
Bug Fixes
- OpenRouter streaming: Fixed parsing errors when receiving reasoning content from models with reasoning capabilities by adding missing
reasoningandreasoningDetailsfields to the streaming response (#854) - ReadFileTool: Fixed incorrect binary file detection for empty files (KG-533, #1340)
- DevstralMedium model: Added missing
LLMCapability.Documentcapability (#1482) - Ktor integration: Fixed custom timeout values being ignored when configuring LLM providers in
application.yaml(KTOR-8881, #807)
Breaking Changes
- Streaming API redesign: Restructured
StreamFrametypes to distinguish between delta frames (incremental content likeTextDelta,ReasoningDelta) and complete frames (full content likeTextComplete,ReasoningComplete). AddedEndframe type to signal stream completion (#1264) - Kotlin version update: Migrated from Kotlin
2.2.21to2.3.10; replacedkotlinx.datetime.Clock/Instantwithkotlin.time.Clock/Instant(#1475) - LLModel API changes:
LLMClient.models()now returnsList<LLModel>instead ofList<String>;LLModel.capabilitiesandLLModel.contextLengthare now nullable (#1452)
Documentation
- Updated documentation for the
singleRunStrategyAPI andAIAgentServiceclass.
Refactoring
- Module restructuring: Moved file-system abstractions (
GlobPattern,FileSize,FileSystemEntry,FileSystemEntryBuilders) fromagents-exttorag-basemodule to reduce transitive dependencies (#1278)
Examples
- Added the ACP (Agent Communication Protocol) agent example project (#1438)