Smriti
Open-source memory plugin for AI coding assistants — hybrid relevance scoring, 60% fewer API calls, 70% token savings.
Overview
Smriti is an open-source memory layer for AI coding assistants that provides persistent context across sessions. Without Smriti, every new conversation starts from zero. With it, the assistant recalls past decisions, codebase patterns, and project-specific knowledge — behaving more like a collaborator than a stateless tool.
Relevance is driven by hybrid scoring: vector embeddings (sqlite-vec with ONNX runtime) combined with full-text search, recency decay, and importance weighting. An observation batching system groups related context updates, cutting API calls by 60%, while context masking delivers 70% token savings. The write path is crash-safe, so no observation is ever lost mid-session.
Quality was a first-class concern from day one. The project ships with 330+ tests covering unit, integration, and edge cases — validating search relevance scoring, embedding consistency, concurrent access patterns, and graceful degradation under failure. It includes a React dashboard, an MCP server, and a CLI with cross-IDE support.
Key Achievements
- Hybrid relevance scoring: vector embeddings + full-text search + recency decay + importance weighting
- 60% fewer API calls through observation batching
- 70% token savings through context masking
- Crash-safe, stateless architecture with 330+ tests
- Ships with a React dashboard, MCP server, and CLI — cross-IDE support
Tech Stack
- TypeScript — type-safe codebase for reliability in a developer tool
- Bun — fast runtime with built-in test runner and bundler
- SQLite + sqlite-vec — embedded, local-first storage with vector search
- ONNX — portable embedding inference without Python dependencies
- Hono — lightweight HTTP framework for the MCP server
- React — memory management dashboard
- MCP — Model Context Protocol for cross-IDE integration