KAOS Whitepaper · April 2026 · v0.8.1

KAOS Dream: A Continuous Consolidation Mechanism for Agent Libraries

Inline synaptic plasticity plus batched structural consolidation, implemented for an SQLite-backed multi-agent framework. Real benchmarks, honest limits, and a simulated adversarial review.

Danilo Canivel · KAOS maintainer · github.com/canivel/kaos
16 pages · 4 figures · 2 tables · Companion benchmarks committed in demo_*_bench/
End-to-end demo of KAOS plasticity: BM25 baseline retrieval, feedback accumulation, weighted rank flip, and failure triage.
Figure 0 · End-to-end demo: BM25 ordering before feedback, plasticity accumulates outcomes, weighted rank flips top-1, failure triage surfaces categorised fingerprints with a live systemic alert. 6 scenes, ~45 seconds, real CLI output.
Abstract We describe KAOS Dream, a continuous consolidation mechanism for multi-agent LLM frameworks. Unlike prior work treating the agent library (skills, memory, shared log) as a passive filing cabinet queried at retrieval time, Dream introduces inline synaptic plasticity — lightweight telemetry writes on every skill outcome, memory retrieval, and agent termination — plus batched structural consolidation that rebuilds a Hebbian co-occurrence graph at agent-completion boundaries. Retrieval is reweighted at query time using a Wilson-lower-bound success estimator combined with exponential recency decay. A parallel failure-intelligence subsystem categorises errors into actionable buckets (transient / config / code / infra / unknown), tracks whether suggested fixes actually resolve the error, and raises systemic alerts when multiple agents hit the same fingerprint inside a sliding window. Three reproducible benchmarks committed alongside the code measure: a +10 percentage-point gain in top-1 retrieval accuracy on a disambiguation-dominated workload; +15 µs of p50 hot-path overhead per agent operation after an initial naive design was rejected by the microbenchmark and rewritten; and 60/60 validations in a realistic failure-triage scenario. An earlier design with inline association upserts was 14,000× slower and was discarded. We are explicit that gains are workload-conditional: benchmarks without outcome feedback or without retrieval ambiguity show zero gain. The paper concludes with a simulated adversarial review from systems, information-retrieval, and cognitive-science perspectives, pushing back on the biological metaphor, the benchmark design, and the production readiness claims.
On the review process. Section 7 of this paper contains what we call a simulated adversarial review: three distinct reviewer personas (systems, information retrieval, cognitive science), each articulating the strongest critique of the work from their perspective. We do not fake the identity of real researchers. The reviewers are rhetorical devices used to stress-test claims we would otherwise be too close to. Authors' responses follow each critique. Anyone reading this is welcome to actually review the work — open an issue on the repository.

1.Introduction

Contemporary multi-agent frameworks — AutoGen, CrewAI, LangGraph, and KAOS [1] among them — have converged on a common storage pattern. An agent's episodic memory is a full-text search index of past observations. Its procedural skills are a collection of parameterised prompt templates (externalisation in the sense of Zhou et al. [2]). Its coordination history is an append-only log, often with intent-vote-decide primitives [3]. Each of these is a place: a table an agent writes into at one moment and retrieves from at another.

Viewed globally, the library is nevertheless dead. Nothing ranks its contents by whether they actually worked in production. Nothing notices that two skills are always applied in the same session, or that a particular memory entry is cited by every successful run but never by a failed one. Nothing raises a flag when the same error fingerprint is hit by ten agents in two minutes — a signal that infrastructure is down and spawning more agents will make things worse.

The biological analogue does not work this way. The cortex is a graph that reshapes its own connectivity as a side effect of neural activity: coincident firing reinforces synaptic strength (Hebbian learning [4]), unused pathways atrophy, and consolidation during sleep moves episodic content into structured abstraction [5]. This activity is continuous with normal cognition, not a separate maintenance job.

This paper presents KAOS Dream, an integration of these ideas into a production multi-agent framework. The contribution is not a new algorithm. Wilson score intervals [6], exponential recency decay, Hebbian co-occurrence graphs, and failure-fingerprint indexes all predate this work. The contribution is a carefully engineered system where these signals flow continuously through normal agent operation without manual curation, and where an honest benchmark forced us to throw away an obvious-but-slow architecture and rebuild it for the hot path.

