Celiums Cognition · OpenClaw plugin · @celiumsai/cognition

Cognition. Wired in.

Persistent emotional memory for OpenClaw agents. A SHA-chained journal, a multi-layer ethics gate, a PAD + circadian limbic engine, hybrid memory retrieval and ~60 cognitive tools — all wired into the agent's lifecycle by default.

$ openclaw plugins install clawhub:@celiumsai/cognition
01 — Wired into every turn

Twelve SDK seams. None of them optional in spirit.

Every line below is an actual wired seam on the OpenClaw 2026.5+ runtime, not a hypothetical capability. The plugin observes the lifecycle hooks the SDK provides and turns each into a recurring, audited act of cognition.

You install once. From that point, every prompt is enriched, every meaningful turn is journalled, every tool call is gated. Nothing here is a slash command you remember to invoke.

Auto-recall

Every prompt is enriched with relevant memories, the agent's identity preamble, subagent briefings (when applicable), and a structured turn_context. Cache-stable, ~3000-char budget.

Auto-capture

The user's last message at every agent turn end is stored as a memory with importance scoring + PAD analysis — pleasure, arousal, dominance. Salience, not just text.

Auto-journal

Every meaningful turn writes a first-person SHA-256-chained journal entry: decision · reflection · lesson · belief · arc · doubt. Tamper-evident, hash-verified, agent-scoped.

Ethics gate

Five-layer pipeline runs before every prompt and tool call. Block decisions carry category, source, and audit trail. See section 03.

Subagent lineage

Observes subagent_spawning, subagent_spawned, subagent_ended; builds a parent ↔ child tree; briefs children with relevant parent journal entries; refuses cycles past depth 3.

Session boundaries

session_start / session_end write anchor entries with deterministic summaries — reason, duration, message count, journal counts. Resumed sessions carry a resumed-from:<id> tag.

Compaction continuity

When the context window rotates, high-value facts persist as memories and an arc journal entry is written so the next turn picks up the thread without losing it.

Operator dashboard

React SPA at /plugins/celiums-cognition/ shows live PAD + circadian, agent state, journal hash chain, memory search, ethics audit log, subagent lineage tree.

Slash actions

Five inline slash commands. The destructive ones (forget) require a typed two-press confirmation with mandatory reason.

Channel mailbox

POST /api/celiums-cognition/inbox/inject enqueues a note that the target session sees at the top of its next turn. Telegram, Slack, email — all push through here. Nothing flows directly into UI state.

Governance

Every block decision propagates to the gateway's central security-audit log as a SecurityAuditFinding. Tool registrations carry group + risk metadata (memory · journal · ethics · cognitive · atlas · research · write × low / medium / high).

Heartbeat snapshot

Proactive ticks see a state snapshot — memory count, open subagents, ethics mode, last journal hash. Never a fabricated result; the heartbeat is a probe, not an op.

02 — The infrastructure reality

Enterprise infra. Not a laptop plugin.

Cognition runs a four-container Docker stack — Postgres + pgvector, Qdrant, Valkey, OpenSearch — downloads ~110 MB of curated corpora on first install, and holds ~1.5 GB of RAM steady-state. The engine is deliberately heavy because every layer (ethics, journal, limbic, hybrid retrieval) needs to run at agent speed.

There is no “lite mode” by design. If you're on a laptop with minimum specs, use the bundled memory-core or memory-lancedb extension instead — both ship with OpenClaw, neither needs Docker.

Container · 01
Postgres + pgvector

Primary store for memories, journal entries, sessions, agent identity, skills, subagent lineage. Vector column for hybrid retrieval.

Container · 02
Qdrant

Dedicated vector index for the larger memory corpus. Sharded, queryable in parallel with pgvector for hybrid recall.

Container · 03
Valkey

Hot cache for auto-recall, turn-context composition, throttles and the in-flight session state.

Container · 04
OpenSearch

Hosts the ethics corpus (~1,857 docs · 1024-dim embeddings · SHA-256 verified) for Layer D corpus-grounded evaluation.

RAM steady-state ~1.5 GB Four containers + the plugin process, idle.
First-install corpora ~110 MB 10K-skills seed + ethics corpus, both SHA-256 verified.
Minimum host 4 GB · 2 vCPU Linux + Docker. VPS, Mac mini, or headless workstation.
Cognitive tools ~60 Memory · journal · ethics · cognitive · atlas · research · write.
03 — The ethics gate

Five layers. Every prompt. Every tool call.

Before any prompt reaches the model and before any tool call executes, intent runs through a five-stage pipeline. Each stage can pass, abstain, or block. Block decisions carry category + source + audit trail and propagate to the gateway's security-audit log as a SecurityAuditFinding.

Layer D abstains cleanly when the ethics corpus is absent (set CELIUMS_ETHICS_CORPUS_SKIP=true to skip the load).

Lexicon
Layer A

Deterministic rule-based pass. Categorical matches against an open lexicon — the bright lines that need no probability.

CVaR
Layer B

Conditional Value-at-Risk over residual ambiguity. Tail-risk aware probabilistic stop with a categorical CBRN hard-block.

