Use this file to discover all available pages before exploring further.
Every token consumed by an AI agent has a cost — in latency, in API spend, and in the shrinking space available for code and reasoning. KiroGraph ships four complementary token reduction systems: shell output compression, prose compression (Caveman mode), on-demand text compression, and file read caching. Each operates independently and can be enabled or tuned without affecting the others.
kirograph_exec runs a shell command and passes its output through a token-optimized filter before returning it to the agent. The filter is selected by command family — git, test runners, linters, build tools, Docker, package managers, AWS, GitHub CLI — and strips noise lines, deduplicates repeated entries, and groups results.
kirograph_gain reports cumulative savings from both shell compression (measured exactly) and graph tools (estimated heuristically). It is part of the enableAgentUtils feature set and requires enableAgentUtils: true.
Removes obvious filler words and softening phrases
full
Removes articles, hedges, and verbose constructions
ultra
Aggressively abbreviates common phrases in addition to full
Caveman mode is applied via multi-level steering injection — no tool call overhead. The agent’s explanations arrive compressed without any change to tool usage patterns.
kirograph_compress is an on-demand compression tool for arbitrary text that arrives outside of kirograph_exec. Enable it with enableGeneralCompression: true.
{ "enableGeneralCompression": true}
The tool routes to one of two compression engines depending on whether command is provided:
rtk-style filters (with command)
Pattern-matched per command family — same filters as kirograph_exec. Use when the text is the output of a known shell command that was run outside of kirograph_exec.
Caveman grammar (without command)
Prose compression for observations, summaries, and freeform text. Preserves code blocks, paths, URLs, and identifiers.
File Read Caching — kirograph_read and kirograph_retrieve
kirograph_read is a caching file reader that returns a compact [cached: file unchanged] marker (~13 tokens) on subsequent reads of files whose content has not changed. Enable it with enableAgentUtils: true.
kirograph_retrieve (CCR) recovers the full content stored in the session cache without performing a filesystem read. Use it after kirograph_read returns a [cached: file unchanged] marker to get the actual content back without redundant I/O.
Parameter
Type
Default
Description
path
string
required
File path to retrieve
projectPath
string
cwd
Project root path
Prefix-stable cache markers enable KV cache hits on conversation context — the model sees the same token sequence for unchanged files, improving KV cache utilization on repeated calls.
kirograph_budget shows per-session token consumption, remaining budget, and utilization percentage. Useful for agents managing context window pressure during long sessions.
Each enabled flag adds tool descriptions to the model context on every MCP call. Total with all flags enabled: 126 tools · ~6,240 tokens.
Enable only the modules your project needs. A typical setup (enableMemory, enableDocs, enableAgentUtils, enableShellExec) costs about ~1,300 tokens — well under the point where tool descriptions start competing with your context budget.