Skip to content

Smriti

Open-source AI memory system for Claude Code with hybrid semantic search and 330+ tests.

TypeScriptBunSQLiteONNXHonoReactMCP

Overview

Smriti is an open-source memory layer for Claude Code that gives AI assistants persistent context across sessions. Without Smriti, every new conversation starts from zero. With it, the AI can recall past decisions, codebase patterns, and project-specific knowledge -- behaving more like a collaborator than a stateless tool.

The hybrid search architecture combines vector embeddings (via ONNX runtime) with SQLite full-text search to deliver relevant memories with high recall and precision. An observation batching system groups related context updates, reducing API calls by 60% while maintaining data freshness. The system is designed for cross-IDE support through the MCP protocol.

Quality was a first-class concern from day one. The project ships with 330+ tests covering unit, integration, and edge cases. The test suite validates search relevance scoring, embedding consistency, concurrent access patterns, and graceful degradation under failure conditions.

Key Achievements

  • 330+ tests covering unit, integration, and edge case scenarios
  • Hybrid semantic search with vector embeddings and full-text search
  • 60% reduction in API calls through observation batching
  • Cross-IDE support through the MCP protocol

Tech Stack

  • TypeScript -- type-safe codebase for reliability in a developer tool
  • Bun -- fast runtime with built-in test runner and bundler
  • SQLite -- embedded database for local-first, zero-config storage
  • ONNX -- portable vector embedding inference without Python dependencies
  • Hono -- lightweight HTTP framework for the MCP server
  • React -- UI for the memory management dashboard
  • MCP -- Model Context Protocol for cross-IDE integration