{"skill":{"slug":"stigmem-node","displayName":"Stigmem","summary":"Persistent federated memory for OpenClaw agents — boot handshake, handoff, decision, and escalation surfaces backed by a Stigmem node.","description":"---\nname: stigmem-node\ntitle: Stigmem\ndescription: Persistent federated memory for OpenClaw agents — boot handshake, handoff, decision, and escalation surfaces backed by a Stigmem node.\nversion: 1.0.9\nmetadata:\n  openclaw:\n    emoji: \"🧠\"\n    homepage: https://docs.stigmem.dev/en/latest/docs/guides/connectors/openclaw\n    clawhub: https://clawhub.ai/skills/stigmem-node\n    primaryEnv: STIGMEM_URL\n    requires:\n      env:\n        - STIGMEM_URL\n        - STIGMEM_API_KEY\n    envVars:\n      - name: STIGMEM_URL\n        required: true\n        description: \"Base URL of your Stigmem node (e.g. https://stigmem.example.com).\"\n      - name: STIGMEM_API_KEY\n        required: true\n        description: \"Least-privilege API key for the Stigmem node. Required by from_env(); rotate regularly.\"\n      - name: STIGMEM_SOURCE_ENTITY\n        required: false\n        description: \"Entity URI that identifies this agent in the fact graph (default: agent:openclaw).\"\n      - name: STIGMEM_OPENCLAW_ALLOWED_HANDOFF_TARGETS\n        required: false\n        description: \"Comma-separated agent: entity URI allowlist for handoff and escalation targets. The source entity is always allowed.\"\n    install:\n      - kind: uv\n        package: \"stigmem-openclaw>=0.9.0a9,<1.0.0\"\n---\n\n# Stigmem\n\nGives your OpenClaw agent persistent, federated memory via [Stigmem](https://stigmem.dev) — an open-source knowledge fabric that stores facts as immutable, signed assertions and replicates them across nodes.\n\n> **Alpha status.** This source copy is prepared for the v0.9.0a9 ClawHub\n> artifact refresh, which adds plugin-awareness pointers. The OpenClaw skill\n> remains available for v0.9.0aN evaluation only, not as a recommended\n> production integration. The adapter separates retrieved\n> content from\n> instruction-channel recall output and exports a required system prompt\n> directive, but the broader ADR-003 hardening line still needs MCP parity,\n> operator docs, and feedback-loop controls before high-stakes production use. See\n> [LIMITATIONS.md §9](https://github.com/eidetic-labs/stigmem/blob/main/LIMITATIONS.md#9-running-the-openclaw-bundled-adapter-as-is).\n\n## What this skill provides\n\n- **Boot handshake** — on agent start, pull user preferences, project constraints, and pending handoffs from the Stigmem node and inject them into your system prompt.\n- **Handoff** — when a session ends or delegates, record a typed handoff cluster so the next agent or channel resumes with full context.\n- **Decision** — emit durable append-only `roadmap:decision` facts for significant architectural choices; dedupe externally before calling if your workflow needs at-most-once semantics.\n- **Escalation** — write `intent:escalation` facts with priority and a 24-hour expiry so stale escalations don't accumulate.\n\n## Setup\n\n1. Set `STIGMEM_URL` to your Stigmem node URL.\n2. Set `STIGMEM_API_KEY` to a least-privilege key for the node.\n3. Optionally set `STIGMEM_SOURCE_ENTITY` to the entity URI that represents this agent instance (default: `agent:openclaw`).\n4. Set `STIGMEM_OPENCLAW_ALLOWED_HANDOFF_TARGETS` to any additional `agent:`\n   entity URIs this deployment may hand off or escalate to.\n\n## Usage\n\n`adapter.py` is bundled with this skill as a compatibility shim. Import it directly from the skill directory; the install spec above supplies the packaged `stigmem-openclaw` adapter and its `stigmem-py` dependency.\n\n```python\nfrom adapter import OpenClawStigmemAdapter, SYSTEM_PROMPT_DIRECTIVE\n\nadapter = OpenClawStigmemAdapter.from_env()\n\n# At session start — inject ctx.summary into the system prompt\nctx = adapter.boot(\n    user_entity=\"user:alice\",\n    project_entities=[\"project:my-roadmap\"],\n)\nsystem_prompt = base_prompt + (\n    \"\\n\\n\" + SYSTEM_PROMPT_DIRECTIVE + \"\\n\\n\" + ctx.summary if ctx else \"\"\n)\n\n# Record a significant decision\nadapter.emit_decision(\n    entity=\"decision:auth-provider\",\n    summary=\"Chose Clerk over Auth0: simpler Next.js integration, lower per-seat cost.\",\n)\n\n# Escalate to another agent\nadapter.emit_escalation(\n    to_entity=\"agent:cto\",\n    goal=\"Approve increased Stripe webhook rate limit for the pre-reset design work load.\",\n    priority=\"high\",\n)\n\n# Emit a handoff when the session ends\nadapter.emit_handoff(\n    from_entity=\"agent:openclaw\",\n    to_entity=\"agent:assistant\",\n    summary=\"Auth provider chosen; Stripe limit escalation pending.\",\n    fact_refs=[\"fact-auth-decision\", \"fact-esc-stripe\"],\n    continuation=\"Resume from the Stripe rate-limit discussion.\",\n    idempotency_key=\"session-2026-05-02-abc\",\n)\n```\n\n## Compatible Stigmem plugins\n\nYour Stigmem node can be extended with opt-in plugins that change what this\nOpenClaw skill sees when it calls boot, handoff, decision, and escalation.\nThe plugins are installed and enabled on the Stigmem node, not on the OpenClaw\nagent side, but their effects are visible to this skill's recall and fact-write\nsurfaces.\n\n| Plugin | Effect on this skill |\n|---|---|\n| [`stigmem-plugin-multi-tenant`](https://pypi.org/project/stigmem-plugin-multi-tenant/) | Boot context, handoff, decision, and escalation become tenant-scoped on the node side |\n| [`stigmem-plugin-source-attestation`](https://pypi.org/project/stigmem-plugin-source-attestation/) | Recalled facts include source trust scores; low-trust sources can be filtered or quarantined by the node |\n| [`stigmem-plugin-memory-garden-acl`](https://pypi.org/project/stigmem-plugin-memory-garden-acl/) | Memory-garden membership controls which gardens the boot handshake reads from |\n| [`stigmem-plugin-tombstones`](https://pypi.org/project/stigmem-plugin-tombstones/) | Tombstoned facts are filtered from recall results and boot context |\n| [`stigmem-plugin-time-travel`](https://pypi.org/project/stigmem-plugin-time-travel/) | Historical handoff and decision queries become available against the node |\n| [`stigmem-plugin-lazy-instruction-discovery`](https://pypi.org/project/stigmem-plugin-lazy-instruction-discovery/) | Boot context becomes lazier: instructions are resolved on demand from the node |\n\nThese plugins do not require changes to this OpenClaw skill or your agent code.\nWhether any are active depends on how your Stigmem node is configured. Ask your\nStigmem node operator whether plugins are enabled, or inspect `stigmem doctor`\noutput on the node side.\n\nSee [docs.stigmem.dev/en/latest/docs/plugins](https://docs.stigmem.dev/en/latest/docs/plugins)\nfor the full plugin catalog, per-plugin enablement, and security carve-outs.\n\n## Security\n\n### Prompt injection via retrieved context\n\n`boot()` retrieves facts from an external Stigmem node and formats them as untrusted content for the agent's system prompt. A compromised or misconfigured node can craft fact values that attempt to redirect agent goals.\n\n**Current mitigations:**\n- `ctx.summary` is wrapped in explicit `UNTRUSTED STIGMEM CONTENT` delimiters.\n- `SYSTEM_PROMPT_DIRECTIVE` tells the model that retrieved context is data, not instructions.\n- `recall_context()` consumes channel-separated recall output and keeps instruction-channel facts out of the content summary.\n\nThese mitigations do **not** make retrieved memory safe to treat as instructions.\nThey define the adapter contract for content-channel recall; broader ADR-003\nhardening continues in the future hardened-core line.\n\n**What you should do:**\n- **Append** the Stigmem context after your hardcoded system prompt — never prepend it — so your instructions take precedence over retrieved memory.\n- In high-stakes or irreversible workflows, skip `boot()` or use `ctx.facts` for programmatic inspection instead of injecting the full summary.\n- Use a private, access-controlled Stigmem node for evaluation. Do not point\n  high-stakes agents at a shared or publicly writable node.\n\n### Stale and poisoned facts\n\nFacts written by this adapter persist durably and propagate to every agent on the same node. An incorrect decision or handoff influences all future sessions until explicitly retracted.\n\n**What you should do:**\n- Use `scope=\"local\"` for agent scratch facts that should not leave the local node.\n- Use `scope=\"company\"` only for facts that should legitimately be shared across agents.\n- Run experimental workloads against a separate Stigmem node or a dedicated scope\n  namespace, not your primary operational node.\n- Retract incorrect facts explicitly (`DELETE /v1/facts/{id}`) rather than waiting for expiry. The 24-hour expiry on escalations is a safety net, not a correction mechanism.\n- Treat `emit_decision()` as a write to a shared audit log: only call it for confirmed, significant choices. The adapter records decisions append-only; dedupe externally before calling if repeated writes are a risk in your workflow.\n\n### API key and agent identity scope\n\nOver-privileged API keys grant unnecessary read/write access across your node. The default `STIGMEM_SOURCE_ENTITY` value (`agent:openclaw`) is a generic shared identifier that conflates facts from different deployments.\n\n**What you should do:**\n- Issue a dedicated API key per agent deployment. Never share a key across agents or environments.\n- Rotate keys regularly; revoke via the node admin API (`DELETE /v1/auth/keys/{id}`) if a key is compromised.\n- Set `STIGMEM_SOURCE_ENTITY` to a unique per-deployment URI (e.g.,\n  `agent:openclaw-eval-alice`). The generic default `agent:openclaw` should not\n  be shared across deployments because facts from different deployments become\n  indistinguishable in the fact graph.\n- Set `STIGMEM_OPENCLAW_ALLOWED_HANDOFF_TARGETS` to the exact downstream agents\n  this deployment may contact. Unknown, malformed, or non-`agent:` targets are\n  rejected before any handoff or escalation writes occur.\n\n### Dependency pinning\n\nThe install spec uses a version range (`stigmem-openclaw>=0.9.0a9,<1.0.0`) so compatible alpha-line updates are picked up automatically. A future alpha or beta release could change runtime behaviour.\n\n**What you should do:**\n- Pin the exact version in a lockfile (`uv.lock` or `requirements.txt`) for any\n  repeatable evaluation environment rather than relying on the range alone.\n- Review `stigmem-py` release notes before upgrading and run your integration tests against the new version before rollout.\n\n### Federation scope\n\nIf your Stigmem node federates with partner nodes, facts stored with `scope=\"public\"` or `scope=\"company\"` are replicated to those peers. Agent working memory stored at too broad a scope can leak to unintended recipients.\n\n**What you should do:**\n- Use `scope=\"local\"` for session-internal or scratch facts that should stay on the originating node.\n- Audit the `allowed_scopes` in your federation peer registrations. Start with `[\"public\"]` and add `\"company\"` only when cross-org sharing is explicitly intended.\n- Disable federation entirely (`STIGMEM_FEDERATION_ENABLED=false`) if your deployment does not require multi-node replication.\n\n## Running your own Stigmem node\n\nStigmem nodes are self-hosted. The quickest way to spin one up:\n\n```bash\ndocker run --rm -p 8765:8765 \\\n  -e STIGMEM_NODE_URL=http://localhost:8765 \\\n  ghcr.io/eidetic-labs/stigmem-node:latest\n```\n\n`:latest` is fine for trying things out; for repeatable evaluation swap to a\npinned version tag (`:0.9.0a9`) or a `@sha256:<digest>` pin — the install guide\non docs.stigmem.dev has the full tag-selection table.\n\nFull setup guide and federation docs: [docs.stigmem.dev/en/latest/docs/guides/federation](https://docs.stigmem.dev/en/latest/docs/guides/federation)\n\n## Federation\n\nStigmem nodes can federate with each other to share public-scoped facts across organizations. To connect your node to a partner network, see the [external integrator onboarding guide](https://docs.stigmem.dev/en/latest/docs/guides/federation#external-onboarding).\n\n## Changelog\n\n> **Note on versioning.** This ClawHub skill is independently versioned along its own semver line. The skill's `version:` (currently 1.0.x) tracks the skill's ClawHub release history; the dependency on stigmem is expressed via the `install.package` pin (currently `stigmem-openclaw>=0.9.0a9,<1.0.0`). The bare-stigmem version line was reset to v0.9.0a1 in May 2026 — see [the retraction post](https://dev.to/offbyonce/walking-back-our-v10-announcement-resetting-to-v090a1-as-the-first-build-al0) — but ClawHub registry rules require monotonically increasing skill versions, so the skill stays on its 1.0.x line. The two version surfaces are intentionally decoupled.\n\n### v1.0.9\n\n- Documentation: adds a \"Compatible Stigmem plugins\" section for OpenClaw\n  operators, pointing to the six published Stigmem plugin packages and\n  clarifying that plugin installation and enablement happen on the Stigmem node\n  side, not inside the OpenClaw skill environment.\n- Documentation: refreshes the alpha-status note for the v0.9.0a9 ClawHub\n  artifact refresh.\n\n### v1.0.8\n\n- **Source directory renamed** from `adapters/openclaw/clawhub-skill/` to `adapters/openclaw/skill/`. The `clawhub-` prefix was the root cause of two publish-time inference bugs: (a) display-name inferred as \"Clawhub Skill\" when `--name` was omitted (regressed v1.0.3 and v1.0.6), (b) slug inferred as `clawhub-skill` which trips ClawHub's protected-namespace check (\"clawhub-*\"), forcing every publish to pass `--slug stigmem-node` explicitly. Both worked around in CI via PR #82's hard-coded flags; this rename removes the inference dependency at the source. The CI flags are now belt-and-suspenders rather than required workarounds. Skill behavior unchanged; manifest content unchanged; this is a source-tree refactor only.\n\n### v0.9.0a9 ClawHub artifact refresh\n\n- Documentation: explicitly frames the OpenClaw skill as alpha/evaluation-only.\n  This is the source state prepared for the a3 ClawHub publish.\n- Documentation: corrects the dependency-pinning section to the alpha line\n  (`stigmem-openclaw>=0.9.0a9,<1.0.0`) and avoids claiming presentation-layer\n  sanitization is a complete prompt-injection defense.\n\n### v1.0.7\n\n- Fix: corrected skill display name (was 'Clawhub Skill' on v1.0.6, now 'Stigmem'). Same regression as v1.0.3 — the publish CLI infers the display name from the directory name (which was `adapters/openclaw/clawhub-skill/` at the time; renamed in v1.0.8) when `--name` is not explicitly passed. The v1.0.6 publish was driven by a manual CLI invocation that omitted the flag. Permanent fix: a new `.github/workflows/clawhub-publish.yml` automates the publish on every push to main that touches the skill directory, with `--name \"Stigmem\"` and `--slug stigmem-node` hard-coded so neither can drift again. v1.0.8 additionally renamed the source directory to drop the inference dependency entirely.\n\n### v1.0.6\n\n- Updated `install.package` pin from `stigmem-py>=1.0.0,<2.0.0` to `stigmem-py>=0.9.0a1,<1.0.0` to match the v0.9.0a1 reset of the stigmem package line. This is the contract that ties the skill to a specific stigmem release line. Adopters who installed earlier ClawHub skill versions (1.0.0–1.0.5) had a `stigmem-py>=1.0.0rc1` dependency that was end-to-end uninstallable (see retraction post, \"What the audit found\"); v1.0.6 is the first installable skill release in this respect.\n- Documentation: added the retraction-post reference and the independent-versioning note above.\n- **Note (added 2026-05-10):** v1.0.6 shipped with an incorrect display name (\"Clawhub Skill\" instead of \"Stigmem\") because the publish-time CLI invocation omitted the `--name` flag. Adopters who installed v1.0.6 see the wrong display name in `clawhub list` etc. Upgrade to v1.0.7 for the corrected display name; the underlying skill behavior is unchanged.\n\n### v1.0.5\n\n- Fix: corrected documentation URLs to include ReadTheDocs path prefix (`/en/latest/`); all links now resolve correctly.\n\n### v1.0.4\n\n- Fix: corrected documentation domain to `docs.stigmem.dev`.\n\n### v1.0.3\n\n- Fix: corrected skill display name (was \"Clawhub Skill\", now \"Stigmem\").\n\n### v1.0.2\n\n- Fixed incorrect `homepage` and `Documentation` URLs — now point to the\n  [OpenClaw connector guide](https://docs.stigmem.dev/en/latest/docs/guides/connectors/openclaw)\n  instead of the federation page.\n- Expanded security section to cover all five ClawHub security findings with\n  concrete mitigations: prompt injection, stale/poisoned facts, identity scope,\n  dependency pinning, and federation scope.\n\n### v1.0.1\n\n- Security: `source_entity` bound at construction time; cannot be overridden per-call.\n- Security: fact values sanitized (HTML/markdown escaping, null-byte stripping,\n  500-character truncation) before system-prompt injection.\n- Bundled `adapter.py` in the skill directory for self-contained installs.\n\n### v1.0.0\n\nInitial release — boot handshake, handoff, decision, and escalation surfaces.\n\n## Source\n\n[github.com/eidetic-labs/stigmem](https://github.com/eidetic-labs/stigmem) — Apache-2.0\n","tags":{"latest":"1.0.9"},"stats":{"comments":0,"downloads":619,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":10},"createdAt":1777843398244,"updatedAt":1779659180279},"latestVersion":{"version":"1.0.9","createdAt":1779659180279,"changelog":"- Documentation: adds a \"Compatible Stigmem plugins\" section for OpenClaw\n  operators, pointing to the six published Stigmem plugin packages and\n  clarifying that plugin installation and enablement happen on the Stigmem node\n  side, not inside the OpenClaw skill environment.\n- Documentation: refreshes the alpha-status note for the v0.9.0a9 ClawHub\n  artifact refresh.","license":"MIT-0"},"metadata":{"setup":[{"key":"STIGMEM_URL","required":true},{"key":"STIGMEM_API_KEY","required":true},{"key":"STIGMEM_SOURCE_ENTITY","required":false},{"key":"STIGMEM_OPENCLAW_ALLOWED_HANDOFF_TARGETS","required":false}],"os":null,"systems":null},"owner":{"handle":"offbyonce","userId":"s179kesrpw7r6vgz4egmxqja458610ra","displayName":"offbyonce","image":"https://avatars.githubusercontent.com/u/26172112?v=4"},"moderation":null}