Skip to main content

Overview

Walrus Memory exposes SDK surfaces for TypeScript and Python. The SDKs give your agents portable memory that works across apps, sessions, and workflows, fully under your control.

@mysten-incubation/memwal​

Use this first.

  • relayer-backed
  • best path for most teams
  • main methods: remember, recall, analyze, ask, restore, health
Source: sdk/overview.md
import { MemWal } from "@mysten-incubation/memwal";

@mysten-incubation/memwal/manual​

Use this when the client must handle embeddings and local Seal operations.

  • relayer still handles upload relay, registration, search, and restore
Source: sdk/overview.md
import { MemWalManual } from "@mysten-incubation/memwal/manual";

@mysten-incubation/memwal/ai​

Use this when you already use the AI SDK: withMemWal is AI SDK middleware.

Source: sdk/overview.md
import { withMemWal } from "@mysten-incubation/memwal/ai";

memwal​

The Python SDK mirrors the TypeScript MemWal client exactly, same methods, same relayer, same auth flow. Built for the Python AI/ML ecosystem.

  • relayer-backed (same managed relayer endpoints)
  • Ed25519 signing through PyNaCl
  • async-native with a sync convenience wrapper
  • LangChain and OpenAI SDK middleware included
Source: sdk/overview.md
$ pip install memwal
$ pip install memwal[langchain] # LangChain middleware
$ pip install memwal[openai] # OpenAI SDK middleware
$ pip install memwal[all] # everything
Source: sdk/overview.md
from memwal import MemWal

memwal = MemWal.create(
key="<your-ed25519-private-key>",
account_id="<your-memwal-account-id>",
server_url="https://relayer.memory.walrus.xyz",
namespace="demo",
)

Main methods: remember, recall, analyze, ask, restore, health

Middleware: with_memwal_langchain, with_memwal_openai


What is the default namespace?​

All clients support a default namespace. If you omit it, it falls back to "default".

  1. Start with MemWal (TypeScript) or memwal (Python)
  2. Set a namespace explicitly
  3. Validate remember, recall, analyze, and restore
  4. Move to MemWalManual only if you need client-managed embeddings and local Seal work

Which private key formats can you use?​

The key parameter takes an Ed25519 delegate private key as a string in either of these formats:

  • A hex seed, with or without a 0x prefix
  • A Sui suiprivkey1... string, the format that sui keytool and wallets export

The TypeScript and Python SDKs normalize the key the same way. generateDelegateKey() returns the private key as hex.

What are local Seal operations?​

With MemWal, the relayer performs the Seal encryption and you do not manage keys. With MemWalManual, your client performs Seal encryption locally, so plaintext never leaves your process and the relayer never sees it. In exchange, your agent holds its own key material, and if you lose the delegate key, you cannot recover the encrypted memories. For what Seal is, see What is Seal encryption?.