Concretely, we claim:

3.System

3.1 Architecture

KAOS stores all runtime state in a single SQLite file with WAL mode [1]. Schema v6 adds four tables for plasticity (skill_uses, memory_hits, episode_signals, dream_runs) and five for failure intelligence and structural consolidation (associations, failure_fingerprints, failure_occurrences, systemic_alerts, consolidation_proposals, policies). All migrations are additive; v3 databases upgrade in place.

Two classes of plasticity update run on distinct timescales:

3.2 Weighted retrieval

Skill and memory search support a rank="weighted" mode that replaces pure BM25 with a composite score:

score(e) = max(bm25(e, q), floor) × usage_factor(e) × recency_weight(e)

usage_factor(e) = 0.5                                   if uses(e) = 0
                 0.5 + α · Wlo(s(e), n(e))        otherwise

recency_weight(e) = 2-Δt / h

where Wlo(s, n) is the Wilson score interval lower bound for s successes out of n attempts [6], α=3.0 by default, h is the recency half-life (default 14 days), and the BM25 floor prevents retrieval-irrelevant skills from dominating via usage alone.

The Wilson lower bound has two useful properties for this application. First, it penalises small sample sizes — a skill with 10/10 successes rightly outranks one with 1/1. Second, it never returns zero for 0/n attempts, so a never-tried-but-recently-created skill retains a meaningful weight until usage data arrives. The 0.5 offset for zero-use entries ensures plasticity begins as a neutral multiplier and can only amplify evidence that accumulates, never punish unknowns.

3.3 Hebbian association graph

At agent completion time, for every agent with at least one session-level signal, we compute three edge sets:

  1. skill↔skill: all pairs of distinct skills the agent applied.
  2. memory↔memory: all pairs of distinct memory entries retrieved (with record_hits=True) in the session.
  3. skill↔memory (cross-modal): Cartesian product of applied skills and retrieved memory, with half weight.

Edges are inserted with ON CONFLICT DO UPDATE SET weight = weight + excluded.weight, so repeated co-occurrences accumulate weight linearly. Each edge also carries last_seen for lazy exponential decay at query time.

3.4 Failure intelligence

Failures produce a normalised fingerprint via a stable hash of (tool name, normalised error message) where the normalisation strips UUIDs, timestamps, file paths, and other non-semantic identifiers. On first observation, the fingerprint is diagnosed by a registry of heuristic diagnosers: pattern matchers that return a (category, root_cause, suggested_action, confidence) tuple. Eight diagnosers ship by default; users register domain-specific ones.

When an agent applies a fix suggested by a prior diagnosis, it calls record_fix_outcome(fp_id, succeeded=...). The fingerprint tracks fix_attempts and fix_success_count; at fix_attempts ≥ 5 with success rate < 0.5, the fix suggestion is cleared so future agents fall back to fresh diagnosis. This applies Hebbian principles to the fix layer itself: working suggestions persist, non-working ones fade.

A sliding-window counter per fingerprint tracks recent occurrences. When ≥ KAOS_SYSTEMIC_THRESHOLD distinct agents hit the same fingerprint within KAOS_SYSTEMIC_WINDOW_S, a systemic_alerts row is written (debounced against retriggers for 60s). Consumers should consult active alerts before spawning: infrastructure being down is a signal to stop, not to retry.

4.Implementation Notes

4.1 The cost of getting it wrong

The first implementation (KAOS v0.8.0) built the Hebbian graph synchronously: every record_outcome queried for sibling skills and upserted an association for each. On a 100-skill library under Windows fsync (~30 ms per COMMIT), this produced +210 ms p50 overhead per call, with p99 exceeding 1 second.

The cost was discovered by a microbenchmark we had committed alongside the code, measuring per-op latency with plasticity hooks enabled and disabled. The benchmark's verdict: OVER BUDGET. We regard this as a methodological success, not a failure: the system rejected its own design at code-review time. The alternative — shipping a 210-ms-overhead hook and discovering it in production — would have been materially worse.

