freshcrate
Skin:/
Home > MCP Servers > kuzu-memory

kuzu-memory

Lightweight, embedded graph-based memory system for AI applications. Fast (<3ms recall), offline-first, with MCP server support for Claude and other AI tools.

Why this rank:Recent releaseStrong adoptionHealthy release cadence

Description

Lightweight, embedded graph-based memory system for AI applications. Fast (<3ms recall), offline-first, with MCP server support for Claude and other AI tools.

README

KuzuMemory

Python 3.11+ License: MIT Tests

Lightweight, embedded graph-based memory system for AI applications

KuzuMemory provides fast, offline memory capabilities for chatbots and AI systems without requiring LLM calls. It uses pattern matching and local graph storage to remember and recall contextual information.

โœจ Key Features

  • ๐Ÿง  Cognitive Memory Model - Based on human memory psychology (SEMANTIC, PROCEDURAL, EPISODIC, etc.)
  • ๐Ÿš€ No LLM Dependencies - Operates using pattern matching and local NER only
  • โšก Fast Performance - <3ms memory recall, <8ms memory generation (verified with Kuzu)
  • ๐Ÿ’พ Embedded Database - Single-file Kuzu graph database
  • ๐Ÿ”„ Git-Friendly - Database files <10MB, perfect for version control
  • ๐Ÿ”Œ Simple API - Just two methods: attach_memories() and generate_memories()
  • ๐ŸŒ Cross-Platform - Standardized cognitive types shared with TypeScript implementation
  • ๐Ÿ“ฑ Offline First - Works completely without internet connection
  • ๐Ÿ”ง MCP Ready - Native Claude Desktop integration with async learning support
  • ๐Ÿค– Hook System - Automatic Claude Code integration using hooks (UserPromptSubmit, Stop)
  • ๐Ÿ‘ค User-Level Memory - Cross-project ~/.kuzu-memory/user.db automatically aggregates your best patterns and rules across all projects
  • โšก HNSW Vector Search โ€” Kรนzu-native approximate nearest-neighbour index (O(log N)) replaces brute-force NumPy cosine scan; embeddings stored at ingestion time
  • ๐Ÿ”ค TF-IDF Keyword Boost โ€” multiplicative scoring: final_score = semantic_score ร— (1 + weight ร— normalized_tfidf), configurable via KUZU_MEMORY_TFIDF_BOOST_WEIGHT
  • ๐Ÿ•ธ๏ธ Graph Enrichment Pipeline โ€” 5 enrichers: entity co-occurrence, centrality (PageRank-style), HNSW index, RELATES_TO edges (knowledge-type affinity), TF-IDF keyword index
  • ๐Ÿค– LLM Reranking (opt-in) โ€” Haiku reranking pass after recall, enabled via KUZU_MEMORY_RERANK=1

๐Ÿš€ Quick Start

Installation

# Install via pipx (recommended for CLI usage)
pipx install kuzu-memory

# Or install via pip
pip install kuzu-memory

# For development
pip install kuzu-memory[dev]

Now available on PyPI! KuzuMemory v1.12.2 is published and ready for production use.

Smart Setup (Recommended - ONE Command!)

The easiest way to get started is with the smart setup command:

# Navigate to your project directory
cd /path/to/your/project

# Run smart setup - auto-detects and configures everything
kuzu-memory setup

# That's it! The setup command will:
# โœ… Initialize the memory database
# โœ… Detect your AI tools (Claude Code, Cursor, VS Code, etc.)
# โœ… Install/update integrations automatically
# โœ… Verify everything is working

Options:

# Preview what would happen (dry run)
kuzu-memory setup --dry-run

# Setup for specific AI tool
kuzu-memory setup --integration claude-code

# Initialize only (skip AI tool installation)
kuzu-memory setup --skip-install

# Force reinstall everything
kuzu-memory setup --force

Manual Installation (Advanced Users)

If you need granular control, KuzuMemory can be installed manually with various AI systems following the ONE PATH principle:

# Install Claude Code integration (MCP + hooks)
kuzu-memory install claude-code

# Install Claude Desktop integration (MCP only)
kuzu-memory install claude-desktop

# Install Codex integration (MCP only)
kuzu-memory install codex

# Install Cursor IDE integration (MCP only)
kuzu-memory install cursor

# Install VS Code integration (MCP only)
kuzu-memory install vscode

# Install Windsurf IDE integration (MCP only)
kuzu-memory install windsurf

# Install Auggie integration (rules)
kuzu-memory install auggie

# Uninstall an integration
kuzu-memory uninstall claude-code

Available Integrations (ONE command per system):

  • claude-code - Claude Code IDE with MCP + hooks (complete integration)
  • claude-desktop - Claude Desktop app with MCP server (global memory)
  • codex - Codex IDE with MCP server (global configuration)
  • cursor - Cursor IDE with MCP server
  • vscode - VS Code with Claude extension (MCP server)
  • windsurf - Windsurf IDE with MCP server
  • auggie - Auggie AI with rules integration

