Skip to main content

🌐 Choose a Network

"Network" means two independent choices: where the batched engine puts bytes (MEMORY_STORAGE), and - if you use memwal - which relayer network (MEMWAL_NETWORK). They don't interact.

1. Where bytes live (batched engine)

import { createStorage } from '@lighthouse-ai/core'

const storage = await createStorage('lh-ipfs-filecoin', { apiKey: process.env.LIGHTHOUSE_API_KEY })
// 'lh-ipfs-walrus' | 'walrus' alias | 'filecoin' alias | 's3' | 'local-fs'
MEMORY_STORAGE=lh-ipfs-filecoin   # default | lh-ipfs-walrus | s3 | local-fs
MEMORY_EMBEDDER=local # local (default) | keyword
lh-ipfs-walruslh-ipfs-filecoin (default)s3local-fs
BackingWalrus blobs on SuiIPFS + Filecoin dealsAWS S3 / R2 / MinIOLocal folder
NeedsLIGHTHOUSE_API_KEY (Sui-wallet key)LIGHTHOUSE_API_KEY (any)S3_BUCKET (+ S3_ENDPOINT / creds for R2/MinIO)dir or MEMORY_DIR (offline)
Upload endpointupload-walrus.lighthouse.storageupload.lighthouse.storageyour bucket/endpoint-
Gatewaygateway-walrus.lighthouse.storagegateway.lighthouse.storageS3_PUBLIC_BASE_URL or s3://bucket/prefix/blobs/<cid>.jsonfile://…
Quota accounting~63 MB per blob (erasure coding)Actual file sizeYour bucketYour disk
Deletable / listableYes / YesYes / YesYes / YesYes / Yes
Walrus blob IDs✅ (storage.getBlobIds(cid))Returns []Returns []Returns []

Short aliases walrus and filecoin (plus bare lighthouse, which follows MEMORY_NETWORK/MEMORY_STORAGE) are accepted anywhere a storage kind is.

S3 keys are content-addressed (<prefix>/blobs/<cid>.json + <prefix>/names/<fileName> alias, default prefix memory-sdk); forget() is a hard delete there. local-fs keeps blobs plus CID pointer files under the state dir.

2. Which relayer (memwal engine)

MEMWAL_NETWORK=mainnet   # or testnet (staging relayer)
mainnet (default)testnet
Relayerhttps://relayer.memory.walrus.xyzhttps://relayer-staging.memory.walrus.xyz
Dashboard / credentialshttps://memory.walrus.xyzhttps://staging.memory.walrus.xyz
Sui fullnode / aggregatormainnettestnet

Credentials are per-network - a testnet delegate key won't work on mainnet. Memwal needs MEMWAL_PRIVATE_KEY + MEMWAL_ACCOUNT_ID on either network; LIGHTHOUSE_API_KEY is optional (pins public IPFS mirrors) and MEMWAL_IPFS_PIN=off disables pinning.

Notes

  • Isolation - each storage network keeps its own blobs per namespace, and each memwal network keeps its own relayer index per namespace; the same namespace on two networks never mixes. Memories written to one network are recalled and rebuilt from that network only. The pointer service tracks namespace × network separately too.
  • Quota - on Walrus, batching is essential (every blob costs ~63 MB of quota regardless of size; keep flushEvery high); on IPFS/Filecoin quota tracks real bytes, so batching mainly reduces request overhead; on S3/local it only reduces object count.
  • Sui integrations - choose lh-ipfs-walrus (batched) or memwal on either network when you need Walrus-native blob IDs for on-chain references or Sui ecosystem tooling.
  • Offline dev - local-fs + keyword needs no keys and no network: MEMORY_STORAGE=local-fs MEMORY_EMBEDDER=keyword. Tests pin exactly this so they stay offline.