Skip to main content

Portable memory for AI agents using Walrus and Sui.

Project description

🧠 MemWal

Portable memory for AI agents.

A decentralized LangGraph checkpoint backend powered by Walrus and Sui.

Kill the machine. Start another one. The agent continues.

Python LangGraph Sui + Walrus

🚀 TL;DR

Today:

AI Agent

↓

Local RAM

↓

Process dies

↓

Memory lost


With MemWal:

AI Agent

↓

Walrus

↓

Sui

↓

Resume anywhere

MemWal lets LangGraph agents survive machine restarts without relying on SQLite, Redis, or local files.

Why MemWal?

Most AI agent memory is tied to the machine where the agent is running. If the process exits, the container restarts, or the developer switches machines, the agent's state often disappears with it unless a local database or custom persistence layer has been wired in.

Without MemWal:

AI Agent

↓

Local RAM

↓

Machine dies

↓

Memory lost

With MemWal:

AI Agent

↓

Walrus

↓

Sui

↓

Memory survives

MemWal replaces local-only checkpoint storage with decentralized persistence while keeping the LangGraph developer experience familiar.

Architecture

LangGraph Agent

↓

WalrusCheckpointer

↓

Walrus (blob storage)

↓

Sui (thread_id → blob_id registry)

↓

Resume anywhere

At a high level, MemWal stores checkpoint bytes in Walrus and records the latest blob ID for each thread_id in a Sui registry object.

✅ What We Verified

Capability Status
Snapshot checkpoints
Delta checkpoints
Cross-machine recovery
Multi-thread isolation
Storage benchmarks
Walrus integration
Sui integration
GitHub CI

🌍 Why this matters

Today's agent memory is usually tied to:

  • RAM
  • SQLite
  • Redis
  • Local files

If the machine disappears, the memory disappears.

MemWal decouples memory from compute.

An agent can stop running on one machine and continue running on another by restoring its state from Walrus and Sui.

Features

  • Snapshot checkpoints
  • Delta checkpoints
  • Cross-machine recovery
  • Multi-thread isolation
  • On-chain thread registry
  • Storage benchmarks
  • GitHub CI

Installation

pip install memwal-checkpoint

Or install directly from GitHub:

pip install git+https://github.com/Surojit012/memwal.git

Note

MemWal is the product name.

memwal-checkpoint is the Python package distribution name.

Imports remain:

from memwal import WalrusCheckpointer

🛠️ Development

Install local development dependencies:

pip install -r requirements.txt

Install the package:

pip install -e .

⚡ One-line integration

Replace:

checkpointer = MemorySaver()

with:

checkpointer = WalrusCheckpointer.from_env()

That's it.

Your LangGraph agent now stores memory on Walrus and uses Sui as a decentralized thread registry.

Quickstart

from memwal import WalrusCheckpointer

checkpointer = WalrusCheckpointer.from_env()

graph = builder.compile(
    checkpointer=checkpointer
)

Live Demo Results

The demo runner verifies MemWal against live Walrus and Sui testnet infrastructure.

5 steps:

strategy savings
snapshot 60.87%
delta 53.75%

20 steps:

strategy savings
snapshot 75.66%
delta 81.01%

Delta mode becomes more efficient as conversations grow because it stores incremental changes instead of repeatedly uploading the full growing checkpoint.

Cross-machine verification

MemWal has been verified with a cross-machine recovery flow:

Machine A

↓

Store memory

↓

Destroy machine

↓

Machine B

↓

Restore memory

The restored agent state comes from Walrus and Sui, not from local files, local RAM, or a local database.

Multi-thread isolation

MemWal has also been verified with independent thread recovery:

Thread A -> Pizza

Thread B -> Football

Thread C -> Python

Each thread restores only its own memory. No cross-thread contamination was observed.

How it works

  1. Serialize the LangGraph checkpoint.
  2. Upload the checkpoint bytes to Walrus.
  3. Register the returned Walrus blob ID on Sui under the LangGraph thread_id.
  4. Restore by looking up the thread_id on Sui, fetching the blob from Walrus, and reconstructing the checkpoint.

This gives each LangGraph thread a decentralized memory pointer:

thread_id -> Sui registry -> Walrus blob -> LangGraph checkpoint

🎯 Demo Proof

MemWal has been validated end-to-end on live Walrus and Sui testnet infrastructure.

Verified scenarios:

  • ✅ Agent persistence
  • ✅ Cross-machine recovery
  • ✅ Multi-thread isolation
  • ✅ Snapshot checkpoints
  • ✅ Delta checkpoints
  • ✅ GitHub CI

No local database was used.

No local files were used.

No in-memory state was reused.

Roadmap

  • Delta compaction
  • PyPI release
  • Monitoring dashboard

License

MIT

Kill the machine. Start another one. The agent continues.

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

memwal_checkpoint-0.1.1.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

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

memwal_checkpoint-0.1.1-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file memwal_checkpoint-0.1.1.tar.gz.

File metadata

  • Download URL: memwal_checkpoint-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for memwal_checkpoint-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9aa6c475cd5e1d3d760c5e451f70115b0225be40850ba28a223c60f9004440ef
MD5 7e828860df8d804e99d8e98c88a28980
BLAKE2b-256 41c9822bcd475960ac0e5297d782f53a0f2a85396a8ec29d30472bdda3a1ce25

See more details on using hashes here.

File details

Details for the file memwal_checkpoint-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for memwal_checkpoint-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01f97fe0648ab87fdf45674e5f491ae40237b0b1a0d581b120a9811d897959f0
MD5 2ed335e4fb535fba1e9641452dd26f7d
BLAKE2b-256 7361ce5b6dbc464b40cb5ec058336ee1b1ce1eea994f653cb74e380b661b3d33

See more details on using hashes here.

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