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 List
String 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)