Documentation Index
Fetch the complete documentation index at: https://docs.memwal.ai/llms.txt
Use this file to discover all available pages before exploring further.
The fastest way to get MemWal running is through the TypeScript SDK.
Prerequisites
Quick Start
Install the SDK
pnpm add @mysten-incubation/memwal
npm install @mysten-incubation/memwal
yarn add @mysten-incubation/memwal
bun add @mysten-incubation/memwal
Optional packagesFor AI middleware with Vercel AI SDK (@mysten-incubation/memwal/ai):For the manual client flow (@mysten-incubation/memwal/manual):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 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.
| App | URL |
|---|
| MemWal Playground | memwal.ai |
| Walrus-hosted Playground | memwal.wal.app |
For the contract-based setup flow, see Delegate Key Management and MemWal 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.memwal.ai |
| Staging (testnet) | https://relayer.staging.memwal.ai |
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",
});
Verify your connection
Run a health check to confirm everything is working: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("What do we know about this user?");
console.log(result.results);
That’s it - you’re up and running.