← 返回
效率工具 中文

OpenClaw Universal Memory

Generic Postgres and pgvector memory layer for connector-agnostic data ingestion, incremental sync, and searchable chunk storage with cursor history.
通用的 Postgres 与 pgvector 内存层,实现连接器无关的数据摄取、增量同步及可搜索的分块存储,并保留游标历史。
marcosathanasoulis
效率工具 clawhub v1.0.0 1 版本 99805.8 Key: 无需
★ 0
Stars
📥 1,028
下载
💾 12
安装
1
版本
#latest

概述

OpenClaw Universal Memory

This skill provides a generic memory layer for heterogeneous data:

  • canonical entity/chunk schema,
  • connector-style ingestion with cursors,
  • searchable memory in Postgres.

Use Cases

  • Normalize records from multiple systems into one schema.
  • Keep incremental sync history (cursor per connector/account).
  • Build RAG-ready chunk storage in pgvector.

Prerequisites

  • Postgres with vector extension.
  • Local package installed: pip install -e ..
  • Python dependency for DB I/O:
  • pip install "psycopg[binary]>=3.2"
  • DSN provided via environment variable (DATABASE_DSN by default).

Security Boundaries

  • Do not pass raw passwords/tokens in command-line arguments.
  • Prefer OS secret store or process environment injection for DSN.
  • This skill only reads/writes your configured Postgres database; it does not call external APIs directly.
  • Use least-privilege DB credentials (SELECT/INSERT/UPDATE/DELETE on um_* tables only).
  • Review and trust any custom connector before running it.

Responsible Use Caveat

  • Use this only for accounts/data you legitimately control or are authorized to process.
  • You are responsible for privacy, retention, and regulatory compliance.
  • This project is provided under Apache 2.0 without operational warranty.
  • This implementation is mostly AI-generated code with experienced engineer oversight; validate before production use.

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_id
  • entity_type
  • title
  • body_text
  • raw_json
  • meta_json
  • next_cursor

This keeps ingestion generic and supports arbitrary source systems.

Starter connector templates:

  • src/openclaw_memory/connectors/templates.py

Step-by-step setup guide (Gmail/Slack/Asana/iMessage):

  • docs/CONNECTOR_SETUP_WALKTHROUGH.md

Community

We welcome connector contributions via PR.

See docs/CONNECTOR_CONTRIBUTING.md for required contract, tests, and setup instructions.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 06:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 432 📥 103,773
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,594
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,824