Skip to main content

AI Memory Interchange Layer — language-neutral bridge for AI memory systems

Project description

memlink

A canonical interchange format for AI memories — like Pandoc, but for AI memory systems.

Built for developers building AI assistants, memory platforms, and agent frameworks.

CI Python PyPI License Code style: ruff


Why memlink?

Different AI tools store memories differently. memlink lets them exchange memories without every project writing custom converters.

Without memlink — 10 memory formats need 45 converters. Every new format makes it worse:

Ombre → OpenClaw    Ombre → Mem0    Ombre → Zep
Mem0 → Zep          OpenClaw → Zep  ...

With memlink — each format writes one Reader + one Writer. Everything else is automatic:

         ┌── Reader → Canonical ──┬── Writer → OpenClaw
  Ombre ─┤                        ├── Writer → Mem0
         └── ...                   └── Writer → Any Format

n systems = 2n plugins. Not n² converters.


Quick Start

pip install memlink-bridge

# Convert Ombre → OpenClaw
memlink convert --from ombre --to openclaw \
  -s ~/.claude/ombre-buckets -T ./my-memories/

# Inspect any memory file
memlink inspect tests/fixtures/ombre_samples/dynamic/user/sample.md

# Validate data integrity
memlink validate -s tests/fixtures/ombre_samples --level schema

# Show installed formats
memlink formats

Supported Formats

Format Read Write Status
Ombre Brain Stable
OpenClaw Stable
Generic Markdown Stable
Mem0 🚧 v0.2
Zep 🚧 v0.3

3 plugins, 7+ apps interoperable. Generic alone covers Obsidian, Logseq, Bear, iA Writer, and plain Markdown — every app that uses YAML frontmatter.


Architecture

  Ombre ──┐
Generic ──┼──→ Reader → Canonical Memory → Writer ──┬──→ OpenClaw
OpenClaw ─┘                                          └──→ Ombre

Each format implements three methods:

class FormatPlugin:
    def read(path)  ReadResult       # Format → Canonical
    def write(memories, path)  []    # Canonical → Format
    def validate(path)  [Issue]      # Integrity checks

Add a new format = write one plugin. Zero changes to core code.


Feature Compatibility

memlink is honest about what gets lost. Every conversion shows a Compatibility Report:

$ memlink convert --from ombre --to openclaw -s ombre/ -T openclaw/

  Read:     117 memories from ombre

  Compatibility Report:
    [ok] Preserved via metadata:
      Emotion fields (valence/arousal): 117 field values

  Warnings: 0
  Time:     0.23s

No silent data loss. No surprises.


Canonical Memory Schema

id: "project-alpha"
name: "Project Alpha Kickoff"
body: "..."
kind: dynamic
tags: [meeting, planning]
metadata: { ... }

See spec/canonical-v1.md for the full specification. JSON Schema also available.


Roadmap

Version Focus
v0.2 Mem0 Reader, daily-notes roundtrip, --fail-on-loss
v0.3 Zep Reader, chat export readers (ChatGPT, Claude)
v0.4 memlink merge, memlink broadcast
v1.0 Stable Canonical Schema v1, stable Plugin API

What memlink is NOT

  • Sync engine — v0 is export/import only
  • Memory database — Works with files, not APIs
  • Embedding store — No vector search
  • Knowledge graph — No traversal or inference

Development

git clone https://github.com/velnori/memlink.git
cd memlink
pip install -e ".[dev]"

pytest tests/ -v          # 115 tests
ruff check memlink/       # Lint
mypy memlink/             # Type check

See CONTRIBUTING.md for how to add a new format.


License

MIT — see LICENSE.

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

memlink_bridge-0.1.1.tar.gz (44.3 kB view details)

Uploaded Source

Built Distribution

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

memlink_bridge-0.1.1-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

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