Koog is an excellent framework. Thanks for all the...
# koog-agentic-framework
g
Koog is an excellent framework. Thanks for all the great work! I have already given a tech talk at my workplace on Koog. Is there a roadmap to check what features are being prioritized for the near future so consumers can make informed decisions about adopting this framework? Thanks!
❤️ 7
👍 1
v
Hi! Thank you so much for your positive feedback, and happy to see you excited! We are already working on the public roadmap at the moment, and very soon it will be published! Stay tuned 🙂 In the meantime, if you have any specific questions or requests for some functionality — please feel free to ask here or in GitHub issues
g
I am more eager about the MCP support (Client and Server), for which we wish to adopt Koog at our workplace. From the existing examples, I assume it is still in a primitive stage
Also, if there is any comparison chart with existing popular frameworks, like LangGraph helps
v
cc: @Olga Galchenko
👀 1
o
Good point @Gopal S Akshintala! TODO item taken(about comparisson), I will check what we can to and within what timeframe and come back to you!
thank you color 1
But we should definitely keep in mind that both us and other frameworks are dynamic, so it would be kinda snapshot.
👍🏼 1
g
Reposting, I hope my comparison chart message didn't overshadow this. Any news on MCP? https://kotlinlang.slack.com/archives/C08SLB97W23/p1749036622529049?thread_ts=1749016807.322849&cid=C08SLB97W23
v
MCP client is there and getting improved with more data types support for tools. MCP server is also on our list, but you would also probably like to check out this official library: https://github.com/modelcontextprotocol/kotlin-sdk
❤️ 1
g
Ya, the official library is great! I haven't tried using it along with Koog, though. we have a requirement to write some Agentic workflows using Subgraphs connecting "MCP Tools". I don't see them in the existing examples, I assume it's not possible today
v
Could you please describe what specifically you want to implement with MCP? We have the following examples: • https://github.com/JetBrains/koog/blob/develop/examples/src/main/kotlin/ai/koog/agents/example/mcp/GoogleMapsMcpClient.kthttps://github.com/JetBrains/koog/blob/develop/examples/src/main/kotlin/ai/koog/agents/example/mcp/PlaywrightMcpClient.kt So basically you can have even a joint tool registry with MCP tools and other tools:
Copy code
val myTools = McpToolRegistryProvider.fromTransport(...) + ToolRegistry {
   tool(ExtraTool1)
   tool(ExtraTool2)
} + McpToolRegistryProvider.fromTransport(...some other MCP server...)
And then you provide it as a normal ToolRegistry to any agent, and then you can limit tools in subgraphs as the following:
Copy code
val mySubgraph by subgraph(tools = listOf(...)) {
  // only provided tools will be available to LLM inside this subgraph

  // Note: of course, as subgraphs share the same history and context, some older subgraphs could populate different tool cals in the history, that are not available here to the LLM. This might be confusing to the model or even break the model, and that's why we have `MissingToolsConversionStrategy` in AIAgentConfig, which defaults to `MissingToolsConversionStrategy.Missing(ToolCallDescriber.JSON)` i.e. missing tools in the history will be described as JSON plain text and all tool calls will be substituted to user messages with plain text before sending to the actual LLM. So, this problem won't be hitting you, but you may also want to play different strategies of describing tools. JFYI.

  ...

}
And also to get the tools from the MCP tool registry (or any tool registry in general), you can use
toolRegistry.tools
that would give you a list of tools. So, for example if different MCP tools are needed for different subgraphs, you can do something like this:
Copy code
val mcpToolRegistry1 = McpToolRegistryProvider.fromTransport(...)
val mcpToolRegistry1 = McpToolRegistryProvider.fromTransport(...some other MCP server...)

val allTools = mcpTools1 + mcpTools2 + ...



val strategy = strategy("yours") {
  val firstPart by subgraph(tools = mcpToolRegistry1.tools) { ... }
  
  val secondPart by subgraph(tools = mcpToolRegistry2.tools) { ... }

  val commonPary by subgraph { ... } // all tools available

  // some edges
  ...
}

val agent = AIAgent(toolRegistry = allTools, strategy = strategy, ...)
@Gopal S Akshintala please let me know if this helped or if you still have some issues or non-covered use-cases 🙏
g
Thanks @Vadim Briliantov, it does certainly help! Let me try it out and get back! Appreciate such quick support! ❤️
kodee welcoming 1