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
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"):
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.
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.
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.
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 keysOne 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.
| Key | Type | Default | Env override | Reader | Live | Effect |
|---|---|---|---|---|---|---|
| name | string | listen address | - | PROXY | STARTUP | Proxy label; the port overrides (APHRODITE_CACHE_PORT / APHRODITE_TOKEN_PORT) match on it the listen address |
| listen | "addr:port" | 127.0.0.1:9797 | - | PROXY | STARTUP | Bind address; loopback by default, and non-loopback peers are rejected on every route except /health |
| mode | "cache" | "token" | token | - | PROXY | STARTUP | Backend and compiled threshold: token = SQLite above 1 KB, cache = in-memory above 8 KB "token" |
| api_key | string | - | - | PROXY | STARTUP | Upstream key; the one chain where TOML outranks the env var none - the proxy refuses to start |
| api_url | url | - | - | PROXY | STARTUP | Upstream API base URL https://api.openai.com |
| model | string | - | - | PROXY | STARTUP | Model name to forward "default-model" |
| tool_relay | bool | false (example true) | - | PROXY | STARTUP | Enables the /tool/relay endpoint false |
| dev | bool | false | - | PROXY | STARTUP | Verbose request and response logging |
| ccr_ttl_seconds | int (seconds) | 3600 | - | PROXY | STARTUP | CCR entry time-to-live |
| ccr_db_path | path | ~/.hermes/aphrodite/ccr.db | - | PROXY | STARTUP | SQLite path for the token proxy; a relative path resolves against the binary's directory |
| notify_url | url | - | - | PROXY | STARTUP | Hermes callback URL for CCR-create notifications none |
| notify_key | string | - | - | PROXY | STARTUP | Bearer token sent with notify_url none |
| timeout | int (seconds) | 300 (example 120) | - | PROXY | STARTUP | Upstream request timeout, clamped to 600 with a warning 300 |
| max_context | int (tokens) | 1,000,000 | - | PROXY | STARTUP | Max context tokens |
| max_output | int (tokens) | 384,000 | - | PROXY | STARTUP | Max output tokens; the proxy refuses to start when it is at or above max_context |
[compression]
25 keysOne 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.
| Key | Type | Default | Env override | Reader | Live | Effect |
|---|---|---|---|---|---|---|
| tool_threshold_token | int (bytes) | 1024 (example 256) | APHRODITE_TOOL_THRESHOLD_TOKEN | PROXY | HOT | Token-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_cache | int (bytes) | 8192 (example 2048) | APHRODITE_TOOL_THRESHOLD_CACHE | PROXY | HOT | Cache-proxy compression threshold cache proxy threshold (bytes) - lower = compress more (hot-reloads) · cache proxy threshold (bytes) - hot-reloads |
| inline_threshold | int (bytes) | 256 (example 1024) | APHRODITE_INLINE_THRESHOLD | PROXY | HOT | Inline zlib versus the durable CCR store inline zlib fallback threshold (bytes) (hot-reloads) · inline-vs-durable cutoff (bytes) - hot-reloads |
| code_multiplier | float | 3.0 (example 1.0) | APHRODITE_CODE_MULTIPLIER | PROXY | HOT | Multiplies 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_expand | bool | false (example true) | APHRODITE_AUTO_EXPAND | DYLIB | HOT | Resolve 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_limit | int (bytes) | 102400 | APHRODITE_AUTO_EXPAND_LIMIT | DYLIB | HOT | Byte 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_size | int (bytes) | none | APHRODITE_MAX_REQUEST_BODY_SIZE | PROXY | STARTUP | Request-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_entries | int (rows) | 100000 | APHRODITE_STORE_MAX_ENTRIES | PROXY | STARTUP | Max 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_bytes | int (bytes) | 536870912 | APHRODITE_STORE_MAX_BYTES | PROXY | STARTUP | Max 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_threshold | int (bytes) | 1024 (example 256) | APHRODITE_TERMINAL_THRESHOLD | DYLIB | LOAD | Terminal-output threshold gating transform_terminal_output dylib terminal-output threshold (bytes); proxy path parses-only · dylib terminal-output threshold |
| poll_worker | bool | true | APHRODITE_POLL_WORKER | DYLIB | LOAD | Auto-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_split | bool | false | APHRODITE_CHAIN_SPLIT | DYLIB | LOAD | Opt-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_segments | int | 2 | APHRODITE_CHAIN_SPLIT_MIN_SEGMENTS | DYLIB | LOAD | Floor 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_segments | int | 6 | APHRODITE_CHAIN_SPLIT_MAX_SEGMENTS | DYLIB | LOAD | Cap 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_engine | bool | true | APHRODITE_CONTEXT_ENGINE | DYLIB | LOAD | Enables 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_pct | int (%) | 45 (example 30) | APHRODITE_ENGINE_THRESHOLD_PCT | DYLIB | LOAD | Context-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_first | int (turns) | 2 | APHRODITE_ENGINE_PROTECT_FIRST | DYLIB | LOAD | Turns 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_last | int (turns) | 5 | APHRODITE_ENGINE_PROTECT_LAST | DYLIB | LOAD | Turns 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_msgs | int (turns) | 8 | APHRODITE_ENGINE_MIN_MSGS | DYLIB | LOAD | Minimum 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_container | bool | false | APHRODITE_LIVE_CONTAINER | DYLIB | LOAD | Instant 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_depth | int | 5 | APHRODITE_RECURSIVE_DEPTH | DYLIB | LOAD | Nested marker expansion cap WIRED (dylib): max nested expansion depth; env APHRODITE_RECURSIVE_DEPTH > TOML > default 5 · max nested marker expansion depth |
| auto_reload | bool | false (example true) | APHRODITE_AUTO_RELOAD | DYLIB | LOAD | Watch 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 | - | - | UNWIRED | Parses; 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 | - | - | UNWIRED | Parses; nothing reads it back classification is per invocation, not polled, so there is no interval for this key to set · none |
| prefetch | - | none | - | - | UNWIRED | Parses; the aphrodite_prefetch tool exists regardless of this key the tool is registered unconditionally, so turning this off disables nothing |
[previews]
4 keys| Key | Type | Default | Env override | Reader | Live | Effect |
|---|---|---|---|---|---|---|
| preview_max_chars | int (chars) | 0 | - | DYLIB | HOT | Caps 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 | - | DYLIB | LOAD | Selects 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_map | bool | true | - | - | UNWIRED | Reserved: include function, struct and class signatures in code previews DOCUMENTED BUT UNWIRED: parsed, no consumer · none |
| rust_preview_lines | int | none | - | - | UNWIRED | Reserved: lines of Rust source to include in previews |
[prompts]
4 keys| Key | Type | Default | Env override | Reader | Live | Effect |
|---|---|---|---|---|---|---|
| session_inject | string | " | - | DYLIB | LOAD | First-turn orientation text injected on turn 0; "" disables it the shipped builtin |
| retrieve_guidance | "minimal" | "standard" | "verbose" | minimal | - | DYLIB | LOAD | How 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_hint | bool | false | - | DYLIB | HOT | Append a retrieval hint after markers - it fills the marker template's {hint} WIRED: prompt knob - marker hint shown to the LLM |
| catalog_intent_hints | bool | false | - | DYLIB | LOAD | Intent hints alongside the hashes in catalog output WIRED: prompt knob - per-intent catalog hints |
[templates]
4 keysLive configuration: every block is optional, and when a block (or the whole section) is absent the hardcoded builders and shipped defaults apply.
| Key | Type | Default | Env override | Reader | Live | Effect |
|---|---|---|---|---|---|---|
| preview.<family>.<ctype> | format string | none | - | BOTH | LOAD | Preview format per content type; resolution is family[ctype], then reverse[ctype], then family[_default], then the hardcoded builder the hardcoded builder |
| marker.format / marker.hint | format string | none | - | BOTH | HOT | Marker block layout, and the retrieval hint appended after markers the shipped default |
| prompts.<name> | format string | none | - | BOTH | LOAD | Named prompt templates rendered into the per-turn context: session_inject, engine_offload, auto_expand_guidance, catalog_context_warn the shipped default |
| reverse.<ctype> | string | none | - | BOTH | LOAD | ctype -> key remap: lets a content type borrow another type's format string |
[directives]
1 keys| Key | Type | Default | Env override | Reader | Live | Effect |
|---|---|---|---|---|---|---|
| active | array of strings | ["lazy", "lazy-eval", "foresight"] | - | DYLIB | LOAD | Which 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| Key | Type | Default | Env override | Reader | Live | Effect |
|---|---|---|---|---|---|---|
| budget_chars | int (chars) | 4000 (example 2600) | APHRODITE_FLOW_BUDGET_CHARS | DYLIB | LOAD | Hard 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.
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_multiplieris 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_thresholddecides 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_pctis 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_entriesandstore_max_bytesare 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_setat 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_modeUNWIREDcatalog_modelost its reader when the catalog layout became compiled-in, so setting it changes nothing.classifier_pollUNWIREDclassifier_polldescribes a poll interval the classifier never had: classification runs per invocation.prefetchUNWIREDprefetchis dead because theaphrodite_prefetchtool is registered unconditionally.code_structure_maprust_preview_linesRESERVEDcode_structure_mapandrust_preview_linesare 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)
| VARIABLE | PRECEDENCE | DEFAULT | EFFECT |
|---|---|---|---|
| APHRODITE_API_KEY | proxy.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_URL | env > TOML > default | https://api.openai.com | Upstream API base URL |
| APHRODITE_MODEL | env > TOML > default | default-model | Model name to forward |
| APHRODITE_CCR_TTL | env > TOML > default | 3600 | CCR entry time-to-live, seconds |
| APHRODITE_STORE_MAX_ENTRIES | env > [compression] > default | 100000 (0 = unlimited) | Max live rows in the SQLite CCR store; past it the least-recently-accessed rows are evicted |
| APHRODITE_STORE_MAX_BYTES | env > [compression] > default | 536870912 (0 = unlimited) | Max stored payload bytes (SUM(LENGTH(original))); past it LRU rows are evicted |
| APHRODITE_DB | env > TOML | (none - proxy uses ~/.hermes/aphrodite/ccr.db) | SQLite path for the token proxy |
| APHRODITE_NOTIFY_URL | env > TOML | - | Hermes callback URL for CCR-create notifications |
| APHRODITE_NOTIFY_KEY | env > TOML | - | Bearer token for the callback |
| APHRODITE_CACHE_PORT | overrides the listen port on the proxy named/moded cache only | 9797 | Per-instance port override (e.g. multiple Hermes Agents on one machine) |
| APHRODITE_TOKEN_PORT | overrides the listen port on the proxy named/moded token only | 9798 | Same, for the token proxy |
| APHRODITE_TOOL_THRESHOLD_CACHE | env > [compression] > const | 8192 bytes (shipped example: 2048) | Cache-proxy compression threshold |
| APHRODITE_TOOL_THRESHOLD_TOKEN | env > [compression] > const | 1024 bytes (shipped example: 256) | Token-proxy compression threshold |
| APHRODITE_INLINE_THRESHOLD | env > [compression] > const | 256 bytes (shipped example: 1024) | Inline-vs-durable CCR storage cutoff |
| APHRODITE_CODE_MULTIPLIER | env > [compression] > const | 3.0 (shipped example: 1.0) | Multiplies the threshold for code_* content types |
| APHRODITE_AUTO_EXPAND | env > [compression] > const | false (shipped example: true) | Resolve the just-stored content inline instead of emitting a CCR marker, capped at auto_expand_limit bytes |
| APHRODITE_AUTO_EXPAND_LIMIT | env > [compression] > const | 102400 bytes | Byte cap for auto-expanded content |
| APHRODITE_MAX_REQUEST_BODY_SIZE | env > [compression] > const | none (no cap) | Proxy request-body cap in bytes; over-size bodies are rejected with 413 while being read (startup-only) |
Rust proxy - either mode
| VARIABLE | PRECEDENCE | DEFAULT | EFFECT |
|---|---|---|---|
| APHRODITE_CONFIG_PATH | - | ./aphrodite.toml, else ~/.hermes/aphrodite/aphrodite.toml, else CLI mode | Which 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 | - | off | Compact log format (no timestamps, no targets); also --log-compact in CLI mode |
| RUST_LOG | - | info | Standard Rust tracing filter (not APHRODITE_-prefixed) |
Rust proxy - CLI-fallback mode only (no aphrodite.toml present)
| VARIABLE | PRECEDENCE | DEFAULT | EFFECT |
|---|---|---|---|
| APHRODITE_MODE | - | token | Proxy mode (cache / token) |
| APHRODITE_LISTEN | - | 127.0.0.1:9797 | Bind address |
Hermes plugin / aphrodite-hermes dylib
| VARIABLE | PRECEDENCE | DEFAULT | EFFECT |
|---|---|---|---|
| APHRODITE_TERMINAL_THRESHOLD | env > [compression] > default | 1024 bytes (shipped example: 256) | Gates transform_terminal_output compression |
| APHRODITE_ENGINE_THRESHOLD_PCT | env > [compression] > default | 45 (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_FIRST | env > [compression] > default | 2 | Turns kept at the start of the index when the context engine archives middle turns |
| APHRODITE_ENGINE_PROTECT_LAST | env > [compression] > default | 5 | Turns kept at the end of the index when the context engine archives middle turns |
| APHRODITE_ENGINE_MIN_MSGS | env > [compression] > default | 8 | Minimum archived turns before the context engine may archive |
| APHRODITE_LIVE_CONTAINER | env > [compression] > default | false | Instant CCR markers with the live type: progressive retrieval with bytes-so-far / ETA progress |
| APHRODITE_RECURSIVE_DEPTH | env > [compression] > default | 5 | Nested marker expansion cap (how deep aphrodite_retrieve expands markers inside markers) |
| APHRODITE_AUTO_RELOAD | env > [compression] > default | false (shipped example: true) | Watch aphrodite.toml and re-apply config fields on change (session CCR state is never touched) |
| APHRODITE_CONTEXT_ENGINE | "1" / "true" enables | off | Two 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_GUIDANCE | env > [prompts] > default | "minimal" | "minimal" | "standard" | "verbose" - how much guidance the per-turn assembler renders about CCR retrieval ([retrieval: ...] line) |
| APHRODITE_CCR_MARKER_HINT | env > [prompts] > default | false | Append a retrieval hint after markers (fills the marker template's {hint}); process-global, re-applied by /reload |
| APHRODITE_CATALOG_INTENT_HINTS | env > [prompts] > default | false | Show intent hints alongside hashes in catalog output |
| APHRODITE_PREVIEW_MAX_CHARS | env > [previews] > default | unlimited (0 = no cap; shipped example 0) | Caps the rendered preview string, enforced on every preview path |
| APHRODITE_FLOW_BUDGET_CHARS | env > [flow] > default | 4000 (shipped example 2600) | Hard cap on ALL per-turn injected context (directives + nudges + recall catalog + retrieve hint) |
| APHRODITE_POLL_WORKER | env > [compression] > default | true | Auto-backgrounds slow terminal / process calls (pre-tool-call rewrite) |
| APHRODITE_CHAIN_SPLIT | env > [compression] > default | false (opt-in) | Fine-grained command splitting: rewrites chained commands with segment markers, splits output per segment |
| APHRODITE_CHAIN_SPLIT_MIN_SEGMENTS | env > [compression] > default | 2 | Floor for the adaptive split threshold |
| APHRODITE_CHAIN_SPLIT_MAX_SEGMENTS | env > [compression] > default | 6 | Cap for the adaptive split threshold |
| APHRODITE_SESSION_INJECT | env > [prompts] > default | shipped builtin | First-turn orientation text injected on turn 0; empty string disables it |
| APHRODITE_DIRECTIVES_DIR | exact directory (first candidate) | - | Directives directory override; checked before ./directives/, ~/.hermes/aphrodite/directives/, binary-relative |
| APHRODITE_HOME | whole 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_PATH | overrides the dylib search path | ~/.hermes/aphrodite/binaries/<name> | Which dylib the plugin loads |
| APHRODITE_BINARY_PATH | overrides the proxy binary path | ~/.hermes/aphrodite/binaries/aphrodite | Which proxy binary the plugin launches |
| APHRODITE_NO_AUTO_LAUNCH | "1" / "true" skips auto-launch | off | Stops the plugin from launching the proxy on registration |
| APHRODITE_AUTO_DOWNLOAD | "1" / "true" enables | off | Legacy opt-in: lets register() fetch missing binaries via download.sh (default is explicit-setup-only; PR 118488) |
| HERMES_HOME | base home for the plugin | ~/.hermes | Hermes 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_DIR | download destination | ${HERMES_HOME:-$HOME/.hermes}/aphrodite/binaries | Where download.sh writes the verified binary + dylib (also set by __init__.py when it runs the legacy auto-fetch) |
| REPO | release repository | PlayForm/Aphrodite | Which GitHub repo download.sh fetches release assets from |
Documented but currently inactive
| VARIABLE | PRECEDENCE | DEFAULT | EFFECT |
|---|---|---|---|
| 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
| VARIABLE | PRECEDENCE | DEFAULT | EFFECT |
|---|---|---|---|
| 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.
1024
×3
| Type | Multiplier | At the editor's values |
|---|---|---|
| error | ×8 | 8192 B |
| code_rust | ×code_multiplier | 3072 B |
| code_python | ×code_multiplier | 3072 B |
| code_go | ×code_multiplier | 3072 B |
| code_js | ×code_multiplier | 3072 B |
| code | ×code_multiplier | 3072 B |
| diff | ×2 | 2048 B |
| git | ×2 | 2048 B |
| text | ×2 | 2048 B |
| json | ×1 | 1024 B |
| tool_output | ×1 | 1024 B |
| any other type | ×1 | 1024 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
The lane for results that do not need to survive the process.
The lane a retrieval survives a restart from.
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 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.
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.