Guides

Hermes Tool Output Schemas

IN THIS DOCUMENT

Crimson marks the heading currently in view; every entry is one of the document's own headings.

Every Hermes tool returns output with its own shape: unified diffs, JSON envelopes, grep listings, markdown, console logs.

Aphrodite classifies each result into a content type, builds a compact preview, and - when the result is above the compression threshold and eligible - replaces it with a CCR marker.

This page maps the tool surface: what each tool returns, how Aphrodite classifies that output, and how much compression typically helps.

The catalog below covers 43 tool-output shapes: 31 Hermes tools, 10 Aphrodite meta-tools, and two special entries.

The classification pipeline and its 30 content types are documented in Content Type Taxonomy; the exact preview strings are in the Enriched Preview Catalog.

Classification Pipeline

Classification runs in stages, and the first match wins at each stage:

StageRole
Envelope unwrapThe Hermes bridge extracts the payload from wrapper envelopes ({output, exit_code}, {diff}, {error}, {total_count, matches}, {content, total_lines}) before classifying
Base classifierConfidence-gated regex detection: JSON arrays, diff, HTML, search results, build output, source code, text
Semantic refinementConservative shape detection for git status/log, grep, ls, test output, tables, markdown, YAML, XML, CSV
Caller hintAn explicit type hint on the call overrides the detected type

The stored content is always the original bytes - the extracted payload is used only for classification and preview.

A caller-supplied type hint always wins.

See Content Type Taxonomy for the full detection order and signals.

Threshold Groups

Each content type has a threshold multiplier that decides how many bytes survive in context before compression:

GroupTypesMultiplier
Noisy (base, never auto-tuned)linter, build_output, logbase - always fully visible
Errorerror×8
Codecode, code_rust, code_python, code_go, code_js× code multiplier (default 3.0)
Trackeddiff, git, text×2
Defaulttool_output, json, everything else×1

The base itself is auto-tuned from the historical compression-ratio EMA (ratio above 20 → ×2.0, below 3 → ×0.5); the noisy group is exempt so build, lint, and log output stays readable during a coding session.

See Content Type Taxonomy for the full registry.

Tool-by-Tool Reference

Hermes tools

ToolTypical output shapeClassificationCompression benefit
read_fileLINE_NUM | CONTENT lines, optional hint footertext, reclassified code_* when a language is detected, json if parseableHigh - large files get structure previews
write_fileJSON {status, path, bytes, syntax_errors} or plain confirmationjson / text / error (syntax errors)Low - usually short
patchUnified diff (---/+++/@@) or confirmationdiff / textMedium - diffs compress well
search_filespath:line:content rows, file-only, or count modesearch / grep (file:line pattern) / textMedium - large result sets
terminalstdout/stderr plus exit codeterminal / build_output / build_error / error / textVery high - verbose output
processJSON list, poll delta, paginated log, or confirmationjson / text / terminal (exit code in output)Medium - logs verbose, poll deltas short
execute_codestdout plus optional stderr and resulterror (traceback) / terminal / code / textMedium - errors need visibility
cronjobJSON object or array of jobsjson / json_arrayLow - short scheduling info
delegate_taskNarrative summary with task resultstext (reclassified on JSON, error, or diff patterns)High - delegate outputs can be very verbose
session_searchJSON {total_count, query, results}search / json_array / jsonMedium - scales with session length
memoryConfirmation or {memories: [...]}json / textLow - short snippets
skill_viewMarkdown with YAML frontmattertext / markdown / jsonMedium - skills can be 100+ lines
skill_manageConfirmation or JSON {action, name, path}json / textLow - short
skills_listPipe-delimited table or JSON arraytable / json_arrayMedium - many skills make long tables
clarifyShort question texttextVery low
vision_analyzeDescription text or JSON {description, objects, text}json / text / errorMedium
computer_useScreenshot description plus action resultjson / text / errorLow-medium
browser_navigateJSON {url, title, status} or confirmationjson / textLow - short
browser_snapshotLarge accessibility tree / DOM arrayjson_array / json / tableVery high - trees can be 10 KB+
browser_clickStructured result or narrative confirmationjson / textLow-medium - includes snapshot delta
browser_typeStructured result or confirmationjson / textLow - very short
browser_scrollStructured result or plain textjson / textLow - very short
browser_consoleLog entries [{level, message, timestamp}]log / json_array / errorHigh - console logs verbose
browser_backStructured result or plain textjson / textLow - very short
browser_visionDescription text or JSONjson / text / errorMedium - longer than vision_analyze
browser_get_imagesJSON array of image URLs/descriptionsjson_arrayLow-medium
browser_pressStructured result or plain textjson / textLow - very short
image_generateJSON {image} or MEDIA:pathjson / textLow - short
text_to_speechMEDIA:path audio reference plus confirmationjson / textLow - short
web_searchJSON array of results [{title, url, snippet}]search / json_array / jsonHigh - snippets verbose
todoJSON array, table, or markdown listjson_array / table / textLow-medium

