Lore
Integrates with the Hermes agent runtime as a MemoryProvider plugin, exposing Lore tools, per-prompt recall, and Python-native local Skill work copies.
Lore
Recall Workbench | Memory Browser | Dream Diary |
|
|
|
What Lore is
Lore is a self-hosted memory and Skill service for coding agents and other LLM runtimes. It gives agents a durable graph of memories, a fixed startup baseline, per-prompt recall, guarded write tools, and versioned Skills that become local work copies only when an agent opens them; server-managed package files are read-only while the skill directory itself stays writable, so local outputs, caches, and artifacts live directly inside the copy.
Most memory layers stop at retrieval. Lore covers the full lifecycle:
Boot — load stable identity, workflow, user, and runtime memories at session start
Recall — inject a small
<recall>candidate set before the agent answersRead before trust — open a node before relying on a recalled candidate
URI-first graph — durable addresses such as
core://agent,preferences://user,project://my_projectDisclosure — each memory states when it should surface
Dream — scheduled maintenance with quality checks and rollback history
Skills — on servers that advertise Skills, session start lists the skills the agent may use, and
lore_skill_getdownloads or refreshes the server-managed package files of a local work copy on demand (managed files are read-only; the skill directory stays writable for local outputs)
Related MCP server: Engram
Quick Start
Prefer managed hosting? Use Loremem SaaS and connect agents with a token — no local Docker required. Self-host below if you want everything on your machine.
1. Install
Requires Node.js 20+.
npx @loremem/cliChinese installer output:
npx @loremem/cli --lang zhOne command:
connects to an existing Lore server, or deploys one locally with Docker Compose (
postgres+redis+web) when you choose toconnects the agent runtimes detected on this machine
writes
~/.lore/config.json
On a TTY, npx @loremem/cli always opens the interactive installer; any flags you pass are preselected and can still be changed. Add -y to run straight from flags: unset options use defaults (channels default to detected runtimes), and the server must come from --base-url, --docker, or a saved config. Re-run anytime to update.
Common flags:
Flag | Description |
| Pre-release channel ( |
| Dev channel ( |
| Install only some runtimes: |
| Use an existing Lore server and skip local Docker |
| Deploy the Lore server on this machine with Docker |
| API token for the server |
| Non-interactive: run straight from flags |
| Explicitly allow a token over non-loopback HTTP for this run only |
| Configure agents only |
| Reinstall even when the version is unchanged |
| Installer language |
Examples:
# Pre-release
npx @loremem/cli install --pre
# External server
# Warning: plain HTTP can expose or alter the API token in transit. Prefer HTTPS.
# This explicit approval applies only to this run and is never saved.
npx @loremem/cli install \
--base-url http://192.168.1.100:18901 --api-token my-token \
--allow-insecure-http
# Claude Code + Pi only
npx @loremem/cli install --channels claudecode,pi
# Update later
npx @loremem/cli update
npx @loremem/cli status2. Finish first-run setup
Open:
http://127.0.0.1:18901/setupComplete:
Embedding — OpenAI-compatible endpoint used for semantic recall
View LLM — model used for view refinement and Dream
Global boot memories —
core://agent,core://soul,preferences://userChannel agent memories — runtime-specific nodes under
core://agent/*
Skip saves the default value for an empty boot node and continues.
3. Success signal
You are ready when:
http://127.0.0.1:18901/setupcompletesthe Web UI opens at
http://127.0.0.1:18901restarting a connected agent injects Lore boot context and later shows
<recall>candidates
Then open /settings only if you want to tune recall weights, Dream schedule, backups, or write policy.
Supported runtimes
Runtime | Integration | What you get |
Pi |
| Extension tools, startup boot, per-prompt recall, and local Skill work copies (managed files read-only, dir writable). |
Claude Code |
| Marketplace plugin, remote Memory MCP, local Skills MCP, SessionStart boot, and recall hooks |
Codex |
| Local marketplace plugin, remote Memory MCP, local Skills MCP, and boot/recall hooks |
OpenClaw |
| Runtime plugin with boot, recall, Lore tools, and native local Skill work copies |
Hermes |
| MemoryProvider plugin with Lore tools, recall, and Python-native local Skill work copies |
OpenCode |
| Native plugin with exact |
ZCode |
| Native marketplace plugin with SessionStart boot and UserPromptSubmit recall hooks (no MCP) |
Generic MCP |
| Streamable HTTP endpoint for clients that can attach remote tools |
After install, restart each runtime. Useful notes:
Claude Code keeps its own auto-memory. To make Lore the only memory system, set
CLAUDE_CODE_DISABLE_AUTO_MEMORY=1or"autoMemoryEnabled": falsein~/.claude/settings.json.Codex may ask you to trust Lore hooks under
/hooks. If/pluginsstill shows Lore as installable, install it there; the script has already configured MCP and user-level hooks.OpenCode reads
~/.lore/config.json. The installer skips OpenCode cleanly when theopencodeCLI is absent. See OpenCode notes for compatibility details.ZCode uses native process hooks only. From a source checkout:
zcode plugins marketplace add /path/to/lore/zcode-plugin && zcode plugins install lore@lore && zcode plugins enable lore@lore. Createcore://agent/zcodein Lore setup if that node is still empty.
Generic MCP URL shape:
http://your-host:18901/api/mcp?client_type=mcpDaily use
Once connected, the Memory flow is:
load boot memories at session start
receive
<recall>candidates before promptsopen relevant nodes with
lore_get_nodecreate or update durable memories when something should survive the session
use the Web UI for graph editing, recall inspection, Dream, backup, and settings
The Skill flow is separate and only exists on servers that advertise Skills (capabilities.skills=true). The open-source server has none, so plugins expose no Skills tools or context there.
session start lists the skills the agent may use (
<available_skills>with name, description, andskill_id); skills whoseSKILL.mdsetsdisable-model-invocation: trueare hiddenthe agent decides when a skill is relevant and calls
lore_skill_get(skill_id); a user can also invoke any skill explicitly by typing$skill-namein a promptthe runtime downloads the complete package into a local work copy at
${LORE_HOME:-~/.lore}/skills/<project-id>/<skill-name>/when missing, or updates the server-managed package files when the server version differsthe tool returns the full
SKILL.mdcontent and absoluteskill_dir; server-managed package files are read-only (0444 on POSIX) and the skill directory stays writable (0755) so agents can create local outputs, caches, and artifacts directly inside the same copyextra local files never trigger tamper and survive getSkill calls and version upgrades; a version mismatch updates only the server-managed package files
Useful pages:
Path | Purpose |
| Browse and edit the memory graph |
| Inspect retrieval stages and scoring |
| Run structural maintenance |
| Configure runtime behavior |
Manual setup
Use this path when you want to run the server yourself.
Docker Compose
services:
postgres:
image: fffattiger/pgvector-zhparser:pg16
restart: unless-stopped
environment:
TZ: ${TZ:-Asia/Shanghai}
POSTGRES_DB: ${POSTGRES_DB:-lore}
POSTGRES_USER: ${POSTGRES_USER:-lore}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me}
ports:
- "${POSTGRES_PORT:-55439}:5432"
volumes:
- ${POSTGRES_DATA_DIR:-./data/postgres}:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-lore} -d ${POSTGRES_DB:-lore}"]
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes"]
volumes:
- ${REDIS_DATA_DIR:-./data/redis}:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 10
web:
image: fffattiger/lore:latest
restart: unless-stopped
pull_policy: always
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
TZ: ${TZ:-Asia/Shanghai}
DATABASE_URL: postgresql://${POSTGRES_USER:-lore}:${POSTGRES_PASSWORD:-change-me}@postgres:5432/${POSTGRES_DB:-lore}
REDIS_URL: redis://redis:6379/0
API_TOKEN: ${API_TOKEN:-}
ports:
- "${WEB_PORT:-18901}:18901"
volumes:
- ${SNAPSHOT_DATA_DIR:-./data/snapshots}:/app/snapshotsdocker compose up -d
curl http://127.0.0.1:18901/api/healthThen point agents at the server:
npx @loremem/cli install \
--base-url http://127.0.0.1:18901 --skip-dockerSource build
git clone https://github.com/FFatTiger/lore.git
cd lore
docker compose up -d --buildDevelopment
App code and package.json live under web/.
cd web
cp .env.local.example .env.local
npm install
npm run devRequirements:
Node.js 20+
PostgreSQL with the
vectorextensionoptional Redis; if Redis is unset or unreachable, Lore falls back to a local LRU cache
Useful commands from web/:
npm run typecheck
npm testSee CONTRIBUTING.md for package layout and contribution flow.
Uninstall
npx @loremem/cli uninstall# Specific runtimes
npx @loremem/cli uninstall --channels claudecode,pi
# Remove config and Docker data too
npx @loremem/cli uninstall --purge -yscripts/install.sh, scripts/install.zh.sh, and scripts/uninstall.sh remain for compatibility but are frozen and no longer receive new features. Prefer npx @loremem/cli.
# legacy only
curl -fsSL https://raw.githubusercontent.com/FFatTiger/lore/main/scripts/install.sh | bashOpenCode notes
The installer places lore-memory.js at ~/.config/opencode/plugins/lore-memory.js and reads the server URL/token from ~/.lore/config.json.
Boot is injected through experimental.chat.system.transform. Prompt recall is injected as a current-turn part through chat.message. If the experimental system hook or Lore is unavailable, the adapter fails open instead of blocking the conversation.
The standard install does not configure OpenCode MCP. The native plugin removes duplicate Lore MCP entries at runtime. When an existing user-level oh-my-openagent.json[c] or legacy oh-my-opencode.json[c] is safely parseable, the installer also sets claude_code.plugins_override["lore@lore"] = false to stop duplicate Claude Lore lifecycle hooks. It does not modify Claude Code files, warns and skips unsafe compatibility config, and restores the previous value on uninstall.
Generic /api/mcp remains a manual fallback. Set LORE_OPENCODE_ALLOW_MCP=1 only when you intentionally want that path.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Long-term memory for AI agents: semantic facts, episodic events, and procedural workflows
Long-term memory for AI agents: durable records, observable retrieval, governed context assembly.
Evidence-grounded, graph-connected, correctable memory for agents.
Biological memory for AI agents. Pattern learning, decay, clustering, 8-drive behavior.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA knowledge-graph-based memory system for AI agents that enables persistent information storage between conversations.6-
- MIT
- AlicenseNot gradedqualityCmaintenanceMulti-agent memory intelligence with expertise tracking and conflict detection33 npm1MIT
- AlicenseNot gradedqualityCmaintenanceLong-term memory system for AI agents that accumulates domain expertise through mentorship, automatically recalls relevant knowledge, and supports memory decay and growth with anti-fabrication.151 npm6MIT


