sill-ensoul
OfficialThis MCP server provides persistent, file-based OKF memory bundles for multiple agents, with tools to manage agents and read/write/search their knowledge.
List all existing agents/ensoulers and their knowledge bundles.
Create a new agent bundle with persona, index, and log files.
Delete an agent's entire bundle irreversibly.
Wake/open an agent to see its persona preview, index, and concepts.
Full-text search within a single agent's wiki, with a result limit.
Read a specific concept by
concept_id.Create or update a concept with required OKF
type, plus title, description, tags, body, and custom frontmatter.Append dated update entries to an agent's log.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sill-ensoul wake up alter-ego"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Sill-Ensoul
English | 简体中文
Long-term memory that follows your agents across CLIs, projects, and sessions.
Give your CLI agents experience that doesn't vanish when you switch projects, switch tools, or start a new session — it doesn't touch your workflow, just adds memory to the agents you already use.
ensoul /ɪnˈsoʊl/ — verb. To give a CLI agent memory that carries across sessions, so it's more than a blank slate each time. An agent that's been ensouled is called an ensouler.
What it does
Cross-CLI: one memory, shared across Claude Code / Codex / zcode / Cursor / OpenCode. Use Claude today, switch to Codex tomorrow — your agents' memory follows.
Cross-project: memory lives in a global KB, not bound to any project repo. The bug your algo agent hit in project A is recalled in project B.
Cross-session: every new conversation, the agent
wiki_searches its own past experience first and starts with memory, not from scratch.Agent isolation: spin up multiple ensoulers (algorithm engineer, backend, testing, UI...) — each has its own memory bundle, no cross-contamination. Wake one, work with its experience.
Memory is files: plain markdown (following OKF) — git-able, diff-able, editable in Obsidian. Vector stores are just an index; md is always source of truth.
Zero external deps: SQLite FTS5 full-text search (CJK char segmentation + BM25) — no OpenAI key, no Docker, no cloud service. Model-vendor-agnostic: inference always stays in your CLI.
Proactive distillation: when an agent hits a non-trivial pitfall or makes a reusable decision, it distills and writes it directly, then tells you what it wrote (concept_id + one-line gist). You don't have to remember to write things down, and you keep after-the-fact veto (ask it to delete/edit).
Related MCP server: mcp-chest-memory
Quick Start
After cloning, do one of these in your CLI (Claude Code / Codex / zcode / OpenCode, etc.):
# Option A: let the CLI's AI set it up (recommended — you send one message)
say: set up sill-ensoul from <repo>/SETUP.md
# Option B: more direct — paste SETUP.md contents into the chat, hit enterThe CLI's AI follows SETUP.md: installs the package → builds the KB → creates the default agent alter-ego → registers the MCP server → installs the shell. Restart the CLI, then say:
wake up alter-ego # the Chinese phrase 唤醒 alter-ego / 唤醒分身 works tooalter-ego is your digital twin (default agent, empty memory). Accumulate experience with it first; once a domain (algorithm/backend/ ...) has enough, tell the CLI "create an agent called algo-engineer" for a specialized role.
Recommended shape = remote MCP (many people / many machines sharing one memory): run one
sill-ensoul-httpserver; every CLI is just a client — no repo clone, no Python package, no local KB, just a URL and a token. The Quick Start above is the single-machine shape (offline / only yourself, zero service, zero token) — read it when you actually want that.Onboarding a friend / teammate for the first time: the owner runs
sill-ensoul-admin user createon the server to mint an onboarding card, then hands them the card plusdeploy/cli-setup/cli-remote.md— they paste one message into their CLI and they are connected (no repo access needed).
Choose your deployment
# | Your situation | Files to read (in order) | Notes |
1 | Join an existing server (most common: friend / teammate / your own multi-machine setup) | No repo clone, no local install — you only need URL + token. Ask the owner for the | |
2 | Self-host a server: deploy on a server, then connect from your machine | (1) | Deploy the server first (including |
3 | Single machine (local, stdio) | Offline / only yourself; this is what the Quick Start above does | |
4 | Local → remote: you already ran local stdio, now switch to an existing server | The old registration is backed up then replaced; the local KB goes idle (or migrate it per deployment.md) | |
Upgrade | Already installed (local or remote) | The latter is only for adding the | |
Multica | Binding a platform agent (requires MCP already configured) | Platform side only; it does not install MCP |
Not sure? The one question that settles it: do you have a server URL + token? Yes → scenario 1 (or 4); no, and it is just you → scenario 3; you want to give a teammate a shared memory → scenario 2.
pip install -e <repo> # or, once published: pip install sill-ensoul
sill-ensoul-init # builds the global KB + default agent alter-ego
# then have the CLI's AI read SETUP.md to finish MCP registration + shell installRequires Python >= 3.10.
Global KB, not inside any project repo (private memory never enters git):
Platform | Default path |
Windows |
|
macOS |
|
Linux |
|
Set ENSOUL_KB=<path> to put it anywhere (e.g. a Dropbox / iCloud folder for multi-device sync). Open that folder in Obsidian — each agent is a subfolder, the .md files inside are the memory.
After install, sill-ensoul-init provides a few maintenance commands:
Command | Purpose |
| Initialize the global KB + default |
| Print the CLI-agnostic shell for manual append to a CLI instruction file. |
| Auto-update sill-ensoul shell segments in supported CLI instruction files (Claude Code, Zcode, Codex, OpenCode, pi). |
| Remote-only: create / list / revoke / reset tenant users and write a ready-to-paste onboarding card (URL + token + per-CLI section). |
| Rebuild the SQLite FTS index for every agent from the |
| Print the installed package version (for upgrade checks). |
Supported CLI instruction files are detected automatically; only the ones that exist and already contain sill-ensoul markers are updated.
Upgrade
Upgrading an existing install is two parts, three commands — and your KB is never touched (upgrades update the package code and re-sync the shell rules only; your agents' memory stays put):
sill-ensoul-init --version # what's installed now
pip install -U "git+https://github.com/sillogic/sill-ensoul.git" # or: git pull && pip install -e <repo>
sill-ensoul-init --sync-shell # refresh shell rules in CLI instruction filesRestart your CLI. The full machine-readable intent for the CLI's AI (route
detection, verification, what-not-to-do) is UPGRADE.md — say
"upgrade sill-ensoul from <repo>/UPGRADE.md" and the CLI handles it.
How it works
Claude Code / Codex / zcode / Cursor ← inference runs in each CLI's model vendor, not locked
| load persona + wiki slice (thin shell: AGENTS.md / CLAUDE.md)
sill-ensoul-mcp (MCP server, 8 tools, read/write/search)
| read/write
knowledge/agents/<id>/ ← one OKF bundle per ensouler (markdown files)
knowledge/agents/<id>/.fts/index.db ← local SQLite FTS5 index, derived from the .md filesThree-layer separation (design decisions D1/D2, see docs/ROADMAP.md):
Engine (
ensoul/) — CLI-agnostic, handles data/tools only, no inference.server.pyis a thin MCP shell, pass-through only.Shell (
AGENTS.md/CLAUDE.md) — one per CLI, defines "when to wake/search/distill", references the shared WORKFLOW.md.Memory (
knowledge/agents/<id>/) — OKF markdown files, git-able, diff-able, human-readable.
About the .fts/index.db file: Each agent bundle has a local SQLite FTS5 index that caches metadata and accelerates search. It is derived data — the .md files are always the source of truth. You can delete .fts/ at any time; it will be rebuilt on demand. SQLite is part of Python's standard library, so there is no extra install and no separate database process.
Core loop: wake (load persona + knowledge map) → recall (search relevant experience) → cite (reference real memory with concept_id) → distill (new experience, written directly with a heads-up). Memory persists across projects and sessions.
8 Tools
Tool | Purpose |
| List all ensoulers |
| Create an ensouler (dir + persona + index + log template) |
| Delete an ensouler (irreversible, confirm first) |
| Wake/switch ensouler (persona + knowledge map) |
| Full-text search an ensouler's experience (FTS5 + BM25, with CJK segmentation) |
| Read a concept's details |
| Distill new experience (type required) |
| Log a change |
Multi-ensouler collaboration needs no dedicated tools: any agent can use
wiki_write_concept(agent_id=...)to operate on another agent's memory — orchestrator reads/writes directly (see docs/ROADMAP.md D6).
Remote deployment (HTTP server)
Run the same 8 tools as a Streamable HTTP MCP server on any machine (VPS / home server / tailnet) so multiple machines share one knowledge base. Every request is gated by a static Bearer token (SIL-7 / D11) — single-tenant today, with an identity→KB-root seam for future multi-tenancy.
pip install "sill-ensoul[http] @ git+https://github.com/sillogic/sill-ensoul.git" # not on PyPI yet
# or clone then: pip install ".[http]" (quote the bracket — `.[http]` unquoted is not valid bash)
ENSOUL_MCP_TOKEN=$(openssl rand -hex 32) # or: python -c "import secrets;print(secrets.token_hex(32))"
ENSOUL_MCP_TOKEN=... sill-ensoul-http # default bind 0.0.0.0:8930Dependency pin: the package requires
mcp>=1.2,<2— mcp 2.x renamedFastMCPtoMCPServerand removed themcp.server.fastmcpmodule, which breaks bothsill-ensoul-mcpandsill-ensoul-httpat startup. The upper bound is baked intopyproject.toml, so a fresh install resolves mcp 1.x automatically (migration to mcp 2.x is tracked in D11).
Fail-closed: the server refuses to start without
ENSOUL_MCP_TOKEN— an unauthenticated remote server is exactly what this is for.Optional:
ENSOUL_MCP_HOST/ENSOUL_MCP_PORTenv overrides (or--host/--port). The KB root is stillENSOUL_KB/ the platform default.
Environment variables — a ready template lives in .env.example (token / KB root / host / port). For systemd, copy it to a root-only file and load it with EnvironmentFile; a ready-to-edit unit is at deploy/sill-ensoul-http.service:
sudo mkdir -p /etc/sill-ensoul
sudo cp .env.example /etc/sill-ensoul/env && sudo chmod 600 /etc/sill-ensoul/env
sudo vi /etc/sill-ensoul/env # fill in ENSOUL_MCP_TOKEN / ENSOUL_KB
sudo cp deploy/sill-ensoul-http.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now sill-ensoul-http
systemctl status sill-ensoul-http # an env change needs a restart to take effectMigrate the KB — memory is plain files under the local KB root (knowledge/); copy the whole tree to the server's ENSOUL_KB (exclude per-agent .fts/ caches — they rebuild automatically):
# local (Windows PowerShell, in %LOCALAPPDATA%\ensoul):
tar -cf knowledge.tar --exclude=.fts knowledge
scp knowledge.tar root@<server>:/opt/sill-ensoul/
# server:
cd /opt/sill-ensoul && tar -xf knowledge.tar && ls knowledge/agents/If multiple machines each have a KB, pick ONE as baseline first — do not blindly overwrite; merge the stragglers' unique content by hand.
Point a CLI's MCP config at it (streamable-http clients send the header on every request):
{ "type": "streamable-http", "url": "http://<server>:8930/mcp",
"headers": { "Authorization": "Bearer <token>",
"X-Machine-Id": "<your-hostname>" } }or via a stdio↔HTTP bridge (works for any CLI):
npx mcp-remote http://<server>:8930/mcp --allow-http --transport http-only --header "Authorization: Bearer <token>" --header "X-Machine-Id: <your-hostname>".
--allow-http is required because mcp-remote refuses plain-HTTP URLs by default; --transport http-only avoids mcp-remote's SSE-fallback probe (its default http-first strategy), which conflicts with FastMCP's streamable-HTTP session handling and fails every call with 400 Bad Request: Missing session ID. The X-Machine-Id header is the machine identity (SIL-9): the server stamps it into every concept's frontmatter machine: field, so readers of a shared remote KB can tell "which machine wrote this" from "which machine am I on".
Security notes: the token is the auth boundary — never commit it; prefer a private network (Tailscale / VPN / firewall) for transport security; the stdio server (
sill-ensoul-mcp) stays local-only and needs no token. On a public network, front the server with TLS (Caddy/nginx reverse proxy) so the token is not sent in clear text.
Full runbook: step-by-step deployment, restart / upgrade / KB-migration / troubleshooting lives in
docs/deployment.md. Client install (remote): to point a CLI at the remote server without hand-editing configs, paste the single prompt filedeploy/cli-setup/cli-remote.mdinto that CLI — it identifies which CLI it is, applies the matching section, and registers the remote MCP endpoint itself (seedocs/deployment.md§4). Not sure which file fits you? See Choose your deployment above — pick your scenario (local / self-hosted / join existing server / switch local→remote), it tells you the file order.
Tests
pip install -e .
python -m tests.run_testsFour release tests, all green = core loop works (each builds its own temp KB, runs straight after clone):
Test | Verifies |
| FTS5 search + persona exclusion (11 regressions) |
| MCP shell layer (8 tools, real stdio) |
| HTTP transport + Bearer auth (fail-closed, 401 gate, real uvicorn e2e) |
| Cross-project memory retention (end-to-end) |
Status
✅ Core loop works: wake → recall → cite → distill → cross-project retention
✅ Installable:
pip install+sill-ensoul-initself-boots CLI setup✅ Cross-CLI verified: zcode + Claude Code both adapted
✅ Design final: auto-distill + notify-after (not pre-write confirmation, not full-auto). Multi-agent collaboration via orchestrator model (D6).
See docs/ROADMAP.md
Documentation map (which file, for whom, covering what)
File | Reader | Covers |
Humans | Product overview + Quick Start (two shapes: remote as recommended, single-machine as optional) + deployment decision table | |
The CLI's AI | Local first install (install package → build KB → register stdio → shell → verify) | |
The CLI's AI | Upgrading an existing install (package + shell; never touches the KB) | |
Humans (server admin) | Server-side remote deployment runbook (git install / env / systemd / KB migration / ops / troubleshooting) | |
Humans (server admin) | systemd unit template (copy to | |
Humans | Index of the client-setup prompt files (4 files + scenario routing) | |
The CLI's AI | Remote client setup (first connect / local→remote switch) | |
The CLI's AI | Adding the | |
The CLI's AI | Multica platform agent binding (requires MCP already configured) | |
Humans | The CLI-agnostic workflow (wake / recall / distill / skill dispatch) — authoritative source | |
The CLI's AI (via the shell) | The shell rules injected into each CLI's instruction file (includes the machine banner) | |
Humans | Progress + design decisions D1-D13 + historical pitfalls H1-H21 | |
Humans | Design rationale: why OKF / MCP, and how it compares with mem0 / letta / graphiti | |
Humans | Multica platform integration guide (design-facing; complements the | |
Humans | Release notes per version (0.3.0 onward) |
License
Released under the MIT License © 2026 sillogic.
Available Tools
8 toolsagent_indexA
Open an agent's wiki: persona preview, index.md text, and all concepts. Call this when waking an agent in a new project, before working. Switch agents by calling this with a different agent_id.
Inputs: agent_id (required). Returns: result
create_agentA
Create a new agent bundle (directory + AGENT.md persona + index.md +
log.md). Use when starting a new role that doesn't exist yet.
name: display name (defaults to agent_id). persona: free-text identity
and strengths for the AGENT.md body; omit for a fill-in template.
Fails if the agent already exists — don't clobber.
Inputs: agent_id (required), name, persona. Returns: result
delete_agentA
Delete an agent's entire bundle (all concepts + persona + log). IRREVERSIBLE — confirm with the user before calling. Refuses paths that escape the agents dir. Use when an agent is retired or created by mistake.
Inputs: agent_id (required). Returns: result
list_agentsA
List every agent that owns an OKF knowledge bundle.
Inputs: no named parameters. Returns: result
wiki_append_logB
Append one update entry to the agent's log.md (today's date group).
Inputs: action (required), detail (required), agent_id (required). Returns: result
wiki_readB
Read one concept (frontmatter + body). concept_id uses '/' (e.g. 'projects/x').
Inputs: agent_id (required), concept_id (required). Returns: result
wiki_searchA
Full-text search within one agent's wiki.
Inputs: query (required), agent_id (required), limit. Returns: result
wiki_write_conceptC
Create or update a concept file in an agent's wiki. 'type' is required (OKF). extra_json: optional JSON object string for custom frontmatter fields.
Inputs: type (required), agent_id (required), concept_id (required), body, +4 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct action (create/list/delete agent, read/search/write wiki, append log), and descriptions clarify the one potentially confusing pair (agent_index vs wiki_read). The name agent_index could be misread as an agent list, but its description removes that ambiguity.
Most wiki operations use a wiki_<verb> pattern, while agent lifecycle operations use <verb>_agent; this mixed ordering is readable but not uniform. agent_index is a noun-noun exception, and wiki_read vs wiki_write_concept is asymmetric. All names are snake_case and semantically clear.
Eight tools is a well-scoped set for managing agent bundles and their knowledge wikis. Each tool covers a distinct need without redundancy, and the count is within the ideal range.
Core workflows are covered: create/list/delete agents, open/search/read concepts, write concepts, and append log entries. There is no direct way to update an agent's persona/index or delete an individual concept, but these are minor gaps that can be worked around via concept writes or log entries.
Maintenance
Related MCP Connectors
Cross-tool persistent memory and context for AI assistants over MCP.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Shared memory for your AI tools: tasks, notes and context every tool can read and write over MCP.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Related MCP Servers
- AlicenseCqualityBmaintenanceProvides persistent, local-first AI memory across sessions via MCP tools for storing, searching, and retrieving context from past interactions.31156 PyPI1MIT
- AlicenseNot gradedqualityBmaintenanceProvides a persistent, local-first memory for coding agents over MCP, enabling automatic recall and recording of past work, failures, and decisions to reduce repetition and token usage.MIT
- AlicenseNot gradedqualityDmaintenanceProvides a persistent, cross-tool memory layer for AI coding agents via MCP, enabling storage and retrieval of decisions, preferences, and context across different tools and models.1MIT
- AlicenseNot gradedqualityCmaintenanceProvides shared long-term memory for AI coding agents via MCP, allowing tools like Claude Code and Codex to store and retrieve distilled facts, notes, and conversation history to persist context across sessions.20 npm3MIT