Ai logo

JetBrains AI

Supercharge your tools with AI-powered features inside many JetBrains products

News Releases

Koog 0.5.0 Is Out: Smarter Tools, Persistent Agents, and Simplified Strategy Design

We recently released Koog 0.5.0, introducing full Agent2Agent (A2A) protocol support, which makes it easier than ever to build systems of interconnected AI agents in Kotlin.

But A2A is just the beginning. Koog 0.5.0 brings a host of improvements that make agents more persistent, tools smarter, and strategy design more intuitive. Let’s dive into the highlights.

💡 Non-graph API for strategies

Koog 0.5.0 introduces a non-graph API for defining agent strategies. You can now create and modify agent strategies directly in Kotlin, without working with graphs. The new non-graph API keeps most of Koog’s core features, including state management and history compression, so you can prototype custom strategies faster. 

You can now streamline your development cycle. Start simple with the out-of-the-box AIAgent using the default strategy. Then, experiment with the non-graph API to quickly test and find the best configuration for your task through straightforward code. Once you’re ready, scale it into a graph workflow to take full advantage of persistence for maximum reliability, as well as nested event tracing for deeper insights to build and test strategies more efficiently.

🔁 Agent persistence and checkpointing improvements

Complex AI workflows often depend on persistence – the ability to save and restore state without losing context or causing unintended side effects. Since we introduced persistence in Koog 0.4.0, we’ve continued to build on it to make agent state management much more reliable and flexible.

The new RollbackToolRegistry enables agents to undo side effects from tool calls when checkpointing, ensuring that rollbacks don’t leave your environment in an inconsistent state.

You can now also toggle between full state-machine persistence and message history persistence, giving you control over how much of the agent’s internal state to preserve.

⚒️ Tool API enhancements

Tools are the backbone of Koog’s agent capabilities. This release refines the Tool API to make tool development and integration smoother.

Tool descriptors are now automatically generated for class-based tools across all platforms. With this update, defining tools on multiplatform works just as smoothly as on the JVM, removing redundant setup and keeping your Tool API definitions concise and consistent.

With improvements to subgraphWithTask and subgraphWithVerification, finishTools is no longer required, and neither is the SubgraphResult type. You can now specify any input type, output type (including primitive types), task, tools, and models, and everything works automatically. There’s no more boilerplate – Koog infers and generates it all for you.

👋 Introducing AIAgentService

Managing multiple agents is now easier with the new AIAgentService. It allows you to run and manage multiple AI agents as single-use, state-managed services.

🧑‍⚖️ New components and smarter interactions

Koog 0.5.0 also introduces new components that enhance reasoning and control in agent systems. 

LLM as a judge is a new component that uses large language models to evaluate outputs or guide decision-making processes.

In version 0.5.0, we’ve added a strategy for iterative tool calling with structured outputs. This makes it much easier to obtain typed results from any agent without having to write custom code. 

Streaming now supports tool calls, allowing the use of tools while receiving results from an LLM on the fly. With this update, front-end integrated agents can now stream partial outputs to the user interface while still invoking tools as needed.

Wrapping up

Koog 0.5.0 isn’t just about connecting agents – it’s about empowering them to be smarter, more persistent, and easier to design. Whether you’re experimenting with lightweight strategies, managing long-lived agent sessions, or creating sophisticated toolchains, this release brings significant improvements across the board.

✨ Try Koog 0.5.0

If you’re building agents that need to be more connected, persistent, and easier to design, Koog 0.5.0 is the right choice. Explore the docs, build systems of multiple AI agents, and experiment faster while still benefiting from Koog’s advanced features.

🤝 Your contributions make a difference

We’d like to take this opportunity to extend a huge thank-you to the entire community! Your feedback, issue reports, and pull requests have been invaluable for the development of Koog!

A special shoutout to this release’s top contributors:

  • Stan – refactored the streaming API to support tool calls.
  • Siarhei Luskanau – added the iOS target and enabled web support for demo-compose-app.
  • Didier Villevalois – added an option to dynamically adjust context window sizes for Ollama.
  • Ruben Cagnie – implemented support for the tool-calling strategy in structured output.
image description