Reference Every key in aphrodite.toml - the pick chain, the proxy pair, the compression knobs - with its default and whether it hot-reloads.

INDEX 12 / 14

aphrodite.toml // THE FILE THAT TUNES EVERYTHING

Configuration Playground

A tool call's output becomes part of the model's context, and aphrodite.toml decides how much of it is replaced before the model reads it.

One TOML file, two independent parsers, three places it can live.

The resolution order re-decides what wins as the shipped example changes - env var, per-proxy entry, defaults, or the compiled-in fallback.

Everything here runs in your browser.

ON THIS PAGE 12 SECTIONS

01 // THE FILE // WHERE IT IS FOUND

Where the file is found

Three stops, in order - and a hard fall-through when none of them exists (docs/config/aphrodite-toml.md, "File location"):

1  APHRODITE_CONFIG_PATH  — explicit override. A path that does not exist still counts as set: it falls through to CLI-flag mode, it never silently redirects.
2  ./aphrodite.toml  — the default: the current working directory.
3  ~/.hermes/aphrodite/aphrodite.toml  — the fallback, consulted only when the env var was NOT set; this is where aphrodite setup writes its generated config.
4  none found  — CLI-flag mode: a single proxy, --mode / --listen / --api-key and friends.

02 // EDITOR // THE SHIPPED EXAMPLE, LIVE

Edit the shipped example

This is the shipped aphrodite.toml.example (sanitized: the api_key sample renders as its env-var name).

Edit it - the resolution ladder on the right re-decides every tracked key as you type.

aphrodite.toml parsed
EFFECTIVE CONFIG - WHO WINS env > toml > compiled

This pane resolves each tracked key against the file as it is edited, so it needs JavaScript. The matrix below is server-rendered and complete without it: every key, its compiled default and its env override.

firstthenlastwhich fileAPHRODITE_CONFIG_PATH./aphrodite.toml in the CWDthe Hermes home copy:.hermes, aphrodite, aphrodite.tomlvalue precedence on both stacks:env over TOML over defaultmode and listen get no blanketenv override - ports stay per-mode:APHRODITE_CACHE_PORT andAPHRODITE_TOKEN_PORTaphrodite.toml Modify eventwatcher debounces 500 msresolve_thresholdsonly the 4 threshold atomics:cache, token, inline,code_multiplierPOST /reload doesthe same on demandnothing else updates live
M7 // CONFIG RESOLUTION

03 // EVERY KEY // THE MATRIX

Every key, once

One row per key is the only reference the file gets: its type, its compiled default, the env override, which parser reads it, when a change takes effect, and what it does.

Where the shipped example sets a different value, both are shown - an installation using the example sees the second, a bare binary sees the first.

hot = /reload + watcher startup = restart load = read at dylib load unwired = silent no-op
54 KEYS

One field, matched against every column of every row: a key name ( threshold), an env override ( APHRODITE_ ), a reader ( dylib), a live class ( hot) or any word of an effect.

A section whose every row is filtered out takes its heading with it, so what is left is the answer and not the shape of the file.

Clear the field to get the whole table back - the filter hides rows that are already in the document and never asks the network for anything.

[[proxies]]

15 keys

One entry per listener; [defaults] repeats api_url, model, ccr_ttl_seconds and api_key one level up, for every proxy that does not set its own.

KeyTypeDefaultEnv overrideReaderLiveEffect
namestringlisten address-PROXYSTARTUPProxy label; the port overrides (APHRODITE_CACHE_PORT / APHRODITE_TOKEN_PORT) match on it
the listen address
listen"addr:port"127.0.0.1:9797-PROXYSTARTUPBind address; loopback by default, and non-loopback peers are rejected on every route except /health
mode"cache" | "token"token-PROXYSTARTUPBackend and compiled threshold: token = SQLite above 1 KB, cache = in-memory above 8 KB
"token"
api_keystring--PROXYSTARTUPUpstream key; the one chain where TOML outranks the env var
none - the proxy refuses to start
api_urlurl--PROXYSTARTUPUpstream API base URL
https://api.openai.com
modelstring--PROXYSTARTUPModel name to forward
"default-model"
tool_relayboolfalse (example true)-PROXYSTARTUPEnables the /tool/relay endpoint
false
devboolfalse-PROXYSTARTUPVerbose request and response logging
ccr_ttl_secondsint (seconds)3600-PROXYSTARTUPCCR entry time-to-live
ccr_db_pathpath~/.hermes/aphrodite/ccr.db-PROXYSTARTUPSQLite path for the token proxy; a relative path resolves against the binary's directory
notify_urlurl--PROXYSTARTUPHermes callback URL for CCR-create notifications
none
notify_keystring--PROXYSTARTUPBearer token sent with notify_url
none
timeoutint (seconds)300 (example 120)-PROXYSTARTUPUpstream request timeout, clamped to 600 with a warning
300
max_contextint (tokens)1,000,000-PROXYSTARTUPMax context tokens
max_outputint (tokens)384,000-PROXYSTARTUPMax output tokens; the proxy refuses to start when it is at or above max_context

