Shared Agent Memory Platform with runtime adapters for OpenClaw, Paperclip, and future agent systems.
agent-smart-memo started as an OpenClaw memory plugin. It is now evolving into a moduleized memory platform:
- core → contracts, use-cases, namespace policy, error model
- adapter-openclaw → plugin entry, tool registration, hook wiring, runtime bridge
- adapter-paperclip → runtime wrapper, caller integration, compatibility mapping
- shared infra → Qdrant, embeddings, SlotDB, GraphDB, packaging scripts
That means this repository should no longer be understood as only an OpenClaw plugin repo. It is a shared memory engine with target-specific artifacts.
Agent Smart Memo provides a unified memory stack for AI agents:
- Semantic memory via Qdrant (
memory_search,memory_store) - Structured slot memory via SQLite (
memory_slot_*) - Graph memory for entity/relationship retrieval (
memory_graph_*) - Auto-capture / auto-recall for OpenClaw runtime
- Shared runtime contracts for multi-system memory callers
- Target-based packaging so each runtime only consumes the artifact it needs
Use this when you want Agent Smart Memo as an OpenClaw memory plugin.
Contains:
- core
- required infra
- OpenClaw adapter
- plugin entry / hooks / tool registration
Artifact intent:
- OpenClaw plugin artifact
Use this when you want a Paperclip runtime caller over the same memory core.
Contains:
- core
- required infra
- Paperclip adapter
- runtime wrapper / compatibility mapper
Artifact intent:
- Paperclip runtime package
Use this when you only want shared contracts/use-cases for future systems.
Contains:
- core contracts
- use-case abstractions
- shared platform rules
Artifact intent:
- runtime-agnostic shared memory core
Current OpenClaw behavior must not break while module boundaries are extracted.
Do not treat the whole repository output as one OpenClaw-only artifact.
- OpenClaw artifact should contain only what OpenClaw needs
- Paperclip artifact should contain only what Paperclip needs
- Core artifact should stay reusable for future systems
The following should be shared across runtimes:
- namespace policy
- actor context contract
- error model
- use-case interfaces
- rollout guardrails
If your current goal is still “install the memory plugin into OpenClaw”, use this section.
openclaw plugins install @mrc2204/agent-smart-memoYou need these services running:
| Service | Purpose | Example |
|---|---|---|
| Qdrant | Semantic vector memory | docker run -d -p 6333:6333 qdrant/qdrant |
| Embedding backend | Embeddings for semantic memory | Ollama / OpenAI-compatible / docker adapter |
| LLM endpoint | Fact extraction / auto-capture | Any OpenAI-compatible API |
Add to ~/.openclaw/openclaw.json:
{
plugins: {
allow: ["agent-smart-memo"],
slots: {
memory: "agent-smart-memo"
},
entries: {
"agent-smart-memo": {
enabled: true,
config: {
qdrantHost: "localhost",
qdrantPort: 6333,
qdrantCollection: "openclaw_memory",
llmBaseUrl: "https://api.openai.com/v1",
llmApiKey: "sk-...",
llmModel: "gpt-4o-mini",
embedBaseUrl: "http://localhost:11434",
embedBackend: "ollama",
embedModel: "qwen3-embedding:0.6b",
embedDimensions: 1024,
slotDbDir: "/Users/your-user/.openclaw/agent-memo"
}
}
}
}
}npm install
npm run build
openclaw plugins install -l .If your goal is to let Paperclip consume the same memory core:
npm install
npm run build:paperclip
npm run package:paperclip
npm run pack:paperclipPaperclip should consume:
- shared core contracts/use-cases
- Paperclip adapter runtime
- no OpenClaw plugin metadata/runtime dependency unless explicitly needed
Paperclip path has:
- adapter contracts
- compatibility mapper
- runtime wrapper
- production-like smoke verification
But README intentionally does not overclaim this as full production-grade multi-runtime completion.
npm run buildDefault build remains OpenClaw-compatible for backward compatibility.
npm run build:openclaw
npm run build:paperclip
npm run build:core
npm run build:allnpm run package:openclaw
npm run package:paperclip
npm run package:corenpm run pack:openclaw
npm run pack:paperclip
npm run pack:corenpm run publish:openclaw
npm run publish:paperclip
npm run publish:corePublish requires valid npm authentication. If
NPM_TOKENis missing, publish should be treated as not ready / dry-run only.
GitHub Actions workflow: .github/workflows/publish.yml
Current flow:
- matrix build for
openclaw,paperclip,core - build → package → pack
.tgz→ upload artifact - target-aware tests
workflow_dispatchfor manual publishdry_runsupported- real publish gated by
NPM_TOKEN
A work/... branch is for:
- CI checks
- PR review
- dry-run readiness
It is not the same as:
- production deploy
- final release approval
- final npm publish approval
Recommended flow:
work/... push -> CI checks -> PR review -> approve -> merge default branch -> publish/release/deploy
memory_searchmemory_store- namespace-aware retrieval
- registry-aware alias normalization
- explicit unknown namespace validation
memory_slot_getmemory_slot_setmemory_slot_deletememory_slot_list
- entity create/get/search
- relationship add/remove
- scoped traversal
- auto-capture
- auto-recall
- runtime identity injection where supported
When embedBackend is set:
ollama→/api/embeddingsdocker→/engines/llama.cpp/v1/embeddingsopenai→/v1/embeddings
If omitted, legacy auto behavior is preserved.
Resolution order:
OPENCLAW_SLOTDB_DIR- plugin config
slotDbDir ${OPENCLAW_STATE_DIR}/agent-memo
Confirms code compiles:
npm run build
npm run build:allnpm test
npm run test:openclaw
npm run test:paperclipExamples already added in this repo include:
- Paperclip runtime E2E
- OpenClaw anti-regression integration
- production-like smoke parity harness
This is stronger than mock-only testing, but still distinct from a full production deployment.
src/
core/
contracts/
usecases/
adapters/
openclaw/
paperclip/
tools/
hooks/
entries/
services/
db/
shared/
scripts/
artifacts/
docs/architecture/
Current repo status after ASM-43 work:
- architecture pack completed
- implementation pack substantially advanced
- runtime wiring exists for OpenClaw and Paperclip paths
- production-like smoke parity evidence exists
- target-based packaging/build pipeline exists
Still be precise about claims:
- strong progress beyond scaffold ✅
- compatibility-first runtime wiring ✅
- full production-grade multi-runtime completion should only be claimed with full runtime-host evidence and approved release flow
# install dependencies
npm install
# default build (OpenClaw target)
npm run build
# build all targets
npm run build:all
# test
npm test
npm run test:openclaw
npm run test:paperclip
# package / pack
npm run package:openclaw
npm run package:paperclip
npm run package:core
npm run pack:openclaw
npm run pack:paperclip
npm run pack:coreMIT © mrc2204