Hello, Everyone. I plan to talk about Koog at the ...
# koog-agentic-framework
n
Hello, Everyone. I plan to talk about Koog at the Japan Kotlin Conference. While Koog has many advantages, if I had to point out any disadvantages or considerations compared to other frameworks, what would they be? Personally, I think one point to note is that we need to prepare our own deployment environment.
h
I think the AI ecosystem is just far less developed compared to python and that is probably the biggest downside to doing anything AI with kotlin. There is a kotlin conference in Japan?
v
@Horatio Thomas could you please elaborate on the AI ecosystem point? What is less developed in Kotlin/Java that is relevant to AI agents specifically (if we’re not talking about ML and model training)
h
yeah was more talking about ml and model training
but there are also libraries like langchain
not sure how those fit into the mix
Not sure how lang chain compares to koog
also not sure how gen image and vid fits into the mix
n
@Horatio Thomas Thanks for your reply! Yes, I will be talking at KotlinFest.
v
Langchain is literally like https://docs.koog.ai/llm-providers/ + https://docs.koog.ai/prompt-api/ + https://docs.koog.ai/annotation-based-tools/ (but without type-safety) + https://docs.koog.ai/content-moderation/ + https://docs.koog.ai/embeddings/ + https://docs.koog.ai/ranked-document-storage/ Same as Spring AI or LangChain4j for JVM. Since recently they also added simple agents (like https://docs.koog.ai/basic-agents/). There’s also LangGraph that is kinda similar to https://docs.koog.ai/complex-workflow-agents/ with https://docs.koog.ai/custom-strategy-graphs/ and https://docs.koog.ai/parallel-node-execution/. They also have some basic checkpoints (https://docs.koog.ai/agent-persistence/) BUT the following is clearly missing in LangChain/LangGraph and any other Python frameworks (but exist in Koog): • Persistence comes without tool rollbacks and side-effects handling • Database support is as limited as generally in Python • Concurrency is very limited also due to Python • Strategy graphs have one single state in a String->Any map that you have to manage by yourself (no input/output types in nodes) • History management is manual (you have to keep ListString that is essentially list of LLM messages in the same State map (String -> Any) — and think about when to append a new LLM message) • Context management is also mannual. • No out-of-the-box history compression. And of course no strategies like FactRetrieval. You have to experiment and implement your own things (again — operating String arrays by hand 😅) • No class-based tools with dependency injection • No out-of-the-box higher level components. No subgraphWithTask/subgraphWithVerification, for example: you build everything from scratch. • Hence, no way to easily apply Domain Modeling approach — when you split tasks into smaller subtasks that are essentially defined by Input/Output data classes so that the model would stop the subtask only when the Output data class fields are fully filled-in (data type defines what the model has to achieve, not the long textual prompt). In Koog it’s like 3 lines of declarative code + your Serializable data class. • No fixing models for structured output, no out-of the box retries • No out-of-the-box Memory with fact retrieval and database integration • No Features mechanism— hence you can’t tweak the internal agent process of an existing agent. • Streaming in LangChain/LangGraph doesn’t provide any Markdown parsing API so that you would parse string chunks into a data class that you can then pass to some tool as an argument. In Koog it’s like 3 lines of code. • No equivalent of functional/non-graph strategies (https://docs.koog.ai/functional-agents/) because in Python there’re no extension methods • No out-of-the-box mechanism for limiting tools inside a subgraph so that you can switch LLM and set of tools seamlessly — and the history will be correctly sent to another model. You’ll discover the hard way that Anthropic via Bedrock (or Ollama) would just break — and then you’ll have to invent some manual history rewriting strategy (check missingToolsConversionStrategy in Koog) , and of course you’ll have to manipulate arrays of String by hand 😅 • Another important thing is that you can’t integrate LangChain/LangGraph into an existing JVM application. No Spring Boot support obviously. And of course it’s not possible to easily compile it for Android or iOS or any other real target. • And in general, Python is… well.. not the most high-performant language. And it doesn’t shine in cloud deployments either compared to JVM. Plus the code is far less maintainable due to the lack of type system and design patterns chosen by those frameworks (LangChain/LangGraph) — good luck to guess what some random Array of Strings mean in the middle of your business logic. I can continue this list forever, but to put some grain of salt — the only thing that Lang* has more than Koog is various vector storages integrations. But we’re planning to solve this issue soon by providing an integration with Spring AI (folks have already written 20+ integrations there)
🚀 4
❤️ 5
h
Very cool thanks for the elaboration
My impression is that langchain has a bit of a head start and more adoption than koog, but hoping koog catches up
❤️ 2
v
LangChain was released in October 2022 Koog - 22 May 2025
h
*quite a bit of a head start
n
I also believe Koog has functional advantages. However, when expanding the framework’s scope, cloud vendor agents—like Genkit, for example—integrate with cloud services and Firebase, enabling easy execution all the way through deployment. In this regard, Koog requires more steps to deploy a prototype. (This isn’t necessarily a disadvantage; not relying on the cloud is also an advantage, so it’s just a point to note.) Also, Genkit offers a rich developer UI out of the box, whereas Koog currently lacks standalone debugging tools and requires Langfuse (again, not a disadvantage, just a point to note). Is this line of thinking incorrect?
v
That’s currently true. Though, we’re working on both directions: from the tooling/devugging side our colleagues from another JetBrains team are working on AI Debugger plugin for IntelliJ (which is about to come out with Koog support around qtnext 1-2 weeks) . And as for the cloud/deployment — we’re planning to provide integrations with AWS AgentCore pretty soon, Google AgentEngine is also in our plans, and also we are considering to integrate with Akka runtime. But right now you have to think about deployment by yourself. Though, imo ageents are rather components that you tightly integrate into existing apps. And likely you already have your apps deployed somewhere:)
kodee happy 3
n
@Vadim Briliantov That’s great to hear. Wonderful. Thank you!! I’m looking forward to it.
f
Having used both I find Koog to be much easier to work with in every way. For a lot of the reasons Vadim listed above. I'll add that I find the Koog source code much easier to read and understand which saves me a lot of time. My ONE downside right now is documentation/guides are much more available for LangGraph/LangChain. That being said it's not a big issue because the Slack group is VERY active and I've always gotten great answers from the team on every question usually within an hour or 2.
kodee loving 2
❤️ 2
v
Indeed, our documentation and tutorials could use some improvement — thanks for the feedback! If you could share what was hard to find in the docs, it would be very helpful for us to improve them.
f
At this point the documentation for Koog is pretty good in terms of explaining how everything functions. For me what LangChain does really well is guides on higher level concepts/architectures. They do a good job of explaining high level popular architectures/concepts with diagrams and/or videos then showing how to implement them in LangGraph/Chain. For example Swarm vs Supervisor, handling Authentication/Authorization with your agents, Open SWE, Deep Research examples. This is really helpful for connecting the real use cases to actual code examples. I often find myself reading the LangChain content then trying to translate the concepts into Koog.
thank you color 1
I'm super impressed with the team and understand the priority is probably features in the framework over guides/docs and it's generally easy for me to implement these ideas I see elsewhere into Koog so this isn't a deal breaker. But just as an attempt to answer the original question, that would be my one disadvantage I see.
thank you color 1
118 Views