engram
FreeNo executable scriptsNot checkedLocal associative memory graph for an OpenClaw workspace, shipped as a set of CLI scripts: engram.py (store/recall/msgctx/task ledger over…
by wstienstra715 installs in other catalogsAbout this skill
Engram — associative memory as a skill
Powers, up front
Reads and writes one SQLite file under your workspace. Migration and rewire ask
before touching MEMORY.md, AGENTS.md or your crontab, and uninstall reverts
them from a manifest. Task evidence strings run through the shell. The only
network call is to localhost:11434 (Ollama) when you turn it on. No email, no
credential lookup, no clipboard, nothing outside the workspace.
What this does
Engram gives an agent a memory that answers questions instead of a file it has
to re-read. It stores typed nodes in SQLite, links them, and retrieves them
with a hybrid of keyword search, embeddings, tags and graph hops. It migrates
the MEMORY.md, memory/*.md and AGENTS.md you already have, and it
uninstalls back to exactly what it found.
Everything runs locally. No cloud call is made at runtime.
Install
./install.sh [workspace_dir]
The workspace defaults to the parent of this skill directory.
The installer stops after a migration dry-run. It does not change your
markdown, and it refuses to overwrite an existing engram/ directory.
Flow
- Preflight — Python 3.10 or newer is required. numpy, onnxruntime, flashrank and ollama are optional; each one that is missing degrades one step, loudly, and never stops the install. With none of them Engram runs keyword-only.
- Stage — copies twelve engine files into
<workspace>/engram/, the three cron-driven tools into<workspace>/scripts/, and writesengram/engram.jsonwith every path. - Init — creates a fresh
engram.dbwith the full schema, and starts the warm daemon if ONNX is present. - Smoke — stores one node and recalls it. This is the first recall on a brand-new database, the exact path that crashed in v1.1.x. A failure here stops the install before it touches anything else.
- Migrate (dry-run) — parses your markdown into typed nodes, each tagged
source:<file>#<line>, and writesmigration-report.md. Nothing is stored until you run--apply. The original files are never modified. - Verify —
engram-seed-battery.pymines 20 recall cases from your own migrated content and adds 3 negative controls. It passes at 90% of the positives and 3/3 negatives. A non-zero exit or a traceback from the engine fails the whole run, whatever the score says.
Steps 5 and 6, and the optional rewire, are yours to run:
python3 engram/engram-migrate.py --apply
python3 engram/engram-seed-battery.py
python3 engram/engram-rewire.py # optional, asks before touching anything (--yes to skip)
engram-rewire.py backs up MEMORY.md and AGENTS.md to
.engram-backup/<timestamp>/ with a manifest, slims MEMORY.md to a pointer,
adds an Engram section to AGENTS.md, and appends three cron lines marked
# ENGRAM-MANAGED: backup at 03:15, sleep consolidation dry-run at 03:45, and
a weekly battery on Sunday at 09:00.
Daily commands
engram recall "hosting setup" # ask a question, get the answer
engram msgctx "<incoming message>" # short context block for one message
engram store --name N --type fact --content "..."
engram startup # WIP plus session briefing
engram task add <name> --brief "..." --evidence "<shell command>"
engram task probe # what is open, what has gone stale
engram intend "when X happens" "do Y" # fires when the trigger appears
engram asof "office address" --date 2024-06-01
(engram here is python3 engram/engram.py, or python3 engram/bq.py to go
through the warm daemon when it is running.)
The per-message hook
msgctx is the command an agent should call on every incoming message, not
recall. It takes the raw message, decides whether the message is a question
worth answering from memory, and returns a short block — usually around 200
tokens — or nothing at all. recall is the deeper, more expensive lookup for
when the agent knows it needs to go digging.
python3 engram/bq.py msgctx "$USER_MESSAGE"
Inject the output ahead of the message. When it prints nothing, inject nothing.
The task ledger
engram task is a durable ledger for work that outlives one session. A task
carries a brief that can respawn it, an evidence command whose exit code
decides whether it is really done, and a status. Evidence commands run through
the shell with your privileges, so treat them as code you wrote, not data. Only
task add writes that field; never store evidence from an untrusted source. engram task probe reports
tasks that are open, stale, or finished but unclosed. task done refuses to
close a task whose evidence command fails, unless you pass --force.
Uninstall
python3 engram/engram-uninstall.py # restore and archive the db
python3 engram/engram-uninstall.py --purge # also delete the archived db
Restores every file from the manifest, removes the marked cron
Install engram in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the engram skill do?
Local associative memory graph for an OpenClaw workspace, shipped as a set of CLI scripts: engram.py (store/recall/msgctx/task ledger over SQLite+FTS+embeddings), engram-migrate.py (markdown to nodes), engram-serve.py and bq.py (optional warm daemon over a Unix socket), embeddings.py (ONNX e5 vectors), engram-backup.py (nightly SQLite backup with retention), engram-sleep.py (nightly consolidation, optional local-Ollama distillation), engram-maintenance.py and engram-hygiene.py (dedupe/orphan/archive tiering), engram-aliases.py (alias curation), engram-rewire.py (opt-in: slims MEMORY.md, adds marked cron lines, asks first), engram-uninstall.py (full revert). Task evidence strings run through the shell. No network calls except to localhost Ollama, and only if you enable it.
How do I install the engram skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the engram skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic