Mirzamehdi
08/19/2025, 11:35 AMVadim Briliantov
08/19/2025, 11:49 AMval designer by subgraph {
val setSystemPrompt by node {
llm.writeSession { rewritePrompt { prompt("id") { system("You are designer") } }
}
…
}
val developer by subgraph {
val setSystemPrompt by node {
llm.writeSession { rewritePrompt { prompt("id") { system("Act as a developer") } }
}
…
}
val designAndDevelop by parallel(designer, developer) {
... // combine the results and acquired message histories
}
val qa by subgraph { ... } // Acts as a QA
designAndDevelop then qa
Mirzamehdi
08/19/2025, 11:52 AMGabriel Duncan
08/21/2025, 5:02 PMGabriel Duncan
08/21/2025, 5:06 PMVadim Briliantov
08/23/2025, 12:15 PMAIAgent.asTool(“description”)
syntax. Also please consider checking https://docs.koog.ai/ranked-document-storage/ and https://docs.koog.ai/embeddings/ . Then, it’s up to you whether you just provide it as yet another tool for your agent and prompt it to use it, or force it’s usage in the strategy (ex: use https://docs.koog.ai/nodes-and-components/#subgraphwithtask or https://docs.koog.ai/custom-subgraphs/ that can take a list of tools, or alternatively — you can call any tool anytime directly inside a llm.writeSession{…} of the node using callTool(::toolFunction, arg1, arg2)
or callTool<ToolClass>(toolArgs)
depending on what type of tools you use). Alternatively, you can even go without a separate tool/agent and write a custom node that would call the LLM using promptExecutor
available from inside of the llm.writeSession (it won’t be sharing the history with the parent agent, if called directly — and you’ll see an OptIn warning about that — it’s exactly what you need) and use the vector storage as well inside such node.
• A question-asker is essentially a part of the strategy (a tool or a node)
Sorry for too much of text, I hope I didn’t make it too complicated. Please let me know if it helps or if you need more advice here — I’m always happy to chat about the architecture of agentsGabriel Duncan
08/23/2025, 11:40 PMVadim Briliantov
08/29/2025, 9:48 PM