any plan to add support to skill at the promptexec...
# koog-agentic-framework
s
any plan to add support to skill at the promptexecutor level?
a
Could you please clarify what do you mean by skill?
s
a
Thank you! As far as I understand, skills are a heuristic way for the prompt injection, and the actual heuristic for what and when to inject can vary a lot depending on the use case (e.g. it could be keyword matching, llm-as-a-judge, etc.). So, what we could do is provide a generic agent feature to inject prompt. I think, it could look approximately like this:
Copy code
AIAgent(
    ...
) {
    install(PromptInjection) {
        updatePrompt { prompt: Prompt ->
            val updatedPrompt = ... // inject some messages if needed, e.g. val updatedPrompt = prompt(prompt) { user("You have the following skill ...") }
            updatedPrompt
        }
    }
}
It will update the prompt just before sending it to the llm and not inject the skill in the message history. After we have this generic component, we can see if we need to add some out-of-the-box skill-specific heuristics for prompt injections. cc: @Vadim Briliantov WDYT?
v
@Antonii Belyshev Actually what you suggest resonate with our plan for LongTermMemory / RAG feature via eventhandling (changing prompt with RAG before every LLM call). But I actually thought that Antrhopic’s skills are some sort of folders that contain cpmpressed tool information which Claude migh decide to “open” and read fully to get the idea of available tools. That has some benefits compared to classical tools or MCP where LLM has full tool descriptors from the very beginning and those descriptors consume the context.
s
the opencode, codex, claude code all have this in their code, and they are typically not added to prompt (system one) in order not to invalidate the kv cache, instead these are added as tool result at the current place. Of course the agent have meta for all the skills, in the prompt,
but that does not change though out.
@Vadim Briliantov tool have the description fully available during the first llm call, skill only have the meta (name, description) for the first llm call, and load the entire content for the second call.
@Antonii Belyshev @Vadim Briliantov on a separate note, it seems that koog could be offered into two package, one is low level, (prompt executor, and below), another is aiagent level.
that way, one can potentially build other high level abstraction, in addition to graph/function flavor.
v
@Sean Wu Currently Koog is already provided in separate packages. Prompt, prompt-executors, llm-clients, etc. — are all independent packages available on Maven. So as agents and sub-modules. See https://mvnrepository.com/artifact/ai.koog: • https://mvnrepository.com/artifact/ai.koog/prompt-llm • https://mvnrepository.com/artifact/ai.koog/prompt-model-jvm • https://mvnrepository.com/artifact/ai.koog/prompt-executor-clients • … • https://mvnrepository.com/artifact/ai.koog/agents-core-jvm • https://mvnrepository.com/artifact/ai.koog/agents-tools-jvm • etc. At the same time, there’s an all-in-one dependency
ai.koog:koog-agents
(https://mvnrepository.com/artifact/ai.koog/koog-agents) for convenience that contains everything so that you can have a fast setup
Additionally, you can always build your own abstractions in addition to graph/goap/functiona/basic agents —
AIAgent
is an interface and you can wrap anything inside. For instance, here in this PR (https://github.com/JetBrains/koog/pull/1413) Anton has wrapped Claude Code (as well as other “remotely running” or non-Koog-native agents) into
AIAgent
interface.
Going back to the Skills, it’s in our plans to support them. But if you would like to contribute and have them available earlier — we’re always welcoming contributions 🙂
s
I have been toying around with some idea, but I find it strange, the skill is actually an loopy agent level idea, that may or may not need extra support from prompt executor level.
if the only thing I do not want is AIAgent, what is the dependency I need? @Vadim Briliantov
I also want to tools, obveriously
a
you'll need agent-core for AIAgent and agents-tools for tools