Zero bloat. Zero cloud. Pure SQLite Standard Library. Local memory database with FTS5 full-text search, auto-decay, and conflict detection.
Engram has clear, well-structured tool definitions with good naming (verb_noun pattern: t_auto_context, t_smart_search, t_save, t_delete, t_list, t_stats). Descriptions are present and moderately detailed (avg ~150 chars), explaining what each tool does and when to use it. Input schemas are visible with type definitions and parameter descriptions. However, output schemas are not formally documented, responses are inferred from code (e.g., t_auto_context returns {ctx, n, cats} but this is not declared in a schema). Error handling is minimal (t_smart_search returns {error: 'query required'} but lacks recovery guidance). Parameter constraints are present (limit 1-8, importance 1-10) but some descriptions could be more explicit about format and validation rules. No tool annotations (readOnlyHint, destructiveHint) are visible in the code.
Retrieves high-importance memories (excluding noise categories) ordered by importance and creation date, updates access counts, and returns XML-formatted context with memory metadata.
Deletes a memory by ID from the database and FTS5 index.
Lists all memories ordered by importance and creation date, with optional category filter and limit.
Saves or updates a memory with content, category, tags, and importance. Detects conflicts with existing memories via FTS5 similarity matching. Supports upsert via provided ID.
Performs full-text search using FTS5 with BM25 ranking boosted by importance and recency decay, falls back to LIKE query on FTS5 error, updates access counts for retrieved memories.
Returns database statistics including total memory count, database size, and category distribution.
Output schemas not formally documented. Tool responses (e.g., t_auto_context returns {ctx, n, cats}) are inferred from code, not declared. LLMs cannot reliably plan downstream calls without knowing response structure.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) visible in code. t_delete is destructive but not marked; t_auto_context and t_smart_search are read-only but not annotated. Agents cannot infer safety/retry semantics.
Error handling lacks recovery guidance. t_smart_search returns {error: 'query required'} but does not suggest next steps. t_save conflict detection returns no actionable error message. Agents cannot self-correct.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | 2026-07-28+ | v2 |
Parameter descriptions lack explicit format/constraint details. 'tags' is described as 'Comma-separated tags' but no length limit or character restrictions stated. 'content' max 8000 chars is enforced in code but not documented in schema description.
t_save upsert behavior via 'id' parameter is underdocumented. Description says 'if omitted, generated from content hash' but does not explain what happens if an ID is provided that already exists (update vs. error). Ambiguous semantics.