Key Differences:

Claude Code (claude-code):

  • Configuration: Creates .kuzu-memory/config.yaml in project directory
  • Database: Initializes project database in .kuzu-memory/memorydb/
  • Memory Scope: Each project has isolated memory
  • Hook System: Automatic enhancement (UserPromptSubmit) and learning (Stop)
  • Use Case: Project-specific context and memories
  • Sharing: Memory can be committed to git for team collaboration

Claude Desktop (claude-desktop):

  • Configuration: Creates ~/.kuzu-memory/config.yaml in home directory
  • Database: Initializes global database in ~/.kuzu-memory/memorydb/
  • Memory Scope: Shared across all Claude Desktop conversations
  • Use Case: Personal knowledge base and preferences
  • Installation: Auto-detects pipx or home directory installation

Codex (codex):

  • Configuration: Creates ~/.codex/config.toml in home directory (TOML format)
  • Database: Uses project-specific database via environment variables
  • Memory Scope: Global configuration, project-specific memory
  • Use Case: Codex IDE integration with MCP protocol
  • Format: Uses snake_case mcp_servers convention (TOML)

Auggie (auggie):

  • Configuration: Creates .augment/rules/ directory with enhanced integration rules
  • Version: v2.0.0 with automatic version detection and migration
  • Auto-Migration: Automatically upgrades from v1.0.0 to v2.0.0 with backup
  • Backup: Creates backup at .augment/backups/v{version}_{timestamp}/ before upgrade
  • Rules: Enhanced rules based on Claude Code hooks v1.4.0 insights including:
    • Success metrics (2-5 memories per query, <100ms response)
    • Decision tree for when to store vs skip information
    • Deduplication patterns (SHA256 hashing, TTL caching)
    • Performance optimization (batching, targeted filtering)
    • Failure recovery protocols (graceful degradation)
  • Files Created: AGENTS.md, .augment/rules/kuzu-memory-integration.md, .augment/rules/memory-quick-reference.md
  • Version Tracking: Maintains version at .augment/.kuzu-version
  • Use Case: Rules-based AI instruction integration (Auggie reads rules and decides when to act)

Installation Options:

  • --force - Force reinstall even if already installed (overwrites existing config)
  • --dry-run - Preview changes without modifying files
  • --verbose - Show detailed installation steps
  • --mode [auto|pipx|home] - Override auto-detection (claude-desktop only)
  • --backup-dir PATH - Custom backup directory
  • --memory-db PATH - Custom memory database location

Automatic Initialization:

  • Configuration files are created automatically during installation
  • Database is initialized automatically
  • Existing configurations are preserved (use --force to overwrite)
  • Backups are created when overwriting existing files

See Claude Setup Guide for detailed instructions on Claude Desktop and Claude Code integration.

Note: Previous installer names (e.g., claude-desktop-pipx, claude-desktop-home) still work but show deprecation warnings.

Basic Usage

from kuzu_memory import KuzuMemory

# Initialize memory system
memory = KuzuMemory()

# Store memories from conversation
memory.generate_memories("""
User: My name is Alice and I work at TechCorp as a Python developer.
Assistant: Nice to meet you, Alice! Python is a great choice for development.
""")

# Retrieve relevant memories
context = memory.attach_memories("What's my name and where do I work?")

print(context.enhanced_prompt)
# Output includes: "Alice", "TechCorp", "Python developer"

CLI Usage

# Initialize memory database
kuzu-memory init

# Store a memory
kuzu-memory memory store "I prefer using TypeScript for frontend projects"

# Recall memories
kuzu-memory memory recall "What do I prefer for frontend?"

# Enhance a prompt
kuzu-memory memory enhance "What's my coding preference?"

# View statistics
kuzu-memory status

Keeping KuzuMemory Updated

Check for updates:

kuzu-memory update --check-only

Check and upgrade:

kuzu-memory update

Include pre-releases:

kuzu-memory update --pre

Silent check (for scripts/cron):

kuzu-memory update --check-only --quiet
# Exit code 0 = up to date, 2 = update available

JSON output for automation:

kuzu-memory update --check-only --format json

The update command queries PyPI for the latest version and uses pip to upgrade. It's safe to run anytime and will preserve your database and configuration files.

Repair Command

Auto-fix broken MCP configurations:

If your MCP server fails to start due to configuration issues, the repair command can automatically fix common problems:

# Auto-detect and repair all installed systems
kuzu-memory repair

# Show detailed repair information
kuzu-memory repair --verbose

What it fixes:

  • Broken ["mcp", "serve"] args โ†’ ["mcp"] (common MCP server startup issue)
  • Auto-detects Claude Code, Claude Desktop, Cursor, VS Code, Windsurf configurations
  • Creates backups before making changes
  • Shows clear before/after comparison

