Koog 1.0 idioms, gotchas, and scaffolding skills for Kotlin agents on the JVM
86
88%
Does it follow best practices?
Impact
86%
1.86xAverage score across 45 eval scenarios
Advisory
Suggest reviewing before use
Process steps in order. Do not skip ahead.
ACP and A2A are both inter-agent protocols but serve different needs:
wire-a2a) — agent-to-agent calls modeled as RPC. Caller invokes the remote agent, gets a result. Good fit when the remote is another agent doing its own planningwire-mcp-server) — tool-host protocol. The remote exposes tools, not agentsIf the user's need is "let another agent call this one", redirect to wire-a2a. If it's "let a tooling client drive this agent with cancellation and progress events", continue.
Proceed immediately to Step 2.
implementation("ai.koog:agents-features-acp:1.0.0")Proceed immediately to Step 3.
Install in the agent's trailing lambda:
import ai.koog.agents.features.acp.ACP
val agent = AIAgent(
promptExecutor = ...,
llmModel = ...,
systemPrompt = "...",
) {
install(ACP) {
endpoint = "...."
// auth, transport, capability flags (cancellation, progress events) — see ACP module
}
}The feature wires the agent's pipeline into the ACP transport — incoming ACP requests drive the agent through its strategy, outgoing events (LLM round-trips, tool calls, planner steps) surface as ACP progress notifications the client can subscribe to.
Proceed immediately to Step 4.
ACP clients can cancel mid-run. The feature propagates cancellation as coroutine cancellation through the agent's run — node bodies that catch CancellationException and continue will defeat the cancel signal.
If any tools in the registry perform long-running work, ensure they honor coroutineContext.ensureActive() checks at safe points. The ACP feature does not patch tool bodies — that's the tool author's responsibility.
Reference example: examples/acp-agent/ in the repo.
Finish here.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
scenario-36
scenario-37
scenario-38
scenario-39
scenario-40
scenario-41
scenario-42
scenario-43
scenario-44
scenario-45
skills
add-observability
add-persistence
add-rag
add-structured-output
add-token-budgeting
add-tool
cache-llm-calls
define-prompt
domain-model-subtask-pipeline
references
enable-prompt-caching
handle-agent-events
manage-state
migrate-from-0-x
model-planner-subtasks
persist-chat-history
query-sql-from-agent
scaffold-agent
snapshot-and-restore
test-koog-agents
trace-agent-internals
use-attachments
use-functional-agent
use-llm-node-variants
use-planner
wire-a2a
wire-acp-server
wire-ktor-server
wire-mcp-server
wire-spring-boot