IdeaCredIdeaCred

ashita-ai/engram

84

A memory system for AI applications that preserves ground truth, tracks confidence, and prevents hallucinations.

What's novel

A memory system for AI applications that preserves ground truth, tracks confidence, and prevents hallucinations.

Code Analysis

9 files read · 3 rounds

A layered AI memory system that stores immutable verbatim episodes, extracts structured data via regex and LLM, consolidates into semantic summaries with bidirectional links, and provides multi-type recall with negation filtering, Bayesian confidence scoring, and contradiction detection.

Strengths

Genuinely well-architected with clean separation (encode/recall/consolidation/contradiction as distinct concerns), real algorithmic depth (Beta-Bernoulli Bayesian confidence, map-reduce consolidation with checkpointing, MMR diversity reranking, surprise-based importance scoring), and a thoughtful memory hierarchy (episodic → structured → semantic → procedural) grounded in cognitive science literature. The code is consistently well-documented with docstrings, type hints, and meaningful naming thr

Weaknesses

The consolidation workflow is extremely long (59KB single file) and the storage CRUD layer is 70KB, suggesting some modules could be decomposed further. The LLM-dependent features (contradiction detection, enrichment, consolidation) are tightly coupled to Pydantic AI agents, making it harder to swap providers or test without mocking. Some features like the propagation algorithms and full storage layer couldn't be fully verified due to size.

Score Breakdown

Innovation
5 (25%)
Craft
80 (35%)
Traction
23 (15%)
Scope
86 (25%)

Signal breakdown

Innovation

Not Fork+1
Code Novelty+1
Concept Novelty+2

Craft

Ci+5
Tests+8
Polish+2
Releases+0
Has License+5
Code Quality+24
Readme Quality+15
Recent Activity+7
Structure Quality+5
Commit Consistency+4
Has Dependency Mgmt+5

Traction

Forks+6
Stars+12
Hn Points+0
Watchers+0
Early Traction+5
Devto Reactions+0
Community Contribs+0

Scope

Commits+8
Languages+5
Subsystems+13
Bloat Penalty+0
Completeness+7
Contributors+5
Authored Files+15
Readme Code Match+3
Architecture Depth+7
Implementation Depth+8

Evidence

Commits

202

Contributors

1

Files

166

Active weeks

7

TestsCI/CDREADMELicenseContributing

Repository

Language

Python

Stars

5

Forks

1

License

MIT