index

A guide to Koog, a JVM toolkit for building AI agents. These agents use language models to reason, follow workflows, and use tools to interact with outside services.

In plain words
What is it for?
It is for learning about Koog's basic, graph-based, and other agent types, along with prompts, workflows, and tool use.
Why use it?
It explains the main parts of a Koog agent and helps developers choose how to structure one for a task.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/jetbrains/koog/index
Clone the repo
git clone --depth 1 https://github.com/JetBrains/koog
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,459 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01459
Opus 5 $0.00000 $0.00730
Sonnet 5 $0.00000 $0.00292
Haiku 4.5 $0.00000 $0.00146

Measured yesterday against content hash 2e7280cbddb5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

index scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/docs/agents/index.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agents

AI agents are autonomous systems that can reason, make decisions, interact with the environment, and take actions to achieve a specific goal. In Koog, an AI agent is more than just a wrapper around an LLM; it is a structured, type-safe state machine designed for the JVM ecosystem.

Koog agents are built around the following core concepts:

  • A prompt executor manages and executes prompts, enabling the agent to interact with LLMs for reasoning and decision-making.
  • A strategy defines the agent's workflow. It can be in the form of a directed graph, a function, or a planner. See Agent types.
  • An agent can use tools to interact with external data sources and services.
  • You can extend and enhance the functionality of AI agents using features.

!!! tip

For information about creating and running a minimal agent, see [Quickstart](../quickstart.md).

Agent types

Depending on the task you need to perform, Koog provides several agent types:

  • Basic agents are ideal for simple tasks that don't require any custom logic. These agents implement a predefined strategy that works for most common use cases.
  • Graph-based agents provide full control and flexibility of the agent's workflow, state management, and visualization.
  • Functional agents enable you to quickly prototype custom logic as a function with access to the agent's context.
  • Planner agents can autonomously plan and execute multistep tasks through iterative cycles until they reach a desired final state.

Agent configuration

Agent configuration defines the agent's execution parameters, including the initial prompt, language model, and iteration limits.

!!! tip

For information about creating and running a minimal agent, see [Quickstart](../quickstart.md).

For simple agents, besides the mandatory prompt executor and language model, you can specify the initial system prompt and some other parameters directly in the agent constructor:

Read the full file on GitHub · 170 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 170 lines · 0 tokens per session scan A 2e7280cbddb5

Subscribe to this mod's changes

index is an agent published in the GitHub repository JetBrains/koog (4,541 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,459 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.