SuperAPIAI Directory

In-Memoria

github.com · AI coding

Cumulative memory and pattern learning for coding assistants, with local SQLite/SurrealDB storage for semantic codebase analysis.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

In-Memoria is an MCP server that provides persistent memory and pattern learning capabilities for AI coding assistants. Its goal is to solve the "session amnesia" problem of AI coding sessions: every time you reopen Claude, Copilot, or Cursor, you have to repeatedly explain the architecture, conventions, and habits. In-Memoria learns from real codebases and stores it persistently, allowing AI assistants to directly query this intelligence in subsequent sessions.

Main capabilities:

  1. Pattern learning: Analyzes code to understand naming conventions, architectural choices, and structural preferences, based on statistics rather than manual rules.
  2. Instant project context: Provides the tech stack, entry points, and architecture in fewer than 200 tokens, without the need for re-analysis.
  3. Intelligent file routing: Maps vague requests such as "add password reset" to relevant files (such as src/auth/login.ts).
  4. Semantic search: Finds code by meaning rather than just keywords.
  5. Working memory: Tracks the current task and architectural decisions across sessions.
  6. Pattern prediction: Suggests ways to solve similar problems based on history.

Technical architecture:

  • Rust layer: tree-sitter AST parsing, supporting 12 languages including TypeScript, JavaScript, Python, PHP, Rust, Go, Java, C/C++, C#, Svelte, SQL, etc.; blueprint analyzer, pattern learner, semantic engine.
  • TypeScript layer: MCP server and orchestration, providing 13 specialized tools; SQLite stores structured data, SurrealDB with SurrealKV stores persistent vector embeddings; file watching enables incremental updates.
  • Storage: Local-first, all data stays on the local machine; embeddings are generated locally using transformers.js (model Xenova/all-MiniLM-L6-v2).

MCP tools are divided into four categories:

  • Core analysis (2): analyze_codebase (analyzes files/directories, including concepts, patterns, complexity), search_codebase (semantic/text/pattern multi-mode search).
  • Intelligence (7): learn_codebase_intelligence, get_project_blueprint, get_semantic_insights, get_pattern_recommendations, predict_coding_approach, get_developer_profile, contribute_insights.
  • Automation (1): auto_learn_if_needed.
  • Monitoring (3): get_system_status, get_intelligence_metrics, get_performance_status.

Usage:

  • Claude Desktop: Add the configuration in ~/Library/Application Support/Claude/claude_desktop_config.json.
  • Claude Code CLI and GitHub Copilot: See the Copilot integration section.
  • GitHub Copilot (VS Code): Integrated via MCP + Custom Agents; Copilot only calls MCP tools in Agent mode. You need to create a workspace .vscode/mcp.json and start the MCP server. The repository provides .github/copilot-instructions.md for automatic loading, as well as three Custom Agents (exploration, feature implementation, code review); you need to move/copy the *.chatmode.md files under .github/chatmodes/ to .github/agents/ and rename them to *.agent.md.

Applicable scenarios:

  • Individual developers: Learn personal coding style, remember architectural decisions, and get context-aware suggestions.
  • Teams: Share the .in-memoria.db file to distribute learned patterns; use pre-learned codebase intelligence to help new developers get up to speed; ensure consistent AI suggestions within the team.

Limitations and status:

  • Current version 0.6.0, early stage, with rough edges.
  • Large codebases (100,000+ files) may be slow to analyze for the first time.
  • Pattern accuracy depends on codebase consistency.
  • tree-sitter support for some languages is better than for others.
  • Documentation may not be comprehensive enough.
  • Building requires Rust 1.70+ and a minimum of 2GB of memory.
  • Quality metrics: 118/120 unit tests passing (98.3%), 23/23 MCP integration tests passing (100%), Rust zero clippy warnings, zero memory leaks.

Roadmap: Phase 1-4 completed (project blueprint, working context, intelligent file routing, tool merging); Phase 5 in progress (enhanced vector search and embedding); Phase 6 planned (multi-project intelligence); Phase 7 planned (collaboration features).

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools