What it does
Ingestion
Automatically ingests agent replies, tool calls, and observations into Membrane via
after_agent_reply and after_tool_call hooks.Memory search
Exposes the
membrane_search tool so agents can query episodic memory with natural language.Auto-context
Injects relevant memories into the agent’s context before each turn via the
before_agent_start hook — no explicit tool calls required.Status command
The
/membrane command reports connection status and live memory stats.Prerequisites
- A running Membrane instance (
membraneddaemon) - OpenClaw v0.10+
Installation
Install from npm
In your OpenClaw extensions directory:The
brainplex init command auto-detects and configures all plugins.Configuration reference
All options live underplugins.entries.openclaw-membrane.config in openclaw.yaml.
Membrane gRPC address. Defaults to
"localhost:4222".Sensitivity level applied to all ingested events. One of
"public", "low", "medium", "high", "hyper". Defaults to "low".When
true, injects relevant memories into the agent’s context before each turn via the before_agent_start hook. Defaults to true.Maximum number of memories to inject as context. Minimum
1. Defaults to 5.Minimum salience score (0–1) for retrieval during context injection and search. Defaults to
0.3.Memory types to include in context injection. Valid values:
"episodic", "working", "semantic", "competence", "plan_graph". Defaults to ["episodic", "semantic", "competence"].Configuration summary table
| Option | Default | Description |
|---|---|---|
grpc_endpoint | localhost:4222 | Membrane gRPC address |
default_sensitivity | low | Sensitivity for ingested events: public, low, medium, high, hyper |
auto_context | true | Auto-inject memories before each agent turn |
context_limit | 5 | Max memories to inject |
min_salience | 0.3 | Minimum salience score for retrieval |
context_types | ["episodic", "semantic", "competence"] | Memory types: episodic, working, semantic, competence, plan_graph |
membrane_search tool
The plugin registers the membrane_search tool, which agents can call to query episodic memory:
Parameters
Natural language query to search memories.
Maximum results to return. Defaults to the configured
context_limit (5).Filter by memory type:
"episodic", "working", "semantic", "competence", "plan_graph".Minimum salience score (0–1). Defaults to the configured
min_salience (0.3).Auto-context
Whenauto_context: true (the default), the plugin hooks into before_agent_start to retrieve and inject relevant memories before each agent turn. Agents get awareness of past interactions without explicit tool calls.
The injected context looks like:
context_types and min_salience config values. Set auto_context: false to disable.
/membrane command
Check connection status and memory stats at any time:
Ingestion behavior
The plugin maps OpenClaw hooks to Membrane ingestion methods:| Hook | Membrane method | Condition |
|---|---|---|
after_tool_call | ingestToolOutput | When toolName is present |
after_agent_reply | ingestEvent | Always |
| Other hooks | ingestObservation | Fallback |
hook:<name>, agent:<id>, tool:<name>, session:<key>.
Ingestion failures are logged as warnings and do not interrupt the agent.
Architecture
Plugin metadata
| Field | Value |
|---|---|
| Package | @vainplex/openclaw-membrane |
| Plugin ID | openclaw-membrane |
| Version | 0.4.0 |
| Kind | memory |
| Hooks | after_agent_reply, after_tool_call, before_agent_start |
| Tools | membrane_search |
| Commands | /membrane |