Setup
Enable the Interviewer on a tenant, then wire each harness — the OpenClaw plugin, or the memclaw-interviewer CLI for Claude Code and Cursor workstations.
Turning the Interviewer on takes two switches: enable the tenant (server-side), then turn on a capture source (per harness). Neither half does anything alone.
1. Enable the tenant
The Interviewer reads no trail and writes no memory until the tenant opts in. Set it in the tenant's org settings:
{ "interviewer": { "enabled": true } }Optional tuning under the same key (defaults shown):
| Key | Default | Meaning |
|---|---|---|
enabled | false | Master switch for the tenant. |
period_hours | 12 | How often a node is due for an interview. |
template_id | "default-v1" | Which report template the synthesis prompt uses. |
On a multi-worker deployment the setting is cached per worker (short TTL), so a freshly-flipped flag is honored within a few minutes rather than instantly.
2a. OpenClaw — plugin-buffer
If you already run the OpenClaw plugin, the Interviewer rides it. The plugin keeps a durable, node-local event buffer and submits windows when the server tells it a node is due. Turn it on by adding one variable to the plugin's environment and restarting the gateway:
# in ~/.openclaw/plugins/memclaw/.env
MEMCLAW_INTERVIEWER=trueopenclaw gateway restartWith the tenant enabled and MEMCLAW_INTERVIEWER=true, the server's schedule
drives capture — no cron, no CLI. Nothing is buffered or submitted while
either switch is off.
2b. Claude Code & Cursor — disk-parser CLI
Claude Code and Cursor have no gateway, but each keeps a durable transcript
on disk. The memclaw-interviewer CLI reads it read-only and submits
windows. It ships inside the Python client:
pip install memclaw-clientPoint it at your deployment and pick the harness:
export MEMCLAW_API_KEY=mc_xxx
export MEMCLAW_TENANT_ID=my-team
export MEMCLAW_BASE_URL=https://memclaw.net # or your self-hosted URL
export MEMCLAW_INTERVIEWER_PROJECTS="my-app,acme-*" # allowlist (see Privacy)
memclaw-interviewer status # cursors vs. local transcript lines
memclaw-interviewer run --dry-run -v # parse + window, submit nothing
memclaw-interviewer run # submit due windows (Claude Code)
memclaw-interviewer run --harness cursor # harvest Cursor insteadThe harness selects both the transcript root and the parser dialect:
--harness | Reads | Env alternative |
|---|---|---|
claude-code (default) | ~/.claude/projects/<slug>/*.jsonl | MEMCLAW_INTERVIEWER_HARNESS=claude-code |
cursor | ~/.cursor/projects/<slug>/agent-transcripts/<id>/*.jsonl | MEMCLAW_INTERVIEWER_HARNESS=cursor |
Environment variables
| Variable | Required | Purpose |
|---|---|---|
MEMCLAW_API_KEY | ✅ | Tenant- or agent-scoped credential. |
MEMCLAW_TENANT_ID | ✅ | Tenant to write into. |
MEMCLAW_BASE_URL | — | Deployment URL (default https://memclaw.net). |
MEMCLAW_AGENT_ID | — | Agent identity for the written memories (default user@host). |
MEMCLAW_FLEET_ID | — | Fleet to attribute writes to. |
MEMCLAW_INTERVIEWER_PROJECTS | — | Comma-separated project-dir globs to allow. |
MEMCLAW_INTERVIEWER_HARNESS | — | claude-code (default) or cursor. |
Triggers
Run the CLI on whatever cadence you like — both triggers are safe to combine because duplicate submissions dedup server-side:
-
Cron — a periodic
memclaw-interviewer runis the floor; it catches every session, including ones that crashed. -
Session-end hook — interview a session the moment it ends. The same hook command serves both harnesses; each sends
transcript_pathon stdin and the harness is inferred from the path.Claude Code (
~/.claude/settings.json):{ "hooks": { "SessionEnd": [ { "hooks": [ { "type": "command", "command": "memclaw-interviewer hook", "timeout": 300 } ] } ] } }Cursor (
~/.cursor/hooks.json):{ "version": 1, "hooks": { "sessionEnd": [ { "command": "memclaw-interviewer hook" } ] } }
The hook always exits 0 — a memory-harvest failure never fails your agent session. If it can't act (project not allowlisted, missing credentials) it prints a one-line reason to stderr and exits cleanly.
Privacy: default-deny allowlist
A workstation's transcripts span every project on the machine — including
NDA and client work, and whatever secrets got pasted into a prompt. So the
CLI harvests nothing until you name projects. With no allowlist it lists
the discovered project directories and exits with guidance. Opt in with
MEMCLAW_INTERVIEWER_PROJECTS, --projects <glob…>, or the explicit
--all-projects. Independently, credential-shaped strings are scrubbed
locally before anything leaves the machine, and the server masks again on
receipt.
2c. Hermes — disk-parser (planned)
TBD. A Hermes adapter is planned: it will read Hermes's state.db
conversation store and reuse the same windowing, watermark, and submit
protocol as the Claude Code and Cursor adapters. Not yet shipped — this
section will document --harness hermes when it lands.
Verify
After a real (non-dry) run, confirm the cursor advanced and a memory landed:
memclaw-interviewer statusshowspending=0once a file is fully drained.- The written memories appear in recall / the dashboard, typed as
episode,decision,outcome,task,fact, orpreference. - Re-running submits nothing new — the watermark and server-side dedup make repeat runs idempotent.
The Interviewer
A third way memories enter MemClaw — a scheduled reader synthesizes an agent's own durable work trail into typed memories, so nothing important is lost just because the agent forgot to write it down.
Protocol
How a durable trail becomes typed memories — windows, the forward-only watermark, masking, chunked map-reduce, and idempotent writes. The same contract for every capture source.