Frameworks
Layer C

Multi-framework LLM evaluation — consequentialist, deontological, virtue. Frames the call against the positions that justify it.

Corpus
Layer D

Corpus-grounded: consults the ethics_knowledge index (~1,857 docs · 1024-dim) for precedent. Optional. Abstains cleanly when absent.

Audit
Layer E

Final audit: block decisions are stamped with category, layer, source, evidence, and emitted as a SecurityAuditFinding to the gateway log.

04 — Subagent lineage

Children inherit context. Cycles get refused.

OpenClaw agents spawn subagents. Cognition observes every spawn / end event and builds a parent ↔ child tree. When a child boots, the plugin briefs it with the parent's relevant journal entries — decisions, beliefs, doubts — so the child starts oriented, not blank.

The tree enforces a depth-3 ceiling. A descendant attempting to re-spawn anything in its ancestor chain (or breach depth 3) is refused. Retrospective journal entries close the loop when subagents end.

parent depth 0 child a depth 1 child b depth 1 research depth 2 writer depth 2 analyst depth 2 reviewer depth 2 scout depth 3 refused cycle → parent
  • Parent at depth 0 spawns children, who inherit relevant journal entries from the parent's history.
  • Depth 1–3 children carry briefings into their first prompt — decisions made, doubts raised, beliefs settled.
  • Retrospective journal entries fire when a subagent ends, summarizing what was accomplished.
  • Cycles — any spawn that would loop back to an ancestor, or push past depth 3 — are refused with the reason recorded.
05 — Operator surface

A dashboard, five commands, one mailbox.

The plugin is built for agent-managed deployments — Celiums AI's own gateway runs end-to-end through agents and sub-agents, not humans typing commands. The operator surface is the seam where humans look in and intervene when they need to.

Inline · slash commands
Five inline actions. Destructive ones gate with a typed reason.

Invoke directly from any conversation. The destructive command (forget) requires a typed two-press confirmation and a mandatory reason — captured in the audit log.

/celiums.remember Persist the highlighted text as a memory with importance + PAD analysis.
/celiums.recall Hybrid retrieval over the memory store, returns ranked matches.
/celiums.limbic Show the agent's current PAD coordinates + circadian phase.
/celiums.forget Destructive · two-press confirm · reason required · audit logged.
/celiums.status Plugin health: memory count, open subagents, last journal hash, ethics mode.
Dashboard · React SPA
A web view at /plugins/celiums-cognition/

Live PAD + circadian, agent state, journal hash chain, memory search, ethics audit log, subagent lineage tree. Sign-up; the first user becomes the operator.

Channel mailbox · HTTP
External plugins push through one endpoint.

Telegram, Slack, email — anything outside the gateway — enqueues notes through the mailbox. Notes appear at the top of the target session's next turn; nothing flows directly into UI state.

POST/api/celiums-cognition/inbox/inject
06 — Quickstart

One install. Then verify.

On first start, the plugin auto-bootstraps the four-container stack via Docker, mints a unique database password (chmod 600), applies engine migrations, downloads the curated 10K-skills seed (SHA-256 verified) into Postgres, and bulk-indexes the ethics corpus into OpenSearch.

By the time the gateway reports ready, every layer of the plugin is populated. No manual setup, no SaaS, no required keys.

# 1. Install (in your OpenClaw gateway)
$ openclaw plugins install clawhub:@celiumsai/cognition

# 2. Verify the stack is up
$ curl -s http://localhost:18789/api/celiums-cognition/health | jq .stack
postgres: ok · qdrant: ok · valkey: ok · opensearch: ok (ethics_corpus_docs ~1857) · tei: ok

# 3. Open the dashboard
$ open http://localhost:18789/plugins/celiums-cognition/
07 — Designed for

Three deployment shapes. One engine.

Cognition assumes you've decided to run OpenClaw as managed infrastructure. The four-container footprint is the price of agent-speed cognition at every turn. Below is who it's designed for.

Shape · 01
VPS hosts

Dedicated VPS running OpenClaw — ≥ 4 GB RAM, ≥ 2 vCPU, Linux + Docker. The default deployment shape. Stays online for the agent fleet.

Shape · 02
Mac minis & workstations

Headless workstations driving an agent fleet. The Docker stack runs natively; the operator dashboard is reachable on the local network.

Shape · 03
Enterprise OpenClaw

Deployments where the gateway is managed end-to-end by agents and sub-agents — not humans typing. This is how Celiums AI runs its own.

# Monorepo layout

packages/engine @celiumsai/cognition-engine (private — vendored Celiums Memory v2.0)
packages/shared @celiumsai/cognition-shared (private — plugin adapter + HTTP routes)
packages/hard @celiumsai/cognition (publishable)
08 — Pre-1.0 · audit-hardened · in production

Wire it in. Then forget you did.

Feature-complete against the six transversal phases — continuity, subagents, session lifecycle, operator UX, governance, autonomy + channels. Running in production on a single-tenant gateway. The publish track is gated on an explicit go-ahead.

[ Apache 2.0 · OpenClaw 2026.5+ · ~60 tools · vendors celiums-memory v2.0 ]