Appearance
Configuration Reference
Moved (narrative): Configuration basics explains secrets vs Settings vs defaults.
Full key list: Environment reference (generated from code).
This page groups major flags by subsystem for narrative browsing. Precedence: real process.env → .agent_runtime_prefs.json (harness.env) → harness_default_constants.ts. Put secrets in .env only; tune product flags via Web Settings (GET/PUT /api/settings) or prefs JSON.
Core
AGENT_RULE_RECALL— set to0to disable the harness-injected named rule recall system message at ReAct round 2 (see Harness protocol). Default is on; disabling saves tokens but removes the extra R-* nudge batch.AGENT_API_KEYAGENT_API_BASE_URLAGENT_MODELOPENROUTER_API_KEYOPENAI_API_KEYANTHROPIC_API_KEYXAI_API_KEYPORTAGENT_WORKSPACE_ROOTAGENT_TOOL_LAZYAGENT_UI_VERBOSITY
Persona and bootstrap
First-run and mid-session voice are controlled by the harness plus TUI/web clients.
AGENT_PERSONA_BOOTSTRAP— set0to skip the model-injected first-run prompt asking how the assistant should sound (web/TUI + harness).AGENT_PERSONA_BOOTSTRAP_ALLOW_SKIP— set0to require persona bootstrap input (disablesskip//skipwhere supported).AGENT_PERSONA_BOOTSTRAP_FORCE— set1(ornpm run web -- --bootstrap/npm run tui -- --bootstrap) to show the persona bootstrap UI (web modal or TUI overlay) even when first-run bootstrap is already marked complete in.agent_runtime_prefs.json. Use for demos or re-onboarding. Normal first launch does not need this flag: the web server finishes session initialization before accepting HTTP connections so the client sees accuratepersonaBootstrapPendingfrom/api/config; the TUI reads the same prefs at startup.
Generator tuning (used by persona_generator.ts when set_persona runs a custom voice):
AGENT_PERSONA_INFER_MODEL— optional model slug for persona infer, batched soul, and optional theme LLM; falls back toAGENT_FAST_MODELwhen unset.AGENT_PERSONA_GEN_TIMEOUT_MS— per-request style timeout for persona HTTP calls (default90000, clamped up to180000ms).AGENT_PERSONA_GEN_RETRIES— retry budget for those calls (default2, max3).AGENT_PERSONA_SOUL_MODE—batch(default, one call for all soul slices),parallel(four concurrent slice calls), orscaffold(no soul LLM).AGENT_PERSONA_UI_THEME_LLM—0(default): heuristic HUD theme only;1: add an LLM theme pass.AGENT_PERSONA_GENERATION_STREAM—1(default): stream persona bootstrap artifacts to web/TUI workbench panels via SSE; set0to disable live previews.AGENT_PERSONA_PREVIEW_MAX_CHARS— max characters per artifact panel in bootstrap SSE previews (default16000).AGENT_PERSONA_REPAIR_MAX— max profile repair LLM passes after draft (default1, range 0–2).
Persona UI theme — after custom generation, persona/active/ui_theme.json holds validated PersonaUiThemeV2. Web/TUI read via GET /api/config or disk at startup. See Persona system.
Full pipeline, on-disk layout under persona/active/, and core APIs: Persona system.
Safety and Approval
AGENT_SAFETY_JUDGEAGENT_SAFETY_JUDGE_MODELAGENT_APPROVAL_TIMEOUT_MSAGENT_YOLO— session-only destructive auto-approve switch (1to enable). Intended for launch-time usage (e.g.npm run web -- --yolo), not persistent safety posture.
Context and Compression
AGENT_RECALL_EVERY_NAGENT_DISTILLAGENT_TOOL_BODY_ELIDEAGENT_TOOL_ELIDE_MIN_CHARSAGENT_TOOL_ELIDE_KEEP_ROUNDSAGENT_COMPRESS_SEMANTIC=1— when context fills and old rounds are compressed, calls the configured model to produce a causal narrative digest instead of raw tool-name one-liners. Preserves reasoning chain across very long sessions.AGENT_PROTOCOL_INTENT_HINT— session-wide protocol section filter. Values:coding|knowledge|execution|introspection. Suppresses irrelevant heavy sections (vault KB, markets, document engine, vision sidecar) to save 300–800 tokens per turn. Can also be set programmatically per-turn viabuildAdaptiveProtocolSuffix(toolNames, intent).
Web and fetch
AGENT_WEB_FETCH_TIMEOUT_MS— per attempt budget (ms) for each GET: applies to the full download (headers plus body), not TTFB-only. Default20000; clamped between3000and120000.AGENT_WEB_FETCH_TOTAL_WALL_MS— hard wall clock (ms) for oneweb_fetchcall (all attempts, body read, HTML/PDF parse). Default55000. Prevents long parallel fetches from stalling the UI for many minutes when retries stack.AGENT_WEB_FETCH_RETRIES— retries on 429/5xx or transient network errors. Default2; clamp0–8.AGENT_WEB_FETCH_RETRY_MAX_DELAY_MS— max backoff between retries forweb_fetch(default6000; clamp500–30000). Keeps retry sleep from dominating wall time.AGENT_WEB_FETCH_MAX_PREPROCESS_CHARS— truncate HTML to this many characters before regex strip / Readability (default400000). Huge news pages otherwise stall JSDOM for minutes after download.AGENT_WEB_FETCH_READABILITY_MS— wall time cap (ms) for one JSDOM + Readability pass whenAGENT_WEB_READABILITY=1(default12000; clamped3000–25000). On timeout,web_fetchfalls back to regex-stripped HTML so the tool still completes withinAGENT_WEB_FETCH_TOTAL_WALL_MS.AGENT_WEB_FETCH_READABILITY_MAX_INPUT_CHARS— only this many characters of HTML are passed to JSDOM/Readability (default72000; clamp16000–250000). Larger downloads are still truncated for regex fallback, but Readability never sees the full multi‑hundred‑KB document (which can block the Node event loop for many minutes, especially when severalweb_fetchcalls run in parallel in one model round).AGENT_WEB_READABILITY— set to1to run fetched HTML through JSDOM + Mozilla Readability and return main-article plain text when extraction succeeds (length and quality heuristics apply). When off,web_fetchstrips tags with regex only.AGENT_WEB_FETCH_USER_AGENT— override default Chrome-on-Windows User-Agent forweb_fetch(and fallback reader fetch).AGENT_WEB_FETCH_ALT_USER_AGENT— User-Agent for the one optional 403/401 retry path (default Firefox-on-Windows string).AGENT_WEB_FETCH_ACCEPT_LANGUAGE—Accept-Languageheader (defaulten-US,en;q=0.9).AGENT_WEB_FETCH_403_RETRY— set to0to disable the alt-header retry when a 403/401 body looks like a CDN/bot interstitial. Default on (unset or any value except0).AGENT_WEB_FETCH_FALLBACK_URL_TEMPLATE— optional second fetch when the page URL returns 403/401. Template must contain{url}once; it is replaced withencodeURIComponent(originalUrl)(e.g. a self-hosted reader). Third-party readers have their own ToS, rate limits, and privacy implications—use at your own risk.
Web fetch and Readability (implementation detail)
Readability runs for article extraction, not pixel layout. Before JSDOM parses the document, author <style>, <link rel="stylesheet">, and <script> blocks are stripped from a copy of the HTML so inline CSS does not go through rrweb-cssom (which errors on nested or modern CSS-in-JS). A silent VirtualConsole avoids noisy jsdomError logs for residual parse issues. HTML text decoding uses the response Content-Type charset when valid (falls back to UTF-8).
For rendered pages, screenshots, or DOM after layout, use Playwright browser_open / browser_act (see tool family browser). Document GETs use Accept-Encoding: gzip, deflate, br (not zstd) so fewer CDNs return zstd-compressed bodies that can surface as binary noise in plain-text extraction. See Harness protocol for the conceptual summary.
Memory and Retrieval
Background memory sync (shown as Memory sync in the web Systems panel when enabled) periodically merges recent session traces into typed notes via the remember tool, so long-running work leaves fewer loose ends in .agent_notes.json. It runs only on the root agent after enough wall time and touched session files; it does not replace manual remember / recall during a turn. Turn it on with AGENT_AUTO_DREAM=1 and tune cadence or scope with the variables below.
After a successful run, the harness may append a short system message (not a user turn) with the model’s consolidation summary so the chat log stays readable without making the next real user message look like a reply to that summary. Set AGENT_AUTO_DREAM_INJECT_TRANSCRIPT=0 to skip that line entirely while still applying remember upserts from the same run.
AGENT_AUTO_DREAM— set to1to enable background consolidation between turns (default off).AGENT_AUTO_DREAM_INJECT_TRANSCRIPT—1(default) appends the framed system summary;0disables transcript injection only.AGENT_AUTO_DREAM_MIN_HOURS— minimum hours since the last successful consolidation (default24).AGENT_AUTO_DREAM_MIN_SESSIONS— minimum session files touched since last run (default5).AGENT_AUTO_DREAM_SCAN_INTERVAL_MS— minimum milliseconds between scan attempts (default600000, ten minutes).AGENT_AUTO_DREAM_MAX_SESSION_FILES/AGENT_AUTO_DREAM_MAX_CHARS_PER_SESSION/AGENT_AUTO_DREAM_MAX_TOTAL_CHARS— caps on input size per run.AGENT_AUTO_DREAM_LOCK_STALE_MS— stale lock timeout for the consolidation lock file.AGENT_AUTO_DREAM_ALLOW_DELETE— set to1to allow the model to proposeforgetoperations during consolidation (default off).
For chit-chat / introspection turns where you want less automatic memory priming (not the same as auto-dream), set AGENT_MEMORY_INTROSPECTION_STRICT=1—it tightens mid-turn recall policy when intent is classified as introspection.
Personality heartbeat (idle ambient cognition)
After a successful root turn_end(ok), the harness may schedule an idle debounced tick when AGENT_HEARTBEAT=1. The tick uses the fast model with a strict JSON contract, then may call remember via the dispatcher’s directCall path (no human approval). It never auto-runs shell, web, or other destructive tools. Each run appends a JSON line to .agent_heartbeat.jsonl. Telemetry is emitted as heartbeat_* events for the web/TUI Activity Stream and status strip. User-visible nudges are rate-limited and gated by AGENT_HEARTBEAT_SURFACE (off | trace | assistant, default trace). Set AGENT_HEARTBEAT_UI_STRIP=1 to show the optional Pulse chip strip above the web composer when heartbeats are enabled.
AGENT_HEARTBEAT— master switch (1on, unset or0off).AGENT_HEARTBEAT_IDLE_MS— debounce after turn end before the tick fires (default45000).AGENT_HEARTBEAT_MIN_INTERVAL_MS— minimum spacing between ticks (default120000).AGENT_HEARTBEAT_MAX_TOKENS/AGENT_HEARTBEAT_TIMEOUT_MS— cap LLM cost per tick (defaults512/20000).AGENT_HEARTBEAT_SURFACE—off|trace|assistantfor optional[Pulse]trace lines vs a single pulse nudge row in the web transcript when confidence and hourly caps pass.AGENT_HEARTBEAT_MAX_USER_NUDGES_PER_HOUR— cap on surfaced nudges (default2).AGENT_HEARTBEAT_USER_NUDGE_CONFIDENCE_MIN— minimum model-reported confidence for a nudge (default0.86).AGENT_HEARTBEAT_UI_STRIP—1enables the optional web Pulse strip above the composer.AGENT_EMBED_MODELAGENT_MEMORY_AUTO_EXTRACTAGENT_MEMORY_GRAPHAGENT_MEMORY_AUTOLINKAGENT_MEMORY_AUTOLINK_MODELAGENT_QUERY_REWRITEAGENT_MEMORY_EXPLORATORY_AUTO_RECALL— set to1to allow a tight mid-turn memory prime on exploratory/creative turns (notes scope, excludestrajectory/recipe). Default off: exploratory turns skip automemory_query/recall_relevantpriming so answers are less likely to re-anchor to standing roadmaps.AGENT_QUERY_REWRITE_EXPLORATORY— set to1to runrewriteQueryForRecallon exploratory turns. Default off: skip multi-query expansion there so sub-queries are not nudged toward stored project vocabulary.
Vault
AGENT_VAULT_PATHAGENT_VAULT_AUTO_WRITE(off|research|aggressive)AGENT_VAULT_DEDUPEAGENT_VAULT_WRITE_BUDGETAGENT_VAULT_REQUIRE_LINKSAGENT_VAULT_OBSERVABILITYAGENT_MEMORY_EPISODE
Critics and Reliability
AGENT_CRITICAGENT_CRITIC_REQUIREAGENT_CRITIC_EVIDENCEAGENT_CRITIC_MIN_TOOLSAGENT_FAILURE_LOGAGENT_REFLEXION_SEMANTIC— defaults on. When all tools in a round fail, calls the model to extract a structured{lesson, root_cause, fix_pattern}JSON and stores it as areflection:typed memory note. Set to0to revert to plain-text reflection.AGENT_RATE_LIMIT_MAX_RETRIESAGENT_TRANSIENT_5XX_MAX_RETRIESAGENT_RETRY_MAX_DELAY_MS
Extensions
AGENT_PLUGIN_DIR— absolute path to a directory of.js/.mjsplugin files. Each file must exportregister(registry, emitter). CallloadPlugins(registry, emitter)at startup to load all plugins. Failed plugins emit an error event but do not prevent the harness from starting.
Evaluation and Session Logging
AGENT_EVAL_JSON_SINKAGENT_SESSION_JSONLAGENT_SESSION_MODE
Behavior Notes
- default vault auto-write behavior is research-oriented unless explicitly disabled
- latest/current web queries are time-anchored to current year by tool normalization
- conversational self-management persists approved settings into
.agent_runtime_prefs.json
Recommended Baseline Profiles
Moved to operations/profiles.md.