memoryClaw CLAUDE.md

A project instruction file for MemoryClaw, an open-source library that gives AI agents persistent memory and context management. It records project status, including completed memory search and multi-user isolation work.

In plain words
What is it for?
Use it when developing or reviewing MemoryClaw, especially its MCP tools, n8n workflows, SQLite storage, working memory, and multi-user features.
Why use it?
It helps an agent understand the current state of the project before changing it. This lowers the risk of repeating completed work or breaking user separation.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/tostechbr/memoryclaw/claude-md
Clone the repo
git clone --depth 1 https://github.com/tostechbr/memoryClaw
Per session 6,485 This file is loaded in full into every session.
When invoked 6,485 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.06485 $0.06485
Opus 5 $0.03243 $0.03243
Sonnet 5 $0.01297 $0.01297
Haiku 4.5 $0.00649 $0.00649

Measured 2d ago against content hash 070c511c322b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memoryClaw CLAUDE.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

└── webhook-scenarios.sh # ← 7 cenários e2e (11 assertions) via curl
CLAUDE.md · 734 lines

How it starts

The opening of the file, as written. The whole thing — 734 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MemoryClaw

Open-source library for adding persistent memory and context management to AI agents.

Reference: Architecture based on Moltbot memory system.

Project Status

Phase 1: Memory Search      ✅ COMPLETE (MCP + n8n working)
Phase 1.5-n8n: Quick Wins   ✅ COMPLETE (2026-02-06)
                            - memory_store/delete tools ✅
                            - 20 unit tests (100%) ✅
                            - 3 n8n workflows ✅
                            - Architecture docs ✅
Phase 1.5-QA: Tests & Bugs  ✅ COMPLETE (2026-02-06)
                            - 2 bugs fixed (sync orphans, force reindex) ✅
                            - Integration tests (15 tests) ✅
                            - QA scenarios (17 assertions) ✅
                            - 140 total tests passing ✅
Sprint 0: Multi-User        ✅ COMPLETE (2026-03-06)
                            - userId param in all 4 MCP tools ✅
                            - Per-user workspace (users/{userId}/) ✅
                            - Per-user SQLite DB ✅
                            - Working memory (context.json) ✅
                            - memory_context MCP tool ✅
                            - 12 isolation tests (100%) ✅
                            - Validated in n8n (store+search+isolation) ✅
                            - Bug fixes: path validation, minScore 0.35→0.15 ✅
Sprint 1: Vector Search     ✅ COMPLETE (2026-03-07)
                            - cosineSimilarity() + searchVectorInProcess() ✅
                            - Hybrid merge using real vector results ✅
                            - memory_add tool (LLM extract + merge) ✅
                            - extractionModel configurable (default: gpt-4o-mini) ✅
                            - 149 total tests passing (10 new math + 4 memory_add) ✅
Sprint 1 E2E Validation     ✅ COMPLETE (2026-03-07)
                            - n8n webhook workflow validated end-to-end ✅
                            - 11/11 e2e scenarios passing ✅
                            - Workflow JSON exported: examples/n8n-memory-claw-memory-test.json ✅
                            - Test script: tests/e2e/webhook-scenarios.sh ✅
                            - Fix: MCP Client toolDescription with explicit param schemas ✅
Sprint 2: Context Management 🎯 NEXT
Phase 3: Session Lifecycle  📋 FUTURE

Read the full file on GitHub · 734 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 734 lines · 6,485 tokens per session scan A 070c511c322b

Subscribe to this mod's changes

memoryClaw CLAUDE.md is an instructions file published in the GitHub repository tostechbr/memoryClaw (8 stars, last pushed 5mo ago), licensed MIT. It adds 6,485 tokens to every session, about $0.0324 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.