A self-learning AI harness you can actually trust.
A practical architecture for agent systems that remember, improve and prove their work. Distilled from an operating 8-agent agency and hardened with evaluation, provenance, idempotency and observability.
Two loops, one system
The memory loop makes agents more useful over time. The task loop makes their output verifiable. Neither is safe without the other.
A three-layer memory that learns without losing trust
Workspace files, a fast local hybrid index and a shared global brain — with provenance, evaluation and decay built in.
- BM25 + vector retrieval
- Provenance and quarantine
- Strategy evolution with rollback
A task lifecycle that can prove it is done
Classification, recon, retries, peer review, an independent Oracle and DAG orchestration — with idempotent states and evidence-bound completion.
- 10 states, explicit transitions
- Independent Oracle
- Watchdog and post-mortem
Design principles
These are the constraints I would not remove. They are the difference between a demo that appears to learn and a system you can operate.
Evaluate before autonomy
A self-improving system without a holdout set learns to look better, not to be better. Every prompt, strategy and retrieval weight change must pass an offline gate.
Memory is a trust boundary
Web pages, Discord, attachments and peer agents can poison memory. Store provenance, quarantine unverified knowledge and never clone a strategy without evaluation.
Exactly once, not “usually once”
Tasks, retries, payments and deployments need idempotency keys, leases and terminal-state guards. Cron overlap is a bug, not an edge case.
Evidence, not claims
“Completed” must mean reproducible evidence: command, output hash, artifact, timestamp and the verifier that checked it. Oracles should not trust the agent’s summary.
Humans at risk gates
Human approval should depend on reversibility, spend, data access and blast radius — not only task complexity.
Observe the loop
Track recall, precision, stale memory, retry rate, Oracle pass rate, cost per task and drift. If you cannot see the loop, you cannot improve it.
What I changed from the original design
The original decks describe a strong loop. This reference adds the parts that make it safe to run unattended.
Golden tasks, holdouts, regression suites and canaries before any α, strategy or model change.
Raw → verified → trusted, with source, author, timestamp and a quarantine path.
Event-driven updates plus a reconciliation sweep; version embeddings instead of re-embedding everything.
Leases, transition guards, dependency-cycle checks and replay-safe retries.
Oracle re-checks executable evidence; stale or self-supplied proof cannot pass.
SLOs and dashboards for every loop: retrieval, memory, retries, Oracle, cost and human gates.
If you are building this
A minimum implementation order that avoids the common traps.
- Write the task state machine and transition table before code.
- Define a memory record schema with provenance and trust level.
- Build the evaluation set before the evolution engine.
- Make every scheduled job idempotent and lock-protected.
- Log retrieval, feedback, strategy changes and Oracle evidence.
- Add backup/restore and a disaster-recovery drill.
Download the reference
The same architecture, formatted for offline reading and sharing.