Lore
OfficialLore — Universal AI Memory Layer
Your AI agents remember everything. Automatically.
Lore is a cross-agent memory system that stores, connects, and retrieves knowledge across any AI agent — without code changes. Install a hook, and relevant memories appear in every prompt. No agent cooperation needed.
User: "What API rate limits should I use?"
── Lore hook fires (20ms) ──────────────────────────────
🧠 Relevant memories from Lore:
- [0.82] Stripe API returns 429 after 100 req/min — use exponential backoff
- [0.71] Our internal API rate limit is 500 req/min per API key
────────────────────────────────────────────────────────
Agent sees memories + prompt → responds with full contextFeatures
Universal Memory
remember · recall · forget · list_memories · stats
Store and retrieve memories across any AI agent via MCP tools, REST API, or Python/TypeScript SDK. Semantic search with tier-based TTL, temporal decay, and automatic PII redaction.
Knowledge Graph
graph_query · entity_map · related · extract_facts · list_facts · conflicts
Entities and relationships auto-extracted from memories. Hop-by-hop graph traversal surfaces connected knowledge that pure vector search misses. Atomic fact extraction with automatic conflict detection.
Bi-Temporal Facts & Supersession
supersede · list_at_time · facts_at_time · timeline · provenance · supersession_chain · consolidate_memories
History without deletion. Memories and facts are corrected by superseding them, never deleting — every change appends to an auditable trail. Lore tracks two independent time axes (bi-temporal): valid-time (when a fact was true in the world) and system-time (when Lore learned it), so you can ask "what was canonical — or true about X — as of date Y?". list_at_time / facts_at_time answer as-of queries, timeline walks chronologically adjacent events, and provenance / supersession_chain expose the full correction lineage for a memory or fact.
Graph Visualization
Web UI at /ui/
Interactive D3 force-directed graph of your knowledge base. Entity detail panels, topic clusters, search, and filtering. Runs in the browser — no install required.
Session Continuity
Auto-snapshot + auto-inject — zero agent cooperation
The Session Accumulator automatically captures conversation context and injects relevant session history into every prompt. Deterministic (no LLM needed). Works via hooks — the agent never knows Lore exists.
Recent Activity
recent_activity
Session-aware summary of what happened recently across all projects. Gives agents continuity between conversations without manual context-passing.
Topic Notes
topics · topic_detail
Auto-generated concept hubs that cluster related memories, entities, and facts around recurring themes. See everything Lore knows about a topic in one view.
Export & Snapshot
export · snapshot · snapshot_list · save_snapshot
Full data export in JSON and Markdown formats. Obsidian-compatible output for browsing your knowledge graph in a PKM tool. Snapshots for backup and migration.
Approval UX with Risk Scoring
review_digest · review_connection · lore review list --sort risk
Review discovered knowledge graph connections with computed risk scores. Batch approve/reject with notes, full audit trail of decisions. Sort by risk, confidence, or age.
Guided Bootstrap
lore bootstrap
Single command that validates Python version, Postgres, pgvector, Docker, runs migrations, and verifies server health. Use --fix to auto-remediate missing dependencies.
Multi-Agent Setup
lore setup claude-code · lore setup openclaw · lore setup cursor · lore setup codex
One-command hook installation for all major AI coding agents. Auto-retrieval injected into every prompt — no code changes needed. Includes --validate, --test-connection, and --dry-run flags.
SLO Dashboard + Alerting
lore slo create · lore slo status · GET /v1/slo/status
Define SLO targets for retrieval latency (p50/p95/p99) and hit rate. Background checker evaluates every 60s and fires webhook or email alerts on breach. Time-series API for charting.
Adaptive Retrieval Profiles
lore profiles list · GET /v1/profiles · ?profile=coding
Named retrieval profiles stored in Postgres. Presets for coding (recency-biased), incident response (graph-heavy), and research (long-term). Select per-request or set as API key default.
Policy-Based Retention
lore policy create · lore restore-drill · GET /v1/policies/compliance
Declarative lifecycle policies with per-tier retention windows, cron-based snapshot schedules, and restore drills with timing metrics. Compliance dashboard across all policies.
Multi-Tenant Workspaces
lore workspace create · lore workspace switch · lore audit
Workspace isolation within orgs. Scoped API keys, member management with RBAC roles, and a full audit log of every action (memory.create, key.revoke, etc.).
Plugin SDK
lore plugin create · lore plugin list · lore plugin reload
Extend Lore with plugins discovered via Python entry_points. Five lifecycle hooks (on_remember, on_recall, on_enrich, on_extract, on_score), hot-reload, scaffold CLI, and test harness.
Proactive Recommendations
suggest · lore suggest --context "..." · GET /v1/recommendations
Surface relevant memories before explicit queries. Multi-signal scoring (context similarity, entity overlap, temporal patterns, access patterns) with human-readable explanations and a feedback loop.
Retrieval Analytics
GET /v1/analytics/retrieval · Prometheus metrics
Track hit rate, score distribution, memory utilization, and latency. Know whether memories are actually helping your agents.
Related MCP server: Mnemo MCP
Quick Start
Docker Compose (recommended)
git clone https://github.com/agentkitai/lore.git
cd lore
docker compose up -dStarts Postgres with pgvector and the Lore server on http://localhost:8765.
pip
pip install "lore-sdk[server,solo]"
lore serve # starts on port 8765Verify it works
curl http://localhost:8765/v1/memoriesAdd Lore as an MCP server
One line — no install — drops Lore into any MCP client (Claude Code, Cursor, VS Code, Codex, Claude Desktop):
// Claude Code: .mcp.json · Claude Desktop: claude_desktop_config.json
{
"mcpServers": {
"lore": { "command": "uvx", "args": ["--from", "lore-sdk[mcp]", "lore-memory"] }
}
}Already installed (pip install lore-sdk[mcp])? Use "command": "lore-memory" (or lore mcp). Per-client guides are in Multi-Agent Setup below; lore integrate --platform <client> writes the config for you.
Multi-Agent Setup
Claude Code
Option A: Auto-retrieval hook (recommended)
lore setup claude-codeThis installs a UserPromptSubmit hook that auto-injects relevant memories into every prompt.
Option B: MCP tools
Add to ~/.claude/settings.json:
{
"mcpServers": {
"lore": {
"command": "lore",
"args": ["mcp"],
"env": {
"LORE_API_URL": "http://localhost:8765",
"LORE_API_KEY": "your-api-key"
}
}
}
}OpenClaw
lore setup openclawInstalls a message:preprocessed hook for auto-retrieval. Memories appear in context before every agent response.
Cursor
lore setup cursorInstalls a beforeSubmitPrompt hook. Also add MCP config to .cursorrules:
{
"mcpServers": {
"lore": {
"command": "lore",
"args": ["mcp"],
"env": {
"LORE_API_URL": "http://localhost:8765",
"LORE_API_KEY": "your-api-key"
}
}
}
}Codex CLI
lore setup codexInstalls a beforePlan hook. Add MCP config:
{
"mcpServers": {
"lore": {
"command": "lore",
"args": ["mcp"],
"env": {
"LORE_API_URL": "http://localhost:8765",
"LORE_API_KEY": "your-api-key"
}
}
}
}Any HTTP client
Auto-retrieval works with any system that can make an HTTP call before sending a prompt:
curl -s "http://localhost:8765/v1/retrieve?query=your+prompt&limit=5&min_score=0.3&format=markdown" \
-H "Authorization: Bearer $LORE_API_KEY"MCP Tools Reference
Tool | Description |
| Store a memory with type, tier, tags, metadata |
| Semantic search with temporal/graph-enhanced retrieval |
| Delete a memory by ID |
| List memories with filtering |
| Memory statistics (total, by type/tier) |
| Boost memory ranking |
| Lower memory ranking |
| Hop-by-hop knowledge graph traversal |
| List entities (optional D3 format) |
| Find related memories/entities |
| Extract (subject, predicate, object) triples |
| List active facts |
| List detected fact conflicts |
| Intent, domain, emotion classification |
| LLM-powered metadata extraction |
| Merge duplicate/related memories |
| Accept content from external sources |
| Sync GitHub repo data |
| Verify memory freshness against git |
| Export memories formatted for LLM injection |
| Extract memories from conversation messages |
| Recent memory activity summary |
| List auto-detected recurring topics |
| Deep dive on a topic (memories, entities, timeline) |
| Export all data to JSON |
| Create data backup |
| List available snapshots |
| Save session snapshot |
| Get pending connections for review |
| Approve/reject a pending connection |
| Memories from same date across years |
| Proactive memory recommendations based on session context |
| Record a structured observation from a session |
| Progressive-disclosure compact index (id, title, score) |
| Fetch full payloads for one or more memory IDs |
| Chronologically adjacent events around an anchor memory |
| Share a private memory with the team (private→shared) |
| Unshare a memory, making it private again |
| Mark a memory as superseded by a newer one |
| List memories that were canonical at a given time |
| Create a merged memory and supersede all sources |
| Full lineage for a memory (sources + supersession chain) |
| Supersession audit chain for a memory |
| Facts about an entity that were valid at a given time |
| Supersede a fact with a newer one (never deletes) |
| Correction trail for a fact |
CLI Reference
# Memory operations
lore remember "API rate limit is 100 req/min" --tags api,limits
lore recall "rate limits" --limit 5
lore forget <memory-id>
lore memories --tier long_term
lore stats
# Knowledge graph
lore graph "authentication" --depth 2
lore entities --limit 50
lore facts "extract facts from this text"
lore conflicts
# Session & context
lore recent --hours 24
lore on-this-day
# Export & backup
lore export --format json > backup.json
lore import backup.json
lore snapshot-save --title "before refactor"
# Server & setup
lore bootstrap # validate prerequisites
lore serve # start HTTP server
lore mcp # start MCP server
lore ui # start web UI
lore setup claude-code # install hooks
lore setup claude-code --validate --test-connection
# SLO management
lore slo create --name "P99 < 50ms" --metric p99_latency --threshold 50 --operator lt
lore slo status
lore slo alerts
# Retrieval profiles
lore profiles list
lore profiles create --name fast-coding --semantic-weight 1.0 --recency-bias 7
# Retention policies
lore policy create --name prod --snapshot-schedule "0 2 * * *" --max-snapshots 30
lore policy compliance
lore restore-drill --latest
# Workspaces
lore workspace create dev-team
lore workspace switch dev-team
lore audit --since 24h
# Plugins
lore plugin create my-tagger
lore plugin list
lore plugin reload my-tagger
# Recommendations
lore suggest --context "setting up docker"
# Review (with risk scoring)
lore review list --sort risk
lore review approve <id> --note "Verified"
lore review batch approve --ids id1,id2
# API keys
lore keys create --name "my-agent"
lore keys list
lore keys revoke <key-id>API Reference
Key endpoints
# Memory CRUD
GET /v1/retrieve # Auto-retrieval (for hooks)
POST /v1/memories # Create memory
POST /v1/memories/search # Semantic search
GET /v1/memories # List memories
GET /v1/memories/{id} # Get memory
PATCH /v1/memories/{id} # Update memory
DELETE /v1/memories/{id} # Delete memory
# Knowledge graph
GET /v1/graph # Knowledge graph
GET /v1/graph/topics # Topic list
GET /v1/graph/topics/{name} # Topic detail
GET /v1/graph/entity/{id} # Entity detail
# Bi-temporal & supersession (history without deletion)
POST /v1/memories/{id}/supersede # Mark superseded (by=null un-supersedes)
GET /v1/memories/at_time # Memories canonical as of ?at=<ts>
GET /v1/memories/{id}/supersession-chain # Memory correction audit trail
GET /v1/memories/{id}/provenance # Full lineage (sources + chain)
POST /v1/memories/consolidate # Merge N memories + supersede sources
GET /v1/facts/at_time # Facts about an entity valid at ?at=<ts>
POST /v1/facts/{id}/supersede # Supersede-not-delete a fact edge
GET /v1/facts/{id}/supersession-chain # Fact correction trail
GET /v1/timeline # Chronologically adjacent events
# Ingestion
POST /v1/conversations # Extract memories from conversation
POST /v1/ingest # Ingest external content
# Review + risk scoring
GET /v1/review # Pending reviews (sortable by risk)
POST /v1/review/{id} # Approve/reject with notes
POST /v1/review/bulk # Batch approve/reject
GET /v1/review/history # Decision audit trail
# Export & snapshots
POST /v1/export # Export all data
POST /v1/import # Import data
POST /v1/export/snapshots # Create snapshot
GET /v1/export/snapshots # List snapshots
# SLO dashboard
GET /v1/slo # List SLO definitions
POST /v1/slo # Create SLO
GET /v1/slo/status # Current pass/fail per SLO
GET /v1/slo/alerts # Alert history
GET /v1/slo/timeseries # Time-series for charts
# Retrieval profiles
GET /v1/profiles # List profiles
POST /v1/profiles # Create profile
GET /v1/retrieve?profile=coding # Retrieve with profile
# Retention policies
GET /v1/policies # List policies
POST /v1/policies # Create policy
GET /v1/policies/compliance # Compliance summary
POST /v1/policies/{id}/drill # Execute restore drill
# Workspaces + RBAC
POST /v1/workspaces # Create workspace
GET /v1/workspaces # List workspaces
POST /v1/workspaces/{id}/members # Add member
GET /v1/audit # Query audit log
# Plugins
GET /v1/plugins # List plugins
POST /v1/plugins/{name}/enable # Enable plugin
POST /v1/plugins/{name}/reload # Hot-reload plugin
# Recommendations
POST /v1/recommendations # Get proactive suggestions
POST /v1/recommendations/{id}/feedback # Thumbs up/down
PATCH /v1/recommendations/config # Adjust aggressiveness
# Setup validation
POST /v1/setup/validate # Test connectivity
# Analytics & monitoring
GET /v1/recent # Recent activity
GET /v1/analytics/retrieval # Retrieval analytics
GET /metrics # Prometheus metrics
# API keys
POST /v1/keys # Create API key
GET /v1/keys # List API keys
DELETE /v1/keys/{id} # Revoke API keyConfiguration
Variable | Default | Description |
| — | PostgreSQL connection string |
|
| Server port |
| — | API key for authentication |
|
| Remote server URL |
| — | Default project scope |
|
| Characters before auto-snapshot |
|
| Enable LLM enrichment pipeline |
|
| Model for enrichment |
| — | LLM provider override |
| — | LLM API key |
| — | LLM model override |
| — | LLM base URL |
|
| Default graph traversal depth |
|
| Entity confidence threshold |
|
| Entity extraction from new memories. On by default — entities come from local spaCy NER (no LLM, no |
|
| Use the |
|
| Max concurrent |
|
| Per-extraction subprocess timeout, seconds (LLM path only) |
| auto | Write-time contradiction detection + soft-supersession. Auto-on when |
|
| Soft-supersede the older contradicted memory (last-write-wins). |
|
| Confidence bar to supersede (higher than the flag bar, |
|
| Auto-capture (Claude Code hooks) master switch; |
|
| Auto-capture mid-session batch size. |
|
| Auto-capture: extract once per completed agent turn ( |
|
| HTTP timeout (seconds) |
| — | Auto-enables enrichment when set |
|
| SLO evaluation interval (seconds) |
| — | Default webhook URL for SLO alerts |
| — | SMTP server for email alerts |
|
| SMTP port |
| — | SMTP username |
| — | Email sender address |
|
| Auth mode: |
| — | Default workspace slug |
Architecture
┌──────────────────────────────────────────────────────────────┐
│ Agent Runtimes │
│ Claude Code · OpenClaw · Cursor · Codex · Any HTTP client │
└──────────┬──────────────────────────────────┬────────────────┘
│ hooks (auto-retrieval) │ MCP tools
▼ ▼
┌──────────────────────────────────────────────────────────────┐
│ Lore Server (:8765) │
│ │
│ REST API · MCP Server · Web UI (/ui/) · Plugin SDK │
│ │
│ ┌─────────────┐ ┌──────────────┐ ┌─────────────────────┐ │
│ │ Embedder │ │ Knowledge │ │ LLM Pipeline │ │
│ │ (ONNX) │ │ Graph │ │ (optional) │ │
│ │ pgvector │ │ + Review │ │ classify · enrich │ │
│ │ + Profiles │ │ + Risk │ │ extract · recommend │ │
│ └─────────────┘ └──────────────┘ └─────────────────────┘ │
│ │
│ ┌─────────────┐ ┌──────────────┐ ┌─────────────────────┐ │
│ │ SLO │ │ Retention │ │ Workspaces │ │
│ │ Checker │ │ Scheduler │ │ + RBAC │ │
│ │ + Alerting │ │ + Drills │ │ + Audit Log │ │
│ └─────────────┘ └──────────────┘ └─────────────────────┘ │
└──────────────────────────┬───────────────────────────────────┘
│
┌────────────▼────────────┐
│ PostgreSQL + pgvector │
│ memories · entities │
│ relationships · facts │
│ slo · profiles · audit │
│ workspaces · policies │
└─────────────────────────┘Performance
Operation | Latency |
| ~20ms |
| < 100ms |
| < 50ms |
| < 200ms |
| < 500ms |
Embedding (500 words) | < 200ms |
Contributing
git clone https://github.com/agentkitai/lore.git
cd lore
pip install -e ".[dev,server,mcp,enrichment]"
docker compose up -d db # Postgres + pgvector
pytestLicense
MIT
Available Tools
46 toolsadd_conversationA
Accept raw conversation messages and automatically extract memories. USE THIS WHEN: you want to dump your recent conversation context so Lore can identify and store useful knowledge (facts, decisions, preferences, lessons). Unlike 'remember' which requires you to decide what to save, this tool accepts raw conversation history and uses LLM processing to extract what's worth keeping. Requires enrichment to be enabled (LORE_ENRICHMENT_ENABLED=true).
Inputs: messages (required), project, user_id, session_id. Returns: result
as_promptA
Export memories formatted for LLM context injection. USE THIS WHEN: you need to inject relevant memories directly into a prompt or system message. Returns a formatted block of memories optimized for your LLM's preferred format. Supports XML (Claude), ChatML (OpenAI), markdown, and raw text.
Inputs: query (required), tags, type, limit, +4 more. Returns: result
check_freshnessA
Check if stored memories are still fresh against current git state. USE THIS WHEN: you want to verify that code-pattern memories are still relevant before acting on them. Compares memories with file_path metadata against the git commit history to detect staleness.
Inputs: repo_path (required), project. Returns: result
classifyA
Classify a piece of text by intent, domain, and emotion. Returns structured classification without storing anything. USE THIS WHEN: you want to understand the nature of a piece of text before storing it, or to analyze conversation patterns.
Inputs: text (required). Returns: result
conflictsA
List recent fact conflicts detected during memory ingestion. Shows what facts were superseded, merged, or flagged as contradictions. USE THIS WHEN: you want to review knowledge changes, audit what facts were updated, or resolve flagged contradictions.
Inputs: limit, resolution. Returns: result
consolidateA
Trigger memory consolidation. Merges near-duplicate memories and summarizes related memory clusters into concise long-term memories. USE THIS WHEN: memory bloat is high, or you want to compress episodic memories into semantic knowledge. Defaults to dry-run (preview only).
Inputs: dry_run, project, strategy. Returns: result
consolidate_memoriesA
Atomic consolidation: create a new memory from N source memories and supersede every source in one operation. USE THIS WHEN: merging near-duplicates or promoting an observation cluster to a lesson. Provenance guarantee: every source_ids entry has its supersession_chain pointing at the returned id before this tool returns — even if the dream subagent crashes mid-loop. PREFER THIS over remember(...) + forget(...) for any merge / promotion path; forget destroys the audit trail.
Inputs: content (required), source_ids (required), tags, type, +4 more. Returns: result
demote_memoryA
Unshare a memory, making it private to you again (SHARED → PRIVATE). USE THIS WHEN: a memory was shared with the team but should no longer be visible to others. Pass the memory ID from recall output.
Inputs: memory_id (required). Returns: result
downvote_memoryA
Downvote a memory that was wrong or unhelpful. USE THIS WHEN: you recalled a memory but it was outdated, incorrect, or misleading. This lowers the memory's ranking so others don't waste time on bad advice. Pass the memory ID from recall output.
Inputs: memory_id (required). Returns: result
enrichA
Enrich memories with LLM-extracted metadata (topics, sentiment, entities, categories). USE THIS WHEN: you want to add structured metadata to existing memories for better filtering. Requires LORE_ENRICHMENT_ENABLED=true and a configured LLM provider (LORE_LLM_PROVIDER + API key). Enrichment runs automatically on remember() when enabled; use this tool to enrich older memories.
Inputs: all, force, project, memory_id. Returns: result
entity_mapA
List entities in the knowledge graph, optionally filtered by type. USE THIS WHEN: you want to see what entities Lore knows about, find entity names for graph queries, or get an overview of the knowledge graph. Set format='json' for D3-compatible graph visualization output.
Inputs: limit, format, entity_type. Returns: result
exportA
Export all memories and knowledge graph to a JSON file for backup or migration. USE THIS WHEN: you want to create a portable backup before risky operations, migrate data to another machine, or audit stored knowledge. Supports filtering by project, type, tier, and date.
Inputs: tier, type, since, format, +3 more. Returns: result
extract_factsA
Extract structured facts from text without storing them. Returns atomic (subject, predicate, object) triples with confidence scores. USE THIS WHEN: you need to understand what facts are contained in a piece of text, or to preview what facts would be extracted before remembering.
Inputs: text (required). Returns: result
facts_at_timeA
List the facts (subject–predicate–object relationships) about an entity that were valid at a given point in time. USE THIS WHEN: you need 'what was true about X as of date Y?' for audit/compliance, debugging stale context, or historical questions (e.g. 'what database did ServiceX use on 2026-05-01?'). Excludes facts that had already been superseded as of that timestamp. Optionally filter by predicate.
Inputs: at (required), entity (required), limit, direction, +1 more. Returns: result
fact_supersession_chainA
Show the correction trail for a fact (relationship). USE THIS WHEN: auditing 'how did this fact change over time?' or tracing which newer fact replaced an old one and why. Returns the supersession events oldest first.
Inputs: relationship_id (required). Returns: result
forgetA
Delete a memory by its ID. USE THIS WHEN: a memory is outdated, incorrect, or no longer relevant. Pass the memory ID from recall output.
Inputs: memory_id (required). Returns: result
get_memoriesA
Phase 6D progressive disclosure: fetch full payloads for one or more memory IDs (typically returned by search()). USE THIS AFTER search() identifies rows worth drilling into. Caps at 10 IDs per call. Returns a JSON-formatted block with full content, tags, meta, and timestamps. Errors (missing or unauthorized IDs) are surfaced in the errors array; the call still succeeds as long as at least one ID resolves.
Inputs: ids (required). Returns: result
github_syncB
Sync GitHub repository data (PRs, issues, commits, releases) into Lore as memories. USE THIS WHEN: you want to ingest tribal knowledge from a GitHub repo so it's searchable. Requires the gh CLI to be installed and authenticated.
Inputs: repo (required), since, types, project. Returns: result
graph_queryB
Query the knowledge graph to find entities connected to a given entity. USE THIS WHEN: you want to understand relationships between concepts, find dependencies, or explore how entities are connected. Returns connected entities and relationship types within the specified depth.
Inputs: entity (required), depth, direction, rel_types, +1 more. Returns: result
ingestA
Ingest content from external sources with source tracking. USE THIS WHEN: you want to import content from Slack, Telegram, Git, or any external source with full provenance tracking (who said it, where, when). Content goes through normalization and deduplication before storage. Supports source-specific formatting cleanup (Slack mrkdwn, Telegram HTML, etc).
Inputs: content (required), tags, type, user, +3 more. Returns: result
list_at_timeA
List memories that were canonical at a given point in time. USE THIS WHEN: you want to know 'what did we know about X as of date Y?' — useful for audit, debugging stale-context issues, or answering historical questions. Filter by entity name and/or type. Excludes memories that were already superseded as of the given timestamp.
Inputs: at (required), type, limit, entity. Returns: result
list_factsB
List active (non-invalidated) facts from the knowledge base. USE THIS WHEN: you want to see what structured facts Lore knows about a subject, or to review all known facts.
Inputs: limit, subject. Returns: result
list_memoriesA
List stored memories, optionally filtered by type, tier, or project. USE THIS WHEN: you want to browse all stored memories, audit what's in the knowledge base, or find memories by type/tier without semantic search. For semantic search, use recall instead.
Inputs: tier, type, limit, project. Returns: result
on_this_dayA
Retrieve memories from this month+day across all years. USE THIS WHEN: you want to reflect on what happened on a specific date in past years, find anniversaries, or review historical context. Returns memories grouped by year. Defaults to today's date. Supports date window for fuzzy matching.
Inputs: day, tier, limit, month, +1 more. Returns: result
promote_memoryA
Share a private memory with the whole team (PRIVATE → SHARED). USE THIS WHEN: a memory you captured is useful to teammates and you want everyone in the org to be able to recall it. By default captures are private to you; this opts a specific one into the shared pool. Pass the memory ID from recall output.
Inputs: memory_id (required). Returns: result
provenanceA
Show the full lineage for a memory: which source memories were consolidated into it, plus its own supersession chain. USE THIS WHEN: a recall result looks suspicious and you want to drill back to the unconsolidated source claims, or when auditing how a lesson was synthesized. Returns sources (events where memory_id appears as superseded_by) and chain (events for memory_id itself).
Inputs: memory_id (required). Returns: result
recallA
Search for relevant memories from past experience. USE THIS WHEN: you're about to solve a problem, debug an error, or make a design decision — especially if you suspect someone has hit this before. Search with a natural-language description of your problem or question. GOOD queries: 'CORS errors with FastAPI', 'Docker build fails on M1', 'rate limiting strategy for API'. BAD queries: 'help', 'error', 'fix this'. Be specific. Supports filtering by tier (working/short/long), type, tags, entity, topic, intent, domain, and emotion. Supports temporal filtering: year, month, day, days_ago, hours_ago, window (today/last_hour/last_day/last_week/last_month/last_year), before, after, date_from, date_to (ISO 8601). When knowledge graph is enabled, set graph_depth (e.g. via LORE_GRAPH_DEPTH) to surface memories connected via entity relationships. Pass scope='all' to also include memories from other projects (rare; default scopes to current project + global pool).
Inputs: query (required), day, tags, tier, +25 more. Returns: result
recent_activityA
Get a summary of recent memory activity across projects. CALL THIS AT THE START OF EVERY SESSION to maintain continuity with prior work. Returns the last N hours of memories grouped by project, regardless of semantic relevance to your current task. This catches recent decisions, changes, and context that semantic search would miss. Works without LLM (structured listing) — enhanced with LLM (concise summary of key points).
Inputs: hours, format, project, max_memories. Returns: result
rememberA
Save a memory — any knowledge worth preserving. USE THIS WHEN: you just solved a tricky bug, found a non-obvious fix, discovered a workaround, learned a user preference, or encountered something that future agents (or your future self) would benefit from knowing. DO NOT save trivial things — only save memories that would save someone real time or prevent a real mistake. The content should be a clear, self-contained piece of knowledge. Optionally set tier: 'working' (auto-expires in 1h, for scratch context), 'short' (auto-expires in 7d, for session learnings), or 'long' (default, no expiry, for lasting knowledge). Optionally set scope='global' to make this memory visible across every project (use for universal lessons, language gotchas, framework patterns, tool quirks); leave unset to default by type (lesson/preference/pattern/convention default to 'global', everything else stays scoped to the current project). When enrichment is enabled, automatically extracts topics, entities, sentiment, classifies intent/domain/emotion, and extracts structured facts.
Inputs: content (required), ttl, tags, tier, +6 more. Returns: result
remember_observationA
Record a structured observation extracted from a session. USE THIS WHEN: capturing a multi-faceted event (a debugging session, a decision with trade-offs, a workflow pattern) where you have a short title, a few atomic facts, and a narrative. PREFER THIS over remember(...) for typical auto-extracted observations from session transcripts. Use the simpler remember(content, type=...) only for polished single-fact memories you're confident about. Stored with type='observation' so future retrieval can score polished memories higher than raw observations. Pass scope='global' for universal lessons; default 'project' keeps the observation visible only inside its repo.
Inputs: facts (required), title (required), narrative (required), tags, +2 more. Returns: result
review_connectionA
Approve or reject a pending knowledge graph connection. USE THIS AFTER: getting a review_digest and the user has decided which connections to keep or discard. Rejected patterns are tracked so the same connection won't be re-suggested.
Inputs: action (required), relationship_id (required), reason. Returns: result
review_digestA
Get pending knowledge graph connections for review. USE THIS WHEN: you want to present discovered connections to the user for approval or rejection. Returns pending relationships grouped by type with entity names and source memory context. The user can then decide which connections to keep (approve) and which to discard (reject). Rejected patterns are remembered so they won't be re-suggested.
Inputs: limit. Returns: result
save_snapshotC
Save a session snapshot to preserve important context before it is lost.
Inputs: content (required), tags, title, session_id. Returns: result
searchA
Phase 6D progressive disclosure: return a compact index of relevant memories — id, title, score, signals only. USE THIS WHEN: you want to survey what Lore knows about a topic before drilling in. Cheaper than recall (~50 tokens/result vs ~300). Pair with get_memories(ids=[...]) to fetch full content for the rows worth reading. GOOD queries: 'CORS errors with FastAPI', 'Docker build fails on M1'. Avoid 'help', 'error', 'fix this'. Pass scope='all' to also include memories from other projects (rare; default scopes to current project + global pool).
Inputs: query (required), limit, scope, min_score. Returns: result
snapshotA
Create a quick snapshot backup of all Lore data. USE THIS BEFORE: running consolidation, bulk imports, upgrades, or any operation that modifies many memories at once. Snapshots are stored at ~/.lore/snapshots/ and can be restored.
Inputs: no named parameters. Returns: result
snapshot_listA
List available snapshots for restore. USE THIS WHEN: you want to see what backups are available before restoring or cleaning up old snapshots.
Inputs: no named parameters. Returns: result
statsA
Return memory statistics: total count, counts by type and tier, oldest and newest memory timestamps. USE THIS WHEN: you want an overview of the knowledge base, check how many memories exist, or see the distribution across types and tiers.
Inputs: project. Returns: result
suggestA
Get proactive memory suggestions based on current session context. USE THIS WHEN: you want to surface potentially relevant memories without a specific query. Useful at session start or before major decisions. Returns memories ranked by multi-signal relevance.
Inputs: context, max_results, session_entities. Returns: result
supersedeA
Mark a memory as superseded by a newer one. USE THIS WHEN: a fact has changed (e.g. 'we used Postgres but switched to SQLite', 'I no longer prefer X'). PREFER THIS over forget — supersede preserves history for audit while ensuring the old memory drops in retrieval score so stale facts don't pollute future recalls. Pass superseded_by=None to explicitly un-supersede.
Inputs: memory_id (required), reason, superseded_by. Returns: result
supersede_factA
Supersede a fact (relationship) with a newer one — supersede-NOT-delete. USE THIS WHEN: a fact was corrected (e.g. 'ServiceX uses Postgres' is now 'ServiceX uses MySQL'). Pass the old fact's relationship_id and the newer fact's id as superseded_by. The old fact stops appearing in current fact queries but stays queryable as-of past dates, and the correction is recorded in the audit chain. Get relationship_ids from facts_at_time.
Inputs: superseded_by (required), relationship_id (required), reason. Returns: result
supersession_chainA
Show the supersession audit chain for a memory. USE THIS WHEN: investigating why a memory drops in retrieval score, auditing 'what changed' for a given fact, or tracing the lineage of a piece of knowledge across corrections. Returns the events oldest first.
Inputs: memory_id (required). Returns: result
timelineA
Phase 6G middle drill-down: return chronologically adjacent events (±limit entries, hard cap ±max_hours) around an anchor memory ID, scoped to the same project. Each entry: id, created_at, type, title, narrative_1l, same_session. USE THIS AFTER search() identifies a promising hit, BEFORE get_memories(), to establish causality without paying for full content. ~60 tokens/entry. PARAMS: anchor_id (required); limit (1-50, default 10); direction ('before'|'after'|'both', default 'both'); max_hours (>0, ≤72, default 2.0).
Inputs: anchor_id (required), limit, direction, max_hours. Returns: result
topic_detailB
Get everything Lore knows about a topic — linked memories, related entities, timeline.
Inputs: name (required), format, max_memories. Returns: result
topicsC
List auto-detected topics — recurring concepts across multiple memories.
Inputs: limit, project, entity_type, min_mentions. Returns: result
upvote_memoryA
Upvote a memory that was helpful. USE THIS WHEN: you recalled a memory and it actually helped solve your problem. This boosts the memory's ranking in future searches. Pass the memory ID from recall output.
Inputs: memory_id (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 46 tools
While individual tools have detailed descriptions, the large number of memory-related tools (remember, remember_observation, add_conversation, ingest) and retrieval tools (recall, search, get_memories, related, graph_query) creates potential confusion for an agent. However, the descriptions attempt to differentiate use cases, and there are no truly overlapping tools.
Most tool names follow a verb_noun pattern using snake_case (e.g., list_memories, upvote_memory). However, there are exceptions like 'as_prompt' (starts with preposition), 'facts_at_time' (noun phrase), and 'on_this_day' (prepositional phrase). The overall pattern is fairly consistent but has several deviations.
With 46 tools, the server is quite large. While each tool serves a distinct purpose in the memory management lifecycle, the count exceeds what is typically manageable and may overwhelm agents. A more focused set could reduce cognitive load without losing functionality.
The tool surface covers the entire memory lifecycle: ingestion (multiple methods), retrieval (semantic, categorical, temporal, graph), maintenance (consolidation, supersession, forgetting, voting, sharing), auditing (provenance, history, conflicts), and export/import. It is exceptionally comprehensive for a knowledge management system.
Maintenance
Related MCP Connectors
Shared memory for AI agents, as a graph in your own Postgres. Writes never call an LLM.
A second brain for your AI agent. Shared memory for your team's AI agents, plus public and private knowledge bases — works with ChatGPT, Claude, Cursor and any MCP client.
Persistent memory for AI agents. EU-hosted, privacy-first, hybrid recall, contradiction detection.
One memory for your AI agents and your team: Claude, ChatGPT, Cursor and your agents share it.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenancePersistent shared memory for AI agents. Hybrid search (pgvector + tsvector), knowledge graph, cognitive scoring, and 16-language temporal extraction. 97.2% Recall@10 on LongMemEval with one PostgreSQL query. Works across Claude Code, Cursor, Codex, OpenClaw, and any MCP client.179 PyPI116MIT

Mnemo MCPofficial
AlicenseNot gradedqualityDmaintenancePersistent AI memory server with hybrid search and embedded sync. Enables AI agents to store, retrieve, and manage information across sessions with temporal knowledge graph support.MIT- AlicenseNot gradedqualityDmaintenanceSelf-hosted, governed long-term memory and knowledge-graph server for AI agents with access control, hybrid retrieval, and typed graph linking.AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceSelf-hosted long-term memory for AI agents on your own Postgres. Facts are dated, versioned and superseded rather than silently overwritten, every recall ships with an inspectable trace, and agents can correct wrong memories from inside the conversation.2Apache 2.0