The Living Harness
Over 150 days of unbroken persistent runtime in continuous production. Tested where long-running agents fail: context fatigue, silent schema drift, rate-limit stalls, and unhandled cascade crashes.
Most AI developer tools are ephemeral prompt wrappers around stateless model APIs. Aedelgard is engineered from the silicon up to solve persistent agent state, deterministic self-healing, and model independence without vendor custody.
Over 150 days of unbroken persistent runtime in continuous production. Tested where long-running agents fail: context fatigue, silent schema drift, rate-limit stalls, and unhandled cascade crashes.
Open-sourcing the memory palace primitives, temporal knowledge graph, and autonomous reflection loops. Provenance defense and public verification of model-agnostic memory storage.
A native desktop workspace (macOS DMG, Windows MSIX & Linux AppImage) executing locally on user hardware. Zero cloud subscription required for local operations. BYO model key. Sealed exit ramp.
Every long-running agent encounters the context ceiling. How an architecture handles that threshold determines whether the mind compounds wisdom or degrades into amnesia.
valid_from / valid_to intervals, and an append-only JSONL Journal keeps every turn word-for-word on local disk. Two-Step Dry-Run mutation safety: palace_supersede_drawer and palace_retire_drawer each compute and report the exact mutation before any write, so an invalidation is inspectable and reversible rather than a silent overwrite. Compass Corridors keep recall directional: palace_search is scoped by corridor, so a query lands in the heading it belongs to instead of bleeding across projects.| Dimension | Conventional Tools (Cursor / Claude Code / Mem0) | Aedelgard Tripartite Palace |
|---|---|---|
| Context RetentionStorage model | Rolling window truncation or periodic LLM summarization. Yesterday’s raw rationale is flattened into lossy abstracts; original constraints are discarded. | Verbatim Storage (ChromaDB + SQLite). Every meaningful decision and turn is preserved uncompressed in structured semantic rooms. Searchable by meaning with zero API cost. |
| Fact InvalidationHandling changing requirements | Overwrite or append. Old facts collide with new statements in vector recall, producing confident contradictions and hallucinated requirements. | Bitemporal Knowledge Graph. Triples carry two independent time axes: explicit validity intervals (valid_from, valid_to) describing when a fact holds in the world, plus an immutable created_at recording timestamp stored in SQLite describing when the mind actually wrote it. Historical context remains inspectable; invalidated decisions cease surfacing in active recall. |
| Procedural MemoryComplex workflows | Generic system instructions or repetitive prompt-stuffing. Prompts grow bloated; execution instructions lack verifiable outcomes. | Self-Amending Skills. The Rule of Three encapsulates repeated multi-step workflows into versioned playbooks (skills/) that log run outcomes and flag drift. |
| Consolidation LatencyBackground processing | Graph traversal and memory consolidation executed during live turns, adding seconds of user latency and compounding token costs. | Ambient Consolidation (Dreaming). Scheduled offline reflection loops synthesize connections and prune telemetry between sessions. Live chat remains instant. |
Prompt instructions are stochastic suggestions. Production resilience requires deterministic code guards that actively intercept failures.
config/SCARS.md under the Equilibrium Law, which holds a hard cap of 12 active gates so the guard surface stays small enough to reason about. Critical rules are never lost to FIFO eviction: a recurring scar graduates from prose into a deterministic Python guard before anything is retired, so the 12-slot cap bounds the surface without discarding load-bearing rules. Promotion also grafts a companion skill automatically from the naked prompt, and the reasoning is written down in VERIFY_BY_SUBSTANCE.md rather than trusted to memory. A scar that keeps firing hardens into code; one that goes quiet retires with its history kept.When an agent fails repeatedly on the same failure class, re-prompting is an admission of defeat. Aedelgard enforces an automated promotion pipeline:
S001 cross-boundary shape verification, the two-step drawer_id mutation lock, and the SHA-256 release leak gate — so a load-bearing rule is enforced by code rather than by prompt wording; one that goes quiet retires to the archive with its history kept.Standard agent loops hang or corrupt when peripheral tools fail or rate limits hit mid-turn. Aedelgard isolates cascades defensively:
_sanitize_tool_pairs catches missing tool results and synthesizes safe responses; _strip_orphan_tool_results prevents poisoned message arrays.bin/safe-restart), waking the next instance with immediate continuity.Separating what you own (the mind, memory, provenance) from what you rent (the model weights).
| Capability | Platform AI (OpenAI / Anthropic / Cursor) | Aedelgard Desktop Workspace |
|---|---|---|
| Provider SeamSwapping reasoning engines | Locked to provider platform. Moving from Claude to Gemini or local weights forces complete memory abandonment. | Hot-Swappable Provider Seam. Swap between Anthropic Claude, Google Gemini, OpenAI, or local offline models (Ollama/vLLM) mid-project without losing history or knowledge graph state. |
| Data ResidencyPhysical storage location | Stored on provider cloud servers. Subject to cloud outages, remote access policies, and server-side log retention. | Local-First on Disk. SQLite databases and ChromaDB vectors reside on your device, in the OS user-data folder (%APPDATA% on Windows, ~/Library/Application Support on macOS, XDG on Linux). Thinks and remembers offline. |
| Exit RampPortability without lock-in | Proprietary export formats, incomplete chat dumps, or non-existent export mechanisms. | Unencrypted Portable ZIP Export. Clean, transparent export of all memory drawers and temporal graphs. Restores independently on any clean installation. |
| Cloud Backup SecurityOptional multi-device sync | Cloud platform holds keys and can access stored memory on its servers. | Client-Side Envelope Encryption. Sealed on-device (AES-256-GCM) with keys derived from your Aedelgard key (HKDF). The server stores blind ciphertext — our broker cannot decrypt your records. |
Your primary Mind designs the specification and writes the protected acceptance tests, then dispatches the implementation loop via /drone to a bench-qualified, cost-efficient worker model — such as DeepSeek V4.1 Flash, Claude Haiku 5.5, Qwen 3, or Gemini Flash — inside an isolated local sandbox at raw provider API rates, with $0 markup on your own keys.
A drone earns its place on the bench before it ever touches your code, and it runs behind a wall while it works.
/drone setup): A candidate worker model is scored on seven real engineering tasks — strict file edits, multi-file refactors, test-driven repairs, and tool-protocol adherence. A model that fails the gate is simply never dispatched.conftest.py, pyproject.toml, and pytest.ini. If a worker edits a protected test or runner config, the hash mismatch invalidates the job — the drone cannot move the goalposts to make itself pass. The posture travels cross-platform: bwrap --unshare-net namespace isolation on Linux, alongside clean-room worktree credential stripping and hash-locked test verification across macOS, Windows, and Linux, so the same boundary is enforced on every host the desktop ships to.bwrap --unshare-net with a bundled CPython 3.13.16 and pytest. No network namespace, no provider keys, no access to your wider disk — only the job worktree.These are not benchmarks from a brochure. They are the recorded totals from live dispatch on this project:
| Job & Scope | Steps | Tokens | Worker Cost vs. Frontier |
|---|---|---|---|
Provider Catalogue & Keyring Refactorbody-prov-1 · 6 files · +237/−69 lines |
48 steps | 3,185,118 tokens (3,076,107 in · 2,900,992 cached · 109,011 out) | $0.1692 on DeepSeek V4.1 Flash vs. $3.46 cached / $14.48 uncached on Claude Opus 5.5 — 95%–99% savings. |
Background Foreman Watcherbody-bell-1 · 4 files · +177/−1 lines |
36 steps | 901,149 tokens (862,096 in · 789,504 cached · 39,053 out) | $0.0526 vs. $1.23 cached / $4.23 uncached on the frontier. |
Encrypted Dead-Drop Kin Protocolbody-kin-1b · 3 files · +299 lines |
14 steps | 301,451 tokens (291,721 in · 238,080 cached · 9,730 out) | $0.0200 vs. $0.46 cached / $1.36 uncached on the frontier. |
Hot-Reloading /drone Tool Registrationbody-organ-wakes-1 · 2 files · +27/−4 lines |
8 steps | 45,017 tokens (43,605 in · 29,184 cached · 1,412 out) | $0.0037 vs. $0.09 cached / $0.20 uncached on the frontier. |
Most of every request is identical to the last one. Aedelgard assembles the prompt in two tiers so the stable half is written to the provider cache once and read back at a discount for hours, and swaps the volatile half in place when a thread has gone cold.
system[0] stable block, and the rolling history tail — with the volatile clock and daily-log state isolated past the breakpoint into system[1].The stable half of the prompt is not merely cached; it is frozen so its bytes never change:
system[0]: build_stable_text() holds the Constitution, Soul, Scars, and the Compass-scoped project slice. The 6 hours (21,600s) figure is Aedelgard's local prefix stability window (AEDELGARD_FROZEN_PREFIX_TTL_S), enforced by the harness rather than inherited from a provider — it is what stops a clock tick or daily-log drift from quietly busting the provider cache across turns. Provider cache TTLs are a separate, downstream concern; the local window only guarantees the prefix bytes stay fixed long enough for those caches to keep hitting.system[1], so a new minute never invalidates the frozen prefix.system[0], and the rolling history tail keep active turn input costs down by 90%–95% across Anthropic, Gemini, OpenAI, Mistral, and Nebius.harness/rollover.py)When a thread reaches 60,000 tokens and sits idle past the 300-second cache TTL, re-sending the cold history would trigger a massive full-price cache write. The rollover engine refuses that bill:
archive_async() — nothing is lost, only moved.~80k to ~2k tokens.Aedelgard seals model keys and multi-account GitHub PATs inside local-keyring.enc and keeps them behind a RESERVED slot that is never exported into os.environ, so the mind reads the tool output without ever seeing the secret. Multi-repo workspaces are then governed through /repo, which binds each repository to the Compass heading that owns it.
local-keyring.enc in a RESERVED slot the model never reads and that is never exported into os.environ. Git authentication is handed out one shot at a time through a temporary 0o700 GIT_ASKPASS helper unlinked on exit, while /repo binds each account and repository to a Compass heading and check_shoulder_guard refuses cross-boundary writes.0o700 GIT_ASKPASSos.environ. The threat boundary is stated explicitly: the store defends against accidental secret leakage into LLM context, into logs, into child-process environments, and against prompt-injection exfiltration — an injected instruction that tries to hand a credential back out finds no readable slot to draw from.config/repos.json records which GitHub account owns which repository, so the right identity is used without a global default.0o700 GIT_ASKPASS: Git auth is served by a one-shot helper created with 0o700 permissions and unlinked on exit, so nothing lingers on disk after the command.git add, commit, checkout, merge, and pull run green while git push stays yellow — committing is local, publishing is deliberate./repo binds each repository to a Compass heading, so a workspace carries a declared shoulder it belongs to.check_shoulder_guard refuses write_file and drone_dispatch into a repository bound to a different heading until you switch headings — a guard, not a reminder.No fragile npm global installs or Docker daemon requirements. A self-contained native desktop binary backed by cryptographic signatures.
/checksums before execution.The single-user Desktop Body is free to download and run on your own API keys, with an optional $25 encrypted Cloud Vault for personal multi-machine sync. For organisations and regulated teams that require isolated multi-seat licensing, EU-resident model routing, or custom signed extensions, Millenion AB (Sweden) licenses Aedelgard Enterprise directly as a dedicated software platform.
local-keyring.enc and /repo Compass Shoulders.Ollama and vLLM execution so regulated prompts and memory stay within European jurisdiction.drawer_id), SHA-256 protected test gates, and signed dead-drop inter-agent channels for compliance-grade auditability./drone Seats & Signed Product Extensions/drone Worker Bench Licensing ($22.84 / 132.1M Tokens): Equip engineering teams with Aedelgard’s SHA-256 test-gated /drone worker harness and /repo Compass Shoulders, separating frontier architectural planning from low-cost sandboxed test execution.