The rewrite moved graph construction out of per-event hooks and into a single executemany at agent completion. Raw telemetry (the skill_uses row) continues to write inline in the caller's transaction — zero extra fsync. The agent-completion batch pays one COMMIT for the whole session's edges. Measured overhead: +15 µs p50 on the hot path, +872 µs on completion. The architectural change was roughly eighty lines of code.

4.2 Inline vs. batched: the biology is also the engineering

In the mammalian cortex, synaptic-weight adjustment (long-term potentiation) is a fast, local process at individual synapses. Structural plasticity — dendritic spine formation and pruning — is a slower, energy-expensive process concentrated in sleep [5]. The two are mechanistically distinct, not implementations of the same thing at different speeds.

KAOS adopts the same distinction. Inline hooks write telemetry but do not restructure the library. Structural operations — Hebbian edge upserts, promote/prune/merge proposals, policy promotion — run at natural consolidation boundaries. The benefit is not only performance; it is also semantic: the inline operations are small, bounded, and transactionally coupled to the event that produced them, which makes reasoning about consistency straightforward. Structural changes are transactionally separate and can be rolled back or re-run idempotently.

4.3 Escape hatches

Neuroplasticity has pharmacological opt-outs. KAOS has KAOS_DREAM_AUTO=0, which disables all inline hooks (telemetry tables still accept writes but nothing reads them for plasticity purposes). KAOS_DREAM_THRESHOLD=N tunes consolidation cadence. rank="bm25" on any individual search() call bypasses weighted ranking. The library is designed to be turned off.

5.Evaluation

Three benchmarks are committed in the repository. Every number in this section links to a specific results file under demo_*_bench/results.json.

5.1 Retrieval accuracy (C1)

We constructed a 20-skill library arranged in 10 twin pairs: for each query, two skills share most of the query's vocabulary. BM25 alone cannot reliably disambiguate. Ground truth assigns one of the two as correct per query. Both runs use identical seeded epsilon-greedy exploration (ε=0.25, seed=42), identical training data, and 80 training episodes. The only variable is whether the retrieval rank is feedback-sensitive.

100% 80% 60% 40% 20% 0 20 40 60 80 final 80% 90%
Figure 1. Top-1 retrieval accuracy during training (four checkpoints) and the final deterministic measurement. Cyan: BM25 control. Pink: plasticity-weighted. Weighted's lower training accuracy reflects epsilon-greedy demotion of failing top-1 results; the final measurement — a single non-exploring top-1 pick per query — lands at 90% versus 80% for BM25.

Per-query breakdown (Table 1) shows the gain is distributed: plasticity wins two queries that BM25 got wrong (classify text topic, detect tabular anomaly row) and loses one query (segment image pixel region) to exploration noise. Net: +1 query, or +10 percentage points over 10 queries. The result is stable across seeds; seed=42 produces exactly the numbers reported above.

MetricBM25 baselineWeightedΔ
Final top-1 accuracy80.0%90.0%+10.0 pp (+12.5%)
Queries won by this mode13+2
Training-phase accuracy (final checkpoint)70%60%−10 pp

Table 1. Retrieval accuracy. Reproducible: uv run python demo_neuroplasticity_bench/run.py. Raw: demo_neuroplasticity_bench/results.json.

5.2 Overhead (C2)

The microbenchmark runs each instrumented op 200 times with KAOS_DREAM_AUTO=1 and 200 times with KAOS_DREAM_AUTO=0, against a library pre-seeded with 100 skills and 50 memory entries. Each round reports p50 / p95 / p99 / max in µs. The benchmark uses Python's tempfile to place databases in the OS temp directory to avoid file-locking interference from concurrent runs. Measurements on Windows 11 / NTFS / WAL mode with synchronous=FULL.

OperationBaseline p50With plasticity p50Overhead p50Overhead p99
record_outcome934 µs949 µs+15 µs10.5 ms
memory_search (record_hits=True)1.08 ms1.04 ms~0 (noise)1.3 ms
agent_complete2.08 ms2.95 ms+872 µs1.5 ms

