OpenClaw Universal Memory
by @marcosathanasoulis
Generic Postgres and pgvector memory layer for connector-agnostic data ingestion, incremental sync, and searchable chunk storage with cursor history.
clawhub install openclaw-universal-memoryπ About This Skill
name: openclaw-universal-memory description: Connector-agnostic Postgres + pgvector memory ingestion and retrieval with incremental cursor history.
OpenClaw Universal Memory
This skill provides a generic memory layer for heterogeneous data:
Use Cases
cursor per connector/account).Prerequisites
vector extension.pip install -e ..pip install "psycopg[binary]>=3.2"
DATABASE_DSN by default).Security Boundaries
SELECT/INSERT/UPDATE/DELETE on um_* tables only).Responsible Use Caveat
Commands
Store DB credentials once (recommended):
python skills/openclaw-universal-memory/scripts/run_memory.py \
--action configure-dsn
Initialize schema:
python skills/openclaw-universal-memory/scripts/run_memory.py \
--action init-schema \
--dsn-env DATABASE_DSN
Ingest JSON/NDJSON:
python skills/openclaw-universal-memory/scripts/run_memory.py \
--action ingest-json \
--dsn-env DATABASE_DSN \
--source gmail \
--account marcos@athanasoulis.net \
--entity-type email \
--input /path/to/records.ndjson
Ingest from built-in connectors:
python skills/openclaw-universal-memory/scripts/run_memory.py \
--action ingest-connector \
--connector google \
--account you@example.com \
--dsn-env DATABASE_DSN \
--limit 300
Validate connector auth/config before ingest:
python skills/openclaw-universal-memory/scripts/run_memory.py \
--action validate-connector \
--connector google \
--account you@example.com \
--dsn-env DATABASE_DSN \
--limit 1
Search:
python skills/openclaw-universal-memory/scripts/run_memory.py \
--action search \
--dsn-env DATABASE_DSN \
--query "Deryk" \
--limit 20
Recent ingest history:
python skills/openclaw-universal-memory/scripts/run_memory.py \
--action events \
--dsn-env DATABASE_DSN \
--limit 20
Doctor check:
python skills/openclaw-universal-memory/scripts/run_memory.py \
--action doctor
Scheduling reference:
docs/SCHEDULING.md (cron examples, 15-minute default, connector toggles)Connector Contract (for custom adapters)
A connector returns normalized records + next cursor:
external_identity_typetitlebody_textraw_jsonmeta_jsonnext_cursorThis keeps ingestion generic and supports arbitrary source systems.
Starter connector templates:
src/openclaw_memory/connectors/templates.pyStep-by-step setup guide (Gmail/Slack/Asana/iMessage):
docs/CONNECTOR_SETUP_WALKTHROUGH.mdCommunity
We welcome connector contributions via PR.
See docs/CONNECTOR_CONTRIBUTING.md for required contract, tests, and setup instructions.
β‘ When to Use
βοΈ Configuration
vector extension.pip install -e ..pip install "psycopg[binary]>=3.2"
DATABASE_DSN by default).