Skip to content

[Bug] @natebjones/ob1-agent-memory v0.1.1 — plugin loads as memory-slot owner but neither auto-invokes nor exposes its 7 tools to agents in OpenClaw 2026.5.7 #279

@MicScalise

Description

@MicScalise

Which contribution?

integrations/openclaw-agent-memory (the @natebjones/ob1-agent-memory plugin, v0.1.1)

What happened?

The plugin installs and loads cleanly under OpenClaw 2026.5.7, owns the exclusive memory slot, and the gateway reports it as active — but neither auto-invocation nor agent-callable tools work, so the seven OB1 Agent Memory tools (openbrain_recall, openbrain_writeback, etc.) are unreachable from any agent.

Concretely:

  • openclaw plugins doctor → "No plugin issues detected."
  • Gateway log on startup: http server listening (2 plugins: nbj-ob1-agent-memory, telegram; 2.5s)
  • plugins.slots.memory: nbj-ob1-agent-memory is set in openclaw.json
  • After dispatching any agent through the gateway:
    • The agent never sees openbrain_recall etc. in its tool list. Asking "list any tools whose name starts with openbrain_" returns the unrelated leftover MCP tool surface (openbrain__capture_thought etc., double-underscore namespacing).
    • Calling openbrain_recall directly returns: Error: Tool 'openbrain_recall' not found in available tools.
    • The agent_memories, agent_memory_recall_traces, and agent_memory_audit_events tables in OpenBrain stay at 0 rows, and the Edge Function logs receive no traffic from the agent run, even though the agent's SOUL/identity loads and the turn completes successfully.

The Edge Function backend itself is healthy — direct curl against the configured endpoint returns expected responses (/health → 200, /recall and /writeback validate input shape and reject correctly), so the issue is between the plugin and the OpenClaw runtime, not in the API.

What did you expect?

Per the v0.1.1 release notes ("a clean OpenClaw profile should install the plugin from ClawHub and list all seven OB1 Agent Memory tools"), and per the kind: memory plugin pattern other memory plugins use in OpenClaw (e.g. bundled memory-core, @openclaw/memory-lancedb), one of:

  1. The seven openbrain_* tools appear in the agent's available tool list and the agent can call them directly, or
  2. The runtime auto-invokes recall before the turn and writeback after, populating agent_memory_recall_traces / agent_memory_audit_events for every meaningful turn.

Neither happens with v0.1.1 + OpenClaw 2026.5.7.

Steps to reproduce

  1. Stand up Open Brain locally (in this case: official supabase/supabase Docker compose self-host on Linux + the OB1 schemas applied via docker exec ... psql).
  2. Deploy integrations/agent-memory-api/index.ts as a local Edge Function (we mounted into volumes/functions/agent-memory-api/ and added OPENROUTER_API_KEY + MCP_ACCESS_KEY to the functions service env). Confirm /health returns 200.
  3. Install the plugin from a local clone of integrations/openclaw-agent-memory/plugin/:
    openclaw plugins install /tmp/ob1-clone/integrations/openclaw-agent-memory/plugin --force
    
    (Direct ClawHub install via openclaw plugins install clawhub:@natebjones/ob1-agent-memory still returns ClawHub package "@natebjones/ob1-agent-memory" has no installable version even after the v0.1.1 distribution-fix release — possibly a separate ClawHub registry issue.)
  4. Configure the plugin in openclaw.json:
    "plugins": {
      "slots": {"memory": "nbj-ob1-agent-memory"},
      "allow": ["nbj-ob1-agent-memory", ...],
      "entries": {
        "nbj-ob1-agent-memory": {
          "enabled": true,
          "config": {
            "endpoint": "http://localhost:8000/functions/v1/agent-memory-api",
            "accessKey": "<MCP_ACCESS_KEY>",
            "workspaceId": "openclaw-fleet",
            "requireReviewByDefault": true,
            "includeUnconfirmedRecall": false
          }
        }
      }
    }
  5. Restart the gateway. Verify openclaw plugins doctor reports no issues.
  6. Dispatch any agent (e.g. openclaw agent --agent <any> --message "what is your role?"). Turn completes successfully.
  7. Query the brain — observe agent_memories, agent_memory_recall_traces, agent_memory_audit_events are all empty, and the Edge Function logs show no requests arrived from the gateway.
  8. Ask the agent to list openbrain_*-prefixed tools — none appear. Ask it to call openbrain_recall — it errors with "Tool not found in available tools."

Plausible cause (from inspection of dist/index.js)

The plugin registers each of the seven tools via api.registerTool({ name: "openbrain_recall", run: (client, input) => client.recall(input) }). Searching the compiled bundle for memoryHost, onRecall, onWriteback, provideMemory, or hooks returns nothing, so the plugin appears to register agent-callable tool handlers rather than runtime-side memory-host hooks. By contrast, the OpenClaw plugin SDK ships memory-host-core.d.ts, memory-host-search.d.ts, memory-core-host-query.d.ts, etc., which other kind: memory plugins implement and which OpenClaw's runtime invokes around each turn.

If the manifest declares kind: memory (which routes the plugin into the exclusive memory slot and the runtime expects host hooks) but the implementation registers tools instead, both paths end up unreachable: the slot owner has no host hooks to call, and the agent's tool list filters out tools belonging to memory-slot plugins.

Environment

  • OpenClaw 2026.5.7 (eeef486)
  • Plugin @natebjones/ob1-agent-memory v0.1.1 (installed from local clone of NateBJones-Projects/OB1@main, commit 151a8d1)
  • Backend: self-hosted Supabase via official supabase/supabase@main Docker compose, all 13 services healthy, OB1 schemas applied (agent-memory, enhanced-thoughts, entity-extraction, workflow-statustyped-reasoning-edges skipped due to a pre-existing dependency issue; not relevant to this report)
  • Edge Function deployed via the bundled supabase-edge-functions container in the self-host stack
  • Linux 6.17.0-23-generic x86_64, Node v22.22.1, Deno 1.x (whatever ships in supabase/edge-runtime:v1.71.2)

Useful next investigation

Either:

  • Add the runtime-side memory-host hook implementations (memory-host-core, memory-host-search, etc.) to dist/index.js so the runtime can auto-invoke recall/writeback around each turn, or
  • Change kind from memory to whatever value lets the seven tools surface as agent-callable while still occupying the appropriate slot (so the discipline skill nbj-ob1-agent-memory-openclaw can guide the agent to call them per its written rules), or
  • Document the additional OpenClaw config required (e.g., a per-agent agents.list[*].memory.enabled flag, or a separate runtime.memory.autoInvoke setting) that we're missing.

Backend infrastructure and schema are sound — happy to share agent_memory_* table dumps, gateway logs, or any specific diagnostic output that would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions