Skip to main content

Quick Start

The fastest way to get Walrus Memory running is through the TypeScript SDK.

Install the SDK

pnpm add @mysten-incubation/memwal

Optional packages

For 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

Generate your account ID and delegate key

Create a Walrus Memory account ID and delegate private key for your SDK client using one of the hosted endpoints below.

note

The following endpoints are provided as a public good by Walrus Foundation.

AppURL
Walrus Memory Playgroundmemory.walrus.xyz

For the contract-based setup flow, see Delegate Key Management and Walrus Memory smart contract.

Choose a relayer

Use a hosted relayer, or deploy your own self-hosted relayer with access to a wallet funded with WAL and SUI:

note

Following endpoints are provided as public good by Walrus Foundation.

NetworkRelayer URL
Production (Mainnet)https://relayer.memory.walrus.xyz
Staging (Testnet)https://relayer-staging.memory.walrus.xyz

Configure the SDK

Set up the SDK with your delegate key, account ID, and relayer URL:

import { Walrus Memory } from "@mysten-incubation/memwal";

const memwal = Walrus Memory.create({
key: "<your-ed25519-private-key>",
accountId: "<your-memwal-account-id>",
serverUrl: "https://relayer.memory.walrus.xyz",
namespace: "my-app",
});

Verify your connection

Run a health check to confirm everything is working:

await memwal.health();

Store and recall your first memory

const job = await memwal.remember("User prefers dark mode and works in TypeScript.");
await memwal.waitForRememberJob(job.job_id);

const result = await memwal.recall({ query: "What do we know about this user?" });
console.log(result.results);

That's it - you're up and running.