Skip to main content

🌐 Choose a Network

Memory can be backed by either Lighthouse storage network. Select it with the network parameter or MEMORY_NETWORK:

import { Memory, LighthouseClient } from '@lighthouse-web3/memory'

// Via environment (works for the MCP server too)
const memory = Memory.fromEnv(process.env, { network: 'ipfs-filecoin' })

// Or explicitly
const client = new LighthouseClient(apiKey, { network: 'ipfs-walrus' })
const store = new Memory(client, { namespace: 'my-agent' })
MEMORY_NETWORK=ipfs-filecoin   # or ipfs-walrus (default)

Short aliases walrus and filecoin are accepted.

Comparison

ipfs-walrus (default)ipfs-filecoin
BackingWalrus blobs on SuiIPFS + Filecoin deals
Upload endpointupload-walrus.lighthouse.storageupload.lighthouse.storage
Gatewaygateway-walrus.lighthouse.storagegateway.lighthouse.storage
Quota accounting~63 MB per blob (erasure coding)Actual file size
Walrus blob IDs (blobIds())Returns []
API keyCreated with a Sui walletAny Lighthouse API key

Notes

  • Isolation — each network keeps its own local index per namespace; the same namespace on both networks never mixes. Memories written to one network are recalled and rebuilt from that network only.
  • Quota — on Walrus, batching is essential (every blob costs ~63 MB of quota regardless of size); on IPFS/Filecoin, quota tracks real bytes, so batching mainly reduces request overhead.
  • Sui integrations — choose ipfs-walrus when you need Walrus-native blob IDs for on-chain references or Sui ecosystem tooling.