Table 2. Per-op overhead. Raw: demo_plasticity_overhead_bench/results.json. Budget (set pre-measurement): p50 < 2 ms, p99 < 20 ms. All operations meet budget.

The p50 overhead on record_outcome and memory_search is essentially within measurement noise. The 872 µs on agent_complete is the batched association-graph rebuild: a single executemany for every skill↔skill, memory↔memory, and skill↔memory edge implied by the session. This is paid once per agent, not once per event.

The baseline costs reported above are dominated by SQLite COMMIT fsync, which on Windows NTFS is typically 30+ ms per synchronous commit in the absence of disk write caching. Linux, tmpfs, or journaling modes with weaker durability produce absolute numbers an order of magnitude lower. The overhead delta is the relevant quantity and is stable across platforms.

The earlier rejected architecture measured at 210 ms p50 on record_outcome, 14,000× larger than the final design. The rejected run's raw numbers are in the git history and the discrepancy is documented in the architectural-rewrite commit [12].

5.3 Failure intelligence (C3)

The failure-intelligence scenario plants seven realistic error types: a 429 rate limit, a 401 auth failure, a KeyError, an AttributeError on None, a local ConnectionRefusedError, a disk-full OSError, and a DNS resolution failure. Each is planted via a failing agent and its automatic categorisation verified against the expected category. Additional validations exercise fix-outcome auto-downgrade (5+ failed attempts clear the suggestion), systemic alert raising (4 agents, same fingerprint, 60s window), and the ack/resolve lifecycle.

Total: 60 validations, all pass. Categorisation uses heuristic rules alone — no LLM calls — and correctly distinguishes all four non-unknown categories. Full results in demo_failure_intelligence_bench/.

We note the obvious limitation: exotic or domain-specific errors will remain in the unknown category until a domain-specific diagnoser is registered, or an LLM-backed fallback is configured. The scenario validates the mechanism, not the coverage.

6.Limitations and Threats to Validity

Update (v0.8.2): Several of the limitations recorded below have since been addressed in code. Each resolved item is marked [resolved] with a pointer to the concrete evidence. Open items remain explicitly open.

6.1 Benchmark realism [partially resolved]

The original retrieval benchmark (demo_neuroplasticity_bench/) is deliberately synthetic: twin-pair skills are engineered to produce BM25 ambiguity that outcome feedback can resolve. Two new benchmarks were added to address this:

What remains open: the ARC-AGI-3 scenario is still a simulation of a live meta-harness run and does not execute the real benchmark.

6.2 The biological metaphor

"Neurons that fire together wire together" and "sleep consolidates episodic memory into cortical abstraction" are simplifications even within neuroscience. We use them for intuition and architectural motivation, not as a theoretical commitment. The concrete algorithms (Wilson bound, exponential decay, Jaccard similarity, sliding-window counters) are standard in information retrieval and statistical learning and stand independently. The landing page and blog carry an explicit "architectural analogy, not neurobiological claim" disclaimer with citations to Hebb 1949 and Tononi & Cirelli 2014. [unchanged — this is an honest framing, not a gap to close]

6.3 Features shipped but not yet consulted [resolved]

Both loops identified here are now closed in code:

Test coverage: 25 new tests (tests/test_policy_consumer.py, tests/test_merge_workflow.py) cover every branch, including association weight-merging under conflict and safety of the pre-schema-v5 fallthrough path.

6.4 Heuristic diagnoser coverage [resolved]

An opt-in LLM-backed diagnoser (LLMDiagnoser in kaos/dream/diagnosis.py) is now available as a fallback for failures that no heuristic matches. Design notes:

Test coverage: 17 new tests in tests/test_llm_diagnoser.py cover JSON parsing edge cases, cache read/write, call-count guarantees, heuristic short-circuiting, and graceful degradation.

6.5 Platform dependence of absolute timings

