Quick Start
The fastest way to get Walrus Memory running is through the TypeScript SDK.
Install the SDK
- pnpm
- npm
- yarn
- bun
pnpm add @mysten-incubation/memwal
npm install @mysten-incubation/memwal
yarn add @mysten-incubation/memwal
bun add @mysten-incubation/memwal
Optional packages
For AI middleware with Vercel AI SDK (@mysten-incubation/memwal/ai):
- pnpm
- npm
- yarn
- bun
pnpm add ai
npm install ai
yarn add ai
bun add ai
For the manual client flow (@mysten-incubation/memwal/manual):
- pnpm
- npm
- yarn
- bun
pnpm add @mysten/sui @mysten/seal @mysten/walrus
npm install @mysten/sui @mysten/seal @mysten/walrus
yarn add @mysten/sui @mysten/seal @mysten/walrus
bun 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.
The following endpoints are provided as a public good by Walrus Foundation.
| App | URL |
|---|---|
| Walrus Memory Playground | memory.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:
Following endpoints are provided as public good by Walrus Foundation.
| Network | Relayer 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.