Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

engram

БесплатноБез исполняемых скриптовНе проверен

Local associative memory graph for an OpenClaw workspace, shipped as a set of CLI scripts: engram.py (store/recall/msgctx/task ledger over…

wstienstraот wstienstra715 установок в других каталогах

Об этом скилле

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

  1. 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.
  2. Stage — copies twelve engine files into <workspace>/engram/, the three cron-driven tools into <workspace>/scripts/, and writes engram/engram.json with every path.
  3. Init — creates a fresh engram.db with the full schema, and starts the warm daemon if ONNX is present.
  4. 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.
  5. Migrate (dry-run) — parses your markdown into typed nodes, each tagged source:<file>#<line>, and writes migration-report.md. Nothing is stored until you run --apply. The original files are never modified.
  6. Verify — engram-seed-battery.py mines 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

Полный SKILL.md на ClawHub

Установить engram в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл engram?

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.

Как установить скилл engram?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл engram запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить engram с