JetBrains/koog
66.1
Weak · 25 September 2026
137.5k
lines of production code
Kotlin
primary language
3
measurements over time
What this system is
This system is a Kotlin-based framework for building, orchestrating, and observing AI agents, supporting graph, functional, and planner execution strategies. It provides comprehensive observability through event handling, tracing, and OpenTelemetry integration, alongside persistent state management via chat history and agent checkpoints. The platform enables inter-agent communication through A2A and ACP protocols, and extends functionality via Model Context Protocol (MCP) tool integration and various memory backends.
How it got here
2025 — API unification and observability expansion
193 changes.
This period focused on unifying the agent construction and event handling APIs through a new fluent builder pattern and a centralized lifecycle event system, while removing legacy infrastructure. It simultaneously expanded the framework's capabilities by introducing comprehensive tracing, token counting, and checkpoint persistence features, alongside new LLM client integrations and prompt caching support.
2026 — Java API and persistence expansion
71 changes.
This period focused on establishing a robust Java-friendly API for agent construction, execution, and lifecycle management, complemented by extensive multi-platform support. It introduced comprehensive persistence capabilities, including SQL and JDBC backends for chat history and checkpoints, alongside long-term memory integrations with AWS Bedrock. The work also expanded the framework's ecosystem with Spring AI v2 adapters, new CLI agent support, and detailed OpenTelemetry tracing across all platforms.
Features
A2A module documentation and test infrastructure added
The A2A module now includes comprehensive development guidelines in CLAUDE.md and per-module documentation (Module.md) for the client, server, core, transport, and test submodules. Additionally, a new test infrastructure has been introduced: a Python-based A2A test server (test-python-a2a-server) using the a2a-sdk 0.3.22, and a Technology Compatibility Kit (TCK) integration (test-tck) that pins the A2A protocol to version 0.3.x and provides shell scripts to set up, run, and validate the Kotlin SDK against the official A2A specification.
a2a · high confidence
AWS Bedrock client now supports the Converse API, caching, and guardrails
The Bedrock client has been updated to support the AWS Bedrock Converse API as an alternative to the legacy InvokeModel method, providing a consistent interface for message-based models. This change introduces support for Anthropic cache control (5-minute and 1-hour TTLs) to optimize costs, and enables AWS Bedrock Guardrails for content moderation. The client now handles authentication via both AWS Credentials and Bearer tokens, and includes expanded model support for Anthropic Claude 4.x series, Amazon Nova, Meta Llama, and others.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client · high confidence
Add ACP agent example project
Introduces a new example project in \examples/acp-agent\ that demonstrates an AI coding agent implementing the Agent Client Protocol (ACP). The example includes a Koog-based agent implementation (\KoogAgentSupport\, \KoogAgentSession\) with file system and terminal tools, a terminal client (\TerminalClientOperations\) for interactive chat, and two runner modes: a standalone agent (\AcpAgent\) and a client-server setup using pipes (\PipeApp\) or external processes (\ProcessApp\).
examples/acp-agent · high confidence
Add AWS Bedrock AgentCore as a Long-Term Memory backend
Introduces a new long-term memory implementation backed by AWS Bedrock AgentCore, enabling agents to store and retrieve semantic, episodic, preference, and summary memory. The change includes \AgentcoreSearchStorage\ for executing similarity and listing searches, an \AgentcorePromptAugmenter\ that injects retrieved context into system or user messages based on strategy type, and an auto-discovery mechanism (\AgentcoreStrategyDiscovery\) that automatically maps configured AgentCore memory strategies to retrieval subrequests, eliminating the need for manual namespace configuration.
agents/agents-features/agents-features-longterm-memory-aws/src/jvmMain/kotlin/ai/koog/agents/features/longtermmemory · high confidence
Add Amazon Bedrock AgentCore Runtime integration
Introduces the \koog-bedrock-agentcore-runtime\ module, providing a Ktor route installer that implements the Amazon Bedrock AgentCore Runtime HTTP contract. This allows Koog agents to be deployed as AgentCore workloads by exposing the required \POST /invocations\ endpoint (supporting JSON, text, binary, multipart, and streaming payloads via typed or unified handlers) and a \GET /ping\ health check endpoint that reports \Healthy\, \HealthyBusy\, or \Unhealthy\ status based on background task tracking. The module includes utilities for mapping Bedrock content blocks to HTTP responses and handling specific AgentCore headers.
koog-bedrock-agentcore-runtime · high confidence
Add Dashscope (Qwen) LLM client support
Users can now connect to Alibaba's DashScope API using the Qwen model family. This change introduces the \DashscopeLLMClient\, which communicates via OpenAI-compatible endpoints, and provides a predefined set of models (such as \qwen-flash\, \qwen-plus\, and \qwen3.5-plus\) with specific capabilities like tool use, vision, and thinking modes. The client supports streaming, structured output, and DashScope-specific features including web search, parallel tool calls, and extended thinking. Note that embedding and moderation are not supported by this client.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-dashscope-client · high confidence
Add DeepSeek LLM client support
Introduces a new DeepSeek LLM client that enables users to interact with DeepSeek models (including DeepSeek V4 Flash, V4 Pro, and V4 Flash Vision) via the Koog framework. This addition provides full support for chat completions, streaming, tool calling, structured JSON output, and reasoning content, along with a JVM-specific factory for simplified client instantiation.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-deepseek-client · high confidence
Add Devoxx Belgium 2025 interactive support bot example
Introduces a new Spring Boot example application that demonstrates an interactive e-commerce support agent using Koog. The example features a multi-step agent strategy that identifies order issues, applies fixes, and verifies solutions using subgraphs, along with persistence and rollback capabilities backed by PostgreSQL checkpoints. It includes REST endpoints for launching agents, checking status, listing checkpoints, and performing rollbacks, supported by mock tools for user accounts, orders, and carrier communication.
examples/devoxx-belgium-2025 · high confidence
Add JVM shell command execution with timeout support
Introduces JvmShellCommandExecutor to enable agents to run shell commands on JVM platforms, supporting both Windows and Unix-like systems. The implementation respects a configurable timeout, forcibly terminating the process and its descendants if execution exceeds the limit, and returns partial output in such cases. It also handles standard output and error streams, combining them into a single result string for easier consumption by the agent.
agents/agents-ext/src/jvmMain · high confidence
Add Jackson-based JSON serialization implementation
The serialization-jackson module now provides a complete Jackson-based implementation of the library's serialization API. This includes the JacksonSerializer class for encoding and decoding objects to and from JSON strings and JSON elements, along with a JacksonModule that handles serialization of the library's core JSON types (JSONElement, JSONObject, JSONArray, JSONPrimitive, etc.). The implementation supports generic type preservation through JavaType resolution and includes comprehensive test coverage for both Kotlin and Java usage scenarios.
serialization/serialization-jackson · high confidence
Add Java HttpClient and OkHttp implementations for KoogHttpClient
Users can now choose between Java's standard HttpClient and OkHttp as the underlying transport for the KoogHttpClient interface, in addition to any existing implementations. This change introduces the \http-client-java\ and \http-client-okhttp\ modules, each providing a factory that registers via Java's ServiceLoader for automatic discovery. Both implementations support GET, POST, and Server-Sent Events (SSE) streaming, handle JSON serialization, and allow configuration of base URLs, default headers, and query parameters.
http-client/http-client-java, http-client/http-client-okhttp · high confidence
Add Java banking agent example for Spring I/O 2026
A new Java-based example application has been added to the Spring I/O 2026 examples directory, demonstrating an AI banking agent built with Spring Boot. The example includes a REST API endpoint for launching support agents, a service layer that configures an AI agent with tools for reading and writing account data, and data models for transactions and account issues. It integrates with PostgreSQL for persistence and vector storage, and supports multiple LLM providers including OpenAI, Anthropic, and Ollama.
examples/spring-io-2026/java · high confidence
Add Mistral AI LLM client
Users can now connect to Mistral AI models through a new MistralAILLMClient, which supports chat completions, embeddings, and content moderation. The client includes a predefined set of Mistral models (such as Mistral Large, Medium, Small, Codestral, and Devstral) with their specific capabilities and context lengths, and provides a JVM-specific factory function for easier instantiation.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-mistralai-client · high confidence
Add SQL-based chat history persistence with TTL support
This change introduces a new pure JDBC implementation for storing chat conversation history in SQL databases, utilizing the JetBrains Exposed ORM. It provides a generic base provider alongside database-specific implementations for H2, MySQL, and PostgreSQL, each handling their own schema migration (e.g., using native JSON columns in MySQL). The feature supports configurable Time-To-Live (TTL) for automatic expiration of conversation records and exposes a blocking migration helper for Java interoperability.
agents/agents-features/agents-features-chat-memory-sql/src/jvmMain/kotlin/ai/koog/agents/features/chatmemory · high confidence
Add Spring AI VectorStore integration starter
This release introduces a new Spring Boot starter that adapts Spring AI VectorStore implementations to Koog's storage abstractions. Users can now inject a unified KoogVectorStore interface to perform document ingestion, similarity search, and deletion against any Spring AI-compatible backend (such as Pinecone, Qdrant, or PostgreSQL). The integration includes auto-configuration that supports selecting a specific VectorStore bean via the koog.spring.ai.vectorstore.vector-store-bean-name property, restricts document metadata to primitive types (String, Number, Boolean) to match Spring AI constraints, and provides configurable coroutine dispatchers for handling blocking vector-store operations.
koog-spring-ai/koog-spring-ai-starter-vector-store · high confidence
Add Spring AI integration for chat models and chat memory
This release introduces two new Spring Boot starters that bridge Koog agents with Spring AI. The chat model starter (\koog-spring-ai-starter-model-chat\) auto-configures an \LLMClient\ backed by a Spring AI \ChatModel\, supporting multi-model setups via property-based bean selection, auto-detecting LLM providers (e.g., OpenAI, Anthropic), and allowing optional moderation via a \ModerationModel\. It also provides a \ChatOptionsCustomizer\ extension point for provider-specific tuning. The chat memory starter (\koog-spring-ai-starter-chat-memory\) bridges Koog's \ChatHistoryProvider\ with Spring AI's \ChatMemoryRepository\, enabling persistent conversation history. This adapter is text-only: it persists System, User, and Assistant text messages while silently dropping tool calls, reasoning steps, and attachments on store, and skipping Spring AI TOOL messages on load. Both starters are enabled by default and respect \koog.spring.ai.\*.enabled\ configuration properties.
koog-spring-ai/koog-spring-ai-starter-model-chat · high confidence
Add Spring Boot Java example for AI chat integration
Introduces a new Spring Boot Java example that demonstrates integrating the Koog prompt library to send chat messages to OpenAI. The example includes a REST controller at /api/chat, an AI service layer using JavaPromptExecutor with GPT-4o-mini, and configuration for the OpenAI API key via environment variables. It also provides an integration test to verify the chat endpoint functionality.
examples/spring-boot-java · high confidence
Add Spring Boot Kotlin example with YAML-configured Koog agent
A new example project demonstrates how to build a Spring Boot application in Kotlin that integrates with the Koog agent framework. The example uses YAML configuration to define agent properties (model, system prompt, tools) and supports optional S3-based persistence for agent checkpoints. It includes a REST controller for chat interactions, a service layer that constructs and runs the AI agent, and providers for MCP-based tools (via SSE or Docker) and S3 storage.
examples/spring-boot-kotlin · high confidence
Add Spring WebClient HTTP client implementation
The http-client module now includes a new Spring WebClient-based implementation of the KoogHttpClient interface for JVM platforms. This addition allows users to integrate the Koog framework with Spring WebFlux applications by providing a factory and adapter that wraps a configured Spring WebClient, supporting standard HTTP operations (GET, POST) as well as streaming responses (SSE and lines). The implementation includes a ServiceLoader registration for automatic discovery and tests verifying UTF-8 stream decoding and SPI integration.
http-client · high confidence
Add code-agent example with intelligent subagent for code search
The step-04 code-agent example now demonstrates a multi-agent workflow where a main programming agent delegates code-search tasks to a specialized 'FindAgent' subagent. The main agent uses tools to read, edit, and execute shell commands, while the new FindAgent tool leverages an internal LLM to intelligently locate code elements (classes, functions, variables) based on semantic queries and file paths, rather than simple text matching. The example also includes updated observability setup using OpenTelemetry and Langfuse for tracing agent interactions.
examples/code-agent/step-04-add-subagent · high confidence
Add code-agent example with shell execution tool
A new example agent in the code-agent step-02 directory now includes a shell execution tool, allowing the AI agent to run commands and verify changes via tests. The agent is configured with file tools (read, write, list) and a shell executor, with optional confirmation handling based on environment variables.
examples/code-agent/step-02-add-execution-tool · high confidence
Add minimal code agent example with GPT-5 Codex and file tools
A new example project has been added at \examples/code-agent/step-01-minimal-agent\ that demonstrates a minimal code agent setup. The example configures an \AIAgent\ using the \GPT5Codex\ model and registers file-based tools (\ListDirectoryTool\, \ReadFileTool\, \EditFileTool\) to allow the agent to interact with the local filesystem. It includes a \main\ entry point that accepts a project path and task description as arguments, runs the agent, and prints the result, while also setting up basic logging via \logback.xml\.
examples/code-agent/step-01-minimal-agent · high confidence
Add trip planning agent example
Introduces a new example application in examples/trip-planning-example that demonstrates an AI agent capable of planning multi-day trips. The example includes a main entry point that configures a multi-LLM executor (OpenAI, Anthropic, Google) and integrates Google Maps via an MCP server, alongside tools for querying weather forecasts from the Open Meteo API and interacting with the user. It showcases agent strategies for clarifying user requirements and suggesting detailed itineraries based on location and weather data.
examples/trip-planning-example · high confidence
Added A2A message conversion and metadata support
The \agents-features-a2a-core\ module now provides utilities to bridge A2A (Agent-to-Agent) messages with Koog's internal message format. It introduces \MessageA2AMetadata\ to store A2A-specific fields (such as \messageId\, \taskId\, and \contextId\) within Koog message metadata, and includes bidirectional converters (\toKoogMessage\ and \toA2AMessage\) that map A2A parts (text, data, and files) to Koog's content parts, ensuring seamless communication between A2A-enabled agents and the Koog system.
agents/agents-features/agents-features-a2a-core · high confidence
Added desktop and web entry points for the Koog demo app
The demo application now includes specific entry points for desktop and web platforms. A new desktop main function initializes a Compose window titled "Koog Demo App" with defined dimensions and minimum size constraints, launching the shared KoinApp. For the web platform, a new main function renders the KoinApp within a browser viewport, supported by an HTML template featuring a loading animation and a PWA manifest for standalone display.
examples/demo-compose-app/desktopApp, examples/demo-compose-app/webApp · high confidence
Added internal trace and event string helpers for debugging and logging
A new \messageFormat.kt\ file introduces internal extension properties (\traceString\ for \Prompt\, \Message\, and \MessagePart\, and \eventString\ for \LLModel\) that generate human-readable string representations of agent state. These helpers are designed for debugging and logging, allowing users to easily inspect prompt structures, message contents, and LLM model identifiers in a standardized format.
agents/agents-features/agents-features-event-handler/src/commonMain/kotlin/ai/koog/agents/features/eventHandler · high confidence
Added trace string formatting for Prompt and Message objects
A new \messageFormat.kt\ file has been added to the tracing module, introducing internal \traceString\ extension properties for \Prompt\, \Message\, and \MessagePart\. This change enables the generation of human-readable string representations of these objects, which are primarily intended for debugging and logging purposes within the agent's tracing infrastructure.
agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing · high confidence
Amazon Bedrock AgentCore Memory as Chat History Provider
The AWS chat history module now includes a new \AgentcoreChatHistoryProvider\ that stores and retrieves conversational history (User and Assistant messages) using Amazon Bedrock AgentCore Memory. This implementation persists only plain-text conversational messages, filtering out system, tool, reasoning, and attachment types based on the \ignoreUnsupportedValues\ setting. It uses delta tracking via event IDs to avoid re-saving loaded messages and supports configurable pagination and total event limits when loading history.
agents/agents-features/agents-features-chat-history-aws/src/jvmMain/kotlin/ai/koog/agents/features/chathistory · high confidence
Anthropic client adds prompt caching, structured output, and extended parameter support
The Anthropic client now supports automatic prompt caching via the \cacheControl\ parameter (with 5-minute and 1-hour TTL options), enabling lower latency and cost for multi-turn conversations. It also introduces native structured output support for Claude 4.5+ models using JSON Schema, with custom schema generators handling Anthropic-specific requirements like mandatory \required\ lists and \anyOf\ substitution. Additionally, the client exposes extended generation parameters including \topK\, \topP\, \stopSequences\, \container\, \serviceTier\, and MCP server integration, while providing a JVM-specific convenience constructor that auto-resolves the HTTP client factory.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client · high confidence
Google client adds thinking mode support and Google-specific schema generation
The Google LLM client now supports Google's "thinking" mode via a new \thinkingConfig\ parameter in \GoogleParams\, allowing users to control whether the model exposes its chain-of-thought reasoning and how many tokens to spend on it. Additionally, the client introduces \GoogleBasicJsonSchemaGenerator\ and \GoogleStandardJsonSchemaGenerator\ to handle Google's specific JSON Schema requirements, such as removing unsupported \additionalProperties\ in simple schemas and wrapping \$ref\ fields in \oneOf\ to work around limitations with co-located description fields. The client also now handles embedding requests and responses via new model classes, and provides a JVM-specific convenience factory that automatically resolves the HTTP client factory.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client · high confidence
Initial public API definitions for OpenTelemetry and Embeddings modules
This change introduces the initial public API contracts for the \agents-features-opentelemetry\ and \embeddings-base\ libraries. For OpenTelemetry, it exposes the \OpenTelemetry\ feature and \OpenTelemetryConfig\ for configuring tracing, including span adapters, exporters, and service metadata, alongside \SpanType\ enums and attribute classes for GenAI telemetry. For Embeddings, it defines the \Embedder\ interface for generating vector embeddings and the \Vector\ class with utility methods for similarity calculations (cosine, dot product, Euclidean distance) and serialization support. These API dumps establish the stable surface area for these modules across JVM, Android, and Kotlin Multiplatform targets.
agents/agents-features/agents-features-opentelemetry/api, embeddings · high confidence
Introduce A2A client agent feature for inter-agent communication
Added the \agents-features-a2a-client\ module, which enables Koog agents to act as A2A clients. This feature provides a registry of \A2AClient\ instances accessible via the agent context, allowing agent nodes to send messages, retrieve agent cards, manage tasks, and subscribe to events on remote A2A-enabled agents. The module includes pre-built nodes for common operations such as sending messages (with streaming support), getting/caching agent cards, and task management (get, cancel).
agents/agents-features/agents-features-a2a-client · high confidence
Introduce A2A client foundation with agent card resolution and protocol methods
The A2A client library now provides the core \A2AClient\ class, enabling applications to connect to A2A servers, resolve and cache agent cards (via explicit or URL-based resolvers), and execute protocol operations such as sending messages (including streaming), managing tasks (get, cancel, resubscribe), and configuring push notifications. This change establishes the foundational client-side API for interacting with A2A-compliant agents.
a2a/a2a-client/src/commonMain · high confidence
Introduce A2A protocol core models and transport abstractions
This change adds the foundational data models and transport interfaces for the A2A (Agent-to-Agent) protocol in the \a2a-core\ module. It introduces serializable data classes for agent discovery and interaction, including \AgentCard\, \Task\, \Message\, \Artifact\, and various event types (\TaskStatusUpdateEvent\, \TaskArtifactUpdateEvent\). It also defines the \ClientTransport\ and \ServerTransport\ interfaces, which expose the full set of A2A JSON-RPC protocol methods (such as \message/send\, \message/stream\, \tasks/get\, and push notification configuration endpoints) along with corresponding error handling via \A2AException\ types and request/response wrappers.
a2a/a2a-core/src/commonMain · high confidence
Introduce A2A server core with session, task, and push notification management
The A2A server module now provides a complete server-side implementation of the A2A protocol, centered on the new \A2AServer\ class which orchestrates request handling, agent execution, and session lifecycle. This release adds a robust session management system via \SessionManager\ and \SessionEventProcessor\ to handle concurrent agent jobs, task persistence through \TaskStorage\ (with an \InMemoryTaskStorage\ implementation), and message history via \MessageStorage\. It also introduces push notification support, allowing clients to receive task updates via \PushNotificationSender\ (including a \SimplePushNotificationSender\ using Ktor). The \AgentExecutor\ interface defines the contract for agent logic, and the server includes built-in concurrency safety using read-write locks and keyed mutexes to prevent race conditions during task and session operations.
a2a/a2a-server/src/commonMain · high confidence
Introduce ACP integration feature
Adds a new ACP (Agent Client Protocol) feature that enables agents to communicate with ACP clients. This includes the \AcpAgent\ class for managing sessions and sending events, along with message converters to translate between Koog's internal message models and ACP's content blocks, supporting audio, image, and resource attachments.
agents/agents-features/agents-features-acp/src/jvmMain/kotlin/ai/koog/agents/features/acp · high confidence
Introduce Agent Checkpoint (Persistence) feature
The new agents-features-snapshot module provides checkpoint functionality for AI agents, allowing you to save and restore agent state at specific points during execution. This enables resuming agent execution from a specific point, rolling back to previous states, and persisting agent state across sessions. The feature includes built-in storage providers (InMemory, File-based, and No-op), supports automatic checkpoint creation after each node execution, and allows for custom rollback strategies and tool side-effect rollbacks via RollbackToolRegistry. Users can install the Persistence feature in their agent configuration to enable these capabilities.
agents/agents-features/agents-features-snapshot · high confidence
Introduce Agent-to-Agent (A2A) protocol support with client, server, and transport modules
This release adds a complete implementation of the Agent-to-Agent (A2A) protocol, enabling agents to discover, communicate, and exchange tasks with other agents over HTTP. The change introduces a new module structure including \a2a-core\ for data models, \a2a-client\ and \a2a-server\ for the respective endpoints, and \a2a-transport\ for JSON-RPC over HTTP. It also adds \agents-features-a2a-client\ and \agents-features-a2a-server\ to integrate these capabilities into the Koog agent framework, along with a Python test server for integration testing.
(dependencies) · high confidence
Introduce Debugger feature for monitoring AI agent execution
The Debugger feature is now available in the agents-core module, allowing users to monitor and record events during AI agent operation. This feature integrates into the agent pipeline (graph, functional, and planner) to collect and process various events such as agent start/end, tool calls, strategy executions, and errors. It provides a remote server connection for debugging, configurable via environment variables (KOOG\_DEBUGGER\_PORT, KOOG\_DEBUGGER\_WAIT\_CONNECTION\_MS) or VM options, and includes a remote writer to send debug messages to a specified port. The feature is marked as experimental and does not allow event filtering to preserve execution sequence integrity.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger · high confidence
Introduce EventHandler feature for agent lifecycle and execution callbacks
The EventHandler feature is now available, allowing users to register callbacks for various agent lifecycle and execution events. This includes hooks for agent starting, completion, failure, and closing, as well as granular events for strategy execution, node processing (starting, completed, failed), subgraph execution, LLM calls (starting, completed), tool calls (starting, validation failed, failed, completed), and LLM streaming (starting, frame received, failed, completed). Users can attach these handlers via the \handleEvents\ DSL or by configuring \EventHandlerConfig\ to observe and react to the agent's internal state changes.
agents/agents-features/agents-features-event-handler/src/commonMain/kotlin/ai/koog/agents/features/eventHandler/feature · high confidence
Introduce HTTP-based JSON-RPC server transport with SSE and CORS support
Added a new \HttpJSONRPCServerTransport\ class that enables A2A agents to communicate over HTTP using JSON-RPC. This transport leverages Ktor to provide a standalone server mode or allows mounting routes into an existing Ktor application. Key features include Server-Sent Events (SSE) for streaming responses, automatic CORS configuration to allow cross-origin requests, and optional serving of the Agent Card at a well-known path. This change provides the underlying network transport layer for A2A server interactions.
a2a/a2a-transport/a2a-transport-server-jsonrpc-http/src/commonMain · high confidence
Introduce JSON-RPC transport layer for A2A client and server communication
This change adds the core JSON-RPC transport infrastructure for the A2A protocol, enabling both client and server sides to communicate over HTTP. It introduces the \HttpJSONRPCClientTransport\ for sending requests and handling streaming responses via Server-Sent Events (SSE), alongside abstract \JSONRPCClientTransport\ and \JSONRPCServerTransport\ classes that define the protocol logic. The implementation includes the \A2AMethod\ enum covering all defined A2A endpoints (such as \message/send\, \tasks/get\, and \agent/getAuthenticatedExtendedCard\), JSON-RPC 2.0 message models, and serialization utilities, providing the foundational networking layer for A2A agent interactions.
a2a/a2a-transport/a2a-transport-core-jsonrpc · high confidence
Introduce Ktor integration for Koog AI agents
The new \koog-ktor\ module provides a Ktor server plugin that enables seamless integration of the Koog AI agents framework into Ktor applications. Users can now install the \Koog\ plugin to configure multiple LLM providers (OpenAI, Anthropic, Google, MistralAI, OpenRouter, DeepSeek, Ollama, and AWS Bedrock) via code or YAML/CONF configuration files. The module exposes extension functions like \llm()\ for direct LLM interaction and \aiAgent()\ for creating and running AI agents within Ktor routes, supporting features such as content moderation, custom agent strategies, and JVM-specific Model Context Protocol (MCP) tool integration.
koog-ktor · high confidence
Introduce Ktor-based HTTP client implementation for Koog
This change adds a new \KtorKoogHttpClient\ implementation that uses the Ktor HTTP client library to perform GET, POST, and Server-Sent Events (SSE) requests. It registers itself as a discoverable factory via the Java Service Provider Interface (SPI), allowing the system to automatically resolve and use the Ktor-based client when available. The implementation supports custom configuration of the underlying Ktor client, including base URL, headers, query parameters, and JSON serialization settings, and includes comprehensive tests to verify its behavior and SPI discovery.
http-client/http-client-ktor · high confidence
Introduce Ktor-based MCP server with Streamable HTTP and SSE transports
Users can now start an MCP server using Ktor with support for both Streamable HTTP and SSE transports via the new \startMcpServer\ function, in addition to the existing \startStdioMcpServer\ for stdin/stdout communication. The server automatically registers tools from a \ToolRegistry\ and handles argument decoding and result serialization using a configurable \JSONSerializer\ (defaulting to \KotlinxSerializer\), with built-in error handling for argument parsing failures.
agents/agents-mcp-server/src/commonMain · high confidence
Introduce LLM-based tool call fix processor
The prompt-processor module now includes an LLM-based response processor that iteratively asks the model to correct malformed or incorrectly formatted tool calls. It detects when a tool call is intended but improperly structured, then loops (up to a configurable retry limit) to fix issues such as invalid JSON, wrong tool names, or missing arguments, falling back to a manual regex-based fixer or the original message if corrections fail.
prompt/prompt-processor · high confidence
Introduce LiteRT LLMClient for on-device Android inference
Adds a new LiteRT LLMClient for Android that enables on-device inference using the LiteRT runtime. This client supports the FunctionGemma, Gemma4E2B, and Gemma4E4B models, allows configuration of model paths, cache directories, and compute backends (CPU/GPU), and handles tool calling by forwarding tool descriptors to the LiteRT session while executing tool logic within the Koog agent framework. It also includes message conversion utilities to map Koog messages to LiteRT formats and manages session lifecycle with conversation reuse to optimize performance.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-litert-client · high confidence
Introduce LongTermMemory feature with configurable retrieval, ingestion, and failure handling
The LongTermMemory feature is now available, enabling agents to persist conversation history to a vector database and retrieve it for retrieval-augmented generation (RAG). Users can configure independent retrieval and ingestion pipelines, including search strategies (defaulting to vector similarity), query providers, and prompt augmenters (injecting context into system or user messages). The feature introduces a FailurePolicy to control error handling: retrieval failures default to failing fast to prevent ungrounded answers, while ingestion failures default to logging and continuing to avoid blocking agent runs. An InMemoryRecordStorage is included for local testing and development.
agents/agents-features/agents-features-longterm-memory/src/commonMain · high confidence
Introduce OpenAI-compatible client base with provider-specific schema generation
This change introduces the \AbstractOpenAILLMClient\ base class and associated data models for the OpenAI-compatible prompt executor, establishing a unified foundation for OpenAI-like LLM integrations. It includes \OpenAICompatibleToolDescriptorSchemaGenerator\ to convert tool descriptors into OpenAI-specific JSON schemas, alongside \OpenAIBasicJsonSchemaGenerator\ and \OpenAIStandardJsonSchemaGenerator\ to handle parameter serialization with OpenAI-specific constraints (such as handling nullable lists via \anyOf\ and enforcing required property lists). The entry also adds the core data models (\OpenAIMessage\, \OpenAIContentPart\, etc.) and tests to validate the schema generation and tool descriptor conversion logic.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base · high confidence
Introduce Spring AI v2 chat adapter with auto-configuration and provider detection
The \koog-spring-ai-v2-starter-model-chat\ module now provides a complete adapter for Spring AI v2, enabling Koog agents to use any Spring AI chat model (OpenAI, Anthropic, Google, Ollama, etc.) as their LLM backend. The \SpringAiChatAutoConfiguration\ automatically wires a \SpringAiLLMClient\ when a \ChatModel\ is present, supporting both single-candidate auto-detection and explicit bean-name selection via \koog.spring.ai.chat.chat-model-bean-name\. Provider identity is resolved automatically from the model class name or explicitly via \koog.spring.ai.chat.provider\, falling back to a generic \spring-ai\ provider. The adapter includes robust message conversion between Koog and Spring AI types, handles provider-specific streaming differences for tool calls (immediate emission for Anthropic/Google, buffering for OpenAI), and allows runtime customization of Spring AI \ChatOptions\ via the new \ChatOptionsCustomizer\ extension point.
koog-spring-ai-v2/koog-spring-ai-v2-starter-model-chat · high confidence
Introduce Spring Boot auto-configuration for Koog AI agents
The new koog-spring-boot-starter module provides seamless integration between the Koog AI agents framework and Spring Boot applications. It includes auto-configuration for LLM clients (Anthropic, Google, MistralAI, OpenAI, OpenRouter, DeepSeek, Ollama), configuration properties for easy setup through application.properties/yml, conditional bean creation based on configuration presence, and ready-to-use SingleLLMPromptExecutor beans for dependency injection.
koog-spring-boot-starter · high confidence
Introduce comprehensive agent tracing feature with streaming support
The Tracing feature has been introduced to capture detailed execution data for agents, including LLM calls, tool usage, graph node visits, and agent lifecycle events. This update adds support for LLM streaming events (starting, frame received, completed, failed) alongside standard call events, allowing for real-time analysis of streaming responses. The feature integrates with the agent pipeline via interceptors for agent, strategy, node, and tool events, emitting structured events to configurable message processors such as log writers or file writers. It also includes configuration options to filter specific message types and utilizes a unified event context with run IDs for correlation across the execution flow.
agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature · high confidence
Introduce explicit model resolution and multi-LLM routing for prompt execution
The PromptExecutor model layer now supports explicit model resolution and load-balanced routing across multiple LLM clients. A new \DynamicPromptExecutor\ base class enforces a single \resolveModel\ step before every operation, allowing custom executors to implement fallback strategies or model substitution. Two concrete executors are provided: \MultiLLMPromptExecutor\ for direct provider-to-client mapping with fallback, and \RoutingLLMPromptExecutor\ which delegates client selection to pluggable routers like the new \RoundRobinRouter\ for even load distribution. The underlying \PromptExecutorAPI\ interface introduces \ResolvedModel\ and \PromptExecutorOperation\ types to distinguish between requested and effective models, and platform-specific \PromptExecutor\ stubs are added for Android and Apple targets.
prompt/prompt-executor/prompt-executor-model · high confidence
Introduce library-agnostic serialization API with Jackson and kotlinx-serialization implementations
The serialization module now exposes a unified, library-agnostic \JSONSerializer\ interface that decouples JSON encoding/decoding from specific underlying libraries. This change introduces \serialization-core\ with core abstractions (e.g., \JSONElement\, \TypeToken\) and provides two concrete implementations: \serialization-jackson\ for JVM-based serialization using Jackson, and built-in support for \kotlinx-serialization\. A new \serialization-test\ module offers a shared test base (\JSONElementSerializationTestBase\) to validate serialization round-trips across these implementations, ensuring consistent behavior regardless of the chosen backend.
serialization · high confidence
Introduce prompt caching and LLM client retry capabilities
This release adds a new prompt caching system and robust retry logic for LLM clients. Users can now cache prompt responses using \InMemoryPromptCache\ or \FilePromptCache\ (via \prompt-cache-model\ and \prompt-cache-files\) and wrap executors with \CachedPromptExecutor\ to avoid redundant API calls. Additionally, the \prompt-executor-clients\ module introduces \RetryingLLMClient\ and configurable \RetryConfig\ (including backoff, jitter, and retryable patterns) to automatically handle transient LLM failures, along with \ConnectionTimeoutConfig\ for fine-grained network control.
prompt · high confidence
Introduce shell command execution tool with user confirmation and timeout
Added a new \ExecuteShellCommandTool\ that allows agents to run shell commands with built-in safety controls. The tool requires user confirmation before execution (via a configurable handler, defaulting to a console prompt) and enforces a configurable timeout to prevent hangs. It captures command output and exit codes, returning structured results that include explanations for denied or timed-out executions.
agents/agents-ext/src/commonMain/kotlin/ai/koog/agents/ext/tool/shell · high confidence
Introduce skills module for discovering and formatting agent capabilities
Added a new skills module that enables automatic discovery of agent skills from directory structures and generates structured prompts for them. The module includes a discovery engine that scans directories for skill definition files (SKILL.md), parses YAML frontmatter to extract metadata (name, description, license, compatibility, allowed tools), and resolves name collisions using configurable precedence rules. It also provides a prompt generation utility that formats discovered skills into XML, JSON, or YAML representations, allowing users to include optional fields like location, license, and metadata in the output.
skills · high confidence
Introduce strategy-specific event contexts for agent lifecycle tracking
The agent framework now provides dedicated context objects for strategy-related events, allowing users to access specific details when strategies start or complete. A new \StrategyEventContext\ interface extends the base lifecycle context to include the current \AIAgentContext\ and the \AIAgentStrategy\ instance. Two concrete implementations are introduced: \StrategyStartingContext\, which carries the strategy input and execution info, and \StrategyCompletedContext\, which provides the strategy result and its type token. This enables more granular handling and inspection of strategy execution phases within the agent pipeline.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/handler/strategy · high confidence
Introduce structured output API with native and manual modes
The prompt-structure module now provides a new structured output API that allows you to define data schemas and examples for LLM responses. You can choose between Native mode, which leverages the model's built-in structured output capabilities via JSON schemas, or Manual mode, which guides the model through explicit prompting. The API includes a JsonStructure for JSON-based schemas with support for description overrides and property exclusion, a MarkdownStructureDefinition for text-based structures, and a new LLMStructuredParsingError exception to handle parsing failures.
prompt/prompt-structure · high confidence
Introduce unified KoogHttpClient interface with automatic factory discovery
The http-client-core module now provides a new, unified \KoogHttpClient\ interface that standardizes HTTP operations (GET, POST, SSE streaming, and line-based streaming) across different underlying libraries. This change decouples the core HTTP client contract from specific implementations like Ktor, allowing LLM clients to use any compliant HTTP engine. On the JVM, the system automatically discovers the default HTTP client implementation at runtime using \ServiceLoader\, simplifying setup by removing the need to manually configure the HTTP client for most use cases, while still allowing explicit factory injection for custom configurations.
http-client/http-client-core · high confidence
Introduces SQL-based chat history persistence with schema migration support
The chat memory module now includes a new SQL-based implementation for storing conversation history. This change adds an abstract \SQLChatHistoryProvider\ base class that handles core persistence logic, including JSON-serialized message storage, time-to-live (TTL) expiration management, and conversation deletion. It also introduces a \SQLChatHistorySchemaMigrator\ interface to allow concrete implementations to manage database table creation and updates, along with a \NoOpSQLChatHistorySchemaMigrator\ for cases where schema management is handled externally.
agents/agents-features/agents-features-chat-memory-sql/src/commonMain/kotlin/ai/koog/agents/features/chatmemory · high confidence
Introduces a library-agnostic serialization API with a dynamic JSON model
The serialization-core module now provides a new, library-agnostic serialization API that decouples JSON handling from specific underlying libraries. This change introduces a dynamic \JSONElement\ model (including \JSONObject\, \JSONArray\, and \JSONPrimitive\) that can be manipulated independently of the serialization engine. It defines a \JSONSerializer\ interface and \TypeToken\ abstractions to support runtime type representation across platforms, with a default \KotlinxSerializer\ implementation that bridges the new API to \kotlinx-serialization\. This allows the system to mix internal data structures with external user inputs and supports Java interop via \TypeCapture\.
serialization/serialization-core · high confidence
Introduces feature configuration and system variable utilities in agents-core
The agents-core module now includes a new \FeatureConfig\ abstract base class that allows features to register message processors and define event filters to control which lifecycle events are processed or traced. Additionally, a \FeatureSystemVariables\ utility object has been added to expose the environment variable (\KOOG\_FEATURES\) and JVM option (\koog.features\) names used for external feature configuration, with the utility marked as experimental.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/config · high confidence
Introduction of FeatureMessageProcessor for event filtering
A new \FeatureMessageProcessor\ class has been added to the agents core library to handle feature-related messages and events. This component allows users to configure a filter function that determines which incoming messages are processed, providing a foundational mechanism for managing system events and updates within the agent framework.
agents/agents-core/src/nonJvmCommonMain/kotlin/ai/koog/agents/core/feature/message · high confidence
JDBC-based persistence storage for agent checkpoints
The agents module now includes a new JDBC-based persistence implementation for storing agent checkpoints, available as a separate module. This feature allows users to persist checkpoint data directly to relational databases (PostgreSQL, MySQL, and H2) using plain JDBC without requiring an ORM. The implementation provides specific storage providers for each supported database engine, automatic schema migration, and support for configurable time-to-live (TTL) to automatically clean up expired checkpoints. It also offers blocking methods for easier integration with Java applications.
agents/agents-features/agents-features-persistence-jdbc, agents/agents-features/agents-features-persistence-jdbc/src/main/kotlin/ai/koog/agents/features/persistence · high confidence
Java examples for OpenTelemetry tracing with Jaeger, Langfuse, and Weave
Added Java example implementations for the OpenTelemetry feature, demonstrating how to integrate tracing into Koog agents. The examples show configuration for standard log and OTLP exporters (viewable in Jaeger), a Langfuse exporter with custom session and trace attributes, and a Weave exporter using environment variables. A docker-compose file is also included to spin up a local Jaeger instance for local debugging.
examples/simple-examples-java/src/main/java/ai/koog/agents/example/features/opentelemetry · high confidence
Java-compatible AIAgentPlanner base class added
A new abstract base class, JavaAIAgentPlanner, has been introduced in the agents-core module to simplify integration for Java users. This class provides a Java-friendly API by exposing standard synchronous methods for building plans, executing steps, and checking completion status, while internally handling the necessary Kotlin coroutine continuations required by the underlying planner interface.
agents/agents-core/src/jvmMain/java · high confidence
Java-compatible tracing writers for file and log output
The tracing feature now exposes Java-friendly factory methods for writing trace events. In the JVM-specific tracing module, \TraceFeatureMessageFileWriter\ and \TraceFeatureMessageLogWriter\ gain \@JavaAPI\-annotated \create\ methods that accept \java.nio.file.Path\ and SLF4J \Logger\ respectively, allowing Java callers to configure trace output without dealing with Kotlin-specific types. The non-JVM tracing module provides the corresponding platform-specific implementations of these writers to ensure the tracing capability is available across all supported targets.
agents/agents-features/agents-features-trace/src/jvmCommonMain/kotlin/ai/koog/agents/features/tracing, agents/agents-features/agents-features-trace/src/nonJvmCommonMain/kotlin/ai/koog/agents/features/tracing · high confidence
Java-friendly API for AI agents and services
The agents-core module now provides a dedicated Java API for building and running AI agents. Users can construct agents using \AIAgentBuilder\ with \functionalStrategy\ or \graphStrategy\ methods, and execute them synchronously via \runBlocking\. The \AIAgentService\ class offers a blocking interface for managing agent lifecycles, including \createAgentBlocking\, \createAgentAndRunBlocking\, and \removeAgentBlocking\. Configuration is handled through \AIAgentConfig\ and its builder, which supports setting executors for strategy and LLM dispatchers. Additionally, graph-based agent workflows can be visualized as Mermaid diagrams using the new \MermaidDiagramGenerator\.
agents/agents-core/src/jvmCommonMain · high confidence
Java-friendly blocking event handlers for agent lifecycle events
The \EventHandlerConfig\ class now exposes a set of \\*Blocking\ methods (e.g., \onAgentStartingBlocking\, \onSubgraphExecutionCompletedBlocking\) that allow Java callers to register synchronous interceptors for agent, strategy, node, and subgraph lifecycle events. These methods internally wrap the provided handlers using \withContextReentrant\ to ensure proper coroutine context propagation, simplifying integration for Java users who previously had to deal with asynchronous or complex coroutine-based event registration.
agents/agents-features/agents-features-event-handler/src/jvmCommonMain/kotlin/ai/koog/agents/features/eventHandler · high confidence
Java-friendly blocking interceptors for agent pipelines
The agent pipeline now exposes JVM-friendly blocking interceptor methods (e.g., interceptNodeExecutionStartingBlocking, interceptAgentStartingBlocking, interceptPlanCreationStartingBlocking) across AIAgentPipeline, AIAgentGraphPipeline, and AIAgentPlannerPipeline. These methods accept Java-compatible functional interfaces (Interceptor, TransformInterceptor, AsyncInterceptor) and execute the interception logic on the strategy dispatcher using withContextReentrant, enabling Java callers to hook into node, subgraph, agent, strategy, and planner lifecycle events without dealing with Kotlin coroutines directly.
agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/pipeline · high confidence
New A2A and ACP agent examples with centralized API key management
The simple-examples directory now includes new demonstrations for Agent-to-Agent (A2A) communication and the Agent Client Protocol (ACP). The A2A examples feature a simple joke agent for basic message-based interaction and an advanced joke agent that supports task-based workflows, streaming responses, and artifact delivery. Additionally, ACP examples show how to integrate Koog agents as both clients and servers, including a terminal client for interacting with agents and a Koog-based agent supporting file system and terminal operations. To support these examples, a new ApiKeyService utility has been added to centralize access to environment variables for various LLM providers (OpenAI, Anthropic, Google, AWS Bedrock, MistralAI, etc.).
examples/simple-examples · high confidence
New A2A server agent feature for handling incoming requests
Agents can now act as A2A servers by installing the new \agents-features-a2a-server\ module. This feature exposes the A2A request context and event processor to agent strategies, allowing them to receive messages, manage tasks, and send responses or status events back to clients. It includes pre-built agent nodes for common operations such as sending messages (\nodeA2ARespondMessage\), updating task status (\nodeA2ARespondTaskEvent\), and managing message and task storage.
agents/agents-features/agents-features-a2a-server · high confidence
New Code Agent and ACP integration examples
The examples directory now includes a new ACP agent example demonstrating how to connect a Koog agent to IntelliJ IDEA via the Agent Communication Protocol, and a multi-step Code Agent series (minimal agent, execution tool, and observability) that guides users through building a coding agent with shell execution and LangFuse tracing capabilities.
examples · high confidence
New Java API for agent graph strategies and subgraph utilities
The library introduces a new Java API for defining agent execution strategies and managing subgraphs. This includes pre-built strategies such as \chatAgentStrategy\, \reActStrategy\, \structuredOutputWithToolsStrategy\, and \singleRunStrategyWithHistoryCompression\ (with configurable history compression), as well as utilities for subgraph management like \subgraphWithRetry\ (with condition-based retry logic) and \llmAsAJudge\ (for LLM-based plan evaluation). These components are exposed via the \AIAgentStrategies\ and \AIAgentSubgraphExt\ modules to allow Java projects to construct and control complex agent workflows.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/ext/agent · high confidence
New Java example for JavaOne 2026
Added a new Java-based example application in the examples/javaone-2026 directory that demonstrates how to build and run AI agents using the Koog framework. The example includes a Spring Boot application with a REST API endpoint for launching support agents, along with several agent strategy implementations: a functional agent, a GOAP (Goal-Oriented Action Planning) agent, an LLM-planner agent with history compression, and a simple graph-based agent. It also provides tool implementations for reading and writing account information, communication, and data structures for handling account issues and transactions.
examples/javaone-2026 · high confidence
New Java examples for agent strategies, persistence, and chat memory
The simple-examples-java module now includes a comprehensive set of Java demonstrations for building AI agents. These examples cover graph-based strategies (Calculator, Problem Solver), functional strategies (Chat, Problem Solver), and GOAP planning. They also showcase advanced features like JDBC-backed chat history persistence and agent state persistence using PostgreSQL, as well as custom subgraph implementations for research workflows. A shared ApiKeyService utility is provided to manage environment-based API keys for various providers.
examples/simple-examples-java · high confidence
New Java-blocking API for synchronous feature message processing
The \FeatureMessageProcessor\ now exposes dedicated blocking methods (\initializeBlocking\, \onMessageBlocking\) and non-suspend override hooks (\handleMessage\, \handleClose\) to facilitate synchronous interaction from Java code. This allows Java developers to initialize and process feature messages without managing Kotlin coroutines, while the underlying implementation delegates to the existing coroutine-based logic using \runBlockingReentrant\.
agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/message · high confidence
New JavaScript example for running Koog agents
This change introduces a new example project (koogelis) that demonstrates how to invoke a Koog agent from JavaScript code. The example provides a configurable agent setup supporting Google AI models (including Gemini 3 Flash Preview) and local Ollama instances, with features like MCP tool integration, agent persistence, and tracing. It includes the necessary Kotlin/JS source files to bridge the agent logic to the JavaScript environment.
examples/koog-js-example/koogelis · high confidence
New LLM client infrastructure with retry logic and Java blocking APIs
This change introduces the core \LLMClient\ and \LLMEmbeddingProvider\ interfaces and their platform-specific implementations (JVM, Android, Apple, JS) in the \prompt-executor-clients\ module. It adds a \RetryingLLMClient\ decorator that automatically retries transient failures (such as rate limits or timeouts) based on a configurable \RetryConfig\, and provides Java-friendly blocking wrappers (e.g., \executeBlocking\, \embedBlocking\) on the JVM target to allow synchronous usage from Java code. The module also includes serialization helpers for handling additional JSON properties and defines model definition interfaces.
prompt/prompt-executor/prompt-executor-clients · high confidence
New MCP metadata library for transport types and server info
The \agents-mcp-metadata\ module has been introduced to provide common classes for MCP metadata. This includes the \McpTransportType\ enum, which defines supported transport protocols (Stdio, Tcp, StreamableHttp, and Unknown), and the \McpServerInfo\ class for storing server connection details. Additionally, the \McpMetadataKeys\ object exposes standard keys for tool identification, server URLs, ports, instructions, protocol versions, and session IDs, enabling consistent metadata handling across MCP tool integrations.
agents/agents-mcp-metadata · high confidence
New McpTool implementation and registry provider for Model Context Protocol integration
This change introduces the core components for integrating Model Context Protocol (MCP) tools into the agent framework. It adds McpTool, which bridges the agent framework's Tool interface with the MCP SDK by handling argument conversion, tool execution, and result serialization (including improved error handling for LLMs). It also adds McpToolRegistryProvider, which facilitates connecting to MCP servers via Streamable HTTP, SSE, or stdio transports, and McpToolDefinitionParser to convert MCP tool schemas into the framework's ToolDescriptor format, supporting complex types like anyOf and enums.
agents/agents-mcp/src/commonMain · high confidence
New MessageTokenizer feature for configurable message tokenization
A new \MessageTokenizer\ feature has been added to the agents toolkit, allowing users to integrate tokenization logic directly into the agent pipeline. This feature supports configurable tokenization strategies via a \MessageTokenizerConfig\, including the ability to enable or disable caching for tokenization results to optimize performance. It provides a \tokenizer()\ extension function on \AIAgentContext\ to access the configured \PromptTokenizer\ instance, enabling downstream components to estimate token counts and process messages consistently across graph, functional, and planner pipelines.
agents/agents-features/agents-features-tokenizer/src/commonMain/kotlin/ai/koog/agents/features/tokenizer · high confidence
New MessageTokenizer feature for token counting and caching
The agents-features-tokenizer module introduces the MessageTokenizer feature, allowing AI Agents to count tokens in individual messages and entire prompts, manage token usage for cost and performance optimization, and support both on-demand and cached tokenization strategies. Users can install the feature via the MessageTokenizer config to specify a tokenizer implementation and enable caching, then access token counts through the agent context's LLM session.
agents/agents-features/agents-features-tokenizer · high confidence
New OpenTelemetry tracing examples for Jaeger, Langfuse, and Weave
Added example code demonstrating how to integrate Koog agents with OpenTelemetry for distributed tracing. The new examples show how to configure the OpenTelemetry feature to export traces to a local Jaeger instance (via OTLP gRPC), Langfuse (via OTLP HTTP), and Weave (via OTLP HTTP), including the necessary setup for environment variables and Docker services.
examples/simple-examples/src/main/kotlin/ai/koog/agents/example/features/opentelemetry · high confidence
New Python-based A2A test server with agent execution and task management
A new test server implementation has been added to the \a2a/test-python-a2a-server\ location, providing a functional Python-based A2A (Agent-to-Agent) server for integration testing. The server, built on Starlette and Uvicorn, exposes an agent card with skills (including a basic 'hello world' and an extended authenticated skill) and handles requests via a \DefaultRequestHandler\. It supports various agent execution scenarios, including simple text responses, task submission with status updates (submitted, working, completed), cancellable tasks, and long-running tasks with streaming progress updates. The server uses in-memory stores for task history and push notification configurations, running on port 9999 by default.
a2a/test-python-a2a-server · high confidence
New RegexSearchTool for content-based file searching
A new \RegexSearchTool\ is now available in the agents extension library, allowing users to search for regular expression patterns within text files across specified directories. The tool recursively scans files, returning structured results that include file paths, line numbers, and contextual excerpts around matches. It supports pagination via limit and skip parameters, as well as case-sensitive or case-insensitive matching, enabling precise content retrieval without modifying the underlying files.
agents/agents-ext/src/commonMain/kotlin/ai/koog/agents/ext/tool/search · high confidence
New SQL persistence provider infrastructure with schema migration and storage abstraction
The SQL persistence feature now includes a new \SQLPersistenceSchemaMigrator\ interface and a \NoOpSQLPersistenceSchemaMigrator\ implementation to handle database schema changes asynchronously, alongside a new \SQLPersistenceStorageProvider\ abstract base class. This provider establishes a generic SQL abstraction for persisting agent checkpoints to relational databases, defining a standard schema (persistence\_id, checkpoint\_id, created\_at, checkpoint\_json, ttl\_timestamp) and providing methods for transaction management, TTL-based cleanup, and checkpoint CRUD operations, enabling concrete implementations to support specific SQL dialects.
agents/agents-features/agents-features-sql/src/commonMain/kotlin/ai/koog/agents/features/sql · high confidence
New Spring AI integration for chat memory and embedding models
This release adds Spring Boot auto-configuration for Koog's Spring AI integration, introducing two new starters: chat memory and embedding models. The chat memory starter provides a \ChatHistoryProvider\ backed by Spring AI's \ChatMemoryRepository\, enabling text-only conversation persistence with support for selecting specific repository beans via configuration. The embedding starter offers an \LLMEmbeddingProvider\ that delegates to Spring AI's \EmbeddingModel\, allowing runtime model selection and bean-based configuration when multiple models are present. Both starters share a common threading configuration mechanism that automatically detects Spring's \AsyncTaskExecutor\ (supporting virtual threads) or falls back to \Dispatchers.IO\, with configurable parallelism limits to prevent thread starvation under load.
(repo-wide) · high confidence
New Spring Boot example for the Koog Java API
Added a complete Spring Boot application example in the \examples/koog-java-api-example\ directory that demonstrates how to integrate the Koog Java API. The example includes a REST controller for launching and monitoring support agents, a service layer using the new \AIAgent\ builder and \MultiLLMPromptExecutor\, and supporting data structures annotated with \@LLMDescription\. It also provides a \RollbackTools\ implementation to show how tool reversibility works within the agent's execution context.
examples/koog-java-api-example · high confidence
New agent testing API with graph assertions and LLM capture
The agents-test module now exposes a comprehensive testing API for validating AI agent behavior. Users can assert on agent graph structure and execution flow using \GraphAssertions\, \EdgeAssertion\, \NodeOutputAssertion\, and \ReachabilityAssertion\. A \CapturingLLMClient\ is provided to intercept and inspect LLM interactions, exposing details like executed prompts, models, tools, and embeddings. Additionally, \AIAgentContextMockBuilderBase\ allows constructing mock agent contexts for isolated testing.
agents/agents-test · high confidence
New agents-cli module for integrating Claude Code and OpenAI Codex
The new agents-cli module allows you to use Claude Code and OpenAI Codex as agents within Koog workflows. Instead of communicating with LLMs through API calls, it invokes their CLI binaries and parses the output. Agents can run locally via ProcessCliTransport or inside Docker containers via DockerCliTransport. CLI agents can also be embedded as nodes in Koog graph-based strategies using asNode(), enabling multi-agent orchestration.
agents/agents-cli · high confidence
New agents-planner module with GOAP and LLM-based planning strategies
The \agents-planner\ module introduces dedicated planner strategy implementations for \agents-core\, accessible via the \Planners\ factory entry point. It adds a Goal-Oriented Action Planning (GOAP) strategy, allowing users to define actions with preconditions, beliefs, costs, and execution logic, and goals with conditions, using a DSL or Java-style builders; the planner uses A\* search to find the optimal action sequence. It also adds LLM-based planning strategies (\llmBased\ and \llmBasedWithCritic\) that delegate plan creation and execution to an LLM, with the critic variant adding a second LLM pass to evaluate and potentially replan. The module includes builders for GOAP actions and goals, state management via \GoapAgentState\, and comprehensive tests for both Kotlin and Java usage.
agents/agents-planner · high confidence
New code-agent example with OpenTelemetry and Langfuse observability
Added a new example agent in the step-03-add-observability directory that demonstrates how to integrate observability into a code-agent application. The example configures OpenTelemetry tracing with a Langfuse exporter to send trace data, allowing users to monitor agent execution and tool calls. It also includes a Logback configuration for console logging at the ERROR level.
examples/code-agent/step-03-add-observability · high confidence
New file-system and document abstractions in rag-base
The rag-base module introduces a new set of interfaces and utilities for handling files and documents, including a generic DocumentProvider for retrieving and editing document text, a FileSystemProvider with read-only and read-write capabilities, and a TraversalFilter system (with GlobPattern support) to restrict file-system visibility. It also adds data models such as DocumentWithPayload, TextDocument, FileMetadata, FileSize, and FileSystemEntry to represent document metadata, file sizes, and hierarchical file-system entries, along with utility functions for text range manipulation and path filtering.
rag/rag-base · high confidence
New inspection for missing KDoc in public API declarations
A new local inspection named 'Missing KDoc for public API declaration' has been added to the inspections directory. This tool scans Kotlin files for public classes, functions, properties, and object declarations that lack KDoc comments, flagging them as warnings. It specifically excludes overridden members, ensuring that only original public API surface areas are checked for documentation coverage.
inspections · high confidence
New node execution event contexts with input/output type information
The framework now exposes specific event context classes for node lifecycle events (starting, completed, failed). These contexts include the node's input and output data along with their corresponding TypeToken metadata, allowing users to inspect the exact data types flowing through the agent graph during execution.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/handler/node · high confidence
New pure JDBC ChatHistoryProvider implementations for PostgreSQL, MySQL, H2, and Oracle
This module introduces a set of chat history providers that persist conversation history using plain JDBC without requiring an ORM like Exposed. It includes specific implementations for PostgreSQL, MySQL, H2, and Oracle, each extending the base \JdbcChatHistoryProvider\ and providing their own schema migrators for automatic table creation. The providers support configurable TTL for automatic cleanup of expired conversations and are designed for Java interoperability with \@JvmOverloads\ constructors.
agents/agents-features/agents-features-chat-history-jdbc · high confidence
New shared utils module with platform-specific system config, secrets, and time utilities
The \utils\ module introduces a set of cross-platform helpers for the Koog project. It provides a \SystemConfigReader\ interface with platform-specific implementations: on JVM it reads from environment variables and system properties, and on Apple platforms it reads from \NSUserDefaults\ (Android, JS, and WasmJS currently throw \NotImplementedError\). A \SystemSecretsReader\ interface is also added, with a JVM implementation that reads from environment variables (Apple, Android, JS, and WasmJS currently throw \NotImplementedError\). A \KoogClock\ functional interface abstracts the current time source, defaulting to \kotlin.time.Clock.System\, and a \TimeUtils\ class on JVM bridges Java and Kotlin time types. Additional utilities include a \ByteArrayAsBase64Serializer\ for kotlinx.serialization, a \masked\ extension on strings for hiding sensitive data, a \Closeable\ interface with a \use\ extension for coroutines, and a \Dispatchers.SuitableForIO\ property that delegates to platform-appropriate dispatchers. Reentrant coroutine utilities (\runBlockingReentrant\, \withContextReentrant\) are included for safe interop with blocking Java code, and an \@InternalKoogUtils\ opt-in annotation marks internal APIs.
utils · high confidence
New structured event model for agent lifecycle, LLM calls, and tool execution
The agent core now exposes a comprehensive set of serializable feature events that provide detailed observability into the agent's execution flow. This includes lifecycle events for the agent itself (starting, completing, failing, closing), granular events for LLM interactions (starting, completed, failed, and streaming frames), and execution events for internal components such as nodes, subgraphs, strategies (including graph-based strategies with topology details), and tool calls (starting, validation failures, failures, and completions). All events share a common base with execution context and timestamps, enabling consistent monitoring and debugging of agent runs.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/model/events · high confidence
New test-utils module with serialization helpers and coroutine-aware Awaitility extensions
A new test-utils module has been introduced to provide shared testing utilities across the Koog codebase. This includes a CapturingKoogHttpClient test double for verifying HTTP request paths and bodies, and SerializationHelpers that allow verifying JSON deserialization and re-serialization consistency with configurable strict/lenient modes. For JVM-based tests, the module adds Awaitility extensions that support Kotlin Coroutines (allowing suspendable assertions within Awaitility's polling loop) and a DockerAvailableCondition to automatically skip tests when Docker is not present.
test-utils · high confidence
New token counting capabilities for prompts and messages
The prompt module now includes a tokenizer library that allows you to estimate token usage for messages and prompts. This includes a \PromptTokenizer\ interface with \OnDemandTokenizer\ and \CachingTokenizer\ implementations, as well as several \Tokenizer\ implementations like \NoTokenizer\, \SimpleRegexBasedTokenizer\, and \TiktokenEncoder\ for different accuracy and performance needs. This enables better management of context windows and cost estimation when interacting with LLMs.
prompt/prompt-tokenizer · high confidence
New trace event formatters and writers for file, log, and remote output
The tracing feature now includes dedicated message processors to write trace events to files, logs, and remote servers, each with customizable formatting. Users can install \TraceFeatureMessageFileWriter\ to persist traces to disk, \TraceFeatureMessageLogWriter\ to stream them to a logger (defaulting to INFO level), or \TraceFeatureMessageRemoteWriter\ (moved to the core tracing package) to send data to a remote server. The system also introduces a comprehensive default formatting strategy that structures event output to include specific context such as agent ID, run ID, node names, prompts, model identifiers, tool details, and error messages for events like LLM calls, streaming, tool usage, and node execution.
agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/writer · high confidence
New utility classes for locking, model info, and hidden strings in agents-utils
The agents-utils module now exposes several new public utilities: a KeyedMutex for keyed, suspend-friendly mutual exclusion and an RWLock for concurrent read/exclusive write access, both supporting Kotlin Multiplatform; a ModelInfo data class that replaces the previous 'provider:model' string format with structured fields (provider, model, displayName, contextLength, maxOutputTokens) and includes serialization support; and a HiddenString data class that obscures sensitive values in string representations while keeping the original value accessible. Additionally, a public rootCause extension property for CancellationException and a withLockCheck extension for Mutex are now available in this module, and the previous expect/actual declaration for Dispatchers.SuitableForIO has been removed.
agents/agents-utils · high confidence
Ollama client introduces configurable context window strategies and dynamic model metadata
The Ollama client now allows users to control how the \num\_ctx\ parameter is determined for chat requests through a new \ContextWindowStrategy\ interface with three built-in modes: \None\ (delegates to the Ollama server's default logic), \Fixed\ (enforces a specific context length, capped by the model's maximum), and \FitPrompt\ (dynamically calculates the context length based on prompt tokenization or previous usage, rounded to configurable chunk sizes). Additionally, the client now parses detailed model metadata from the Ollama API via \OllamaModelCard\, exposing properties like parameter count, embedding length, and capabilities, which are used to populate \LLModel\ definitions with accurate context lengths and capabilities.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-ollama-client · high confidence
OpenRouter client refactored with native embedding support and decoupled HTTP layer
The OpenRouter client has been significantly refactored to support embedding generation alongside chat completions, introducing dedicated data models for embeddings and model listings (including pricing and architecture details). The client now decouples from the Ktor HTTP library by accepting an abstract HttpClientFactory, allowing non-Ktor implementations on the JVM, and provides a convenience factory that auto-resolves the default HTTP client. Additionally, the internal data models have been restructured to align with OpenAI-compatible standards, and comprehensive tests have been added to verify serialization, parameter validation, and embedding functionality.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-openrouter-client · high confidence
OpenTelemetry feature migrated to Kotlin Multiplatform with new GenAI attribute structure
The OpenTelemetry integration for AI agents has been rewritten to support Kotlin Multiplatform, replacing the previous Java-specific implementation with a commonMain codebase backed by the Kotlin OpenTelemetry SDK. This change introduces a comprehensive, type-safe attribute system for OpenTelemetry GenAI semantic conventions (covering agent, provider, input/output, tool, and usage data) alongside vendor-specific (Koog) and Model Context Protocol (MCP) attributes. Users benefit from consistent tracing capabilities across all supported platforms, with configuration now managed through a unified API that supports custom span processors, resource attributes, and verbose debugging modes.
agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry · high confidence
OpenTelemetry feature now supports Java API compatibility and Kotlin Multiplatform
The OpenTelemetry feature has been migrated to Kotlin Multiplatform, introducing platform-specific implementations for JVM and non-JVM targets. For Java users, the feature now provides Java-friendly API overrides in OpenTelemetryConfig, including methods like setServiceInfo and integration exporters (Langfuse, Weave, Datadog) that accept java.time.Duration to work around Kotlin value-class name mangling. The JVM implementation includes a full metric collector with counters and histograms, while non-JVM platforms use a no-op metric collector. The feature also adds tool name cardinality restriction capabilities to manage metric dimensions.
agents/agents-features/agents-features-opentelemetry/src/jvmCommonMain/kotlin/ai/koog/agents/features/opentelemetry, agents/agents-features/agents-features-opentelemetry/src/nonJvmCommonMain/kotlin/ai/koog/agents/features/opentelemetry · high confidence
Planner lifecycle event contexts added
The planner agent pipeline now exposes specific event context classes (such as PlanCreationStartingContext, StepExecutionCompletedContext, and PlanCompletionEvaluationCompletedContext) that extend the base AgentLifecycleEventContext. These contexts provide structured access to the AIAgentContext, current state, plan details, and step index for key planner operations, enabling interceptors and handlers to observe and react to the planner's lifecycle events like plan building and step execution.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/handler/planner · high confidence
Project onboarding and development guidelines established
The repository now includes comprehensive documentation and configuration files to standardize the development workflow. A new \.editorconfig\ enforces consistent code style (UTF-8, LF line endings, 4-space indentation) and integrates ktlint rules for Kotlin files. An \AGENTS.md\ file provides a project overview, architecture summary, and testing guidelines, while symlinks (\CLAUDE.md\, \CODEX.md\, \GEMINI.md\, \GPT.md\) point to it for AI coding assistants. \CONTRIBUTING.md\ has been updated to specify Conventional Commits for PR titles, define supported scopes, and introduce ABI validation via \checkLegacyAbi\ to prevent accidental public API breaks. \TESTING.md\ outlines quality gates and test execution commands, and \VERSIONING.md\ details the semantic versioning policy and stable/beta module structure. Additionally, \.gitignore\ has been expanded to exclude local environment files and build artifacts, and the \LICENSE\ file was renamed to \LICENSE.txt\.
(repo-wide) · high confidence
Pure JDBC Chat History Provider with multi-database support
The chat history module now includes a pure JDBC implementation that allows storing conversation history in standard SQL databases. This adds a base \JdbcChatHistoryProvider\ and specific implementations for H2, MySQL, PostgreSQL, and Oracle, each handling database-specific schema creation and upsert logic (such as \MERGE\ for H2/Oracle and \ON DUPLICATE KEY\ for MySQL). Users can now persist chat history using their existing JDBC data sources with built-in support for message serialization and optional TTL-based expiration.
agents/agents-features/agents-features-chat-history-jdbc/src/main/kotlin/ai/koog/agents/features/chathistory · high confidence
SQL checkpoint persistence now supports TTL and filtering
The SQL persistence provider for agent checkpoints has been updated to support automatic expiration (TTL) and query filtering. Checkpoints can now be assigned a time-to-live, after which they are automatically cleaned up by the storage provider, helping to manage database size. Additionally, the provider now accepts filters to retrieve specific checkpoints rather than just the latest one, enabling more granular state management and querying capabilities for agents using SQL-backed persistence.
agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql · high confidence
SQL persistence providers for agent checkpoints and chat history
The agents-features-sql module now provides SQL-based persistence for agent checkpoints using the JetBrains Exposed ORM, supporting PostgreSQL, MySQL, H2, and SQLite with HikariCP connection pooling and configurable TTL cleanup. Additionally, the new agents-features-chat-memory-sql module exposes SQL-based providers for persisting chat history, supporting PostgreSQL, MySQL, and H2 with automatic cleanup of expired conversations. Both modules include database-specific schema migrators and allow independent installation.
agents/agents-features/agents-features-sql · high confidence
Support for multi-choice LLM responses with selectable strategies
The agent framework now supports generating multiple response choices from the LLM and selecting one based on a configurable strategy. This is enabled by new DSL nodes (\nodeLLMSendResultsMultipleChoices\ and \nodeSelectLLMChoice\) that allow agents to send tool results and request multiple LLM outputs, then apply a \ChoiceSelectionStrategy\ (defaulting to picking the first choice) to determine the final assistant message. A specialized \PromptExecutorWithChoiceSelection\ wraps the standard executor to handle this multi-choice generation and selection flow transparently.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/ext/llm · high confidence
Tool execution now supports per-call metadata
The agents-tools module now allows tools to receive additional per-call metadata alongside their standard typed arguments. This metadata is passed via a side channel, meaning it is not part of the tool's argument schema and is not serialized to the LLM. This enables caller- and feature-contributed context to be available during tool execution without affecting the prompt sent to the model.
agents/agents-tools · high confidence
Removals
Removal of JVM-specific tool execution extension functions
The JVM-specific file \AIAgentLLMWriteSession.jvm.kt\ has been removed, eliminating extension functions that allowed direct invocation of tools via Kotlin reflection (\KFunction\). This removes the \findTool\, \callTool\, \toParallelToolCalls\, \toParallelToolCallsRaw\, \emitParallelToolCalls\, and \emitParallelToolCallsRaw\ APIs from the \AIAgentLLMWriteSession\ class, meaning users can no longer execute tools by passing function references directly in this session context.
agents/agents-core/src/jvmMain/kotlin/ai/koog/agents/core/agent · high confidence
Removal of MultiLLMPromptExecutor and SingleLLMPromptExecutor classes
The \MultiLLMPromptExecutor\ and \SingleLLMPromptExecutor\ classes, along with their associated test suite (\LLMPromptExecutorMockTest\), have been removed from the \prompt-executor-llms\ module. This change eliminates the previous implementation that routed prompts to specific LLM clients based on provider maps or single-client delegation, indicating a structural shift in how prompt execution is handled within the library.
prompt/prompt-executor/prompt-executor-llms · high confidence
Removal of SafeToolFromCallable wrapper
The \SafeToolFromCallable\ class and its associated \Result\ sealed interface have been removed from the JVM agent environment. This eliminates the previous abstraction layer that wrapped Kotlin callables (\KFunction\) for tool execution, meaning users can no longer utilize this specific wrapper to safely invoke tools within the environment.
agents/agents-core/src/jvmMain/kotlin/ai/koog/agents/core/environment · high confidence
Removal of agents-features-common module
The agents-features-common module has been removed from the codebase. This deletion eliminates the shared infrastructure previously provided for agent features, including the feature configuration framework, message and event system, I/O utilities, and client/server architecture components. Users relying on this module for common agent feature implementation must migrate to the new location where this logic has been moved.
agents/agents-features/agents-features-common · high confidence
Removal of deprecated agent factory functions and strategies
The \simpleChatAgent\, \simpleSingleRunAgent\, \chatAgentStrategy\, and \singleRunStrategy\ functions have been removed from the \agents-ext\ module. This change eliminates the legacy convenience constructors and graph-based strategies that previously handled basic chat and single-run agent configurations, requiring users to migrate to the current agent creation and strategy APIs.
agents/agents-ext/src/commonMain/kotlin/ai/koog/agents/ext/agent · high confidence
Removal of legacy event handling and remote messaging infrastructure
The \EventHandler\ feature, which allowed users to register callbacks for agent lifecycle, strategy, node, LLM, and tool events, has been removed along with its configuration and test suite. Additionally, the common feature infrastructure for remote communication via Server-Sent Events (SSE) has been deleted, including the \FeatureMessageRemoteServer\, \FeatureMessageRemoteClient\, associated connection configurations, and the underlying \FeatureMessage\ serialization and processing classes. This eliminates the ability to hook into agent execution events and removes the built-in mechanism for streaming feature messages to remote clients.
(repo-wide) · high confidence
Removal of reflection-based tool implementation
The \ToolFromCallable\ class and its associated reflection utilities in \agents/agents-tools/src/jvmMain\ have been removed. This eliminates the ability to dynamically create tools from arbitrary Kotlin callables (functions/methods) using reflection, requiring users to adopt the library's new serialization API and class-based tool definitions instead.
agents/agents-tools/src/jvmMain · high confidence
API
Publishes agents-core public API surface for multiplatform and JVM
The agents-core module now publishes its stable public API definitions for consumers. This includes the Klib ABI dump for multiplatform targets (iOS, JS, WASM) and the standard API dumps for Android and JVM. These files expose the public interfaces, classes, and functions available in the agents-core library, allowing downstream projects to verify binary compatibility and understand the available agent building blocks, strategies, and service configurations.
agents/agents-core/api · high confidence
Tracing feature API stabilization and event naming updates
The \agents-features-trace\ module now exposes its public API via new ABI dump files for JVM, Android, and multiplatform targets, formally publishing the \Tracing\ feature, \TraceFeatureConfig\, and message writers (\TraceFeatureMessageLogWriter\, \TraceFeatureMessageFileWriter\, \TraceFeatureMessageRemoteWriter\). The module's documentation has been updated to reflect a shift in event naming conventions, changing from \\*StartEvent\/\\*EndEvent\ patterns to \\*StartingEvent\/\\*CompletedEvent\ patterns (e.g., \LLMCallStartingEvent\, \ToolExecutionCompletedEvent\). Additionally, the example configuration demonstrates a refined approach to filtering trace messages, using \setMessageFilter\ on the file writer instance to selectively capture specific execution events.
agents/agents-features/agents-features-trace · high confidence
Behavioural changes
Added KDoc documentation to Vector utility methods
The Vector class in the embeddings-base module now includes KDoc comments for its public utility methods: isNull(), magnitude(), and dotProduct(). This change improves API discoverability and provides users with clear descriptions of what these methods do, their return values, and any constraints (such as dimension matching for dotProduct), aligning with the project's new inspection for missing KDocs in the public API.
embeddings/embeddings-base · high confidence
Added iOS build stub for ACP feature module
A stub class has been added to the ACP feature module to satisfy iOS build requirements when the commonMain source set is not explicitly configured, ensuring the module can be published for the iOS target.
agents/agents-features/agents-features-acp/src/commonMain/kotlin/ai/koog/agents/features/acp · high confidence
Added iOS build stub for chat history module
A stub class was added to the chat history AWS module to resolve publishing issues for the iOS target when no commonMain source set is configured.
agents/agents-features/agents-features-chat-history-aws/src/commonMain/kotlin/ai/koog/agents/features/chathistory · medium confidence
Added iOS publishing stub to koog-agents-additions
A new Stub class has been added to the koog-agents-additions module to resolve publishing issues for the iOS target when commonMain is not explicitly set.
koog-agents-additions · high confidence
Added iOS stub and ABI dumps to support iOS publishing
The koog-agents module now includes a stub class in commonMain to satisfy iOS target publishing requirements when no commonMain code is present, alongside new API dump files for JVM, Klib (covering iOS, JS, and WASM targets), and Android. This change ensures the library can be successfully compiled and published for iOS platforms without exposing internal implementation details in the public API.
koog-agents · high confidence
Build infrastructure migrated to convention-plugin-ai with Kotlin 2.3 and JVM 17 defaults
The build configuration has been reorganized into the new \convention-plugin-ai\ module, centralizing Gradle conventions for JVM, Multiplatform, and Dokka. This update enforces Kotlin 2.3 as the language and API version, raises the JVM target and Java compatibility to version 17, and configures the Multiplatform plugin to include shared source sets for non-JVM and JVM/Android targets. Additionally, the Dokka plugin now links to the correct release branch for source code navigation, and ABI validation is enabled for public APIs while excluding internal annotations.
convention-plugin-ai/src/main/kotlin · high confidence
Build infrastructure reorganized into convention-plugin-ai with enhanced test and package verification
Build logic previously located in buildSrc has been moved to the convention-plugin-ai module, renaming the internal package from ai.grazie to ai.koog. This change introduces a new CheckSplitPackagesPlugin that detects and reports split packages across JARs on the classpath, configurable via a DSL to fail or warn. JVM test execution is now parallelized by default using JUnit 5 dynamic parallelism, and the test suite has been streamlined by removing the PERFORMANCE, GPU, and CLIENT test types while adding an OLLAMA test type. Additionally, the Maven publishing configuration has been updated to use configureEach for POM metadata, ensuring that lazy publications (such as those from AGP) are correctly included, and the XCFramework build configuration remains opt-in via a Gradle property.
convention-plugin-ai/src/main/kotlin/ai · high confidence
CachedPromptExecutor adopts new Message architecture and tool-aware caching
The CachedPromptExecutor now integrates with the updated Message architecture, returning a single Message.Assistant instead of a list of responses, and supports tool-aware caching by including ToolDescriptor lists in cache keys. It also introduces a configurable clock for timestamp-based cache validation, delegates model resolution and JSON schema generation to the nested executor, and implements AutoCloseable to properly clean up resources.
prompt/prompt-executor/prompt-executor-cached · high confidence
Chat memory feature refactored to focus on conversation history persistence
The agents-features-memory module has been refactored to replace the previous fact-based memory system with a conversation history persistence feature. The new \ChatMemory\ feature automatically loads and stores full conversation history between agent runs using a pluggable \ChatHistoryProvider\ interface, which includes a built-in \InMemoryChatHistoryProvider\ for testing. Configuration is now handled via \ChatMemoryConfig\, allowing users to set a custom history provider and apply \ChatMemoryPreProcessor\ implementations (such as the new \WindowSizePreProcessor\ for sliding-window truncation and \FilterMessagesPreProcessor\ for message filtering) to shape the history before it is injected into the prompt or saved.
agents/agents-features/agents-features-memory · high confidence
Chat memory feature replaces legacy AgentMemory with conversation history persistence
The legacy AgentMemory feature, which stored structured facts (concepts, subjects, scopes) via providers like LocalFileMemoryProvider, has been removed and replaced by a new ChatMemory feature. ChatMemory now persists and retrieves full conversation history (message lists) between agent sessions using a pluggable ChatHistoryProvider, with InMemoryChatHistoryProvider available for testing. Users can configure message preprocessing, including sliding window truncation (windowSize) and content filtering (filterMessages), to manage prompt size and relevance.
agents/agents-features/agents-features-memory/src/commonMain · high confidence
Consolidates event handler configuration into a single abstract class
The event handler configuration has been refactored to replace the previous API and implementation split with a single abstract class. This change simplifies the configuration structure for non-JVM platforms, ensuring that the EventHandlerConfig is now defined as a single actual class that extends the common base, reducing complexity in how event handler settings are managed across different environments.
agents/agents-features/agents-features-event-handler/src/nonJvmCommonMain/kotlin/ai/koog/agents/features/eventHandler · medium confidence
Demo Compose App restructured with new Android entry point and multi-provider agent support
The Demo Compose App has been reorganized to include a dedicated Android entry point (MainActivity and AndroidManifest) and a unified common module structure. Users can now select from multiple LLM providers (Ollama, OpenAI, Anthropic, Gemini) in the Settings screen, with Ollama added as a new option. The app features two agent demos—a Calculator and a Weather agent—where the Weather agent utilizes tools for datetime handling and OpenMeteo API integration. Navigation is handled via a new stack-based system, and agent responses are rendered using a Markdown component for improved readability.
examples/demo-compose-app/commonApp · high confidence
EventHandler API adopts context-based callbacks and unified agent builder
The EventHandler feature now uses a context-based callback model where event handlers (such as onAgentStarting, onAgentCompleted, onLLMCallStarting, and onToolCallCompleted) receive a typed event context object instead of individual arguments, providing structured access to details like agent IDs, tool names, and results. Additionally, the agent construction API has been unified from the AIAgents builder to the AIAgent builder, and the module documentation has been updated to reflect these naming and structural changes.
agents/agents-features/agents-features-event-handler · high confidence
Expanded LLM capabilities and model metadata support
The LLM model definitions now include optional context length and maximum output token limits, allowing applications to better manage resource usage and token constraints. The capability system has been significantly extended to support new features such as audio, document, and video processing, prompt caching, content moderation, and multi-choice generation. Additionally, the provider hierarchy has been unsealed to allow for custom provider implementations, and the JSON schema support has been refined with 'Basic' and 'Standard' levels to better reflect actual model capabilities.
prompt/prompt-llm · high confidence
Feature message writers migrated to agents-core with reactive state management
The feature message writers (File, Log, and Remote) have been moved from the agents-features-common module to agents-core. This change updates the \isOpen\ status from a simple boolean to a reactive \StateFlow\, allowing consumers to observe writer state changes asynchronously. Additionally, the default port for the remote server connection has been updated from 8080 to 50881, and lock/exception utilities have been consolidated into the agents-utils module.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/writer · high confidence
In-memory prompt cache now enforces positive size limits and uses a unified request model
The in-memory prompt cache implementation now validates configuration strings to reject negative or non-numeric size limits, ensuring only positive integers or 'unlimited' are accepted. Additionally, the cache interface has shifted from accepting separate prompt and tool lists to using a unified \Request\ object, which simplifies cache key generation by stripping metadata (like timestamps) before hashing. This change also standardizes cached responses to a single \Message.Assistant\ type rather than a list of responses, and updates the internal clock usage to the new \KoogClock\ abstraction for better testability.
prompt/prompt-cache/prompt-cache-model · high confidence
Introduce token-normalized file patching for robust text modifications
The file editing tools now use a token-based approach to apply patches, allowing replacements and deletions to match file content even when whitespace or line endings differ. This change improves the reliability of file edits by ensuring that the original text is found correctly before applying updates, reducing errors caused by minor formatting variations.
agents/agents-ext/src/commonMain/kotlin/ai/koog/agents/ext/tool/file/patch · high confidence
Introduce unified AIAgentBuilder and AIAgentService APIs
The agent construction API has been refactored to use a new fluent builder pattern. Users now configure agents via \AIAgentBuilder\ (with \graphStrategy\, \functionalStrategy\, and \plannerStrategy\ entry points) or \AIAgentServiceBuilder\ for managing multiple agent instances. This replaces previous factory methods and direct constructors, providing a consistent way to set up prompts, models, tools, and features across graph, functional, and planner agent types.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core · high confidence
Introduce unified message content parts and streaming frame architecture
The prompt model now uses a unified list of content parts (text, images, audio, video, files) within messages, replacing the previous separate content and attachments fields to preserve part order and support multimodal inputs. This change introduces a new streaming API based on \StreamFrame\ objects (deltas and completions for text, reasoning, and tool calls) and corresponding DSL builders (\ContentMessagePartsBuilder\, \RequestMessagePartsBuilder\, \ResponseMessagePartsBuilder\) to construct these structured messages. It also adds support for content moderation categories and cache control configurations for prompt caching.
prompt/prompt-model · high confidence
Introduces history compression and multi-LLM support in the code-agent example
The code-agent example now supports multi-LLM execution by using a combined OpenAI and Anthropic prompt executor, allowing the agent to leverage different models for different tasks. It also introduces a single-run strategy with automatic history compression to manage context window limits; when the conversation exceeds 200 messages or 200k characters, the system compresses the history by extracting key facts (such as project structure, dependencies, and current status) using a dedicated retrieval model. This change improves the agent's ability to handle long-running coding tasks without losing context, while maintaining observability through OpenTelemetry and Langfuse integration.
examples/code-agent/step-05-history · high confidence
Logging feature adopts new graph-based pipeline and event context API
The logging example has been migrated to the new agent graph architecture, moving from the legacy AIAgentPipeline to AIAgentGraphPipeline. This change updates the feature to use a new event-context-based interception model (e.g., interceptAgentStarting, interceptNodeExecutionStarting) instead of the previous node/strategy-specific hooks, providing richer context in log messages such as agent IDs and tool lists. Additionally, the example now uses the generic AIAgent builder instead of the deprecated simpleSingleRunAgent helper and references the updated Chat.GPT4oMini model.
examples/simple-examples/src/main/kotlin/ai/koog/agents/example/features/logging · high confidence
Markdown and XML builders now accept TextContentBuilderBase
The \markdown\ and \xml\ extension functions in the prompt modules now accept \TextContentBuilderBase\<\*\>\ instead of the concrete \TextContentBuilder\. This change allows these builders to be used in a wider range of contexts where a base text content builder is available, improving composability. The update also includes minor syntax cleanups in the DSL usage (e.g., removing unnecessary parentheses in lambda arguments) and formatting fixes in the associated tests.
prompt/prompt-markdown, prompt/prompt-xml · high confidence
New LLM call event context types with execution info and moderation support
The LLM handler now exposes richer context objects for agent lifecycle events. LLMCallStartingContext, LLMCallFailedContext, and LLMCallCompletedContext all include AgentExecutionInfo and a runId for session tracking, while LLMCallCompletedContext additionally provides the assistant response and any moderation result. This enables users to correlate LLM calls, access execution metadata, and inspect moderation outcomes in event handlers.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/handler/llm · high confidence
New agent lifecycle event contexts with execution info and event IDs
The agent feature handler now exposes a set of specific context objects (AgentStartingContext, AgentCompletedContext, AgentExecutionFailedContext, AgentClosingContext, and AgentEnvironmentTransformingContext) that extend the base AgentEventContext. These contexts provide richer information for event handling, including the associated AIAgent instance, the AIAgentContext, a runId, and crucially, AgentExecutionInfo and a unique eventId. This allows users implementing custom agent event handlers to access detailed execution metadata and traceability for each agent lifecycle stage.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/handler/agent · high confidence
New tool call event context types with execution info
The tool handler now exposes a richer event context for tool lifecycle events. A new \ToolCallEventContext\ interface and its implementations (\ToolCallStartingContext\, \ToolValidationFailedContext\, \ToolCallFailedContext\, \ToolCallCompletedContext\) are introduced, each carrying \AgentExecutionInfo\ (providing parent ID and execution path) alongside standard tool details like name, arguments, and results. This allows users observing tool events to access detailed execution tracing and specific error or result data for each tool call stage.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/handler/tool · high confidence
Ollama embedding models moved to separate module
The Ollama embedding model definitions (such as NOMIC\_EMBED\_TEXT and ALL\_MINI\_LM) have been removed from the embeddings-llm module and relocated to the prompt-executor-ollama-client module. This change decouples the model metadata from the embedding implementation, requiring users to import the models from the new location if they rely on these predefined configurations.
embeddings/embeddings-llm/src/commonMain · high confidence
OpenAI client refactoring and expanded API support
The OpenAI client module has been significantly restructured to support newer API capabilities and improve configuration flexibility. New data models and parameters have been added for the OpenAI Responses API, including support for reasoning effort, encrypted reasoning content, and structured outputs. The client now supports Azure OpenAI integration with explicit service version management (up to 2025-03-01-preview) and dedicated moderation models. Additionally, the client decouples from the Ktor HTTP client on JVM targets by introducing a pluggable \HttpClientFactory\ pattern, allowing for greater flexibility in HTTP implementation choices. Existing features like chat completions and embeddings have been updated with new parameters such as \promptCacheKey\, \safetyIdentifier\, and \webSearchOptions\.
prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client · high confidence
Prompt cache API updated to use new Message architecture and request model
The file-based prompt cache now uses the new Message architecture, changing the stored response type from a list of messages to a single assistant message and updating the request model to use the new PromptCache.Request class. This aligns the cache implementation with the broader message system changes, ensuring consistent handling of prompt responses and request identification.
prompt/prompt-cache/prompt-cache-files · high confidence
RAG storage layer refactored into modular base and vector components
The RAG system's storage architecture has been restructured to separate core abstractions from vector-specific implementations. The new \rag-base\ module introduces a set of specialized interfaces—\LookupStorage\, \WriteStorage\, \DeletionStorage\, and \SearchStorage\—along with supporting types like \DocumentWithPayload\, \TextDocument\, and \DocumentProvider\ to handle document metadata, file system interactions, and search requests. The \rag-vector\ module now builds upon this foundation, providing the \VectorStorage\ interface and \EmbeddingStorage\ implementation to enable semantic search via vector embeddings. This change provides a consistent, implementation-agnostic API for document management, allowing different storage backends to be used interchangeably while maintaining a unified interface for retrieval operations.
rag · high confidence
Redis prompt cache adopts new message architecture and adds Java interop
The Redis prompt cache implementation has been updated to align with the new Message architecture, changing the cache interface to store and retrieve a single assistant message instead of a list of responses, and using the new PromptCache.Request model for key generation. A Java-compatible constructor accepting java.time.Duration for the TTL parameter has been added to improve interoperability, and the internal serialization format for cached elements has been simplified.
prompt/prompt-cache/prompt-cache-redis · high confidence
Refactor JVM-specific MCP transport and tool execution logic
The JVM-specific implementation for connecting to Model Context Protocol (MCP) servers has been restructured. The previous \McpToolRegistryProvider\ object, which handled both standard I/O and Server-Sent Events (SSE) transports, has been replaced by a new \McpToolRegistryProvider.jvm.kt\ file that provides JVM-specific helpers for creating \StdioClientTransport\ instances from a \Process\. Additionally, the \McpTool\ class and \McpToolDefinitionParser\ have been removed from this location, indicating that the direct tool execution and descriptor parsing logic has been moved or consolidated elsewhere in the codebase.
agents/agents-mcp/src/jvmMain · high confidence
Refactor agent event model and enhance error details
The agent feature event model has been restructured: the previous sealed class hierarchy for feature events (including agent, strategy, node, LLM call, and tool call events) has been removed and replaced with a new timestamped string message type for feature messages. Additionally, the AIAgentError data class now includes a 'type' field that captures the class name of the underlying throwable, providing more detailed error context for debugging agent failures.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/model · high confidence
Refactor feature message processing API and introduce event tracking
The feature message processing system has been restructured to support event tracking and filtering. A new \FeatureEvent\ interface extends \FeatureMessage\ to include a unique \eventId\, enabling better correlation of system events. The \FeatureMessageProcessor\ now exposes a configurable \messageFilter\ property, allowing users to selectively process specific message types (e.g., filtering for LLM call events) before they are handled. Additionally, internal utility methods for safe message processing have been renamed (\onMessageSafe\ to \onMessageCatching\) and moved to the core module, standardizing how messages are caught and logged during processing.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/message · high confidence
Refactor remote server connection configuration
The remote server connection configuration has been restructured to support more flexible setup. A new abstract \ServerConnectionConfig\ base class and a \DefaultServerConnectionConfig\ implementation now expose configurable properties for host (defaulting to 127.0.0.1), port (defaulting to 50881), and a new \awaitInitialConnection\ flag with a 300-second timeout, allowing the server to optionally wait for the first client connection before proceeding. The previous \AIAgentFeatureServerConnectionConfig\ class has been removed as part of this consolidation.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/remote/server/config · high confidence
Refactored agent pipeline architecture with new feature installation API
The agent pipeline has been restructured to separate concerns into distinct pipeline types: \AIAgentFunctionalPipeline\ for non-graph workflows, \AIAgentGraphPipeline\ for graph-based execution, and \AIAgentPlannerPipeline\ for planner agents. Each pipeline type now exposes a specific \install\ method that accepts its corresponding feature type (e.g., \AIAgentFunctionalFeature\, \AIAgentGraphFeature\, \AIAgentPlannerFeature\) along with a configuration lambda, replacing the previous generic installation mechanism. This change introduces a more type-safe and explicit way to add features to the appropriate pipeline context, while the underlying \AIAgentPipelineImpl\ handles the core feature registration and lifecycle management.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline · high confidence
Refactored file tools with improved line-range handling and directory filtering
The file tools in the agents extension have been refactored to improve robustness and usability. ReadFileTool now clamps the endLine parameter to the actual file length instead of failing, returning a warning when the requested range exceeds the file's content. ListDirectoryTool now properly handles empty filter strings by treating them as null (no filtering), preventing validation errors when no glob pattern is intended. Additionally, the tools now use a library-agnostic serialization API for consistent textual result representation, and the ReadFileTool's warning message is exposed publicly to ensure agents can surface these clamping warnings to users.
agents/agents-ext/src/commonMain/kotlin/ai/koog/agents/ext/tool/file · high confidence
Refactored remote client connection configuration and moved to agents-core
The \ClientConnectionConfig\ class and its related configuration logic have been moved from the \agents-features-common\ module to \agents-core\, centralizing remote client connection settings. The base \ClientConnectionConfig\ class has been refactored to use nullable parameters for protocol, headers, and timeouts, with defaults applied via a companion object (e.g., defaulting to HTTPS) rather than constructor arguments, allowing for more flexible configuration. A new \DefaultClientConnectionConfig\ implementation has been added to provide sensible defaults (localhost:50881, 5s request timeout, 15s connect timeout), replacing the previous \AIAgentFeatureClientConnectionConfig\ which is now removed. This change simplifies client connection initialization by offering a standardized default configuration while maintaining the ability to customize specific connection parameters.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/remote/client/config · high confidence
Refactored tool serialization to use a new schema generator interface
The internal implementation for serializing tool descriptors has been restructured to support a library-agnostic serialization API. The previous custom serialization logic, including the \ToolResultStringSerializer\ and the \ToolSerialization\ module (which handled JSON encoding via \kotlinx.serialization\), has been removed. In its place, a new \ToolDescriptorSchemaGenerator\ interface has been introduced, allowing tool descriptors to be converted into a JSON object representation through a pluggable generator rather than hardcoded serialization rules.
agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/serialization · high confidence
Remote client connection state is now reactive
The \FeatureMessageClient\ interface and its \FeatureMessageRemoteClient\ implementation have been moved to the \agents-core\ module and updated so that the connection status is exposed as a reactive \StateFlow\<Boolean\>\ instead of a static \Boolean\. This allows consumers to observe connection state changes in real-time rather than polling a single snapshot. The implementation also removes the platform-specific \expect\ engine factory, defaulting to a standard \HttpClient\ instance, and refactors internal header handling to use \appendAll\.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/remote/client · high confidence
Remote feature serialization configuration and module consolidation
The remote feature's JSON serialization logic has been consolidated into the \agents-core\ module, introducing a preconfigured \Json\ instance (\defaultFeatureMessageJsonConfig\) that enables pretty printing, ignores unknown keys, and omits null fields to ensure robust backward and forward compatibility for remote communication. This configuration registers a comprehensive \SerializersModule\ capable of polymorphically serializing and deserializing a wide range of agent lifecycle, strategy, node, tool, and LLM events (including new streaming events like \LLMStreamingFrameReceivedEvent\), and the \ConnectionConfig\ class has been moved to this new location to utilize these shared serialization settings.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/remote · high confidence
Remote server now waits for initial client connection before proceeding
The remote feature message server now supports a configuration flag to pause execution until the first client connects. When the \awaitInitialConnection\ option is enabled in the server configuration, the server will block after starting until a client establishes a connection, ensuring that the server is ready to receive messages before the agent continues. This change is implemented in the \FeatureMessageRemoteServer\ class within the \agents-core\ module, which also includes the server implementation and the \FeatureMessageServer\ interface.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/remote/server · high confidence
Removal of legacy buildSrc Gradle convention plugins
The buildSrc module has removed three Kotlin Gradle plugin scripts: ai.kotlin.configuration (which set JVM toolchains, language versions, and compiler options), ai.kotlin.dokka (which configured documentation generation and source links), and ai.kotlin.jvm (which registered JVM test tasks and applied the above plugins). This change eliminates these specific build conventions from the project's source code, likely as part of a broader migration to a different build configuration strategy.
buildSrc · high confidence
Rename LLMDescription annotation property to 'value' for Java compatibility
The \LLMDescription\ annotation's primary property has been renamed from \description\ to \value\. This change improves compatibility with Java consumers of the library, as Java does not support named arguments for annotations. Additionally, the \@SerialInfo\ annotation from kotlinx.serialization has been added to the class, and redundant \AnnotationTarget.PROPERTY\ targets have been removed from the \@Target\ declaration.
agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/annotations · high confidence
Simplified multi-provider executors and added AWS Bedrock support
The \prompt-executor-llms-all\ module now provides simplified \simple\*Executor\ convenience functions for OpenAI, Azure OpenAI, Anthropic, OpenRouter, Google AI, Ollama, Mistral AI, and AWS Bedrock, all returning a \MultiLLMPromptExecutor\ instead of the previous \SingleLLMPromptExecutor\. These functions accept an explicit \KoogHttpClient.Factory\ on common platforms, while JVM/Android builds offer additional overloads that automatically resolve the default HTTP client factory. AWS Bedrock is now supported via \simpleBedrockExecutor\ (using static credentials) and \simpleBedrockExecutorWithBearerToken\. The legacy \DefaultMultiLLMPromptExecutor\ class has been removed in favor of the new \MultiLLMPromptExecutor\ constructor, and tests have been updated to reflect the new message and streaming APIs.
prompt/prompt-executor/prompt-executor-llms-all · high confidence
Simplified tool definition API with auto-generated descriptors
The \AskUser\, \ExitTool\, and \SayToUser\ service tools have been refactored to use a simplified constructor pattern. Tool metadata (name, description) and argument serialization are now passed directly to the \SimpleTool\ base class via \typeToken\ and constructor parameters, removing the need for manual \ToolDescriptor\ and \KSerializer\ overrides. Additionally, argument properties now use the \@LLMDescription\ annotation for metadata, and the execution method has been renamed from \doExecute\ to \execute\.
agents/agents-ext/src/commonMain/kotlin/ai/koog/agents/ext/tool · high confidence
Stub class added for iOS publishing compatibility
A stub class has been added to the long-term memory AWS module to satisfy publishing requirements for the iOS target when no commonMain is set, ensuring the module can be published correctly without build errors.
agents/agents-features/agents-features-longterm-memory-aws/src/commonMain/kotlin/ai/koog/agents/features/longtermmemory · high confidence
Tool execution now supports per-call metadata and enhanced parameter schemas
The tool execution model has been updated to thread a new \ToolCallMetadata\ side channel into every tool call, allowing features to inject cross-cutting context like tracing span IDs without altering the tool's argument schema. The \Tool\ and \ToolBase\ classes now use \TypeToken\ for generic type handling and expose \executeUnsafe\ methods for raw argument encoding. Additionally, the tool parameter schema (\ToolParameterType\) has been expanded to support \Null\ types, \anyOf\ unions (with a specific hack for providers like Anthropic that require type unions), and object parameters with \additionalProperties\ and \requiredProperties\ definitions. The \ToolResult\ interface has been removed in favor of direct result types, and the \ToolRegistry\ builder has been unified under an \expect/actual\ implementation.
agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools · high confidence
Unified ToolRegistryBuilder and non-JVM schema generation for agents
The \ToolRegistryBuilder\ is now implemented as an \expect/actual\ class, providing a unified builder API for registering tools across all platforms, which resolves previous issues where \tools(Any)\ interfered with \tools(List)\. Additionally, a new \SchemaGenerator\ implementation for non-JVM platforms enables automatic JSON schema generation for \@Serializable\ classes or explicit \KSerializer\ instances, ensuring consistent tool schema support outside the JVM.
agents/agents-tools/src/nonJvmCommonMain · high confidence
Unified agent lifecycle event handling replaces fragmented handler classes
The agent framework's event interception mechanism has been refactored from a scattered set of handler classes (such as AgentHandler, ExecuteLLMHandler, ExecuteNodeHandler, and ExecuteToolHandler) into a single, unified lifecycle event system. This change introduces a centralized registry (AgentLifecycleHandlersCollector) and a comprehensive set of lifecycle event types (AgentLifecycleEventType) covering the entire agent execution flow, including agent, strategy, node, subgraph, LLM, tool, and planner events. For users, this means that custom features and interceptors now register against a consistent, typed event context (AgentLifecycleEventContext) rather than implementing disparate handler interfaces, simplifying the integration of observability, tracing, and custom logic across the agent pipeline.
agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/handler · high confidence
Updated test executor to use new Message architecture and Tool API
The test implementation in CalculatorPromptExecutor and CalculatorTools has been updated to align with the new Message architecture and Tool API. CalculatorPromptExecutor now returns a single Message.Assistant object containing MessagePart.Tool.Call instances instead of a list of Message.Response objects, and utilizes the new KoogClock for timestamping. CalculatorTools has been refactored to use the new Tool base class constructor with explicit type tokens and LLMDescription annotations for argument descriptions, removing the manual ToolDescriptor definition.
agents/agents-core/src/commonTest/kotlin/ai/koog/agents/core · high confidence
Fixes
Add platform-specific error type name retrieval for AIAgentError
The AIAgentError model now includes platform-specific logic to retrieve the class name of a Throwable. On JVM platforms, it returns the fully qualified class name, while on non-JVM platforms, it returns the simple class name. This enhancement allows for more precise error identification and debugging across different execution environments.
agents/agents-core/src/jvmCommonMain/kotlin/ai/koog/agents/core/feature/model, agents/agents-core/src/nonJvmCommonMain/kotlin/ai/koog/agents/core/feature/model · high confidence
Fix tool schema generation for nested nullable objects
The schema generator in the agents tools module now correctly handles nested nullable objects when creating tool descriptors. This fix ensures that complex argument types with optional nested structures are accurately represented in the generated JSON schema, preventing errors or incorrect tool definitions when agents interact with tools requiring such parameters.
agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/schema · high confidence
Unified tool registration and reflection-based tool discovery
The tool registration API has been consolidated into a single \ToolRegistryBuilder\ class, removing the previous \ToolRegistry.Builder\ and the conflicting \tools(Any)\ overload to prevent registration errors. Additionally, reflection-based tool discovery now correctly respects the \customName\ attribute from the \@Tool\ annotation when converting Kotlin functions or Java methods into tools, ensuring that explicitly named tools are registered with their intended identifiers rather than defaulting to the function name.
agents/agents-tools/src/jvmCommonMain · high confidence
Test coverage
Add tests for Streamable HTTP transport and nullable tool parameters; Added A2A protocol compliance test suite and test utilities; Added A2A server integration and stress tests; Added CapturingLLMClient test double for LLM interactions; Added JVM integration tests for the ChatMemory feature; Added JVM tests for HTTP JSON-RPC server transport; Added JVM tests for Java method tool reflection and schema generation; Added JVM tests for Java-friendly agent APIs and graph strategies; Added JVM tests for LongTermMemory ingestion, retrieval, and storage; Added JVM tests for OpenTelemetry agent span collection; Added JVM tests for OpenTelemetry metrics collection; Added JVM tests for agent feature events, pipeline configuration, and tool call failures; Added JVM tests for file tool utilities and tool implementations; Added JVM tests for shell command execution tool; Added JVM-specific mock OpenTelemetry components for testing; Added JVM-specific tests for OpenTelemetry attribute conversion; Added TCK test server implementation for A2A compliance testing; Added and updated tests for reflective tool execution and serialization; Added comprehensive tests for the Agent Event Handler feature; Added concurrency tests for AIAgentLLMContext; Added in-memory filesystem utility for tests; Added integration tests for A2A client JSON-RPC communication; Added integration tests for OpenTelemetry trace structure; Added integration tests for SQL persistence providers; Added mock test utilities for agent event collection and agent creation; Added mock test utilities for agent feature events; Added mock utilities for tracing feature tests; Added test assertion helpers for filtering and validating pipeline events; Added test coverage for AIAgent generic types, service management, and streaming error handling; Added test infrastructure for KoogHttpClient implementations; Added test infrastructure for OpenTelemetry agent tracing; Added test utilities and data models for JVM tool testing; Added test utilities and refactored mock builder for tool execution; Added tests for AIAgentStorage; Added tests for AWS AgentCore chat history provider and message conversion; Added tests for AgentContextAwareTool metadata handling; Added tests for AgentExecutionInfo path construction; Added tests for Amazon Bedrock AgentCore long-term memory components; Added tests for Debugger feature configuration and event collection; Added tests for EditFileTool and file rendering logic; Added tests for FeatureMessageProcessor lifecycle and filtering; Added tests for JDBC Chat History Provider implementations; Added tests for JDBC persistence storage provider; Added tests for Java API blocking behavior and prompt XML injection safety; Added tests for Java-facing ToolRegistry API; Added tests for Koog tool integration with MCP server; Added tests for Kotlin and Java tool schema generation; Added tests for LLM choice selection strategies; Added tests for LLM description annotation handling and ToolCallMetadata behavior; Added tests for LLMAsJudgeNode; Added tests for Langfuse OpenTelemetry integration; Added tests for MCP tool descriptor parsing; Added tests for MockLLMBuilder capabilities; Added tests for OpenTelemetry feature configuration and span management; Added tests for OpenTelemetry response metadata handling; Added tests for OpenTelemetry span assertions and attribute handling; Added tests for RegexSearchTool; Added tests for ResultUtils; Added tests for SQL chat history providers; Added tests for agent configuration and tool call description logic; Added tests for agent environment metadata propagation and tool execution; Added tests for agent execution path construction; Added tests for agent execution strategies and subgraph behaviors; Added tests for agent node transformation and parallel node merging; Added tests for agent storage, Java API, and Mermaid diagram generation; Added tests for history compression and fact retrieval strategies; Added tests for sealed type output handling in subgraph finish tool; Added tests for structured output parsing and LLM write session management; Added tests for the MessageTokenizer feature; Added tests for tool schema generation with new serialization API; Added tests for tracing feature message writers; Added unit tests for A2A model serialization and concurrency utilities; Added unit tests for A2A server storage and session components; Added unit tests for AIAgentContext and LLM context behavior; Consolidated embedding model tests; Expanded test coverage for agent exceptions, token counting, and error handling; Migrate feature message writer tests to agents-core module; New Java integration test infrastructure and agent service coverage; New testing utilities for mocking agent contexts and LLM executors; Removed tests for remote server message handling; Updated agent DSL tests for new message architecture and parallel node execution; Updated agent pipeline tests to align with new event architecture and graph-based strategy API; Updated testing feature API to align with graph agent refactoring; Updated tests for new graph API and tool definitions; Updated tests for remote client connection state and new wait-connection flag; Updated tool serialization tests to reflect new descriptor generation and API changes.
Dependencies
Updated Gradle wrapper to version 8.14.3
The Gradle wrapper has been upgraded from version 8.2.1 to 8.14.3. This ensures that all builds use the newer Gradle distribution, which may include performance improvements, bug fixes, and new features available in the 8.14.x release line.
gradle · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 47 → 66 (+18.7)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 88 → 92 (+4.4)
- Architecture 94 → 92 (-1.7)
- Maturity 63 → 72 (+9.1)
- Readiness 31 → 54 (+22.6)
- Security 49 → 75 (+26.0)
Resolved (132)
- Coverage not measured — test suite did not build
- Dimension evaluation failed
- Duplicated block (10 lines × 2) (agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/attribute/GenAIAttributes.kt)
- Duplicated block (10 lines × 2) (agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/integration/weave/WeaveSpanAdapter.kt)
- Duplicated block (10 lines × 2) (prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt)
- Duplicated block (11 lines × 2) (agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/metric/events/histogramMetricEvents.kt)
- Duplicated block (11 lines × 2) (prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt)
- Duplicated block (11 lines × 2) (prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt)
- Duplicated block (11 lines × 3) (agents/agents-features/agents-features-trace/src/commonMain/kotlin/ai/koog/agents/features/tracing/feature/Tracing.kt)
- Duplicated block (13 lines × 2) (agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt)
- Duplicated block (13 lines × 2) (agents/agents-features/agents-features-sql/src/jvmMain/kotlin/ai/koog/agents/features/sql/providers/ExposedPersistencyStorageProvider.kt)
- Duplicated block (13 lines × 2) (prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt)
- Duplicated block (13 lines × 2) (prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt)
- Duplicated block (14 lines × 2) (a2a/a2a-server/src/commonMain/kotlin/ai/koog/a2a/server/A2AServer.kt)
- Duplicated block (14 lines × 2) (agents/agents-features/agents-features-snapshot/src/commonMain/kotlin/ai/koog/agents/snapshot/feature/Persistence.kt)
- Duplicated block (14 lines × 2) (http-client/http-client-java/src/main/kotlin/ai/koog/http/client/java/JavaKoogHttpClient.kt)
- Duplicated block (15 lines × 2) (http-client/http-client-okhttp/src/main/kotlin/ai/koog/http/client/okhttp/OkHttpKoogHttpClient.kt)
- Duplicated block (15 lines × 3) (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt)
- Duplicated block (16 lines × 2) (agents/agents-cli/src/commonMain/kotlin/ai/koog/agents/cli/claude/ClaudeAgentBuilder.kt)
- Duplicated block (16 lines × 2) (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/debugger/Debugger.kt)
- …and 112 more
New (426)
- AIAgentPlanner.execute (cognitive 19) (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/planner/AIAgentPlanner.kt)
- AbstractOpenAILLMClient.toOpenAIContentPart (cognitive 16) (prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/AbstractOpenAILLMClient.kt)
- Ambiguous extension function names in different modules. Both JacksonJSONElementMappersKt and KotlinxJSONElementMappersKt define an extension function toKoogJSONElement() on their respective underlying types (likely JsonNode and JsonElement). If a user imports both modules, they may face ambiguity or confusion about which underlying type is being converted, as the function name is identical but the receiver type differs. While technically distinct due to receiver types, this violates the principle of least surprise for users managing multiple serialization backends.
- AnthropicLLMClient.executeStreaming (cyclomatic 20) (prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt)
- BedrockConverseConverters.toConverseContentBlock (cyclomatic 19) (prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt)
- BedrockConverseConverters.toToolResultContentBlock (cyclomatic 19) (prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/converse/BedrockConverseConverters.kt)
- Change coupling: AnthropicModels.kt ↔ BedrockModels.kt (prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicModels.kt)
- Change coupling: ContextualPromptExecutor.kt ↔ AIAgentPipeline.kt (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/ContextualPromptExecutor.kt)
- Change coupling: OllamaClient.kt ↔ OllamaConverters.kt (prompt/prompt-executor/prompt-executor-clients/prompt-executor-ollama-client/src/commonMain/kotlin/ai/koog/prompt/executor/ollama/client/OllamaClient.kt)
- ClassTooLong: AIAgentPipelineImpl (agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/pipeline/AIAgentPipelineImpl.kt)
- ClassTooLong: AnthropicLLMClient (prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/anthropic/AnthropicLLMClient.kt)
- ClassTooLong: BedrockLLMClient (prompt/prompt-executor/prompt-executor-clients/prompt-executor-bedrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/BedrockLLMClient.kt)
- ClassTooLong: GoogleLLMClient (prompt/prompt-executor/prompt-executor-clients/prompt-executor-google-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/google/GoogleLLMClient.kt)
- ClassTooLong: OpenAILLMClient (prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/OpenAILLMClient.kt)
- ClassTooLong: OpenTelemetry (agents/agents-features/agents-features-opentelemetry/src/commonMain/kotlin/ai/koog/agents/features/opentelemetry/feature/OpenTelemetry.kt)
- DefaultMcpToolDescriptorParser.parseParameterType (cognitive 28) (agents/agents-mcp/src/commonMain/kotlin/ai/koog/agents/mcp/McpToolDefinitionParser.kt)
- DefaultMcpToolDescriptorParser.parseParameterType (cyclomatic 23) (agents/agents-mcp/src/commonMain/kotlin/ai/koog/agents/mcp/McpToolDefinitionParser.kt)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no installation or build instructions (README.md)
- Documentation: no project overview (README.md)
- …and 406 more
Changes since last survey
- 7 commits — 2 feature/other, 5 fixes
By area
- prompt/prompt-executor — 3 commits
- docs/docs — 2 commits
- agents/agents-features — 1 commit
- skills/src — 1 commit
Notable commits
- fix: fix(agents): Add newest models to all LLM providers (#2230)
- fix: fix(agents): keep completion text when a reasoning part is empty (#2248)
- fix: fix(prompt): KG-898 Fix OpenAIResponsesAPIResponse.instructions to accept single string (#2220)
- fix: fix(prompt): map cachedContentTokenCount from Google usage metadata (#2249)
- fix: fix: 1.3.0 update (#2254)
- change: feat(agents): 1.2.0 Release update (#2229)
- change: feat(prompt): Add support for skills (#2160)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
JetBrains/koog was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 25 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 16d83270f8a7f25358ae0165466f14e70416c428 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-dd72cc24c749.