🌐 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-walrus | lh-ipfs-filecoin (default) | s3 | local-fs | |
|---|---|---|---|---|
| Backing | Walrus blobs on Sui | IPFS + Filecoin deals | AWS S3 / R2 / MinIO | Local folder |
| Needs | LIGHTHOUSE_API_KEY (Sui-wallet key) | LIGHTHOUSE_API_KEY (any) | S3_BUCKET (+ S3_ENDPOINT / creds for R2/MinIO) | dir or MEMORY_DIR (offline) |
| Upload endpoint | upload-walrus.lighthouse.storage | upload.lighthouse.storage | your bucket/endpoint | - |
| Gateway | gateway-walrus.lighthouse.storage | gateway.lighthouse.storage | S3_PUBLIC_BASE_URL or s3://bucket/prefix/blobs/<cid>.json | file://… |
| Quota accounting | ~63 MB per blob (erasure coding) | Actual file size | Your bucket | Your disk |
| Deletable / listable | Yes / Yes | Yes / Yes | Yes / Yes | Yes / 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 | |
|---|---|---|
| Relayer | https://relayer.memory.walrus.xyz | https://relayer-staging.memory.walrus.xyz |
| Dashboard / credentials | https://memory.walrus.xyz | https://staging.memory.walrus.xyz |
| Sui fullnode / aggregator | mainnet | testnet |
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 × networkseparately too. - Quota - on Walrus, batching is essential (every blob costs ~63 MB of quota regardless of size; keep
flushEveryhigh); 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+keywordneeds no keys and no network:MEMORY_STORAGE=local-fs MEMORY_EMBEDDER=keyword. Tests pin exactly this so they stay offline.