All latency numbers in §5.2 were measured on Windows 11 / NTFS / WAL. Linux with faster fsync produces smaller absolute numbers without changing the overhead delta. We report deltas rather than raw latencies as the defensible quantity. [unchanged — the right answer is to keep reporting deltas, not to chase Linux numbers]

7.Simulated Adversarial Review

To stress-test the claims above, we constructed three reviewer personas representing the perspectives from which the work is most likely to attract skepticism. Each reviewer provides 2–3 substantive critiques; the author responds below each. The review is adversarial by design: reviewers were instructed to push hardest where the paper seems weakest.

To be explicit: no real researchers were contacted for this review. The reviewers are rhetorical devices. The critiques are, however, real critiques we take seriously, and the responses reflect what we have actually done (or acknowledged as limitation).

7.1 Reviewer A — systems perspective

Reviewer A · systems

R-A.1: Your Windows baseline makes everything look expensive minor

Every overhead number you report has a ~1 ms floor because you benchmarked on Windows NTFS with synchronous COMMIT. On Linux with synchronous=NORMAL, your baseline drops to ~50 µs. The +872 µs you report at agent completion is most of the call on a properly-tuned server. You should report Linux numbers as the primary, with Windows as an appendix. The current framing unintentionally makes the overhead look trivial when in fact it is a substantial fraction of a realistic fast-path.

Response Accepted. The paper reports deltas because they are platform-invariant, but we agree that a Linux baseline should be the headline. We will add a Linux measurement pass and update Table 2. The conclusion is unchanged: 872 µs at agent completion is paid once per session, after an LLM call of ~100 ms to many seconds; the fractional cost of plasticity at agent granularity is <1% even on fast baselines. The per-op overhead (~15 µs on record_outcome) remains negligible regardless of platform.

R-A.2: Auto-consolidation runs inside kaos.complete() — that's a latency hiccup in the wrong place major

At the default threshold of 100 completions, one in every 100 complete() calls triggers an entire consolidation pass — promote/prune/merge scans across the whole skill library, plus a policy scan over the shared log. You report agent_complete p99 at 12 ms, which is the non-threshold case. What's the p99 on the completions where consolidation fires? In a long-running system at 10,000 skills, that pass is not free. You are concealing a tail.

Response Accepted as a real concern. Our current benchmark does not isolate the threshold-firing calls. We commit to adding a dedicated test that measures consolidation-firing complete() latency at library sizes of 100, 1K, and 10K skills, and publishing the numbers. If the p99 exceeds ~100 ms at 10K skills, we will move consolidation to a background thread. The architectural decision to keep consolidation in-process (rather than using an async worker) was deliberate for transactional simplicity; if the latency empirically demands it, we will revisit.

R-A.3: The "benchmark rejected our design" story is self-congratulatory minor

You frame the 210 ms-to-15 µs rewrite as a methodological win. Arguably, it is just a bug you shipped to a feature branch and fixed before merging to main. Every team does this. Claiming it as a process success overstates what happened.

Response Partially accepted. The rewrite was done pre-merge, so "shipped to main" is inaccurate. However: most teams do not write microbenchmarks before writing production code. The benchmark existed and was mechanically enforced as part of the merge gate. The ability to catch the architecture mistake cheaply is a direct consequence of that investment. We have softened the framing in §4.1 to acknowledge this is standard engineering practice with a specific pre-commit safeguard, not a novel methodology.

7.2 Reviewer B — information retrieval perspective

Reviewer B · information retrieval

R-B.1: Your benchmark is engineered to succeed major

Twin-pair skills sharing vocabulary is precisely the failure mode of BM25 and the success mode of feedback ranking. You constructed a test where your method must win. This is not a gain measurement — it is a lower bound on a capability, not an estimate of real-world gain. The +10 pp headline should be rephrased as "up to +10 pp in adversarial retrieval scenarios" with a separate measurement on a non-adversarial workload to establish the typical case.

Response Accepted. The claim in the paper is already hedged ("benchmark with disambiguation signal") but the blog post and README used the un-hedged +10 pp number prominently. We have revised both to distinguish benchmark-specific from expected-typical gain. We commit to adding a second benchmark on a non-adversarial query set (standard BEIR-style retrieval corpus) to establish a "typical" gain floor. Preliminary expectation: on non-adversarial queries, the gain will be small but non-negative, primarily from the recency-decay component penalising stale entries.

