JetBrains Denis Domanskii

How JetBrains Builds AI Agents In Kotlin Part 3: Under Observation

Original post Building AI Agents In Kotlin Part 3: Under Observation

Article Summary

Denis Domanskii from JetBrains tackles a problem every AI agent developer hits: your agent works, but you have no idea what it's actually doing or how much it's costing you.

This is part 3 of JetBrains' series on building AI coding agents in Kotlin using their Koog framework. The agent can now read files, write code, and iterate until tests pass, but debugging its behavior has become nearly impossible. Domanskii walks through integrating Langfuse observability to get full visibility into agent trajectories, costs, and failures.

Key Takeaways

Critical Insight

Adding observability transformed a black box agent into an inspectable system that revealed bugs, showed exact costs per run, and enabled data driven optimization decisions.

Continue reading

The next article introduces a sub agent pattern that delegates tasks to smaller, cheaper models, and those traces will show exactly what to delegate.

This page summarizes “Building AI Agents In Kotlin Part 3: Under Observation” by JetBrains, published Dec 1, 2025. All credit for the original work goes to the authors.

Read the original on blog.jetbrains.com (opens in new tab)

AI tools for Android

Browse all AI tools →