When to use:

  • MCP server fails to start with args-related errors
  • After upgrading from older versions
  • When integrations stop working unexpectedly

See Troubleshooting Guide for more repair scenarios.

Git History Sync

Automatically import project commit history as memories:

# Smart sync (auto-detects initial vs incremental)
kuzu-memory git sync

# Force full resync
kuzu-memory git sync --initial

# Preview without storing
kuzu-memory git sync --dry-run

# View sync configuration
kuzu-memory git status

# Install automatic sync hook
kuzu-memory git install-hooks

What gets synced: Commits with semantic prefixes (feat:, fix:, refactor:, perf:) from main, master, develop, feature/, bugfix/ branches.

Retention: Git commits are stored as EPISODIC memories (30-day retention).

Deduplication: Running sync multiple times won't create duplicates - each commit SHA is stored once.

See Git Sync Guide for detailed documentation.

๐Ÿ“– Core Concepts

Cognitive Memory Types

KuzuMemory uses a cognitive memory model inspired by human memory systems:

  • SEMANTIC - Facts and general knowledge (never expires)
  • PROCEDURAL - Instructions and how-to content (never expires)
  • PREFERENCE - User/team preferences (never expires)
  • EPISODIC - Personal experiences and events (30 days)
  • WORKING - Current tasks and immediate focus (1 day)
  • SENSORY - Sensory observations and descriptions (6 hours)

Cognitive Classification

KuzuMemory automatically classifies memories into cognitive types based on content patterns, providing intuitive categorization that mirrors human memory systems. This standardized model ensures compatibility across Python and TypeScript implementations.

Pattern-Based Extraction

No LLM required! KuzuMemory uses regex patterns to identify and store memories automatically:

# Automatically detected patterns
"Remember that we use Python for backend"     # โ†’ EPISODIC memory
"My name is Alice"                            # โ†’ SEMANTIC memory
"I prefer dark mode"                          # โ†’ PREFERENCE memory
"Always use type hints"                       # โ†’ PROCEDURAL memory
"Currently debugging the API"                 # โ†’ WORKING memory
"The interface feels slow"                    # โ†’ SENSORY memory

Important: For pattern matching to work effectively, content should include clear subject-verb-object structures. Memories with specific entities, actions, or preferences are extracted more reliably than abstract statements.

Knowledge Types

Every memory carries a knowledge_type โ€” an orthogonal label that governs retrieval categorization (separate from the cognitive MemoryType which governs retention):

Type When to use Auto-promoted to user DB?
rule Hard constraints: "always use RLock for re-entrant locks" โœ…
pattern Repeatable solutions: "use Repository pattern for DB access" โœ…
gotcha Pitfalls to avoid: "Kuzu single-writer โ€” serialise with a lock" โœ…
architecture Structural decisions: "SOA with dependency injection" โœ…
convention Style preferences: "snake_case for Python, camelCase for JS" โŒ (project-only)
note Everything else (default) โŒ (project-only)

๐Ÿ—‚๏ธ Memory Scopes: Project vs User

KuzuMemory supports two complementary scopes that work together:

Project Scope (default)

Each project gets its own isolated database at .kuzu-memory/memories.db. Memories are project-specific โ€” coding patterns, decisions, and context for that codebase only.

my-api/
โ””โ”€โ”€ .kuzu-memory/
    โ””โ”€โ”€ memories.db   โ† project memories (git-ignored)

This is the default. No configuration required.

User Scope

When you enable user mode, KuzuMemory automatically promotes high-quality memories from every project session into a shared ~/.kuzu-memory/user.db. These are your best cross-project patterns โ€” rules and gotchas that apply everywhere.

~/.kuzu-memory/
โ””โ”€โ”€ user.db           โ† aggregated patterns from all projects

Promotion criteria (applied at session end):

  • knowledge_type โˆˆ rule | pattern | gotcha | architecture
  • importance โ‰ฅ 0.8
  • Deduplicated by content hash โ€” no duplicates accumulate

Enable user mode:

# Initialize user DB and enable automatic promotion
kuzu-memory user setup

# Check what's been aggregated
kuzu-memory user status

# Manually promote from current project (useful for backfilling)
kuzu-memory user promote

# Preview without writing
kuzu-memory user promote --dry-run

# Return to project-only mode (user DB is preserved)
kuzu-memory user disable

At session start, the MCP server merges relevant user-level patterns into your project context automatically via the kuzu_user_context tool โ€” so the lesson you learned in my-api is available when you start work on my-worker.

MCP context tools for session start:

kuzu_project_context โ€” Returns recent project memories grouped by knowledge_type (rules, patterns, gotchas, architecture). Use at session start to inject project context. Parameters: days_back (default 14), max_per_type (default 5).

kuzu_user_context โ€” Returns high-quality memories promoted from all projects (user mode only). Complements kuzu_project_context for cross-project knowledge. Returns {"available": false} in project mode.

