corsoul
v0.1.6
Published
The free, public, MIT client for Corsoul cognitive memory: offline remember and recall, plus all-tier prospective memory (intend/due/resolve) for AI agents. Reduced schema (the licensed engine layer's tables are absent), so it is not the paid-to-free down
Maintainers
Readme
corsoul
The free, public, MIT client for Corsoul — durable
remember / recall (plus all-tier prospective memory) for AI agents, on a local store (PGLite by
default, or any Postgres via DATABASE_URL). No license, no cloud brain, no telemetry.
Reduced schema (the paid engine layer's tables are absent) and no cloud-brain code — storage and
keyword recall are fully offline. Semantic recall is opt-in: if you configure an embeddings
provider, your remember/recall text is sent to THAT provider to be embedded (a local Ollama stays
on your machine; a hosted provider does not). Nothing else leaves your machine — no Corsoul server, no
phone-home. With no provider set, recall is keyword-only and fully local.
Install
npm install corsoul # library
npm install -g corsoul # also installs the `corsoul` CLI / MCP serverUse as a library
import { scope } from 'corsoul'
const npc = scope('game-x:companion:aria')
await npc.remember('the guide helped me cross the river at dusk')
const ctx = await npc.recall('who helped me?')
console.log(ctx.facts) // ['the guide helped me cross the river at dusk']
console.log(ctx.related) // [] ← graph neighbours: paid cloud tier
console.log(ctx.patterns) // [] ← abstract patterns: paid cloud tierUse with an AI agent (MCP)
Installed globally, corsoul is also a free, offline MCP server. One command wires it into a client —
it merges the server into the client's config and writes the capture contract, so the agent
recalls/remembers on its own:
corsoul # stdio (Claude Code, Codex, Cursor, Cline)
corsoul connect claude-code --scope=myapp:me:v1 # also: codex, cursor, cline, claude-desktop, openclawFull setup → the install guide on GitHub. Every agent, HTTP/YAML agents via one-command named profiles,
corsoul contract, a supervised shared brain, shared-vs-separate topologies, and step-by-step verification live there.
Tools: corsoul_remember / corsoul_recall / corsoul_forget, the prospective-memory trio
(corsoul_intend / corsoul_due / corsoul_resolve_intent), and corsoul_set_core / corsoul_get_core.
There is deliberately no corsoul_sleep — graph/pattern consolidation is the paid tier, so
recall always returns related: [] / patterns: [].
API
| Method | Description |
|---|---|
| scope(id) | An automatically-isolated memory handle. |
| remember(text, { type?, metadata? }) | Store an event; immediately recallable. |
| recall(query, { topK? }) | Semantic + keyword recall over Layer 1. |
| forget(slug) | Soft-delete a memory (reversible). |
| intend({ text, dueAt?/dueInSec?, cadence? }) | Record a prospective intention. Returns its id. |
| due({ within? }) | Pure read: intentions due now (or within a window). Never fires. |
| resolveIntent(id, { status }) | Close an intent (done/cancelled/expired); a recurring done reschedules. |
| setCore({ identity?, values?, disposition? }) | Set the baseline self. |
| getCore() | Read the current core. |
Storage + keyword recall need no LLM. Semantic recall needs an embeddings provider (LLM_BASE_URL +
LLM_EMBED_MODEL, or run corsoul setup). Data dir: CORSOUL_DATA_DIR (default ~/.corsoul/db) or
DATABASE_URL. The full config table and the corsoul activation scheduler are in the install guide.
Upgrading
A licensed, cloud-capable client (private delivery) adds connectCloudBrain() + scope.sleep() —
graph + pattern consolidation on a cloud brain while your data stays local. Not a public npm install:
see the Corsoul project or write to [email protected].
License
MIT © Corsoul AGI
