AGENT 06 / 07
Memoring
Persistent memory for the whole worker fleet. Facts, findings, decisions, and past runs are absorbed into an append-only knowledge base so the next operation starts from what is already known.
memoring · autonomous
01The toolset
Six tools, one knowledge base
memory_absorb
Facts enter through a 5-outcome pipeline: duplicate · supersede · contradict · related · new. Append-only with a full audit trail; dry_run previews the plan before writing.
memory_search
Hybrid retrieval — vector cosine fused with BM25 keyword matching and freshness decay. Id lookup with follow: active · latest · full_history.
memory_digest
Deterministic pre-task context: relevant memories + open TODOs + recent facts, with real ids you can verify. Loaded before work starts so nothing is re-done.
memory_boost
Raise (or lower) the importance of a memory that proved useful — default +0.5. Importance breaks ranking ties and shapes future digests.
memory_link
Typed edges between facts: related_to · implements · extends · references. supersedes and contradicts are created automatically by absorb.
memory_graph
Entity graph for people, projects, systems, and organizations. Nodes dedup by name+type, with typed relations and multi-hop BFS up to 4 hops.
02How it works
The absorb pipeline
Validate
Self-contained facts, 50–500 chars recommended (3–5000 enforced). Tags and metadata travel with the content.
Secret scan
sk-, sk-ant-, AKIA…, ghp_, xoxb-, Bearer tokens, PEM blocks and api_key assignments are rejected at the gate.
Consolidate
Near-duplicates within one batch merge into a single fact at cosine > 0.85; embeddings include tags and metadata.
Dedup & classify
Exact dedup by content hash; candidates at cosine ≥ 0.55; an LLM verdict — or the ≥ 0.97 heuristic — decides the relation.
Apply verdict
Duplicates skip · supersede writes a new row plus a supersedes edge and marks the old one · contradict keeps both versions alive. Nothing is ever overwritten.
02.5Three tiers
Profile, skills, archive
A ~2 KB stable profile frozen into the system prompt at session start — prefix-cache friendly, always present, refreshed next run.
Procedural knowledge distilled from experience; injected on demand via the skill tool instead of burning prompt budget.
A durable SQLite knowledge base: hybrid search, typed edges, entity graph, supersession chains, and a history journal.
03Under the hood
Append-only, verifiable, fast
| Store | SQLite · append-only rows · FTS5 (BM25) · embeddings · history journal |
| Hybrid score | score = 0.7·cosine + 0.3·BM25, both signals normalized |
| Freshness decay | score × max(0, 1 − 0.01·days) — 1% per day |
| Scopes | agent (shared knowledge) · user (about the client) · run (session episode) |
| Ids & reads | UUIDv7, shown as last 8 chars · follow active | latest | full_history |
| Auto-absorb | Successful extraction and discovery results can be stored without another model call, retaining confidence, tags, and session provenance |
| Digest | bounded prompt block with real ids — relevant memories, open TODOs, recent facts |
| Embeddings | OpenAI-compatible endpoint, offline TF-IDF fallback (512-dim) · vectors of different models never mix |
| Housekeeping | distill promotes run facts into agent knowledge · GC archives expired/stale rows and compacts groups > 200 — nothing is deleted |
| Benchmarks | absorb 49–521 µs/fact · hybrid search 0.6–0.9 ms at 1K rows · digest ~2 ms |
04Tools
The Memoring toolset
Feeds the worker fleet
Every operation starts smarter
Findings, decisions, entities, and session summaries are absorbed automatically with provenance and confidence. Any later worker can load a digest, follow supersession chains, and see contradictions instead of asserting stale context. Repeat operations stop being a cold start.
$ memory_digest(topic: "Acme follow-up")
## Long-term memory digest
### Relevant memories
- [a3f19c02] Acme CTO is Ivan Petrov, [email protected]
verified 2026-08 (conf 0.90)
- [7b20dd41] first outreach sent 2026-07-12;
reply asked for pricing details (conf 0.80)
### Open TODOs
- [91c4e8ab] check Acme Q3 hiring before follow-up
### Recently added
- [c04b7715] Acme opened 6 platform roles (conf 0.60)