
Lore
io.github.agentkitai由 GitHub 账号 agentkitai 发布v1.4.2更新于 Oct 24, 2026
Cross-agent memory over MCP: hybrid recall, knowledge graph, private/shared visibility, redaction.
概览
Lore 是跨代理记忆层,让助手跨会话存储、检索并关联知识,并提供知识图谱与双时态历史。
- 可以做什么
- 存储、搜索、列出、投票和删除记忆,支持类型、层级与标签,并提供统计和基于会话上下文的主动建议。浏览知识图谱:遍历实体与关系、抽取并列出事实、检测冲突,查看主题与相关内容。不删除地查询历史:取代记忆与事实,查询某日期时的规范内容或真实情况,追溯来源与更正链。以 JSON 或 Markdown 导出和备份数据,创建与列出快照,并按风险评分审阅待处理的图谱连接。
- 适用场景
- 适合希望助手在多次对话或不同编程代理之间延续上下文,并保留可审计、可更正的事实记录而非扁平笔记的场景。也适合需要区分共享与私有记忆、进行历史查询的团队。
- 运行要求
- 通过 uvx 从 lore-sdk 包以本地进程运行,需要已运行的 Lore 服务器,后端为带 pgvector 的 PostgreSQL(Docker Compose 或 pip 安装)。服务器通过类似 的地址访问,可选 API 密钥。可选的 LLM 增强与矛盾检测使用 OpenAI 密钥或 Claude CLI。
安装
在 SourceWeft 中
- 打开 控制台中的 Lore,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Lore — Universal AI Memory Layer
[PyPI] [npm] [Container] [Python 3.10+] [License: MIT] [MCP Compatible] [Tests]
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.
Features
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.
Quick Start
Docker Compose (recommended)
Starts Postgres with pgvector and the Lore server on http://localhost:8765.
pip
Verify it works
Add Lore as an MCP server
One line — no install — drops Lore into any MCP client (Claude Code, Cursor, VS Code, Codex, Claude Desktop):
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)
This installs a UserPromptSubmit hook that auto-injects relevant memories into every prompt.
Option B: MCP tools
Add to ~/.claude/settings.json:
OpenClaw
Installs a message:preprocessed hook for auto-retrieval. Memories appear in context before every agent response.
Cursor
Installs a beforeSubmitPrompt hook. Also add MCP config to .cursorrules:
Codex CLI
Installs a beforePlan hook. Add MCP config:
Any HTTP client
Auto-retrieval works with any system that can make an HTTP call before sending a prompt:
MCP Tools Reference
CLI Reference
API Reference
Key endpoints
Configuration
Architecture
Performance
Contributing
License
MIT
来源:README.md,提交 f2fd553
工具
0版本历史
1- v1.4.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分