00 // WORKBENCH
The pipeline, live
A tool call's output is appended to the model's context, and the model reads every line of it. Aphrodite runs four steps over that output before it arrives: the enriched preview line the agent would read, the marker the store would hold, and the mechanical outcome the pipeline reaches - pass-through, or preview plus marker. Any tool output can be put through those steps: a build log, a test run, a grep result.
The four live-reloadable compression thresholds are yours to turn. The engine's compaction knob is documented further down rather than wired in, because the path modelled is the tool-output path and nothing else.
The thresholds the sliders move are the shipped ones, and every figure is measured from the bytes of the input and recomputed as they turn - so no number can disagree with the payload it describes.
01 // THE CONTRACT
SIMULATION BOUNDARY
Browser simulation · illustrative digest · no engine benchmark · no server-side retrieval
What this simulates
Real
- the classifier rules (README.md:153-176)
- the preview line shapes (README.md:108-133)
- the threshold semantics and defaults (README.md:395-420).
Simulated
- the BLAKE3 digest (a deterministic stand-in hash - the real 40-char digest needs the Rust store, and no engine can resolve the marker it prints)
- and aphrodite_retrieve (shown as the decision text, never executed).
No timing is simulated at all: the 40-123 ns classify figure is the engine's own historical measurement, printed on the rail and arc exactly as the README and the CHANGELOG carry it, and /benchmarks/ prints it with its environment and its reproduce command.
No network and no runtime: the whole pipeline runs in the browser.
Not depicted: the context engine's auto-compaction pass and the injection assembler's directive budget - only the tool-output path is modelled.
The full registry is larger - the 30-type content catalog lives in docs/classification/content-types.md:118-151; only the README tier is modelled.
02 // THE INSTRUMENT
Four steps, one decision
- 01 CLASSIFY engine 40-123 ns
- 02 PREVIEW ~15 tok
- 03 STORE BLAKE3
- 04 DECIDE RETRIEVE?
INPUT
0 BCLASSIFIED
not run yet · ×1 ·limit -
PREVIEW + MARKER
the line the LLM readsPREVIEW LINE
[press RUN PIPELINE]
ILLUSTRATIVE MARKER // NOT ENGINE-RESOLVABLE
illustrative marker - · 0 B · not run yet
The engine's address is a BLAKE3 digest of the original bytes. This browser example computes a deterministic stand-in instead, so its marker is illustrative: no engine can resolve it, and nothing here is stored server-side.
DECISION
no run yet - a run names the mechanical outcome: pass-through, or preview + marker
The agent decides whether to retrieve. The engine has never been given a task, so it cannot know whether a preview answers one: it reports what the pipeline did with the bytes, and the retrieval that would follow belongs to whoever is driving the agent - the engine never retrieves on its own.
INJECTION ASSEMBLER (PRE_LLM_CALL)
[directives:] → [nudge:] → [recall]- assembled per turn, under the 4,000-char budget
THIS RUN, IN FIGURES
Every figure is measured from the bytes of the input and the limits in force: input bytes, the type the classifier chose, the token limit that type resolved to, the replacement the agent would receive (preview plus marker), whether a marker was emitted, and the byte reduction those two numbers produce. There is no running total, because a total would count keystrokes rather than the pipeline's work.
DETECTED TYPE
not run yet
INPUT BYTES
not run yet
EFFECTIVE THRESHOLD
not run yet
REPLACEMENT SIZE
not run yet
MARKER
not run yet
BYTE REDUCTION FOR THIS EXAMPLE
not run yet
The 16 pipeline types the rail renders follow the README catalog (README.md:155-176); the full classification registry behind them is 30 types, printed in docs/classification/content-types.md:118-151.
A type is a routing decision, not a description: the first rule that matches wins, and every later stage reads that one name.
A generic bucket is not the end of the road - a conservative semantic detector upgrades the git, gitlog, grep, ls and test shapes, and ordinary prose is never mis-tagged.
03 // THE CONTROLS
THRESHOLD KNOBS
aphrodite.toml [compression] - the four proxy thresholds are live-reloadable; edit + save (or POST /reload) re-applies them immediately (README.md:389).
Only four values are atomics the running engine swaps: cache, token, inline and code_multiplier. Everything else in the file waits for a restart.
The engine knob is an escape hatch rather than a dial - past 100 the context engine stands down and the four proxy thresholds keep working alone.
Reset defaults restores the four sliders to the shipped [compression] values and changes nothing else. It is not an HTTP reload: the engine's own POST /reload re-applies aphrodite.toml to a running binary, and its behaviour is documented in the aphrodite.toml configuration reference and in /config/ .
token proxy threshold (bytes)
The token proxy measured every tool result against this limit: a result over it was compressed into a marker, a result under it stayed in the transcript as it arrived.
cache proxy threshold (bytes)
The cache proxy answered on its own port with its own limit, which is what let one binary tune the two lanes independently.
inline-vs-durable CCR storage cutoff
This is a storage cutoff, not a compression one: under it a stored blob lived inline in the session, over it the blob went to durable CCR.
threshold multiplier for code_* types
Code types multiplied the token limit by this factor, and the effect the config doc names is that code stayed inline while prose of the same size was compressed (docs/config/aphrodite-toml.md:159).
engine_threshold_pct
30 %
100+ = engine-off escape hatch · compaction, not compression · a context-engine pass the compression readout cannot report
The context engine's fill percentage: middle turns were archived to CCR once the session passed it, 0 meant never, and 100+ switched the engine off (README.md:580).
It is a compaction knob, not a compression one. The four proxy thresholds keep working whatever it is set to, which is why the engine standing down never turned the pipeline off - the two dimensions are separate, and only one of them is measurable without a session.
Compaction is documented with the rest of the configuration surface in the aphrodite.toml configuration reference and exercised on /config/ .
turn the knobs, then RUN PIPELINE
Three independent decisions follow from the knob set: whether the result is compressed, whether the cache lane answers it, and whether the store keeps the blob inline or writes it durably. Aphrodite takes the three separately, and reporting them side by side is what stops one being read as another.
The four thresholds are atomics the running engine swaps, so the same result is inline under a 4 KB limit and stored under a 256 B one, with no restart between the two.
Byte reduction is measured against the bytes the result actually carries rather than against the knob set, so the routing decision and the saving it produces stay two figures: the thresholds decide the first, and only the bytes decide the second.
04 // THE STATES
THRESHOLD STATES
Every run ends in one of three states, and a state is the whole contract: the name says in one line whether the bytes stayed, whether a marker was minted, and whether the engine was in the loop at all.
The first two are compression states, and the readout names them. The third is a compaction state: the token threshold alone decides the first two, while the third is the context engine standing down - which is why that knob is documented beside the thresholds rather than wired into the readout, and why no readout can print it.
None of the three is a judgement about the agent's question. Whether a preview answers it is the agent's decision, taken with a task in hand: the engine reports the state, and the judgement stays with the agent that holds the task.
COMPRESSION
below threshold, kept inline
WHEN: bytes <= tool_threshold_token (x code_multiplier for code_* types)
The sample never crossed the token limit, so the classifier typed it and the preview line was built, but nothing was hashed and no marker was minted.
The bytes stayed in the transcript, which is why this state costs the turn nothing: the agent already reads what it would otherwise have to retrieve.
HOLDS: the bytes themselves - nothing to resolve
COMPRESSION
preview enough, marker stored
WHEN: bytes > tool_threshold_token (x code_multiplier for code_* types)
The sample crossed the limit, so the digest hashed the original bytes and the marker was stored under that hash.
The preview line answered the question, so the agent reasoned on the preview and left the marker as a receipt rather than a debt.
HOLDS: the preview line, the address and the marker
COMPACTION
engine OFF - the 100+ escape hatch, nothing archived mid-session
WHEN: engine_threshold_pct >= 100
Past 100 the context engine stood down: no middle turn was archived mid-session and nothing was marked by it.
The four proxy thresholds kept working on their own, so tool output was still compressed - the knob switches off one engine, not the pipeline.
This is a compaction state, not a compression one, which is why the readout never prints it: the two dimensions answer different questions, and conflating them is a contradiction.
HOLDS: the raw turn, un-archived by the engine - the proxy thresholds still compress tool output
The inputs are printed alongside the name - compression mode, cache lane and storage - so a run that reads as surprising can be traced back to the threshold that produced it.
05 // THE TOPOLOGY
THE STORE AND THE CONFIG SURFACE
Two parts of the pipeline have no place in a readout: where the store actually lives, and where the thresholds come from.
One binary serves both lanes: the cache listener answers on :9797 from a 10K-entry DashMap for content over 8 KB, and the token listener answers on :9798 from SQLite for content over 1 KB plus the tool relay.
Both lanes share the BLAKE3 hash and the marker wire format, so a marker minted by one resolves through the other - the address is the contract, not the port.
SSE streams pass through uncompressed, and a healthy running proxy is reused at startup rather than a second being spawned.
The file is found by the same three-step search on every start: APHRODITE_CONFIG_PATH first, ./aphrodite.toml in the working directory second, the copy under the Hermes home last.
Inside the file, values resolve env over TOML over default - except mode and listen, which get no blanket env override and keep their ports per-mode through APHRODITE_CACHE_PORT and APHRODITE_TOKEN_PORT.
A Modify event on aphrodite.toml debounces 500 ms and resolves the thresholds into the four atomics; POST /reload does the same thing on demand.
06 // THE RECEIPTS
SIM NOTES · THE MEASURED ARC
The numbers the simulation reaches for are real: each plate prints the figure the CHANGELOG carried at that release, and the benchmarks page carries the reproduce commands.
None of them was measured for the simulation. They are historical engine measurements, printed as receipts and labelled as such wherever they appear - which is the difference between a citation and a claim.
A plate is a receipt: the figure is what the release printed, and the note beside it is what the number means for the design.
The figures count up once when they come into view, and the note underneath each one is what makes the number mean something.
54K → 240 tokens · the CHANGELOG entry prints the ratio as 225×
CCR mixed MT, 8 threads: DashMap 229 µs vs Mutex 1.15 ms
The DashMap-over-Mutex result is why the in-memory CCR backend is a sharded map, not one guarded table.
Every compressed blob in the standard corpus was retrieved byte-exact; the corpus ratios themselves live on the benchmarks page.
SRC: CHANGELOG.md:962-973 (the ns/µs table) · CHANGELOG.md:983 (216 KB → 12 markers)