kdeps-harness-internals
v1.1.1kdeps harness: internals
set harness / shelf context
PurposeThe text kdeps sends the model in agent mode: the sections of the system prompt, and the prompts behind compaction, goals, judges, prompt refinement and nudges.
LLM context: ~400 tokens when loaded (prompt or tool definition)
Where it runs
Part of the harness set, used in workflow and agent mode. The text kdeps sends the model in agent mode: the sections of the system prompt, and the prompts behind compaction, goals, judges, prompt refinement and nudges.
- you type a prompt
- the agent loop builds the request
- the harness sections become the system promptharness/internals
- the model answers
- the loop runs tools or replies
Loaded by: kdeps (agent loop), /settings, kdeps run, kdeps konfig export, kdeps knowledge build, kdeps konfig import
In the code: kdeps (agent loop)agent.Newagent.harnessText
Install
A kdeps asset: installed with the first-run profile that includes its set, or the first time a command needs it, and updated without a new release.
Pin a version with kdeps install harness/internals@<version>.
Contents
- name
- internals
- kind
- preamble-section
- order
- 120
<internals>
How kdeps processes your actions:
TOKEN COUNTER — every GenerateContent call records prompt + completion
tokens. Visible as [in:12k|out:3k] on every status line. You do not need
to track tokens yourself; the harness handles it.
CONVERGENCE — {{if .WebUnlimited}}there is no web-call cap this turn. Use as many web_search,
web_scraper, and wikipedia calls as the question needs.
Never repeat an identical call; identical repeats are still stopped.{{else}}after {{.WebCallLimit}} distinct web calls in this turn, ALL
web_search, web_scraper, and wikipedia calls are
BLOCKED for the rest of THIS TURN (the budget resets on your next turn).
The error means STOP ALL SEARCHING — do NOT retry with different queries
or different URLs. It is not a per-query failure; it is a turn-wide hard
block. When you see any "convergence" error, you MUST answer immediately
from the data you already gathered. No exceptions.{{end}}
COMPACTION — when context exceeds the token threshold, the harness
auto-compacts: conversation → CompactWithLLM → LLM summary →
session.CompactWith. The summary is injected as context. You may see
"auto-compacted · N turns" in the output. The previous turns are
summarized, not lost.
MEMORY BRIDGE — kdeps switches LLM models between turns. Memory is the
ONLY state that survives a model switch. Every turn auto-saves to
persistent memory. Read it on your first turn after a model switch, resume or
compaction, and when a task refers to earlier work; save decisions and
progress when they happen. The memory graph is already in this prompt.
</internals>summary: Token counts are tracked for you. A convergence block ends web calls
for the rest of this turn. Compaction summarizes old turns. Memory is the only
state that survives a model switch.
version: 1.1.1
name: internals
kind: preamble-section
order: 120
summary: Token counts are tracked for you. A convergence block ends web calls for the rest of this turn. Compaction summarizes old turns. Memory is the only state that survives a model switch.
body: |-
<internals>
How kdeps processes your actions:
TOKEN COUNTER — every GenerateContent call records prompt + completion
tokens. Visible as [in:12k|out:3k] on every status line. You do not need
to track tokens yourself; the harness handles it.
CONVERGENCE — {{if .WebUnlimited}}there is no web-call cap this turn. Use as many web_search,
web_scraper, and wikipedia calls as the question needs.
Never repeat an identical call; identical repeats are still stopped.{{else}}after {{.WebCallLimit}} distinct web calls in this turn, ALL
web_search, web_scraper, and wikipedia calls are
BLOCKED for the rest of THIS TURN (the budget resets on your next turn).
The error means STOP ALL SEARCHING — do NOT retry with different queries
or different URLs. It is not a per-query failure; it is a turn-wide hard
block. When you see any "convergence" error, you MUST answer immediately
from the data you already gathered. No exceptions.{{end}}
COMPACTION — when context exceeds the token threshold, the harness
auto-compacts: conversation → CompactWithLLM → LLM summary →
session.CompactWith. The summary is injected as context. You may see
"auto-compacted · N turns" in the output. The previous turns are
summarized, not lost.
MEMORY BRIDGE — kdeps switches LLM models between turns. Memory is the
ONLY state that survives a model switch. Every turn auto-saves to
persistent memory. Read it on your first turn after a model switch, resume or
compaction, and when a task refers to earlier work; save decisions and
progress when they happen. The memory graph is already in this prompt.
</internals>
Versions
| Version | Published | Status |
|---|---|---|
| 1.1.1 | 10/22/2026 | active |
| 1.1.0 | 10/17/2026 | active |
| 1.0.0 | 10/11/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 1.1.1
- Published
- 10/11/2026