Skip to main content

Weave your agents' memories into one searchable fabric — local-first, pluggable, raw-preserving.

Project description

memory-pipeline

Unified agent memory collection + local knowledge base.

Collects memory from multiple AI agents (OpenClaw, Claude Code, Codex, etc.) on local or SSH-reachable hosts, stores them as a raw-preserving data lake (JSON + markdown + SQLite FTS5), and exposes full-text search via a CLI.

Why

Every agent has its own memory. None of them talk to each other. This tool is the bottom layer of a stack that lets you grep/search/retrieve across all of them from one place.

The v0.1 design keeps everything raw — original files are copied (or referenced) to disk in their original form, with derived layers (facts, vector indices, graph relations) added on top later. You can always go back to the source.

v0.4 scope

  • Agents (collect): OpenClaw, Claude Code, Codex CLI, LibreChat, Generic JSONL
  • Agents (sync/push): OpenCode, Kilo Code, Qoder, Antigravity brain — push local stores to HTTP ingest
  • Hosts: local + SSH
  • Pipeline: collect → privacy-filter → tag → dedup → persist
  • Retrieval: CLI mp search over SQLite FTS5 + vector hybrid search
  • Ingest server: FastAPI POST /ingest with Bearer auth, privacy filter, auto-embed

Install

uv sync
# or: pip install -e .

Quick start

# 1. Drop a starter config
mp init-config ./config/memory-pipeline.yaml

# 2. Edit it: pick which agents, which hosts

# 3. Collect once
mp collect

# 4. Search
mp search "memory pipeline"
mp search --source openclaw "Beta preferences"

# 5. Inspect a record
mp inspect rec_abc123...

# 6. Status
mp status

# 7. (Push mode) Sync local agent stores to ingest server
mp sync run ~/.memloom-sync/config.yaml --once

Layout

data/                          # data_root from config
  raw/<source>/<key>.json      # canonical record
  raw/<source>/<key>.md        # human-readable mirror
  index.sqlite                 # FTS5 over all records
  runs.sqlite                  # collector run history
  watermarks.json              # incremental cursors

Sync config (push mode)

# ~/.memloom-sync/config.yaml
endpoint: http://192.168.5.101:8789/ingest
api_key: memloom_ingest_xxxxx
batch_size: 500

sources:
  - type: opencode
    db: ~/.local/share/opencode/opencode.db
  - type: kilocode
    session_dir: ~/Library/Application Support/Code/User/globalStorage/kilocode.kilo-code/tasks

Cron

scripts/install-cron.sh registers mp collect every 5 minutes in the user's crontab. Idempotent — re-running picks up only what changed.

Architecture

Agents ──► Collectors ──► Pipeline ──► RawStore
                                  │
                                  └──► (future) Vector index
                                  └──► (future) MCP server
  • Collectors: one per agent type. They know the agent's on-disk format and yield MemoryRecords. They don't know about persistence.
  • Transport: pluggable. LocalTransport for local files, SSHTransport (Fabric) for remote. Collectors ask the transport to read/list — they don't care which one.
  • Pipeline: pure transforms on records — privacy filter, tag inference, deduper. Composable.
  • RawStore: append-only-ish writes keyed by content hash. Three artifacts per record (json + md + sqlite row). FTS5 index for retrieval.

Adding a new agent

  1. Subclass AgentAdapter in memloom/collectors/your_agent.py.
  2. Implement discover() (return list of Source) and pull() (yield (MemoryRecord, Watermark) pairs).
  3. Register in memloom/collectors/__init__.py:_REGISTRY.
  4. Add a config block under agents:.

That's it — pipeline + transport + store need zero changes.

Commit message format

We follow Conventional Commits (English, unless otherwise stated). Every commit message must match this format:

<type>(<scope>): <subject>     ←  ≤72 chars, imperative, no period

[optional body]                 ←  wrap at ~72 chars, explain WHAT and WHY

[optional footer]               ←  BREAKING CHANGE: or Refs: #123

Types: feat, fix, docs, style, refactor, test, chore, build, ci, perf, revert. Breaking changes use a ! after the type/scope (feat(api)!: drop v1 endpoint) or a BREAKING CHANGE: footer.

Scopes (project-specific): collectors, store, pipeline, transport, vector, mcp, cli, config, docs, deps, ci.

The repo ships with a .gitmessage template and a commit-msg git hook that enforces the format. To enable the hook after cloning:

./scripts/install-hooks.sh
git config commit.template .gitmessage

Examples:

feat(collectors): add OpenCode adapter
fix(privacy): strip ghp_ tokens from raw_meta
docs: add AnythingLLM integration guide
refactor(store)!: drop legacy v1 schema
chore(deps): bump pydantic to 2.13

Future (architecture already supports it)

  • v0.2: GitHub / Feishu / Notion / Email / browser extensions → drop in collectors under collectors/saas/.
  • v0.2: AnythingLLM integration via push to its Custom Embedding API.
  • v0.2: MCP server exposing search_records + get_record for OpenClaw.
  • v0.3: Graph layer (relationships between records, projects, agents).

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memloom-0.5.0.tar.gz (183.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memloom-0.5.0-py3-none-any.whl (78.6 kB view details)

Uploaded Python 3

File details

Details for the file memloom-0.5.0.tar.gz.

File metadata

  • Download URL: memloom-0.5.0.tar.gz
  • Upload date:
  • Size: 183.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memloom-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ae3903f1e9232d07236e454f12a275d12a8ab3365177d9c5d16f4d578c42547f
MD5 57f5ed4cbb996f5df4556346c1c07ca7
BLAKE2b-256 34591a8149461666426b8f14c8d98d6308c75a069139b8ed4e4bcaaa96d6da10

See more details on using hashes here.

Provenance

The following attestation bundles were made for memloom-0.5.0.tar.gz:

Publisher: publish.yml on atbeta/memloom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file memloom-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: memloom-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 78.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memloom-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ea0cdb45094a3611ed483b7cd430f456e90237922a0aa996d6c05fc10357151
MD5 21e5d87e8dcc5a7a24052efa3d49156f
BLAKE2b-256 719b5ce97e4932d7039e31a35d5a396ab742491a168285222a662873063eb7ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for memloom-0.5.0-py3-none-any.whl:

Publisher: publish.yml on atbeta/memloom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page