01 // POSITIONING // CCR COMPRESSION ENGINE

// REPRO_PROOF #001
Aphrodite brand mark
CCR CORE // STENCIL
Binary v1.8.1

Aphrodite

CONTEXT MANAGEMENT FOR TOOL-USING AI AGENTS

A tool call's output becomes part of the model's context, and a release build adds thousands of lines the model reads - and pays for - before it can answer. Aphrodite intercepts that result: logs, diffs, files, searches, JSON, and browser snapshots arrive as compact previews the agent can act on, with the original always one retrieval away.

  • Rust engine
  • Hermes plugin
  • Standalone proxy // :9797 :9798
  • Licensed CC0-1.0

02 // DECISION MATRIX

Two ways to run it

Both lanes run the same engine over the same CCR store. One lives inside the turn; the other can only see traffic that arrives over HTTP.

RECOMMENDED PATH 01 // NATIVE PLUGIN

Hermes plugin

Aphrodite connects to Hermes Agent as a native plugin, not as a proxy you point a client at. Tool output never hits a wire, so only hook-level registration catches it before it becomes message history.

WHERE IT RUNS
Inside the turn, as a native Hermes plugin - not a proxy you point a client at.
WHAT IT SEES
Tool output, before it becomes message history: six hooks, thirteen tools, and an optional context engine, every call forwarded into the Rust dylib.
WHAT IT SHARES
The turn's own context. The inline store is session-scoped.
THE LIMIT
The hooks are Hermes' contract - no other client can register them, so this lane works with Hermes only.
BEST FOR: HERMES THE INTEGRATION →
HTTP PATH 02 // OPENAI-COMPATIBLE PROXY

Standalone proxy

The plugin already spawns both listeners, so this lane needs no extra setup: point base_url at :9798 and any OpenAI-compatible client - a second agent, a script, an external tool - gets the same CCR compression over plain HTTP.

WHERE IT RUNS
On a port, as an OpenAI-compatible listener the plugin already spawns.
WHAT IT SEES
HTTP traffic only. SSE streams pass through uncompressed.
WHAT IT SHARES
A persistent SQLite store that survives a restart, shared with any client that speaks HTTP, and the tool relay that retrieves or creates CCR entries.
THE LIMIT
No tool-output interception, no terminal compression, no directives, no context engine. It extends the stack to other callers; it does not replace the hooks inside Hermes.
BEST FOR: OTHER CLIENTS THE PROXY LANE →

03 // OPERATIONAL WORKFLOW // THE PAIR // STREAM + PREVIEW

The agent spends its budget reading noise

Every file read, build, code search or browser open floods the agent's context with raw output - compilation logs, accessibility trees, JSON blobs - and the agent spends its budget reading noise instead of reasoning.

RAW STREAM // WHAT THE TERMINAL KEEPS $ cargo build --release -p aphrodite 142 LINES · 4,565 B
|
note: found an item that was configured out
--> crates/aphrodite/src/lib.rs:88:9
|
88 | pub mod noise;
| ^^^^^
= note: the item is gated behind the `noise` feature
warning: `aphrodite` (bin "aphrodite") generated 1 warning
error: could not compile `aphrodite` (bin "aphrodite") due to 1 previous error

the whole thing enters the context

The commands in a tool-heavy session arrive in exactly this variety: a build that stalls and then bursts, a search that arrives flat and fast, a listing, a test run that ticks, a JSON body that only parses on its last line. The fade, the dim and the mute are the suppression marks the engine puts on these same lines - repeated compile steps recede, counted warnings mute, the one line that stopped the build stays at full strength.

PREVIEW // WHAT THE MODEL READS
build
ONE LINE, ONE MARKER
[build:2E 2W 142L | error[E0432]: unresolved import `crate::noise`]
CUTOFF THE PREVIEW STOPS HERE · THE ORIGINAL IS STORED
<<<CCR:a1b2c3d4|build|4565>>>