Scope Comparison

Project DB User DB
Location .kuzu-memory/memories.db ~/.kuzu-memory/user.db
Scope Single project All projects
Lifetime Lives with the repo Permanent, user-owned
Contents All memory types High-importance rules, patterns, gotchas, architecture
Populated by Hooks + MCP tools Auto-promotion at session end
Default โœ… Always active โŒ Opt-in via user setup

๐Ÿ—๏ธ Architecture

High-Level Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Your App      โ”‚    โ”‚   KuzuMemory     โ”‚    โ”‚   Kuzu Graph    โ”‚
โ”‚                 โ”‚    โ”‚                  โ”‚    โ”‚   Database      โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚    โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚    โ”‚                 โ”‚
โ”‚ โ”‚  Chatbot    โ”‚โ”€โ”ผโ”€โ”€โ”€โ”€โ”ผโ†’โ”‚attach_memoriesโ”‚โ”€โ”ผโ”€โ”€โ”€โ”€โ”ผโ†’ Query Engine   โ”‚
โ”‚ โ”‚             โ”‚ โ”‚    โ”‚ โ”‚              โ”‚ โ”‚    โ”‚                 โ”‚
โ”‚ โ”‚             โ”‚ โ”‚    โ”‚ โ”‚generate_     โ”‚ โ”‚    โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚             โ”‚โ”€โ”ผโ”€โ”€โ”€โ”€โ”ผโ†’โ”‚memories      โ”‚โ”€โ”ผโ”€โ”€โ”€โ”€โ”ผโ†’โ”‚ Pattern     โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚    โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚    โ”‚ โ”‚ Extraction  โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
                                               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Service-Oriented Architecture (v1.5+)

KuzuMemory uses a service layer architecture with dependency injection for clean separation of concerns:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    ServiceManager                           โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚
โ”‚  โ”‚MemoryService โ”‚  โ”‚GitSyncServiceโ”‚  โ”‚DiagnosticSvc โ”‚      โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                  โ”‚                  โ”‚
         โ–ผ                  โ–ผ                  โ–ผ
    IMemoryService    IGitSyncService   IDiagnosticService
    (Protocol)        (Protocol)        (Protocol)

Key Benefits:

  • โœ… 16.63% faster than direct instantiation (Phase 5 verified)
  • โœ… Easy testing via protocol-based mocking
  • โœ… Consistent lifecycle management with context managers
  • โœ… Resource safety - automatic cleanup prevents leaks

For Developers:

๐Ÿ”ง Configuration

Create .kuzu_memory/config.yaml:

version: 1.0

storage:
  max_size_mb: 50
  auto_compact: true

recall:
  max_memories: 10
  strategies:
    - keyword
    - entity
    - temporal

patterns:
  custom_identity: "I am (.*?)(?:\\.|$)"
  custom_preference: "I always (.*?)(?:\\.|$)"

๐Ÿ“Š Performance

Operation Target Typical Verified
Memory Recall <100ms ~3ms โœ…
Memory Generation <200ms ~8ms โœ…
Database Size <500 bytes/memory ~300 bytes โœ…
RAM Usage <50MB ~25MB โœ…
Async Learning Smart wait 5s default โœ…

๐Ÿงช Testing

Quick Start

# Install development dependencies
pip install -e ".[dev]"

# Run all tests
pytest

# Run benchmarks
pytest tests/ -m benchmark

# Check coverage
pytest --cov=kuzu_memory

MCP Testing & Diagnostics

KuzuMemory includes comprehensive MCP server testing and diagnostic tools:

# Run MCP test suite (151+ tests)
pytest tests/mcp/ -v

# Run PROJECT-LEVEL diagnostics (checks project files only)
kuzu-memory doctor

# Quick health check
kuzu-memory doctor health

# MCP-specific diagnostics
kuzu-memory doctor mcp

# Test database connection
kuzu-memory doctor connection

# Performance benchmarks
pytest tests/mcp/performance/ --benchmark-only

Test Coverage:

  • Unit Tests (51+ tests) - Protocol and component validation
  • Integration Tests - Multi-step operations and workflows
  • E2E Tests - Complete user scenarios
  • Performance Tests (78 tests) - Latency, throughput, memory profiling
  • Compliance Tests (73 tests) - JSON-RPC 2.0 and MCP protocol

Diagnostic Tools (Project-Level Only):

  • Configuration validation with auto-fix
  • Connection testing with latency monitoring
  • Tool validation and execution testing
  • Continuous health monitoring
  • Performance regression detection

Note: The doctor command checks PROJECT-LEVEL configurations only:

  • โœ… Project memory database (kuzu-memory/)
  • โœ… Claude Code MCP config (.claude/config.local.json)
  • โœ… Claude Code hooks (if configured)
  • โŒ Does NOT check Claude Desktop (use kuzu-memory install claude-desktop instead)

