Springdrift: An Auditable Persistent Runtime for LLM Agents with Case-Based Memory, Normative Safety, and Ambient Self-Perception
Abstract
We present Springdrift, a persistent runtime for long-lived LLM agents. The system integrates an auditable execution substrate (append-only memory, supervised processes, git-backed recovery), a case-based reasoning memory layer with hybrid retrieval (evaluated against a dense cosine baseline), a deterministic normative calculus for safety gating with auditable axiom trails, and continuous ambient self-perception via a structured self-state representation (the sensorium) injected each cycle without tool calls. These properties support behaviours difficult to achieve in session-bounded systems: cross-session task continuity, cross-channel context maintenance, end-to-end forensic reconstruction of decisions, and self-diagnostic behaviour. We report on a single-instance deployment over 23 days (19 operating days), during which the agent diagnosed its own infrastructure bugs, classified failure modes, identified an architectural vulnerability, and maintained context across email and web channels -- without explicit instruction. We introduce the term Artificial Retainer for this category: a non-human system with persistent memory, defined authority, domain-specific autonomy, and forensic accountability in an ongoing relationship with a specific principal -- distinguished from software assistants and autonomous agents, drawing on professional retainer relationships and the bounded autonomy of trained working animals. This is a technical report on a systems design and deployment case study, not a benchmark-driven evaluation. Evidence is from a single instance with a single operator, presented as illustration of what these architectural properties can support in practice. Implemented in approximately Gleam on Erlang/OTP. Code, artefacts, and redacted operational logs will be available at https://github.com/seamus-brady/springdrift upon publication.
Figures & tables
| Store | Record Type | Purpose |
|---|---|---|
| Narrative | NarrativeEntry | What happened each cycle |
| Threads | Thread | Topics grouping related entries |
| Facts | MemoryFact | Key-value memory (scoped, decayed) |
| CBR cases | CbrCase | Problem-solution-outcome with utility |
| Artifacts | ArtifactRecord | Large content on disk |
| Tasks | PlannerTask | Planned work with steps |
| Agent | Tools | Turns | Restart | Role |
|---|---|---|---|---|
| Planner | none (XML output) | 5 | Permanent | Plan decomposition, risk identification |
| Project Manager | 22 planner tools | 8 | Permanent | Tasks, endeavours, phases, blockers |
| Researcher | web + artifacts | 8 | Permanent | Search, extraction, source tracking |
| Coder | sandbox (6 tools) | 10 | Permanent | Code execution in Podman containers |
| Writer | built-in | 6 | Permanent | Text drafting and editing |
| Comms | 4 email tools | 6 | Permanent | Email via AgentMail |
| System | P@4 | 95% CI | MRR | |
|---|---|---|---|---|
| Random | 0.028 | [0.018, 0.040] | — | |
| CBR full (no embed) | 0.620 | [0.574, 0.664] | 0.852 | |
| Dense cosine | 0.920 | [0.895, 0.943] | 0.978 | |
| CBR index only | 0.921 | [0.897, 0.944] | 0.975 | |
| CBR hybrid | 0.956 | [0.936, 0.974] | 0.993 |
| Resolution Rule | Count | % |
|---|---|---|
| 6.6 Futility | 3,528 | 50.0 |
| 6.7 Indifference | 1,176 | 16.7 |
| 6.3 Moral priority (system wins) | 1,040 | 14.7 |
| 6.3 Moral priority (user wins) | 1,092 | 15.5 |
| 6.2 Absolute prohibition | 56 | 0.8 |
| 6.4 Moral rank | 110 | 1.6 |
| Metric | Value |
|---|---|
| Operating days | 19 (of 23 calendar) |
| Narrative entries | 494 |
| Cycle log entries | 24,035 |
| Total tokens | 10,756,298 |
| Tool calls | 3,797 (138 failures, 3.6%) |
| Agent delegations | 213 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Feature | Impt | Mag | Impt Mag |
| Sourced claims | 5 | 1 | 5 |
| Causal accuracy | 4 | 1 | 4 |
| Data currency | 3 | 2 | 6 |
| No credentials | 5 | 0 | 0 |
| No internal URLs | 5 | 0 | 0 |
| No system internals | 4 | 1 | 4 |
| Feature | Impt | Mag | Impt Mag |
| Option: Send email containing debug output | |||
| [4pt] No credential exposure | 5 | 0 | 0 |
| No internal URLs | 5 | 4 | 20 |
| No system internals | 4 | 5 | 20 |
| Professional tone | 3 | 4 | 12 |
| Recipient suitability | 4 | 3 | 12 |
| Level | Priority |
|---|---|
| Ethical/Moral | 6000 |
| Legal | 5000 |
| Prudential | 4500 |
| Social-Political | 4000 |
| Safety (Physical) | 3500 |
| Environmental | 3000 |
| Pair | Rule | Winner | Severity |
|---|---|---|---|
| U1 vs S1 | 6.5 | compatible | NoConflict |
| U1 vs S2 | 6.3 | S2 | Superordinate |
| U1 vs S3 | 6.3 | S3 | Superordinate |
| U2 vs S1 | 6.3 | S1 | Superordinate |
| U2 vs S2 | 6.3 | S2 | Superordinate |
| U2 vs S3 | 6.3 | S3 | Superordinate |
| Property | What it provides | How Springdrift uses it |
|---|---|---|
| Process isolation | Crash in one component cannot corrupt another | Sub-agent crash supervisor restarts it; cognitive loop unaffected |
| Preemptive scheduling | No process can starve others | Stuck LLM call does not block scheduler or poller |
| Per-process GC | No stop-the-world pauses | Long-running operation remains responsive |
| Supervision trees | Automatic restart on failure | 714 timeouts and multiple crashes handled without manual intervention |
| Typed channels | Wrong message type = compile error | Cognitive loop cannot send a ToolCall to the Librarian |
| Result type | All errors handled explicitly | No unchecked exceptions in 45,000 lines |
| Signal | Source |
|---|---|
| tool_calls_total , tool_calls_failed | Cycle tool call records |
| same_tool_retries | Failed tools appearing more than once |
| gate_rejections , gate_modifications | D ′ decisions this cycle |
| delegations_total , delegations_failed | Agent completion records |
| recent_success_rate | Tool and delegation outcomes (0.0–1.0) |
| cbr_hit_rate | Whether retrieved case IDs exist |
LLM Agents
Large language model agents use language models to plan, use tools, and act across multi-step tasks and environments.
See all 705 papers