Aphrodite previews the output it has received, not the output a command will eventually produce: the counts are the counts of the lines that have actually arrived, and the marker's size is the size of the bytes behind it at that moment. Every intermediate preview reads as one sentence - if the stream ended here, this is the line the agent would read - and the tally climbs with the stream until it settles on the line the build really ends on.

The type chip names the type the tool hands the engine, and the engine honours it: a build counts errors and warnings, a search counts hits and files, a listing counts entries and extensions, a test run counts passes and failures, a JSON body counts items and keys. One engine, five arms of it - the same four stages, reading five different kinds of output.

The flood arrives one line at a time; the line the agent would have read instead is recomputed as each line lands.

COMPRESSION CUTOFF

Everything above the line is stored and addressed; the agent reads the one line, and pays for the rest only when the preview cannot answer.

ONE RETRIEVAL AWAY
METHOD How the demonstration works

A tool call's output arrives in exactly this order and at this pace: a release build, then a code search, then a directory listing, then a test run, then a JSON body, then back to the build - indefinitely, each at the pace its own tool really prints at. Every line is output the named command produces, and the preview is recomputed from those lines as they land.

Each line the tool prints is budget: the model reads it, and pays for it. As the lines land, the counts climb, the marker's size grows, and the preview settles on the one line the agent would actually have read. A marker only means something once there is a flood behind it to address, which is why Aphrodite draws it from the flood rather than beside it.

Five commands, five shapes of answer: the build counts errors, warnings and lines; the search counts hits and files; the listing counts entries and extensions; the test run counts passes and failures; the JSON body counts items and keys. That is one engine reading five kinds of output - the tool naming the type, and the preview rendering the answer that name earns.

The marker is the address of the original bytes.

The agent pays for them only when the preview fails to answer the question.

THE FOUR STEPS // WHAT HAPPENS BETWEEN THE TOOL PRINTING AND THE MODEL READING

A tool result is appended to the model's context the moment the tool returns, so a build log the agent never needed is read in full, and paid for in full. Aphrodite intercepts that output before it reaches the LLM and replaces it with a compact, structured preview - because the agent's reasoning budget is the context budget, and raw noise spends both.

GUIDE How to read the four stages

The four stages run in order: each card is one step, the figure on it is what that step costs, and the line under the rule is what it decides.

What happens between the tool printing and the model reading is four steps, run in the same order every time, and only one of them costs anything measurable.

The first two are the engine's: name the content, then render the one line that describes it. The third is storage, and it is deliberately boring. The fourth is not the engine's at all - it is the agent's, and it is the only step that spends the budget the other three just saved.

The agent sees ~15 tok of metadata instead of hundreds - and retrieves the full content only when it actually needs it.

It is the reason tool-heavy agents keep working: the context window stops paying for noise before the reasoning starts.

01 // CLASSIFY

STAGE // A
40 - 123 ns

Type-aware classifier names the content.

SIMD BYTE

02 // ENRICH & PREVIEW

STAGE // B
~1 ms

Enriched, type-aware preview rendering.

TYPE-AWARE

03 // BLAKE3 STORE

STAGE // C
SQLite

CCR marker: <<<CCR:hash|type|size>>>

DUAL TIER

04 // AGENT DECIDES

STAGE // D
aphrodite_retrieve

Full content only when needed.

ON DEMAND

04 // PERSISTENCE ARCHITECTURE

What lands on disk

Two directories, and neither of them is the plugin's own tree: a reviewed pinned checkout that carries the manifest and the checksum list, and a runtime home that carries everything fetched or written after it.