See MCP Testing Guide and MCP Diagnostics Reference for complete documentation.

๐Ÿฉบ System Diagnostics

The kuzu-memory doctor command provides comprehensive health checks and diagnostics for your project-level KuzuMemory installation.

Quick Start

# Run full diagnostics (interactive, 29 checks)
kuzu-memory doctor

# Auto-fix detected issues (non-interactive)
kuzu-memory doctor --fix

# Quick health check
kuzu-memory doctor health

# MCP-specific diagnostics
kuzu-memory doctor mcp

# Test database connection
kuzu-memory doctor connection

# Selective testing
kuzu-memory doctor --no-server-lifecycle  # Skip server checks
kuzu-memory doctor --no-hooks            # Skip hooks checks

# JSON output for automation
kuzu-memory doctor --format json > diagnostics.json

# Save report to file
kuzu-memory doctor --output report.html --format html

New in v1.4.x:

  • --fix flag for automatic issue resolution
  • Multiple output formats (text, JSON, HTML)
  • Focused diagnostic commands (health, mcp, connection)
  • Enhanced error messages with fix suggestions

What Gets Tested

Configuration Checks (11):

  • Database directory and file
  • Project metadata files (PROJECT.md, README.md)
  • Hook scripts and configuration
  • Claude Code settings (.claude/config.local.json)
  • MCP server configuration

Hooks Diagnostics (12):

  • Hook configuration validation
  • Event name validation (UserPromptSubmit, Stop)
  • Command path verification
  • Hook execution tests (session-start, enhance, learn)
  • Environment validation (logs, cache, project root)

Server Lifecycle Checks (7):

  • Server startup validation
  • Health checks (ping, protocol, tools)
  • Graceful shutdown
  • Resource cleanup (zombie process detection)
  • Restart/recovery capability

Performance Metrics:

  • Startup time
  • Protocol latency
  • Throughput testing

Understanding Results

Severity Levels:

  • โœ… SUCCESS: Check passed
  • โ„น๏ธ INFO: Informational message (not an error)
  • โš ๏ธ WARNING: Issue found but not critical
  • โŒ ERROR: Problem that should be fixed
  • ๐Ÿ”ด CRITICAL: Serious issue requiring immediate attention

Auto-Fix Suggestions: Most failures include a "Fix:" suggestion with a specific command to resolve the issue.

Performance Benchmarks

From QA testing:

  • Full diagnostics: ~4.5 seconds (29 checks)
  • Hooks only: ~1.6 seconds (12 checks)
  • Server only: ~3.0 seconds (7 checks)
  • Core only: ~0.25 seconds (11 checks)

Troubleshooting

Common Issues:

  1. MCP server not configured (INFO)

    • Fix: kuzu-memory install add claude-code
  2. Hook executable not found (ERROR)

    • Fix: kuzu-memory install add claude-code --force
  3. Database not initialized (CRITICAL)

    • Fix: kuzu-memory init or reinstall

Exit Codes

  • 0: All checks passed (or INFO level only)
  • 1: Some checks failed

See Diagnostics Reference for detailed check documentation.

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Setup

git clone https://github.com/kuzu-memory/kuzu-memory
cd kuzu-memory
pip install -e ".[dev]"
pre-commit install

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ”— Links

๐Ÿ™ Acknowledgments

Release History

