| title | Quick Start |
|---|---|
| description | Install the MemWal SDK and store your first memory in under a minute. |
The MemWal SDK gives your app persistent, encrypted memory — store, recall, and analyze context across sessions. It exposes three entry points:
| Entry point | Import | When to use |
|---|---|---|
MemWal |
@mysten-incubation/memwal |
Recommended default for most integrations — relayer handles embeddings, SEAL, and storage |
MemWalManual |
@mysten-incubation/memwal/manual |
You need client-managed embeddings and local SEAL operations |
withMemWal |
@mysten-incubation/memwal/ai |
You already use the Vercel AI SDK and want memory as middleware |
npm install @mysten-incubation/memwalpnpm add @mysten-incubation/memwalyarn add @mysten-incubation/memwalFor MemWalManual, you also need the optional peer dependencies:
npm install @mysten/sui @mysten/seal @mysten/walruspnpm add @mysten/sui @mysten/seal @mysten/walrusyarn add @mysten/sui @mysten/seal @mysten/walrusFor withMemWal, you also need:
npm install ai zodpnpm add ai zodyarn add ai zodBefore wiring the SDK into your app:
- These hosted endpoints are provided by Walrus Foundation.
- Generate a MemWal account ID and delegate private key for your client using the hosted endpoint:
- Production (mainnet):
https://memwal.aiorhttps://memwal.wal.app - Staging (testnet):
https://staging.memwal.ai
- Production (mainnet):
- Choose a relayer:
- Use the hosted relayer at
https://relayer.memwal.ai(mainnet) orhttps://relayer.staging.memwal.ai(testnet) - Or deploy your own relayer with access to a wallet funded with WAL and SUI
- Use the hosted relayer at
MemWal.create takes a config object with the following fields:
| Property | Type | Required | Description |
|---|---|---|---|
key |
string |
Yes | Ed25519 private key in hex |
accountId |
string |
Yes | MemWalAccount object ID on Sui |
serverUrl |
string |
No | Relayer URL — use https://relayer.memwal.ai (mainnet) or https://relayer.staging.memwal.ai (testnet) for the managed relayer |
namespace |
string |
No | Default namespace — falls back to "default" |
import { MemWal } from "@mysten-incubation/memwal";
const memwal = MemWal.create({
key: "<your-ed25519-private-key>",
accountId: "<your-memwal-account-id>",
serverUrl: "https://your-relayer-url.com",
namespace: "demo",
});
await memwal.health();
await memwal.remember("I live in Hanoi and prefer dark mode.");
const result = await memwal.recall("What do we know about this user?");
console.log(result.results);- Usage — all three clients in detail, namespace rules, and restore
- API Reference — full method signatures and config fields