API Overview

Mnemosyne v2.5.0 exposes four interfaces: Python SDK, Hermes plugin tools, MCP server, and a legacy REST API.

Interface Comparison

InterfaceBest ForLatencySetup
Python SDKDirect integration, scriptsLowestpip install
Hermes PluginAgent frameworksLowPlugin config
MCP ServerClaude Desktop, Cursor, MCP clientsLowmnemosyne mcp
REST API (Legacy)Remote services, microservicesMediumpython -m mnemosyne

Python SDK

The primary interface. v2.5.0 supports multi-agent identity, tiered degradation, veracity signals, and cross-provider importers.

from mnemosyne import Mnemosyne

mem = Mnemosyne(session_id="agent-42", author_id="alice", author_type="human")

# Store with veracity confidence
mem.remember("PostgreSQL migration completed.", veracity="stated")

# Multi-agent channel recall
results = mem.recall("migration status", channel_id="team-db")

# Tiered degradation runs automatically
mem.sleep()  # consolidates + degrades old memories

Hermes Plugin

First-class Hermes integration with 15 tools: mnemosyne_remember, mnemosyne_recall, mnemosyne_stats, mnemosyne_sleep, mnemosyne_invalidate, mnemosyne_triple_add, mnemosyne_triple_query, and more.

# hermes.yaml
plugins:
  - name: mnemosyne-memory
    source: pip
    config:
      data_dir: ~/.hermes/mnemosyne/data
      auto_context: true
      context_injection:
        enabled: true
        max_memories: 5
        min_relevance: 0.7

MCP Server

Connect from Claude Desktop, Cursor, or any MCP client:

# Add to claude_desktop_config.json
{
  "mcpServers": {
    "mnemosyne": {
      "command": "mnemosyne",
      "args": ["mcp"]
    }
  }
}

For SSE transport (web clients):

mnemosyne mcp --transport sse --port 8080

REST API (Legacy)

The FastAPI server embedded in mnemosyne/cli.py. Port 8090. Endpoints: POST /store, GET /recall, GET /stats, DELETE /forget/{id}, PUT /update/{id}, POST /consolidate.

python -m mnemosyne --port 8090
curl -X POST http://localhost:8090/store \
  -H "Content-Type: application/json" \
  -d '{"content": "User prefers dark mode."}'
SDK Version Compatibility

Python SDK, Hermes plugin, MCP server, and REST API share the same core version. Use matching versions across all components.