Aphrodite meta-tools

The plugin ships thirteen aphrodite_* tools; the ten below are the ones the output catalog tracks.

auto_expand expands meta-tool output inline - the tools are never compressed - so the agent always sees it (the remaining three, directive, prefetch, and prefetch_status, return short status text classified as json/text).

ToolTypical output shapeClassification
aphrodite_catalogMarkdown table with hash, type, size, and preview columnstable - auto-expanded
aphrodite_compressProgrammatic CCR create confirmation / JSONjson - auto-expanded
aphrodite_diffStructured per-turn compression summarytext - auto-expanded
aphrodite_filesGrouped file listingtext - auto-expanded
aphrodite_rebuildBuild lines or structured responsebuild_output / error / json - auto-expanded
aphrodite_retrieveOriginal uncompressed content with markers resolvedThe original content’s own type - auto-expanded
aphrodite_searchCatalog search resultstext / search - auto-expanded
aphrodite_statsStructured key-value statustext - auto-expanded
aphrodite_testSmoke-test resultsjson / build_output - auto-expanded
aphrodite_reclassifyReclassification resultjson - auto-expanded

Special entries

EntryWhat it isBehavior
CCR_MARKEROutput that is already a CCR marker (<<<CCR:hash|type|size>>>)Detected by marker pattern; never re-compressed
CLASSIFIER_SKIPClean, inert output: builds with 0 errors/warnings, exit=0 terminals, zero-match searchesLeft as-is - the preview is the complete story, no marker needed

Skip Gates

Compression only happens when the result is eligible.

Aphrodite leaves a result untouched when it is empty; when the tool is in the essential set - the agent needs raw output; when the tool is one of Aphrodite’s own or a headroom helper; or when the result is below the threshold.

GateApplies toSetting (default)
Essential toolsskill_view, skills_list, skill_manage, memory, session_search, read_file, read_terminalalways raw - never compressed
Self toolsaphrodite_* and headroom helpers - already compact metadataalways raw
Tool thresholdAll other tool resultstool_threshold_token (4,096 chars; 0 = always compress)
Terminal gateTerminal output without chain-split markersterminal_threshold (1,024 chars; 0 = always compress)

Preview Forms

The preview each type carries is compact and type-aware. Representative examples from the enriched catalog:

[build:1E 1W 142L | error[E0432]: unresolved import ...]
[diff:2F +7/-3 12L | src/main.rs Cargo.toml +N more]
[git:2M 2A 1D 3?? | src/x.rs src/y.rs +5 more]
[gitlog:2 commits | abc1234 fix... → def5678 feat...]
[ls:3 files 2 dirs | .rs×2 .md×1]
[test:220 pass 0 fail 1 ignored | 0.31s]
[grep:4 hits in 3 files | src/preview.rs:12 ...]
[code:3fns|2structs fn main() 414L]
[search:Nhits ML]
[json:5items 3L]
[terminal:14L exit code: 0]
[text:3L 50B | some unrecognizable prose here]

When the classifier only reaches a generic bucket (text/terminal/log/ empty), a semantic detector upgrades the arm to a high-signal shape (git status, git log, grep, ls, test) before Aphrodite builds the preview.

The rendered preview length is capped by preview_max_chars (shipped default 0 = unlimited; APHRODITE_PREVIEW_MAX_CHARS overrides it, and environment beats TOML).

The Enriched Preview Catalog is authoritative for the exact emitted strings.

See also