Skip to main content
The fastest way to get MemWal running is through the TypeScript SDK.

Prerequisites

Quick Start

1

Install the SDK

pnpm add @mysten-incubation/memwal
Optional packagesFor AI middleware with Vercel AI SDK (@mysten-incubation/memwal/ai):
pnpm add ai
For the manual client flow (@mysten-incubation/memwal/manual):
pnpm add @mysten/sui @mysten/seal @mysten/walrus
2

Generate your account ID and delegate key

Create a MemWal account ID and delegate private key for your SDK client using one of the hosted endpoints below.
The following endpoints are provided as a public good by Walrus Foundation.
AppURL
MemWal Playgroundmemwal.ai
Walrus-hosted Playgroundmemwal.wal.app
For the contract-based setup flow, see Delegate Key Management and MemWal smart contract.
3

Choose a relayer

Use a hosted relayer, or deploy your own self-hosted relayer with access to a wallet funded with WAL and SUI:
Following endpoints are provided as public good by Walrus Foundation.
NetworkRelayer URL
Production (mainnet)https://relayer.memwal.ai
Staging (testnet)https://relayer.staging.memwal.ai
4

Configure the SDK

Set up the SDK with your delegate key, account ID, and relayer URL:
import { MemWal } from "@mysten-incubation/memwal";

const memwal = MemWal.create({
  key: "<your-ed25519-private-key>",
  accountId: "<your-memwal-account-id>",
  serverUrl: "https://relayer.memwal.ai",
  namespace: "my-app",
});
5

Verify your connection

Run a health check to confirm everything is working:
await memwal.health();
6

Store and recall your first memory

await memwal.remember("User prefers dark mode and works in TypeScript.");

const result = await memwal.recall("What do we know about this user?");
console.log(result.results);
That’s it - you’re up and running.