Repository navigation
Releases: NextAgentBC/nextclaw
Release list
v0.3.1 — opt-in memory sidecar (stop the <mem> leak)
0.3.1 — Opt-in memory sidecar (stop the <mem> leak)
Patch release on top of 0.3.0. One behavior change, no migrations.
Fixed
-
The
## Memory Sidecarprompt block is now opt-in (sidecar.enabled,
defaultfalse). That block asks the agent to append a<mem>{...}</mem>
line at the end of every turn. On backends whose reply delivery bypasses
OpenClaw'smessage_sendinghook — notably the claude-cli backend — the
block is not stripped and leaked verbatim into user-facing replies
(Telegram/Discord), with no way to remove it downstream. Until now it was
emitted unconditionally on every install. It is now gated behind the
(previously inert)sidecar.enabledflag and defaults OFF, so no deployment
leaks<mem>out of the box.Memory capture is unaffected when the sidecar is off:
memory_storeand the
transcript watcher still ingest every turn — the sidecar was only the
cheapest of several capture paths. Re-enable it with
sidecar: { enabled: true }in yourmemory-postgresplugin config once
you've confirmed your backend strips the block before the user sees it. The
flag is read once at plugin register time, so aopenclaw gateway restart
picks up a change. -
Bumped
package-lock.jsonto match (0.3.0 shipped with a stale0.2.1
version stamp in the lockfile).
Install (curl-installed OpenClaw):
openclaw plugins install git:github.com/NextAgentBC/nextclaw@v0.3.1v0.3.0 — Curated recall + action-sensitive memory
Memory-quality release on top of 0.2.1. Migrations 60/61/62 apply automatically on gateway restart.
New
memory_get(chunkId)— fetch a chunk in full when a search snippet was truncated. Read-only; fail-closed per-agent isolation (another agent's chunk reads as not-found).- Cited recall —
memory_searchsurfaces inlinepg://<source>/<chunkId>citations so the agent can attribute a claim and re-fetch viamemory_get. - Action-sensitive commitments — directives the agent might act on (cancel / send / authorize / appointments / reminders) are extracted into
structured.commitments(agent-isolated) withsafe_to_act/requires_confirmation/authority/ validity, and flagged ⚠ on recall. Conservative by default: side-effecting directives require confirmation; only reminders are safe to act on.
Fixed
- Ingest dedup no longer pollutes
last_recalled_at— the cold-tier aging signal was being bumped on every re-ingest, so chunks never aged into the cold tier. De-polluted 422/500 live chunks. - Tuning analyzer no longer accumulates duplicate pending proposals (partial unique index +
ON CONFLICT; collapsed 23 → 2 live).
Hygiene
- Declared
memory_getincontracts.tools; removed the vestigialcontracts.memoryEmbeddingProvidersdeclaration (nextclaw self-embeds — it's an embedding consumer, not a host provider).
Verification
tsc clean · 146 unit tests · live transactional migration dry-runs · deployed and openclaw plugins inspect clean.
Full details: CHANGELOG.md · merged via #21.
v0.2.1 — Curl-first install + distribution fixes
0.2.1 — Curl-first install + distribution fixes
0.2.1 is a packaging / install-UX release. No new runtime features — the focus
is letting a non-developer install the plugin against a curl-installed OpenClaw
in under 10 minutes, on a machine with neither pnpm nor a source checkout.
Distributable via openclaw plugins install git: / npm:
package.jsonopenclaw.extensionsnow points at./dist/index.js. The
previous./index.tsvalue only worked for local-development checkouts —
OpenClaw's plugin installer requires a compiled entry for any non---link
install source. Verified live:openclaw plugins install git:github.com/NextAgentBC/nextclawagainst a curl-installed OpenClaw now
succeeds end-to-end, registersmemory-postgresas an enabled plugin, and
surfaces the dashboard at127.0.0.1:8765afteropenclaw gateway restart.dist/(752 KB, 75 files) is now tracked in git. OpenClaw's installer runs
npm install --omit=dev --omit=peer, which strips the typescript compiler,
so anyprepare-time rebuild is impossible during a normal install. The
in-tree dist is the source of truth. Contributors mustnpm run buildand
git add dist/before merging source changes — a comment at the top of
.gitignorecalls this out.- New
scripts/prepare-build.mjs. Invoked from thepreparescript. When
typescript is resolvable (regular dev checkouts) it rebuilds; otherwise it
cleanly skips and prints a one-line note. Either way the install succeeds
with a usabledist/. openclaw.plugin.jsonhad two"activation"keys at the top of the
manifest. The second one shadowed the first, forcingonStartup: false.
Now deduped → plugin activates on gateway startup as intended.
Documentation rewritten around curl-installed OpenClaw
README.mdQuick Start replaced. Old flow was clone OpenClaw →pnpm install && pnpm build→ drop nextclaw intoextensions/→pnpm openclaw gateway start. New flow is:curl -fsSL https://openclaw.ai/install.sh | bash openclaw onboard --install-daemon # ... pick Postgres (Neon or Docker) openclaw plugins install git:github.com/NextAgentBC/nextclaw curl -fsSL .../scripts/configure-minimal.mjs | PG_URL=... node --input-type=module openclaw gateway restart
- Postgres step now offers Neon (zero local deps, free tier) as Option A
alongside a single-docker runOption B. Neither requires cloning this repo
to get adocker-compose.yml. - New helper
scripts/configure-minimal.mjs. Pipes throughcurl | node. Reads
the existing~/.openclaw/openclaw.json(created byopenclaw onboard),
injects onlyplugins.slots.memoryandplugins.entries["memory-postgres"],
writes back. Round-trip tested against a real onboard-produced config: every
non-pluginskey (gateway, agents, auth, channels, …) is byte-identical
before/after. Masks the Postgres password in its stdout output. - New "Other install methods" section in README enumerates git / npm /
ClawHub / local-dev install sources. Notes that the barenextclawnpm
name is taken by an unrelated CLI, so any future npm publish will be
scoped (e.g.@nextagentbc/nextclaw). docs/INSTALL.mdsteps ①②④⑤⑦ rewritten to match. Discord, multi-agent
isolation, reflection, Telegram Moderator, and web_search bolt-on sections
preserved verbatim.docs/SERVICES.md§1 (Postgres) gains the Neon / Docker side-by-side; §7
(OpenClaw) drops the source-checkout + pnpm instructions.
Documentation bug fixes surfaced by end-to-end dogfood
Two long-standing doc bugs only became visible after dogfooding the new flow
end-to-end on a clean machine.
- Dashboard auth header. The HTTP dashboard validates requests via the
X-Tokenheader (or?token=query param). Pre-0.2.1 README/INSTALL
examples usedAuthorization: Bearer $TOKEN, which the dashboard treats
as no token at all and returns 401. Allcurlexamples (/api/ingest,
/api/recall,/api/reflection/run-now) switched toX-Token. The
dashboard JS itself was already usingX-Tokenafter capturing?token=
intosessionStorage, so this was a docs-only fix. - Daemon env path.
openclaw onboard --install-daemonruns the gateway
via launchd on macOS and systemd-user on Linux. Neither reads~/.zshrc
or~/.bashrc. The daemon sources~/.openclaw/service-env/ai.openclaw.gateway.env
on every start. Pre-0.2.1 docs told users toecho "export NEXTCLAW_DASH_TOKEN=…" >> ~/.zshrc, which left the daemon with an empty
token (dashboard rejected every request) and noJINA_API_KEY(embedding
client gotAUTH_MISSING_API_KEYfrom Jina). README step 3 and step 6 +
INSTALL.md step ⑦ now write to the service-env file and keep the
shell-rc append only for the smoke-test curls.
Validated end-to-end on a clean machine
Full dogfood ran on macOS with no pnpm, no docker, no Node project. Steps
executed exactly as the new docs ship them: brew install colima docker →
colima start → single docker run pgvector/pgvector:pg16 + three
CREATE EXTENSION → openclaw plugins install git:… → configure-minimal.mjs →
openclaw gateway restart. The smoke test then exercises all four recall
behaviours:
- Lexical hit on a keyword-overlapping query →
hitTier=t1, embedCalls=0, latencyMs=2 - Semantically equivalent English query with no lexical overlap →
hitTier=t2_hybrid, embedCalls=1, latencyMs=379 - Chinese cross-language query →
hitTier=t2_hybrid, embedCalls=1, latencyMs=440, score=1.78 - Repeat of any prior query →
t1 cache, zeroCostHit=true, latencyMs=2
All four match what the README advertises.
Install (curl-installed OpenClaw):
openclaw plugins install git:github.com/NextAgentBC/nextclaw@v0.2.1See README.md for the full 7-step Quick Start (~5 min on Neon, ~10 min on Docker).
v0.1.0 — initial public release
nextclaw 0.1.0 — initial public release
Postgres + pgvector long-term memory plugin for OpenClaw.
4-tier recall · multi-key Xinhua-dictionary indexing · deterministic-first ingest · hard per-agent isolation · real-time dashboard.
Highlights
- 4-tier recall (T0 in-process / T1 PG UNLOGGED / T2 main / T3 cold gist) — most queries return in <5ms with 0 LLM tokens
- 8 parallel routes (semantic / fulltext / trgm / concept_tag / entity_ref / time_bucket / anchor / category) merged via MMR — Xinhua-dictionary mode, every chunk reachable from many angles
- Deterministic-first ingest (Stages 0–6) — LLM only enters as a residual when prior stages produce nothing; in a typical workload, 0 LLM tokens spent on ingest
- Hard per-agent memory isolation —
agent_idcolumn threaded through every recall route, T0 working set, and cache scope. Validated with 6 adversarial probes: 0 chunks leaked - Self-tuning loop — daily / weekly / monthly proposals into
audit.tuning_proposals; auto-apply only onsafe_auto - Real-time dashboard — bilingual (CN/EN) panels for ingest decisions, recall tier hits, category distribution, bot turn latency, model comparison, with health/medical excerpts auto-redacted
- Privacy by default —
healthandmedicalchunks auto-pinned (importance ≥ 0.7) and redacted in the dashboard
Workers shipped
transcript-watcher— ingests every conversation turn deterministically, no agent involvement requiredgit-watcher— polls a local repo and ingests new commits sincelast_shashadow-comparator— replays each turn against a challenger chat endpoint (e.g. Qwen 3.6) for side-by-side latency / token / output comparisoncompactor— 90-day rolling cold-gist consolidationspreading-activator— Hebbian neighbor warmth bump on recalltuning— scheduled proposal analyzer (cron-style)
API endpoints
/api/stats · /api/recent · /api/stream (SSE) · /api/ingest · /api/recall · /api/bot-stats · /api/model-compare
Install
cd dev/ && docker compose up -d # Postgres + pgvector on 127.0.0.1:55432
cd /path/to/openclaw/extensions
git clone https://github.com/NextAgentBC/nextclaw.git memory-postgres
cd /path/to/openclaw && pnpm install && pnpm buildThen point plugins.slots.memory at memory-postgres in your ~/.openclaw/openclaw.json. See README for the full config example, multi-agent setup, and dashboard token flow.
Compatibility
- OpenClaw
>= 2026.4.25 - Node
>= 22 - Postgres
>= 16with pgvector>= 0.7.0 - Embedding: any OpenAI- or Ollama-compat endpoint (Qwen3-embedding 4096-d and nomic-embed-text 768-d both tested)
License
Apache 2.0 · acknowledges OpenClaw upstream in NOTICE