[compression]

25 keys

One table, two consumers - the READER column is the split, and it is why the same key can be hot for the proxy and load-once for the dylib.

KeyTypeDefaultEnv overrideReaderLiveEffect
tool_threshold_tokenint (bytes)1024 (example 256)APHRODITE_TOOL_THRESHOLD_TOKENPROXYHOTToken-proxy compression threshold - the gate every tool result crosses
token proxy threshold (bytes) - lower = compress more (hot-reloads) · token proxy threshold (bytes) - hot-reloads
tool_threshold_cacheint (bytes)8192 (example 2048)APHRODITE_TOOL_THRESHOLD_CACHEPROXYHOTCache-proxy compression threshold
cache proxy threshold (bytes) - lower = compress more (hot-reloads) · cache proxy threshold (bytes) - hot-reloads
inline_thresholdint (bytes)256 (example 1024)APHRODITE_INLINE_THRESHOLDPROXYHOTInline zlib versus the durable CCR store
inline zlib fallback threshold (bytes) (hot-reloads) · inline-vs-durable cutoff (bytes) - hot-reloads
code_multiplierfloat3.0 (example 1.0)APHRODITE_CODE_MULTIPLIERPROXYHOTMultiplies the threshold for code_* content types; 1.0 gives code no extra headroom
multiply threshold for code types (hot-reloads); 1.0 = code at base threshold (max compression) · multiplies the threshold for code_* types - hot-reloads
auto_expandboolfalse (example true)APHRODITE_AUTO_EXPANDDYLIBHOTResolve just-stored content inline instead of emitting a marker, capped by auto_expand_limit
WIRED (proxy): resolve just-stored content inline instead of emitting a marker (env APHRODITE_AUTO_EXPAND > TOML > default false) · resolve just-stored content inline instead of a marker - hot-reloads
auto_expand_limitint (bytes)102400APHRODITE_AUTO_EXPAND_LIMITDYLIBHOTByte cap for auto-expanded content; 0 = unlimited
WIRED (proxy): byte cap for auto-expanded content; 0 = unlimited (env APHRODITE_AUTO_EXPAND_LIMIT > TOML > default 102400) · byte cap for auto-expanded content; 0 = unlimited
max_request_body_sizeint (bytes)noneAPHRODITE_MAX_REQUEST_BODY_SIZEPROXYSTARTUPRequest-body cap; an over-size body is rejected with 413 while it is read
the cap is applied while the body streams in, so an over-size request is refused before it is buffered whole · none - no cap
store_max_entriesint (rows)100000APHRODITE_STORE_MAX_ENTRIESPROXYSTARTUPMax live rows in the SQLite store; past it the least-recently-accessed rows are evicted; 0 = unlimited
max live rows (env APHRODITE_STORE_MAX_ENTRIES; 0 = unlimited) · max live rows in the SQLite store - LRU evicts past it; read at store open, not hot-reloaded
store_max_bytesint (bytes)536870912APHRODITE_STORE_MAX_BYTESPROXYSTARTUPMax stored payload bytes, SUM(LENGTH(original)); past it LRU rows are evicted; 0 = unlimited
max stored payload bytes, SUM(LENGTH(original)) (env APHRODITE_STORE_MAX_BYTES; 0 = unlimited) · max stored payload bytes, SUM(LENGTH(original)) - LRU evicts past it; read at store open, not hot-reloaded
terminal_thresholdint (bytes)1024 (example 256)APHRODITE_TERMINAL_THRESHOLDDYLIBLOADTerminal-output threshold gating transform_terminal_output
dylib terminal-output threshold (bytes); proxy path parses-only · dylib terminal-output threshold
poll_workerbooltrueAPHRODITE_POLL_WORKERDYLIBLOADAuto-backgrounding of slow terminal and process calls in pre_tool_call
dylib-path: enable auto-backgrounding of slow tool calls · the rewrite happens before the call runs, so the transcript never shows the backgrounding
chain_splitboolfalseAPHRODITE_CHAIN_SPLITDYLIBLOADOpt-in command splitting into per-segment markers
dylib-path: opt-in fine-grained command splitting (SEG_MARKER segments); OFF by default (markers pollute redirected stdout) · off by default because invisible segment markers pollute redirected stdout
chain_split_min_segmentsint2APHRODITE_CHAIN_SPLIT_MIN_SEGMENTSDYLIBLOADFloor for the adaptive split threshold
dylib-path: floor for the adaptive chain-split threshold (min 2) · below this many segments the command is left whole
chain_split_max_segmentsint6APHRODITE_CHAIN_SPLIT_MAX_SEGMENTSDYLIBLOADCap for the adaptive split threshold
dylib-path: cap for the adaptive chain-split threshold · past this many segments the split stops, so one command cannot flood the transcript with markers
context_enginebooltrueAPHRODITE_CONTEXT_ENGINEDYLIBLOADEnables the context engine; the standalone HTTP proxy never reads it
dylib-path only (aphrodite_stats/config_get/set, · opt-in dylib status flag; the HTTP proxy never reads it
engine_threshold_pctint (%)45 (example 30)APHRODITE_ENGINE_THRESHOLD_PCTDYLIBLOADContext-engine fill gate: middle turns are archived at or above this fill; 0 = never, 100+ = off
LOAD-BEARING (dylib): % of context filled before middle-turn archiving + engine_offload prompt; 100+ = documented engine-off escape hatch · LOAD-BEARING (dylib): middle-turn archiving + engine_offload prompt; 100+ = off
engine_protect_firstint (turns)2APHRODITE_ENGINE_PROTECT_FIRSTDYLIBLOADTurns kept at the start of the index
LOAD-BEARING (dylib): messages to keep at start · LOAD-BEARING (dylib): turns kept at the start of the index
engine_protect_lastint (turns)5APHRODITE_ENGINE_PROTECT_LASTDYLIBLOADTurns kept at the end of the index
LOAD-BEARING (dylib): messages to keep at end · LOAD-BEARING (dylib): turns kept at the end of the index
engine_min_msgsint (turns)8APHRODITE_ENGINE_MIN_MSGSDYLIBLOADMinimum archived turns before the engine may archive
LOAD-BEARING (dylib): minimum messages before the engine activates · LOAD-BEARING (dylib): minimum messages before the engine activates
live_containerboolfalseAPHRODITE_LIVE_CONTAINERDYLIBLOADInstant CCR markers with the live type, for progressive retrieval
WIRED (dylib): instant 'live' CCR markers for large tool results (progressive chunked retrieval + ETA); env APHRODITE_LIVE_CONTAINER > TOML > default false · instant 'live' CCR markers for large tool results
recursive_depthint5APHRODITE_RECURSIVE_DEPTHDYLIBLOADNested marker expansion cap
WIRED (dylib): max nested expansion depth; env APHRODITE_RECURSIVE_DEPTH > TOML > default 5 · max nested marker expansion depth
auto_reloadboolfalse (example true)APHRODITE_AUTO_RELOADDYLIBLOADWatch aphrodite.toml and re-apply config fields on change
dylib-path: watch aphrodite.toml and re-apply config fields on change (session CCR state is never touched - only config fields) · watch aphrodite.toml and re-apply config fields on change
catalog_mode-tool--UNWIREDParses; the catalog layout is compiled-in, so this is a silent no-op
a key that parsed and did nothing was worse than an undocumented one, so the ledger names it · none
classifier_poll-true--UNWIREDParses; nothing reads it back
classification is per invocation, not polled, so there is no interval for this key to set · none
prefetch-none--UNWIREDParses; the aphrodite_prefetch tool exists regardless of this key
the tool is registered unconditionally, so turning this off disables nothing

[previews]

4 keys
KeyTypeDefaultEnv overrideReaderLiveEffect
preview_max_charsint (chars)0-DYLIBHOTCaps the whole rendered preview string, not per line; 0 = unlimited
caps the whole rendered preview STRING, not per line; 0 = unlimited - previews render at full natural length (env APHRODITE_PREVIEW_MAX_CHARS > TOML > default) · 0 (unlimited)
model_family"compact" | "code_first" | "balance"code_first-DYLIBLOADSelects the [templates.preview.<family>.*] family when templates are configured
WIRED as the [templates.preview] family selector (default "code_first"); only matters when [templates] is configured - absent templates fall back to hardcoded builders · "code_first"
code_structure_mapbooltrue--UNWIREDReserved: include function, struct and class signatures in code previews
DOCUMENTED BUT UNWIRED: parsed, no consumer · none
rust_preview_linesintnone--UNWIREDReserved: lines of Rust source to include in previews

[prompts]

4 keys
KeyTypeDefaultEnv overrideReaderLiveEffect
session_injectstring"-DYLIBLOADFirst-turn orientation text injected on turn 0; "" disables it
the shipped builtin
retrieve_guidance"minimal" | "standard" | "verbose"minimal-DYLIBLOADHow much retrieval guidance the per-turn assembler renders as the [retrieval: ...] line
WIRED: prompt knob - how the system instructs the LLM about CCR retrieval · "minimal"
ccr_marker_hintboolfalse-DYLIBHOTAppend a retrieval hint after markers - it fills the marker template's {hint}
WIRED: prompt knob - marker hint shown to the LLM
catalog_intent_hintsboolfalse-DYLIBLOADIntent hints alongside the hashes in catalog output
WIRED: prompt knob - per-intent catalog hints

[templates]

4 keys

Live configuration: every block is optional, and when a block (or the whole section) is absent the hardcoded builders and shipped defaults apply.

KeyTypeDefaultEnv overrideReaderLiveEffect
preview.<family>.<ctype>format stringnone-BOTHLOADPreview format per content type; resolution is family[ctype], then reverse[ctype], then family[_default], then the hardcoded builder
the hardcoded builder
marker.format / marker.hintformat stringnone-BOTHHOTMarker block layout, and the retrieval hint appended after markers
the shipped default
prompts.<name>format stringnone-BOTHLOADNamed prompt templates rendered into the per-turn context: session_inject, engine_offload, auto_expand_guidance, catalog_context_warn
the shipped default
reverse.<ctype>stringnone-BOTHLOADctype -> key remap: lets a content type borrow another type's format string

[directives]

1 keys
KeyTypeDefaultEnv overrideReaderLiveEffect
activearray of strings["lazy", "lazy-eval", "foresight"]-DYLIBLOADWhich loaded directives start active; unknown names are filtered out, and the set is runtime-mutable through aphrodite_directive
an empty list seeds focus, foresight and lazy

[flow]

1 keys
KeyTypeDefaultEnv overrideReaderLiveEffect
budget_charsint (chars)4000 (example 2600)APHRODITE_FLOW_BUDGET_CHARSDYLIBLOADHard cap on ALL per-turn injected context; sections drop bottom-up, and directives and nudges never drop

04 // THE KNOBS // WHAT [COMPRESSION] DOES

The compression knobs

The [compression] table is the one section a running proxy re-reads, and only part of it is hot.

THE HOT SET

Four rows are the hot set: tool_threshold_token, tool_threshold_cache, inline_threshold and code_multiplier.

auto_expand and auto_expand_limit are hot on the same terms, and so are preview_max_chars, the marker format and hint, and ccr_marker_hint.

Everything else in the section is fixed at startup or read once when the dylib loads, which is what the LIVE column records row by row.

code_multiplier
code_multiplier is the only knob that is a multiplier rather than a byte count: the code_* types get the base threshold times its value, so 3.0 hands source three times the default patience and 1.0 hands it none.
inline_threshold
inline_threshold decides where compressed content lives: below it the bytes ride inline as zlib, above it they become a durable store entry with a marker.
engine_threshold_pct
engine_threshold_pct is the context engine's fill gate, and its two extremes are switches: 0 means never archive and 100 or more means the engine is off.
store_max_entries

The two store retention caps are the deliberate exception, because a store cannot resize while it is serving.

store_max_entries and store_max_bytes are read when the SQLite store is opened, so a change to either takes effect on the next proxy restart, not on save.

aphrodite_config_set
The dylib keys take a third route entirely: they ride aphrodite_config_set at runtime, so a session can move them without a restart and without a file edit.

05 // PER TURN // FLOW, DIRECTIVES, PREVIEWS

[FLOW] / [DIRECTIVES] / [PREVIEWS]

Three sections decide what the model is handed each turn, and none of them touches compression.

[FLOW]

budget_chars = 2600 is the hard cap on ALL per-turn injected context.

The budget covers directives, nudges, the recall catalog and the retrieve hint together, not each one separately.

Sections drop bottom-up when the total goes over; directives and nudges never drop.

Dylib only, overridable through APHRODITE_FLOW_BUDGET_CHARS.

The compiled default is 4,000 characters, so the shipped example buys a leaner turn than a bare binary does.

[DIRECTIVES]

active = ["lazy", "lazy-eval", "foresight"] names which loaded directives start active.

Names that are not in the loaded set are silently filtered out, and an empty list seeds focus, foresight and lazy instead.

The set is runtime-mutable, so a conversation can swap directives mid-flight through aphrodite_directive.

The built-in set is focus, foresight, ccr-handling, cleanup, explore, lazy and lazy-eval - seven files baked into the binary.

[PREVIEWS]

preview_max_chars = 0 caps the whole rendered preview string, not per line, and 0 means unlimited.

model_family = "code_first" selects the [templates.preview.<family>.*] family when [templates] is configured.

The env var APHRODITE_PREVIEW_MAX_CHARS outranks the file, and the file outranks unlimited.

Re-applied by POST /reload.

06 // UNWIRED // THE HONEST LEDGER

DOCUMENTED BUT UNWIRED

Five keys parse and do nothing, and every one of them is marked UNWIRED rather than quietly omitted.

catalog_mode UNWIRED
catalog_mode lost its reader when the catalog layout became compiled-in, so setting it changes nothing.
classifier_poll UNWIRED
classifier_poll describes a poll interval the classifier never had: classification runs per invocation.
prefetch UNWIRED
prefetch is dead because the aphrodite_prefetch tool is registered unconditionally.
code_structure_map rust_preview_lines RESERVED
code_structure_map and rust_preview_lines are reserved: they describe a code preview that includes signatures and a line budget for Rust source, and no builder reads either one yet.

The ledger exists because a key that parses and does nothing is worse than an undocumented one: it looks like a lever and behaves like a wall.

07 // OVERRIDES // ENVIRONMENT

Every override, live or not

A TOML key is only half the story: the environment wins wherever it is set, and the module documents 68 variables across three surfaces - the Rust proxy, the aphrodite setup subcommand, and the Hermes dylib session.

The last two groups are the ones that matter most: a variable with no reader is a silent no-op, and a build-time variable exported at runtime changes nothing.

Rust proxy - multi-proxy mode (aphrodite.toml present) 18 variables

VARIABLEPRECEDENCEDEFAULTEFFECT
APHRODITE_API_KEYproxy.api_key → defaults.api_key → env(must resolve to something)Upstream API key; the proxy refuses to start if the chain resolves empty
APHRODITE_API_URLenv > TOML > defaulthttps://api.openai.comUpstream API base URL
APHRODITE_MODELenv > TOML > defaultdefault-modelModel name to forward
APHRODITE_CCR_TTLenv > TOML > default3600CCR entry time-to-live, seconds
APHRODITE_STORE_MAX_ENTRIESenv > [compression] > default100000 (0 = unlimited)Max live rows in the SQLite CCR store; past it the least-recently-accessed rows are evicted
APHRODITE_STORE_MAX_BYTESenv > [compression] > default536870912 (0 = unlimited)Max stored payload bytes (SUM(LENGTH(original))); past it LRU rows are evicted
APHRODITE_DBenv > TOML(none - proxy uses ~/.hermes/aphrodite/ccr.db)SQLite path for the token proxy
APHRODITE_NOTIFY_URLenv > TOML-Hermes callback URL for CCR-create notifications
APHRODITE_NOTIFY_KEYenv > TOML-Bearer token for the callback
APHRODITE_CACHE_PORToverrides the listen port on the proxy named/moded cache only9797Per-instance port override (e.g. multiple Hermes Agents on one machine)
APHRODITE_TOKEN_PORToverrides the listen port on the proxy named/moded token only9798Same, for the token proxy
APHRODITE_TOOL_THRESHOLD_CACHEenv > [compression] > const8192 bytes (shipped example: 2048)Cache-proxy compression threshold
APHRODITE_TOOL_THRESHOLD_TOKENenv > [compression] > const1024 bytes (shipped example: 256)Token-proxy compression threshold
APHRODITE_INLINE_THRESHOLDenv > [compression] > const256 bytes (shipped example: 1024)Inline-vs-durable CCR storage cutoff
APHRODITE_CODE_MULTIPLIERenv > [compression] > const3.0 (shipped example: 1.0)Multiplies the threshold for code_* content types
APHRODITE_AUTO_EXPANDenv > [compression] > constfalse (shipped example: true)Resolve the just-stored content inline instead of emitting a CCR marker, capped at auto_expand_limit bytes
APHRODITE_AUTO_EXPAND_LIMITenv > [compression] > const102400 bytesByte cap for auto-expanded content
APHRODITE_MAX_REQUEST_BODY_SIZEenv > [compression] > constnone (no cap)Proxy request-body cap in bytes; over-size bodies are rejected with 413 while being read (startup-only)

Rust proxy - either mode 5 variables

VARIABLEPRECEDENCEDEFAULTEFFECT
APHRODITE_CONFIG_PATH-./aphrodite.toml, else ~/.hermes/aphrodite/aphrodite.toml, else CLI modeWhich config file to load; an explicit path that doesn't exist falls through to CLI mode
APHRODITE_MGMT_TOKEN-unset (auth disabled - logs a startup warning)Gates the management routes (/stats, /stats/db, /history, /retrieve, /ccr/*, /reload, /tool/relay, /version, /health/upstream) via Authorization: Bearer <token>; /health and /metrics stay exempt, and the LLM-proxying /{*path} route is unaffected
APHRODITE_WORKER_THREADS-4x CPU count (min 32)Tokio worker thread count
APHRODITE_LOG_COMPACT-offCompact log format (no timestamps, no targets); also --log-compact in CLI mode
RUST_LOG-infoStandard Rust tracing filter (not APHRODITE_-prefixed)

Rust proxy - CLI-fallback mode only (no aphrodite.toml present) 2 variables

VARIABLEPRECEDENCEDEFAULTEFFECT
APHRODITE_MODE-tokenProxy mode (cache / token)
APHRODITE_LISTEN-127.0.0.1:9797Bind address

Hermes plugin / aphrodite-hermes dylib 28 variables

VARIABLEPRECEDENCEDEFAULTEFFECT
APHRODITE_TERMINAL_THRESHOLDenv > [compression] > default1024 bytes (shipped example: 256)Gates transform_terminal_output compression
APHRODITE_ENGINE_THRESHOLD_PCTenv > [compression] > default45 (shipped example: 30)Context-engine fill-% gate: archives middle turns when the conversation index's fill percent (total * 100 / 50) is at or above the threshold; 0 = never, 100+ = off. See [Context Engine](https://github.com/PlayForm/Aphrodite/tree/Development/docs/plugin/context-engine.md)
APHRODITE_ENGINE_PROTECT_FIRSTenv > [compression] > default2Turns kept at the start of the index when the context engine archives middle turns
APHRODITE_ENGINE_PROTECT_LASTenv > [compression] > default5Turns kept at the end of the index when the context engine archives middle turns
APHRODITE_ENGINE_MIN_MSGSenv > [compression] > default8Minimum archived turns before the context engine may archive
APHRODITE_LIVE_CONTAINERenv > [compression] > defaultfalseInstant CCR markers with the live type: progressive retrieval with bytes-so-far / ETA progress
APHRODITE_RECURSIVE_DEPTHenv > [compression] > default5Nested marker expansion cap (how deep aphrodite_retrieve expands markers inside markers)
APHRODITE_AUTO_RELOADenv > [compression] > defaultfalse (shipped example: true)Watch aphrodite.toml and re-apply config fields on change (session CCR state is never touched)
APHRODITE_CONTEXT_ENGINE"1" / "true" enablesoffTwo independent live effects: (1) plugin registers a Hermes ContextEngine subclass only when set; (2) the dylib session's context_engine_enabled status flag (env > TOML compression.context_engine > default true)
APHRODITE_RETRIEVE_GUIDANCEenv > [prompts] > default"minimal""minimal" | "standard" | "verbose" - how much guidance the per-turn assembler renders about CCR retrieval ([retrieval: ...] line)
APHRODITE_CCR_MARKER_HINTenv > [prompts] > defaultfalseAppend a retrieval hint after markers (fills the marker template's {hint}); process-global, re-applied by /reload
APHRODITE_CATALOG_INTENT_HINTSenv > [prompts] > defaultfalseShow intent hints alongside hashes in catalog output
APHRODITE_PREVIEW_MAX_CHARSenv > [previews] > defaultunlimited (0 = no cap; shipped example 0)Caps the rendered preview string, enforced on every preview path
APHRODITE_FLOW_BUDGET_CHARSenv > [flow] > default4000 (shipped example 2600)Hard cap on ALL per-turn injected context (directives + nudges + recall catalog + retrieve hint)
APHRODITE_POLL_WORKERenv > [compression] > defaulttrueAuto-backgrounds slow terminal / process calls (pre-tool-call rewrite)
APHRODITE_CHAIN_SPLITenv > [compression] > defaultfalse (opt-in)Fine-grained command splitting: rewrites chained commands with segment markers, splits output per segment
APHRODITE_CHAIN_SPLIT_MIN_SEGMENTSenv > [compression] > default2Floor for the adaptive split threshold
APHRODITE_CHAIN_SPLIT_MAX_SEGMENTSenv > [compression] > default6Cap for the adaptive split threshold
APHRODITE_SESSION_INJECTenv > [prompts] > defaultshipped builtinFirst-turn orientation text injected on turn 0; empty string disables it
APHRODITE_DIRECTIVES_DIRexact directory (first candidate)-Directives directory override; checked before ./directives/, ~/.hermes/aphrodite/directives/, binary-relative
APHRODITE_HOMEwhole runtime home override$HERMES_HOME/aphrodite (else ~/.hermes/aphrodite)THE single runtime-home decision (issue 40): every artifact (binaries/, aphrodite.toml, ccr.db, directives/, logs) resolves under it for BOTH halves - the shim exports its own resolution here, and the Rust binary/proxy/dylib honor it; never second-guessed
APHRODITE_HERMES_DYLIB_PATHoverrides the dylib search path~/.hermes/aphrodite/binaries/<name>Which dylib the plugin loads
APHRODITE_BINARY_PATHoverrides the proxy binary path~/.hermes/aphrodite/binaries/aphroditeWhich proxy binary the plugin launches
APHRODITE_NO_AUTO_LAUNCH"1" / "true" skips auto-launchoffStops the plugin from launching the proxy on registration
APHRODITE_AUTO_DOWNLOAD"1" / "true" enablesoffLegacy opt-in: lets register() fetch missing binaries via download.sh (default is explicit-setup-only; PR 118488)
HERMES_HOMEbase home for the plugin~/.hermesHermes home: runtime home base ($HERMES_HOME/aphrodite), Hermes-owned plugin dir ($HERMES_HOME/plugins); read by __init__.py, layout_check.py, download.sh, and the Rust binary/dylib (issue 40 - one decision, both halves)
BINARY_DIRdownload destination${HERMES_HOME:-$HOME/.hermes}/aphrodite/binariesWhere download.sh writes the verified binary + dylib (also set by __init__.py when it runs the legacy auto-fetch)
REPOrelease repositoryPlayForm/AphroditeWhich GitHub repo download.sh fetches release assets from

Documented but currently inactive 9 variables

VARIABLEPRECEDENCEDEFAULTEFFECT
APHRODITE_DEBUG--No reader anywhere - setting it is a silent no-op
APHRODITE_PASSTHROUGH--No reader anywhere - setting it is a silent no-op
HERMES_DEV--No reader anywhere - setting it is a silent no-op
APHRODITE_RECENT_MARKERS_MAX--No reader anywhere - setting it is a silent no-op
APHRODITE_CATALOG--No reader anywhere - setting it is a silent no-op
APHRODITE_TOOL_THRESHOLD--No reader anywhere - setting it is a silent no-op
_TOKEN--No reader anywhere - setting it is a silent no-op
_CACHE--No reader anywhere - setting it is a silent no-op
HEADROOM_SSE_BUFFER_MAX_BYTES--No reader anywhere - setting it is a silent no-op

Build-time metadata 6 variables

VARIABLEPRECEDENCEDEFAULTEFFECT
APHRODITE_VERSION--Read during the build, not at runtime - exporting it has no effect on a running proxy
APHRODITE_GIT_HASH--Read during the build, not at runtime - exporting it has no effect on a running proxy
APHRODITE_PROFILE--Read during the build, not at runtime - exporting it has no effect on a running proxy
APHRODITE_BUILD_DATE--Read during the build, not at runtime - exporting it has no effect on a running proxy
APHRODITE_TARGET--Read during the build, not at runtime - exporting it has no effect on a running proxy
APHRODITE_SKIP_FFI_GEN--Read during the build, not at runtime - exporting it has no effect on a running proxy

SRC: docs/config/env-vars.md - every row is generated from it.

08 // CLASSIFY // ONE TYPE, ONE THRESHOLD

One type, one threshold

The gate is threshold_for in crates/aphrodite/src/proxy.rs: the base threshold, then one multiplier per content type.

The base is the proxy's own mode threshold - tool_threshold_token on the token lane, tool_threshold_cache on the cache lane.

The bytes column is computed from the edited file, so the matrix follows those values instead of restating the defaults.

BASE

1024 B

CODE_MULTIPLIER

×3

TypeMultiplierAt the editor's values
error×88192 B
code_rust×code_multiplier3072 B
code_python×code_multiplier3072 B
code_go×code_multiplier3072 B
code_js×code_multiplier3072 B
code×code_multiplier3072 B
diff×22048 B
git×22048 B
text×22048 B
json×11024 B
tool_output×11024 B
any other type×11024 B

linter, build_output and log return the base before any multiplier, so those three never scale.

Two runtime factors scale the result and neither can be read from the config file:

  • the compression-ratio auto-tune (×2 above a 20× ratio, ×0.5 below 3×) scales the base
  • and the headroom budget (0.50 to 1.0) scales the result.

SRC: crates/aphrodite/src/proxy.rs:613-644 .

09 // THE PAIR // TWO LISTENERS

[[PROXIES]] - CACHE :9797 + TOKEN :9798

cache · 127.0.0.1:9797

The lane for results that do not need to survive the process.

token · 127.0.0.1:9798

The lane a retrieval survives a restart from.

WARNING - THE 0.0.0.0 LINES

Listeners bind loopback-only by default, and the router rejects non-loopback peers (and non-loopback Host headers) on every route except /health.

Uncommenting listen = "0.0.0.0:..." exposes an unauthenticated listener to your LAN: /retrieve, /history and /ccr/* have no authentication of their own.

10 // TWO PARSERS // ONE FILE

One file, two parsers

The READER column is the whole split - these are the two codepaths that own it.

THE RUST HTTP PROXY

config/proxy.rs, active whenever an aphrodite.toml is found: it reads every row marked PROXY or BOTH, resolving each one as

  • env var
  • then the per-proxy entry
  • then [defaults]
  • then the compiled default.

Three rows are the exceptions, and the ladder marks them: the API key is TOML-first, and the bind address and the mode are per-entry by construction.

THE HERMES DYLIB SESSION

config_loader.rs, read once at dylib load: it reads every row marked DYLIB or BOTH, and the standalone HTTP proxy never reads a dylib-only key.

The FFI runtime-override variant is the aphrodite_config_get / aphrodite_config_set pair on the C-ABI bridge - it surfaces values and changes them mid-session.

11 // /RELOAD // WHAT A SAVE APPLIES

What /reload would apply

SIMULATED IN THE BROWSER

Simulated from your editor state: /reload answers "applied": true with the values that took effect, and a "parsed_only" object for the fields that do not - the rows the table marks startup or load.

// press SEND /RELOAD

12 // SIMULATION BOUNDARY // REAL VS SIMULATED

What is real, what is simulated

REAL

  • the pick chain
  • the precedence rules
  • the two-stack split
  • the key table
  • and the unwired ledger - all quoted from aphrodite.toml.example, README.md:371-442 and docs/config/aphrodite-toml.md.

SIMULATED

  • the TOML parsing (a browser-side reader, not the Rust or dylib parser)
  • the resolution ladder
  • and the POST /reload response.

No network, no runtime - every number is computed in the browser.

Sanitization: the editor ships the repository's example file - never a user's real toml, never an api_key value; the key field appears only as its env-var name.