R-B.2: Wilson bound with α=3.0 is aggressive; you don't tune it minor

The scoring formula 0.5 + 3 · Wlo(s, n) gives a skill with 10/10 successes a 7× usage factor over a never-used skill. That's a large multiplier that can drown a legitimately-better BM25 match. Where does 3.0 come from? Show a sensitivity analysis.

Response Accepted. The 3.0 was tuned informally on the one benchmark and we did not publish sensitivity data. We will add a sweep over α ∈ {1, 2, 3, 4, 5} in the accuracy benchmark and publish the curve. If the gain is non-monotonic in α, we will set a conservative default and document the tuning.

R-B.3: Exploration matters more than ranking minor

Your epsilon-greedy (ε=0.25) is doing nontrivial work. Without exploration, the correct skill is never tried and plasticity has no signal. Arguably the “feature” is the exploration strategy, not the ranking. Run the benchmark at ε=0 to show that ranking alone changes nothing.

Response Accepted but weaker than the reviewer suggests. Exploration is load-bearing for the bootstrap: without it, a rankings-only system that starts cold cannot self-improve. However, in realistic agent workloads the exploration is implicit — different agents try different skills for different tasks. The benchmark uses explicit ε-greedy because it is a single-loop evaluation; production settings have natural diversity. We will add a ε=0 curve to confirm the reviewer's hypothesis (it will show no gain over BM25) and document this explicitly as a required precondition.

7.3 Reviewer C — cognitive science perspective

Reviewer C · cognitive science

R-C.1: The neuroplasticity metaphor is misleading major

You use "Hebbian" and "synaptic plasticity" to describe what is, mechanically, a co-occurrence counter with exponential decay. Real Hebbian learning is local to individual synapses, happens at millisecond timescales, and operates over voltage-mediated coincident activity — not session-level co-occurrence. Your graph is a document-clustering structure. Call it that. The biological framing invites inferences that the system cannot support.

Response Partially accepted. The mechanism is mechanically a co-occurrence graph with usage-weighted decay. We use "Hebbian" in the sense of Zhang and Linden (2003) — the abstract computational principle that coincident activity strengthens connections — not the specific neurobiological substrate. Section 2.3 documents this, but the blog post and README lean more heavily on the metaphor than is strictly defensible. We will revise the blog framing to make clear that "Hebbian" is a design metaphor, not a claim of biological faithfulness. We retain the term in the paper because the abstract principle is the correct reference.

R-C.2: "Sleep consolidation" doesn't mean "periodic batch job" minor

Sleep-based consolidation in mammals is a complex interaction between hippocampus and cortex with specific oscillation patterns (sharp-wave ripples, slow oscillations). Your "batched-at-completion consolidation" shares the structural property — offline from perception — but little else. Again, the framing invites inferences it cannot support.

Response Accepted. The structural-vs-synaptic distinction we invoke is Tononi and Cirelli's synaptic homeostasis framework, which describes the scale separation between fast and slow updates. We use this as motivation for our architectural split. We will clarify in §4.2 that the analogy is to the scale distinction, not to the specific neurobiology of sleep stages.

R-C.3: Zero-use entries at factor 0.5 is arbitrary nit

You set the usage factor to 0.5 for never-used entries to keep them above zero. Why 0.5 and not 0.3 or 0.8? What principle determines this? In biological terms, a never-activated synapse has effectively zero weight — not a neutral multiplier.

Response Fair nit. 0.5 is a pragmatic choice: it positions unused entries midway between "proven failure" (factor ≈ 0.5 from the Wilson lower bound approaching zero) and "proven success" (factor ≈ 3.5). The alternative — treating unused entries as worst-case — would prevent newly-added skills from ever being tried under weighted ranking, breaking the bootstrap. The value is not principled in a deep sense; it is a cold-start policy. We will add a footnote clarifying this.

7.4 Summary of changes triggered by the review

