Smart Memory for LLMs

A graph-based memory system with intelligent retrieval. Solve the LLM memory problem with knowledge graphs, hybrid retrieval, and semantic search.

PyPI Python License Stars
example.py
from memograph import MemoryKernel

kernel = MemoryKernel("~/my-vault")
stats = kernel.ingest()

kernel.remember(
    title="Meeting Note",
    content="Key decisions",
    tags=["design"]
)

context = kernel.context_window(
    query="retrieval methods?",
    depth=2, top_k=8
)

✨ Powerful Features

Everything you need for intelligent memory management

Smart Auto-Organization Engine

Automatically extract topics, people, action items, decisions, risks, ideas, and timeline events using LLMs

Graph-Based Memory

Navigate knowledge using bidirectional wikilinks and backlinks

Hybrid Retrieval

Combines keyword matching, graph traversal, and vector embeddings

Markdown-Native

Human-readable markdown files with YAML frontmatter

Memory Types

Episodic, semantic, procedural, and fact-based memories

MCP Server Integration

10 powerful tools for AI assistants like Cline and Claude Desktop

Smart Indexing

Efficient caching - only re-indexes changed files

CLI & Python API

Command line tool or Python integration with interactive chat

Multiple LLM Providers

Works with Ollama, Claude, OpenAI, and more

Context Compression

Intelligent token budgeting with salience scoring

🚀 Quick Start

1

Install

# Install with all features
pip install memograph[all]

# Or install specific providers
pip install memograph[openai]
pip install memograph[anthropic]
pip install memograph[ollama]
2

Initialize

from memograph import MemoryKernel
kernel = MemoryKernel("~/vault")
kernel.ingest()
3

Use It

# Start interactive chat
memograph --vault ~/vault ask --chat

# Or use MCP with Cline/Claude
# Add to ~/.cline/mcp_settings.json

🔌 MCP Server Integration

Model Context Protocol support for AI assistants

MemoGraph includes a full-featured MCP server for seamless integration with AI assistants like Cline and Claude Desktop.

10 Available Tools

Search

  • search_vault
  • query_with_context

Create

  • create_memory
  • import_document

Read

  • list_memories
  • get_memory

Update

  • update_memory NEW

Delete

  • delete_memory NEW

Analytics

  • get_vault_stats

Discovery

  • list_available_tools NEW

Quick Setup

For Cline

{
  "mcp": {
    "servers": {
      "memograph": {
        "command": "python",
        "args": ["-m", "memograph.mcp.run_server"],
        "env": {
          "MEMOGRAPH_VAULT": "/path/to/your/vault"
        }
      }
    }
  }
}

Add to ~/.cline/mcp_settings.json

For Claude Desktop

{
  "mcpServers": {
    "memograph": {
      "command": "python",
      "args": [
        "-m", "memograph.mcp.run_server",
        "--vault", "/path/to/your/vault"
      ]
    }
  }
}

Add to claude_desktop_config.json

Usage Examples

"Search my vault for memories about Python"
"Create a memory titled 'Project Ideas' with content '...'"
"Update memory abc-123 to have salience 0.9"
"Delete memory xyz-456"
"What tools are available?"
"Get vault statistics"

📚 Documentation

👥 Community & Support

Join our growing community and get help from other users