repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources15d ago| #1 | # Clawd Memory SOTA Architecture - Masterplan |
| #2 | ## Temporal Epistemic Graphs with Veracity-Weighted Consolidation |
| #3 | |
| #4 | This masterplan now targets Clawd Memory: the local-first agent brain for Clawd. The Clawd layer owns the agent contract, markdown vault, Solana/OODA metadata, and recall behavior. The Mnemosyne engine remains the SQLite storage and retrieval substrate until a deliberate migration is planned. |
| #5 | |
| #6 | --- |
| #7 | |
| #8 | ## Paper Citations & Foundations |
| #9 | |
| #10 | ### Core Papers |
| #11 | 1. **Memanto** (arXiv:2604.22085) - Typed Semantic Memory with Information-Theoretic Retrieval |
| #12 | - 13-type schema, zero ingestion cost, single-query retrieval |
| #13 | - Authors: Moorcheh AI / EdgeAI Innovations |
| #14 | |
| #15 | 2. **Moorcheh ITS** (arXiv:2601.11557) - From HNSW to Information-Theoretic Binarization |
| #16 | - 32x compression, deterministic exhaustive scan, 9.6ms latency |
| #17 | - Authors: Abtahi et al., Ontario Tech University |
| #18 | |
| #19 | 3. **REMem** (ICLR 2026, arXiv:2602.13530) - Reasoning with Episodic Memory |
| #20 | - Hybrid memory graph, time-aware gists, agentic retrieval |
| #21 | - Authors: Shu et al., Ohio State / Intuit AI |
| #22 | |
| #23 | 4. **HippoRAG** (arXiv:2405.14831) - Neurobiologically Inspired Long-Term Memory |
| #24 | - Hippocampal indexing theory, graph-based retrieval |
| #25 | - Authors: Various |
| #26 | |
| #27 | ### Supporting Papers |
| #28 | 5. **BEAM Benchmark** - Beyond a Million Tokens (2026) |
| #29 | 6. **Hindsight Blog** (2026/04) - SOTA on BEAM with structured memory |
| #30 | 7. **Honcho Benchmarks** (blog.plasticlabs.ai) - User modeling and dreaming |
| #31 | |
| #32 | --- |
| #33 | |
| #34 | ## Our Novel Contribution |
| #35 | |
| #36 | **"Temporal Epistemic Graphs with Veracity-Weighted Consolidation"** |
| #37 | |
| #38 | No existing system combines: |
| #39 | - Typed semantic memory (Memanto) |
| #40 | - Binary vector compression (Moorcheh) |
| #41 | - Episodic graph structure (REMem) |
| #42 | - Veracity-weighted confidence (our invention) |
| #43 | - Deterministic retrieval (our constraint) |
| #44 | - Zero LLM ingestion (our constraint) |
| #45 | |
| #46 | --- |
| #47 | |
| #48 | ## Implementation Phases |
| #49 | |
| #50 | ### Phase 0: Research & Foundation (COMPLETE) |
| #51 | - [x] Identify all relevant papers |
| #52 | - [x] Map techniques to our architecture |
| #53 | - [x] Define 10 core principles |
| #54 | - [x] Create masterplan document |
| #55 | |
| #56 | ### Phase 1: Typed Memory Schema |
| #57 | **Goal:** Implement 13-type deterministic classification |
| #58 | **Papers:** Memanto (arXiv:2604.22085) |
| #59 | **Innovation:** Rule-based typing with zero LLM calls |
| #60 | |
| #61 | **Types:** |
| #62 | 1. fact - Objective, verifiable info |
| #63 | 2. preference - User/system preferences |
| #64 | 3. decision - Choices affecting future |
| #65 | 4. commitment - Promises/obligations |
| #66 | 5. goal - Objectives to achieve |
| #67 | 6. event - Historical occurrences |
| #68 | 7. instruction - Rules/guidelines |
| #69 | 8. relationship - Entity connections |
| #70 | 9. context - Situational info |
| #71 | 10. learning - Lessons from experience |
| #72 | 11. observation - Patterns noticed |
| #73 | 12. error - Mistakes to avoid |
| #74 | 13. artifact - Document/code references |
| #75 | |
| #76 | **Implementation:** |
| #77 | - Pattern-based classifier using regex + keyword matching |
| #78 | - Confidence scoring based on pattern match strength |
| #79 | - No LLM calls during classification |
| #80 | - Store type in dedicated column |
| #81 | |
| #82 | ### Phase 2: Information-Theoretic Binary Vectors |
| #83 | **Goal:** Replace float32 vectors with binary compression |
| #84 | **Papers:** Moorcheh ITS (arXiv:2601.11557) |
| #85 | **Innovation:** Deterministic exhaustive scan over binary vectors |
| #86 | |
| #87 | **Implementation:** |
| #88 | - Maximally Informative Binarization (MIB) algorithm |
| #89 | - Efficient Distance Metric (EDM) using Hamming distance |
| #90 | - Information-Theoretic Score (ITS) for ranking |
| #91 | - 32x memory reduction |
| #92 | - No HNSW index needed |
| #93 | - SQLite-native storage |
| #94 | |
| #95 | ### Phase 3: Episodic Gist+Fact Graph |
| #96 | **Goal:** Build hybrid memory graph with temporal edges |
| #97 | **Papers:** REMem (arXiv:2602.13530) |
| #98 | **Innovation:** Time-aware gists + structured facts in single graph |
| #99 | |
| #100 | **Implementation:** |
| #101 | - Gist extraction: concise episode summaries with timestamps |
| #102 | - Fact extraction: (subject, predicate, object) triples |
| #103 | - Graph nodes: V_gist ∪ V_phrase |
| #104 | - Graph edges: E_rel ∪ E_ctx ∪ E_syn |
| #105 | - Temporal qualifiers: point_in_time, start_time, end_time |
| #106 | |
| #107 | ### Phase 4: Veracity-Weighted Consolidation |
| #108 | **Goal:** Bayesian confidence scoring + conflict resolution |
| #109 | **Papers:** None (our invention) |
| #110 | **Innovation:** Confidence-based synthesis with automatic conflict detection |
| #111 | |
| #112 | **Implementation:** |
| #113 | - Veracity tiers: stated (1.0), inferred (0.7), tool (0.5), imported (0.6), unknown (0.8) |
| #114 | - Bayesian updating: confidence = 1 - (0.7^n) where n = mention count |
| #115 | - Conflict detection: contradictory facts with same subject+predicate |
| #116 | - Resolution: higher confidence wins, lower confidence flagged |
| #117 | - Consolidation: periodic background synthesis of high-confidence facts |
| #118 | |
| #119 | ### Phase 5: Polyphonic Recall Engine |
| #120 | **Goal:** Multi-strategy parallel retrieval with deterministic re-ranking |
| #121 | **Papers:** Memanto + REMem |
| #122 | **Innovation:** Parallel strategies with cross-strategy confirmation boost |
| #123 | |
| #124 | **Implementation:** |
| #125 | - Strategy 1: Binary vector similarity (Moorcheh) |
| #126 | - Strategy 2: FTS5 keyword search |
| #127 | - Strategy 3: Temporal index lookup |
| #128 | - Strategy 4: Entity graph traversal |
| #129 | - Strategy 5: Fact triple matching |
| #130 | - Re-ranker: weighted combination with cross-strategy boost |
| #131 | - No LLM calls during retrieval |
| #132 | |
| #133 | ### Phase 6: Integration & Testing |
| #134 | **Goal:** Full system integration with comprehensive testing |
| #135 | **Tests:** |
| #136 | - Unit tests for each component |
| #137 | - Integration tests for end-to-end flow |
| #138 | - BEAM benchmark validation |
| #139 | - Ablation studies (disable each component, measure impact) |
| #140 | - Performance benchmarks (latency, throughput, memory) |
| #141 | |
| #142 | ### Phase 7: Paper Draft |
| #143 | **Goal:** arXiv preprint with full methodology and results |
| #144 | **Sections:** |
| #145 | 1. Introduction + Related Work |
| #146 | 2. Core Principles |
| #147 | 3. Architecture |
| #148 | 4. Implementation Details |
| #149 | 5. Benchmark Results |
| #150 | 6. Ablation Studies |
| #151 | 7. Cost Analysis |
| #152 | 8. Conclusion |
| #153 | |
| #154 | --- |
| #155 | |
| #156 | ## Success Metrics |
| #157 | |
| #158 | | Metric | Current | Target | SOTA | |
| #159 | |--------|---------|--------|------| |
| #160 | | BEAM 100K | 21.8% | 40%+ | 73.4% | |
| #161 | | Ingestion Latency | ~500ms | <10ms | N/A | |
| #162 | | Query Latency | ~100ms | <50ms | N/A | |
| #163 | | Memory Overhead | 1x | 0.03x (32x comp) | N/A | |
| #164 | | LLM Calls per Ingest | 1+ | 0 | N/A | |
| #165 | | LLM Calls per Query | 1+ | 0 | N/A | |
| #166 | |
| #167 | --- |
| #168 | |
| #169 | ## Risk Mitigation |
| #170 | |
| #171 | 1. **Binary vector quality loss**: Test on BEAM before/after, tune MIB threshold |
| #172 | 2. **Type classification accuracy**: Validate against labeled dataset, adjust patterns |
| #173 | 3. **Graph traversal performance**: Add depth limits, cache frequent paths |
| #174 | 4. **Consolidation correctness**: Conservative thresholds, human review for high-stakes |
| #175 | |
| #176 | --- |
| #177 | |
| #178 | ## Timeline |
| #179 | |
| #180 | | Phase | Duration | Cumulative | |
| #181 | |-------|----------|------------| |
| #182 | | Phase 1: Typed Schema | 2 days | 2 days | |
| #183 | | Phase 2: Binary Vectors | 3 days | 5 days | |
| #184 | | Phase 3: Episodic Graph | 4 days | 9 days | |
| #185 | | Phase 4: Veracity Consolidation | 3 days | 12 days | |
| #186 | | Phase 5: Polyphonic Recall | 3 days | 15 days | |
| #187 | | Phase 6: Testing | 5 days | 20 days | |
| #188 | | Phase 7: Paper | 5 days | 25 days | |
| #189 | |
| #190 | **Total: ~25 days to SOTA paper** |
| #191 | |
| #192 | --- |
| #193 | |
| #194 | ## Implementation Order |
| #195 | |
| #196 | Starting with Phase 1 (Typed Schema) because: |
| #197 | 1. Highest impact on BEAM scores (ABS, SUM, KU categories) |
| #198 | 2. Lowest risk (rule-based, no dependencies) |
| #199 | 3. Foundation for all other phases |
| #200 | 4. Can be tested independently |
| #201 | |
| #202 | Then Phase 2 (Binary Vectors) for performance gains. |
| #203 | Then Phase 3 (Episodic Graph) for reasoning improvements. |
| #204 | Then Phase 4 (Veracity) for consolidation quality. |
| #205 | Then Phase 5 (Polyphonic Recall) to tie it all together. |
| #206 | |
| #207 | Ready to start Phase 1? |
| #208 |