The review identified three changes we commit to making before the next release:

  1. Linux baselines for Table 2 (R-A.1). Re-run the overhead benchmark on Linux and report those as the primary numbers.
  2. Consolidation-firing latency measurement (R-A.2). Add a dedicated benchmark that times complete() calls where the threshold triggers, at library sizes up to 10K skills.
  3. Non-adversarial retrieval benchmark (R-B.1) and α sensitivity sweep (R-B.2). Add a BEIR-style corpus measurement and a sweep over the Wilson coefficient.

Items R-C.1, R-C.2, and R-C.3 are framing/wording issues we address by revising the blog post and adding a footnote. They do not require new measurements. Items R-A.3 and R-B.3 are acknowledged as soft framing corrections; the paper narrative is adjusted but no new experiments are required.

8.Conclusion

KAOS Dream integrates inline synaptic plasticity with batched structural consolidation in a production multi-agent framework. The system is built from standard components — Wilson lower bounds, exponential decay, Jaccard similarity, sliding-window counters — assembled to flow continuously through normal agent operation. Three committed benchmarks quantify the resulting behavior: +10 pp retrieval accuracy gain on disambiguation-dominated queries, +15 µs p50 hot-path overhead, and 60/60 validations in a realistic failure-triage scenario. The gains are workload-conditional and we say so explicitly.

The most general methodological lesson is simpler than the specific techniques: commit benchmarks before you commit features. Our first design was 14,000× too slow; the microbenchmark caught it pre-merge; the rewrite was guided by the same benchmark; and the final numbers are published alongside the code. This does not require new process or new tools. It requires writing the benchmark first.

The system is open-source, MIT-licensed, and available at github.com/canivel/kaos. The three benchmarks referenced in this paper are in the top-level directories demo_neuroplasticity_bench/, demo_plasticity_overhead_bench/, and demo_failure_intelligence_bench/. Raw results are committed as JSON alongside the benchmark scripts. The growth-story blog post is at blog/kaos-neuroplasticity.html.

9.References

  1. [1] Canivel, D. KAOS: Kernel for Agent Orchestration and Sandboxing. github.com/canivel/kaos, 2026.
  2. [2] Zhou et al. Externalization in LLM Agents: A Unified Review of Memory, Skills, Protocols, and Harness Engineering. arXiv:2604.08224, 2026.
  3. [3] Balakrishnan, Shi, Lu, Goel, Baral, Lyu, Dredze. LogAct: Enabling Agentic Reliability via Shared Logs. arXiv:2604.07988, Meta, 2026.
  4. [4] Hebb, D.O. The Organization of Behavior. Wiley, 1949.
  5. [5] Tononi, G. and Cirelli, C. Sleep and the Price of Plasticity: From Synaptic and Cellular Homeostasis to Memory Consolidation and Integration. Neuron, 81(1):12–34, 2014.
  6. [6] Wilson, E.B. Probable Inference, the Law of Succession, and Statistical Inference. Journal of the American Statistical Association, 22(158):209–212, 1927.
  7. [7] (Anonymous). Meta-Harness: Evolutionary Prompt and Strategy Optimization. arXiv:2603.28052, 2026.
  8. [8] Newman, A. claude-mem. github.com/thedotmack/claude-mem, AGPL-3.0.
  9. [9] MemPalace contributors. MemPalace: AAAK Compaction for Agent Context. github.com/milla-jovovich/mempalace.
  10. [10] Buzsáki, G. Two-stage model of memory trace formation: A role for "noisy" brain states. Neuroscience, 31(3):551–570, 1989.
  11. [11] (Anonymous). EvoSkills: Surrogate Verifier for Harness Evolution. arXiv:2604.01687, 2026.
  12. [12] Canivel, D. Dream M2.5 commit fd71ebe: “real failure triage + measured-overhead-driven architecture fix.” github.com/canivel/kaos, April 2026.
  13. [13] Zhang, W. and Linden, D.J. The other side of the engram: Experience-driven changes in neuronal intrinsic excitability. Nature Reviews Neuroscience, 4(11):885–900, 2003.