VersionChangesUrgencyDate
v1.12.11**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.12.10...v1.12.11High5/21/2026
v1.12.9## Bug Fix ### Fixed - **Remove `valid_to` expiry filter from `_recall_all_memories`** (closes #51) โ€” EPISODIC memories default to `valid_to = created_at + 30 days`. Historical benchmark sessions are all "expired" by wall-clock, so the `WHERE valid_to > now` guard returned 0 rows, silently blocking the full-corpus cosine scan since #49. Expiry is an operational retention policy, not a search-relevance filter. **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.12.8...v1.12.High4/9/2026
v1.12.8## Bug Fix ### Fixed - **Full-corpus fallback now fires when HNSW returns `[]`** (closes #50) โ€” `_recall_with_hnsw()` returns `[]` (not `None`) when the query succeeds but finds zero neighbours. The condition `hnsw_memories is None` was False for `[]`, silently blocking the full-corpus cosine scan introduced in #49. This is why v1.12.7 SSA R@10 remained 62.5% unchanged. Fix: changed to `not hnsw_memories`. **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.12.7...v1.12.8Medium4/9/2026
v1.12.7## Bug Fix ### Fixed - **Full-corpus cosine scan when HNSW unavailable** (closes #49) โ€” when `use_semantic_search=True` and HNSW index is absent, keyword pre-filter in graph strategies excluded sessions whose answer vocabulary only appears in assistant turns (not indexed). Fix: replace filtered candidates with a full no-filter corpus scan so cosine similarity ranks all sessions. Expected SSA R@10: 62.5% -> 88-91%. **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.12.6...vHigh4/8/2026
v1.12.6## Bug Fix ### Fixed - **Entity match weight reduced 0.10 -> 0.03** (closes #48) โ€” a single common-entity hit on a wrong session could override a Jaccard-leading correct session in fresh/small DBs where all memories share identical importance/confidence defaults. At 0.03 a wrong session needs 3+ entity matches to flip a typical Jaccard advantage. Expected SSA R@10 improvement: 62.5% -> ~80-84%. **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.12.5...v1.12.6Medium4/8/2026
v1.12.5## Bug Fix ### Fixed - **Speaker intent filter zero-result guard** (closes #47) โ€” when all memories use the default `source_speaker="user"` and the classifier fires `ASSISTANT_TURN`, the filter no longer wipes 100% of candidates. Falls back to the full ranked list until callers opt in to tagging assistant turns. Recovers 15 LongMemEval single-session-assistant regressions introduced in v1.12.4. **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.12.4...v1.12.5Medium4/8/2026
v1.12.4## What's Changed ### Added - `relevance_score` and `ranking_explanation` runtime-only fields on Memory model (excluded from serialization, used by recall coordinator for scoring transparency) - Pre-migration JSON backup in KuzuAdapter โ€” exports all Memory nodes to a timestamped backup file before executing any ALTER TABLE schema migrations - `memory_exporter` utility module for JSON export of Memory nodes - `kuzu-memory memory export` CLI command with `--output`, `--format`, and `--include-arcMedium4/8/2026
v1.8.2**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.8.1...v1.8.2Low3/19/2026
v1.8.1**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.8.0...v1.8.1Low3/14/2026
v1.8.0**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.7.0...v1.8.0Low3/13/2026
v1.6.41**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.40...v1.6.41Low3/9/2026
v1.6.40**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.39...v1.6.40Low2/25/2026
v1.6.38**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.37...v1.6.38Low2/19/2026
v1.6.33**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.32...v1.6.33Low1/27/2026
v1.6.32**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.31...v1.6.32Low1/24/2026
v1.6.31**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.28...v1.6.31Low1/23/2026
v1.6.26**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.25...v1.6.26Low1/20/2026
v1.6.25**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.24...v1.6.25Low1/20/2026
v1.6.24**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.23...v1.6.24Low1/20/2026
v1.6.22**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.21...v1.6.22Low1/18/2026
v1.6.21## What's Changed * fix: make UserPromptSubmit hook silent using hookSpecificOutput API (fixes #10) by @bobmatnyc in https://github.com/bobmatnyc/kuzu-memory/pull/11 **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.20...v1.6.21Low1/18/2026
v1.6.20## What's Changed * feat: improve MCP tool discoverability for MCPSearch (fixes #6) by @bobmatnyc in https://github.com/bobmatnyc/kuzu-memory/pull/8 * fix: remove dead auto-upgrade code (fixes #2) by @bobmatnyc in https://github.com/bobmatnyc/kuzu-memory/pull/9 **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.19...v1.6.20Low1/18/2026
v1.6.14**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.13...v1.6.14Low1/8/2026
v1.6.13**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.12...v1.6.13Low1/2/2026
v1.6.12**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.11...v1.6.12Low1/2/2026
v1.6.11**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.10...v1.6.11Low1/2/2026
v1.6.10## What's Changed ### Fixes - **Fixed deprecated 'optimize' command references**: Updated all tips and documentation to use `kuzu-memory doctor autotune` instead of the non-existent `kuzu-memory optimize` command ### Files Updated - `cli_utils.py`: Fixed slow query performance tip - `project_setup.py`: Updated generated README template - `package_managers.py`: Updated integration guide templates - `auggie_rules_v2.py`: Updated Auggie AI integration rules **Full Changelog**: https://github.comLow12/19/2025
v1.6.9## What's Changed ### Features - **Percentage-based pruning**: New `PercentagePruningStrategy` removes oldest X% of memories regardless of source type - **Auto-tune improvements**: Updated thresholds for large database handling: - 500k+ memories: 40% emergency pruning - 250k+ memories: 30% critical pruning - 100k+ memories: 20% normal pruning ### Fixes - Fixed aggressive strategy to work on ALL source types (not just git_sync) - Improved handling of databases with 400k+ memories ### TLow12/19/2025
v1.6.6## Changes in v1.6.6 ### Bug Fixes - Fixed Sentinel error in setup command when invoking init command - Fixed ctx.invoke() passing Sentinel values for Path-typed options ### Improvements - Auto-install Claude Code hooks and MCP during setup (no flag needed) - Auto-install git hooks when git repository detected - Changed `--with-git-hooks` to `--skip-git-hooks` (inverted logic) - Enhanced setup completion panel with hooks status **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compLow12/18/2025
v1.6.5### Bug Fixes - fix: correct ServiceManager import path in setup hooks verification - The import was incorrectly using `..services.service_manager` but ServiceManager lives in the cli module, not services - Fixes hooks verification error: 'No module named kuzu_memory.services.service_manager' ### Internal - style: reorder imports per isortLow12/17/2025
v1.6.4**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.3...v1.6.4Low12/11/2025
v1.6.3**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.2...v1.6.3Low12/11/2025
v1.6.2Patch release v1.6.2 See [CHANGELOG.md](https://github.com/bobmatnyc/kuzu-memory/blob/main/CHANGELOG.md) for details.Low12/4/2025
v1.6.1## What's Changed ### Bug Fixes - Fixed sentinel error in setup command initialization (commit 2aa10df) ### Technical Details This is a patch release that fixes a critical bug where the setup command would fail due to improper sentinel object initialization. **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.6.0...v1.6.1Low12/4/2025
v1.5.3## Type Safety Enhancements (Epic 1M-415) ### Highlights - **66.5% reduction in MyPy strict mode errors** (from 750 โ†’ 163) - Services module now 100% MyPy clean - Migrated to Pydantic v2 for modern Python support - Complete type annotations across core modules ### Changes See [CHANGELOG.md](https://github.com/bobmatnyc/kuzu-memory/blob/main/CHANGELOG.md#153---2025-11-30) for full details. ### Installation ```bash pip install kuzu-memory==1.5.3 # or pipx install kuzu-memory==1.5.3 ``` ### PyPLow11/30/2025
v1.5.2## What's Changed - **Build System**: Synchronized version management across all files (VERSION, pyproject.toml, __version__.py) - **Code Quality**: Applied automated formatting (black, isort) for consistency - **Documentation**: Added comprehensive workflow integration guide for python-project-template submodule ## Installation ```bash pip install kuzu-memory==1.5.2 ``` **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.5.1...v1.5.2 ๐Ÿค–๐Ÿ‘ฅ Generated with [Claude Code](htLow11/29/2025
v1.5.1๐Ÿšจ Emergency hotfix for v1.5.0 **Critical Fix:** - Fixed ModuleNotFoundError: No module named 'kuzu_memory.protocols' - Corrected import path in core/memory.py (protocols โ†’ dependencies) **Impact:** - v1.5.0 was completely non-functional - v1.5.1 restores full functionality - All CLI commands now work correctly **Users on v1.5.0:** Please upgrade immediately to v1.5.1 ```bash pip install --upgrade kuzu-memory # or pipx upgrade kuzu-memory ```Low11/25/2025
v1.5.0๐Ÿšจ **DO NOT USE v1.5.0 - THIS RELEASE IS NON-FUNCTIONAL** ## Critical Issue This release contains a fatal bug that makes the entire package non-functional: - **Error**: `ModuleNotFoundError: No module named 'kuzu_memory.protocols'` - **Impact**: All CLI commands fail immediately - **Status**: Package installs but cannot be used ## Use v1.5.1 Instead v1.5.1 is the emergency hotfix that resolves this issue: ```bash pip install --upgrade kuzu-memory # or pip install kuzu-memory==1.5.1 ``` ## WhaLow11/25/2025
v1.4.51**Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.4.50...v1.4.51Low11/25/2025
v1.4.48## Release v1.4.48 ### What's Changed #### Bug Fixes - Enhanced MCP auto-repair to handle `python -m` pattern for better compatibility with different Python environments #### Documentation - Comprehensive documentation cleanup and improvements across the project - Better clarity for installation and usage instructions #### Maintenance - Applied linting formatting for improved code consistency - Removed deprecated GitHub CI/CD test workflows ### Installation ```bash pip install kuzu-memory=Low11/16/2025
v1.4.46## What's New ### Added - **MCP Repair Command**: New `kuzu-memory repair` command to automatically detect and fix broken MCP configurations - Detects multiple types of MCP configuration issues: - Missing package in `mcpServers` section - Broken symlinks in package paths - Missing MCP packages entirely - Provides automatic fixes with clear before/after diffs - Includes validation and backup functionality ### Fixed - Improved installer UX by removing interactive prompts - EnLow11/7/2025
v1.4.43## v1.4.43 - Automatic MCP Installation Fixes ### Features - **Universal Auto-Repair**: Automatically fixes broken MCP args on every CLI command - Auto-detects and repairs legacy `["mcp", "serve"]` syntax to `["mcp"]` - Zero user interaction required - all fixes happen automatically - System-wide detection and repair on install - **MCP Migration**: Migrates broken project-specific configs to local .mcp.json files - Migrates 23+ broken MCP installations from unsupported ~/.claude.json loLow11/5/2025
v1.4.42## What's New in v1.4.42 **Hook Configuration Verification & Auto-Repair** Automatic validation and repair of Claude Code hooks configuration during installation. ### Features Added - Validates hooks configuration in settings.local.json - Auto-repairs 6 types of configuration issues - Creates automatic backups before repairs - Zero-config for users - auto-repair runs during installation - 8 new test cases covering validation and repair ### Issues Fixed - Invalid hook event names - Missing orLow11/5/2025
v1.4.41## v1.4.41 - Auto-fix extension to all installers ### Fixed - Extended MCP args auto-fix functionality to Cursor, VSCode, Windsurf, and Auggie installers - Improved git sync merge commit detection and commit ordering - Resolved NLP classifier fixture and git sync timing issues - Fixed diagnostics test assertions and skipped unimplemented CLI commands - Updated package version in MCP server initialization ### Changed - Applied code formatting for v1.4.41 release This patch release extends thLow11/4/2025
v1.4.40## What's New ### Features - Auto-detection and global MCP config repair functionality - Enhanced MCP server configuration management ### Bug Fixes - Updated MCPServer imports after class rename - Improved configuration file handling ### Improvements - Applied consistent code formatting (Black and isort) - Enhanced installation reliability **Full Changelog**: https://github.com/bobmatnyc/kuzu-memory/compare/v1.4.39...v1.4.40 --- ๐Ÿ“ฆ **Installation**: `pip install --upgrade kuzu-memory` ๐Ÿ”— Low11/4/2025
v1.4.39Automatic MCP configuration repair functionality - Auto-fix broken ['mcp', 'serve'] args during installation - Add standalone fix script for existing installations - Comprehensive test coverage and documentation See CHANGELOG.md for full details.Low11/3/2025
v1.4.31See CHANGELOG.md for detailsLow10/27/2025
v1.4.27## Changes ### Bug Fixes - **diagnostics**: Fixed `kuzu-memory doctor` to check the correct Claude Code configuration file (`.claude/settings.local.json` instead of `.claude/config.local.json`) - Updated tests to match the correct configuration path ### Testing - All 20 diagnostic unit tests pass - Verified `kuzu-memory doctor` shows 24/24 checks in both test projects ### Links - PyPI: https://pypi.org/project/kuzu-memory/1.4.27/ - Changelog: See CHANGELOG.md for full details --- **InstallaLow10/27/2025
v1.4.26## Bug Fixes ### Legacy Config Cleanup Fixed automatic cleanup of legacy `.claude/config.local.json` during Claude hooks installation. **Changes:** - Installer now automatically removes old `config.local.json` - Creates backup before removal - Merges all MCP configuration into `settings.local.json` - Prevents duplicate MCP configuration - User-friendly cleanup message **Impact:** - Users upgrading from earlier versions will have legacy config automatically cleaned up - Prevents confusion froLow10/27/2025
v1.4.25## MCP Configuration Fix ### Fixed - Fixed MCP server configuration to be added to `.claude/settings.local.json` instead of `.claude/config.local.json` - MCP tools now correctly available in Claude Code after installation - Configuration properly merged with existing MCP servers ### Changed - Updated CLI documentation to reference correct settings file location - Simplified configuration handling (-28 LOC) ### Installation ```bash pipx upgrade kuzu-memory kuzu-memory install claude-code ``` Low10/27/2025
v1.4.24## Fixes - Fixed hooks CLI commands to use proper CLI entry points instead of script paths - Removed Unicode emoji characters causing linting issues - Updated installer to use `kuzu-memory hooks enhance/learn` commands - Fixed database path handling in hooks commands ## Changes ### CLI - Removed deprecation warning from `hooks_group()` - Fixed `enhance` command to use `attach_memories()` API - Fixed `learn` command to use `remember()` API with metadata - Replaced ambiguous Unicode info emoji Low10/27/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

AI-Skills๐Ÿค– Enhance AI capabilities with modular Skills that provide expert knowledge, workflows, and integrations for any project.main@2026-06-07
telegram-mcp๐Ÿค– Manage multiple Telegram accounts effortlessly with AI-driven tools for bulk messaging, scheduling, and more in one easy-to-use platform.main@2026-06-07
Enterprise-Multi-AI-Agent-Systems-๐Ÿค– Build and deploy scalable Multi-AI Agent systems with LangGraph and Groq LLMs to enhance intelligence across enterprise applications.main@2026-06-07
AIDomesticCoreAIJ๐Ÿ› ๏ธ Build a robust AI Kernel for stable, auditable, and sovereign AI systems, ensuring secure execution and compliance across various domains.main@2026-06-07
argus-mcp๐Ÿ” Enhance code quality with Argus MCP, an AI-driven code review server using a Zero-Trust model for safe and efficient development.main@2026-06-07

More in MCP Servers

claude-plugins-officialOfficial, Anthropic-managed directory of high quality Claude Code Plugins.
langchain4jLangChain4j is an open-source Java library that simplifies the integration of LLMs into Java applications through a unified API, providing access to popular LLMs and vector databases. It makes impleme
hyperframesWrite HTML. Render video. Built for agents.
claude-code-guideClaude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks go from beginner to power user!