FILESYSTEM TOPOLOGY // ~/.HERMES/ TWO DIRECTORIES
~/.hermes/
├── plugins/aphrodite/ # the catalog entry: a reviewed pinned checkout
│ ├── plugin.yaml # Hermes manifest
│ ├── __init__.py # loader shim
│ ├── BINARY_VERSION # the release this tree pins
│ └── SHA256SUMS.txt # in-tree checksums, BINARY_VERSION header
└── aphrodite/ # the runtime home
├── binaries/ # fetched by download.sh, SHA-256 and magic-byte verified
│ ├── aphrodite # the proxy binary
│ └── libaphrodite_hermes.* # the dylib the plugin loads
├── ccr.db # SQLite store: survives a restart
└── directives/ # agent directives, hot-reloaded
THE PLUGIN DIRECTORY // HOOKS-ONLY ~/.hermes/plugins/aphrodite

Carries the manifest, the loader shim and the checksum list, and nothing else: a reviewed pinned checkout of the catalog entry. Enabling is a separate write to Hermes' own config.yaml, so a finished download alone does not register the hooks.

THE RUNTIME HOME // PERSISTENCE ~/.hermes/aphrodite

Houses everything fetched or written at runtime: the binary and the dylib, and the SQLite store that survives a restart and is shared with any client that speaks HTTP. The plugin lane's inline store is session-scoped instead.

aphrodite setup runs hermes --version as its first step and fails fast with a clear error, before anything is written.

If the binaries are missing, the plugin logs the setup command and stays disabled until you run it.

05 // EVIDENCE // 200 SESSIONS

One result, and the four figures that qualify it

26.9%

CONTEXT TOKENS DEFLECTED

156 M+ TOKENS SAVED

200 real sessions, 6,843 API calls, Sep 2026.

Measured over 200 real Hermes sessions: 26.9% of all context tokens deflected, a median session saved ratio of 22.9%, and ~22,921 tokens saved per API call. 183 / 200 of the 200 sessions saved tokens.

The sensitivity band is ~24-33%: the estimate depends on the chars-per-token ratio, which the study puts at 3.0-4.5.

THE OTHER MEASUREMENTS

Each of these is a different measurement in a different domain, and the qualifier under each one is part of the number. The ceiling is not the average, the average is not the latency, and the saved total is the session study rather than any single run.

COMPRESSION

610 ×

Best case, on large low-entropy prose.

OVERALL

132 ×

The whole standard corpus: 106 KB to 800 B.

E2E OVERHEAD

~10 MS

Including the HTTP round-trip; the spread is 8-40 ms.

06 // START // INSTALLATION

Installing it

Hermes Agent, with hermes on PATH and a route to GitHub Releases. aphrodite setup runs hermes --version as its first step and fails fast with a clear error, before anything is written.

SESSION // PLUGIN CATALOG FOUR STEPS // READY
hermes plugins install aphrodite
hermes plugins enable aphrodite
cd ~/.hermes/plugins/aphrodite && bash download.sh
hermes
  1. hermes plugins install aphrodite - the catalog entry: a reviewed pinned checkout of plugin.yaml plus the __init__.py shim, in ~/.hermes/plugins/aphrodite .
  2. hermes plugins enable aphrodite - or answer yes at the Enable now? prompt. Enabling is a separate write to Hermes's own config.yaml, so a finished download alone does not register the hooks.
  3. bash download.sh - run from inside ~/.hermes/plugins/aphrodite . It fetches the binary and the dylib into ~/.hermes/aphrodite/binaries/ , validated against the in-tree SHA256SUMS.txt and magic-byte checked. On Windows: pwsh ./download.ps1.
  4. hermes - start it.

EXPECTED RESULT

Reviewed pinned checkout of the catalog entry, binaries fetched + SHA-256 verified, plugin enabled. Start hermes and the plugin logs that Aphrodite is enabled.

VERIFICATION GATE // prebuilt binaries magic-byte verified against the in-tree SHA256SUMS.txt DAEMON LISTENING // :9797 cache proxy (threshold 2048 bytes by default) · :9798 token proxy (threshold 256 bytes by default)

FULL INSTRUCTIONS ON THE SETUP PAGE

APHRODITE // CCR CORE · CONTEXT MANAGEMENT FOR TOOL-USING AI AGENTS · ONE BINARY, ZERO DEPENDENCIES