A decentralized AI agent memory layer using the Shelby Protocol for blob storage on Aptos testnet. Agents store memories (experiences, knowledge, observations) as JSON blobs on Shelby. Any agent can retrieve memories from any other agent, enabling cross-agent knowledge sharing.
Agent (Alpha/Beta/Gamma)
│
▼
MemoryManager
│
▼
Shelby SDK
│
▼
Shelby Testnet
│
▼
Aptos Blockchain
Each memory is stored at:
memories/{agentId}/{memoryId}.json— individual memory blobmemories/{agentId}/index.json— list of all memory IDs for that agent
- Node.js 18+
- An Aptos testnet account with APT (for gas)
- A Shelby API key with ShelbyUSD balance (for blob storage)
- APT (gas): Aptos Testnet Faucet
- ShelbyUSD (storage): Join Shelby Discord and request testnet tokens
npm installcp .env.example .env
# Edit .env with your credentials:
# SHELBY_API_KEY=aptoslabs_***
# APTOS_PRIVATE_KEY=ed25519-priv-***
# AGENT_ALPHA_ID=agent-alpha
# AGENT_BETA_ID=agent-beta
# AGENT_GAMMA_ID=agent-gammanpm run devThis runs a full simulation:
- Agent Alpha stores 3 exploration memories
- Agent Beta stores 2 analysis memories
- Alpha shares a memory with Beta
- Gamma aggregates all memories from Alpha + Beta
- Gamma stores a coordination summary
- Prints all blob URLs on Shelby testnet
# Store a memory
npm run cli -- store agent-alpha experience "Found new data pattern" discovery pattern
# List all memories for an agent
npm run cli -- list <ownerAddress> agent-alpha
# Retrieve a specific memory
npm run cli -- get <ownerAddress> agent-alpha <memoryId>
# Search memories by keyword
npm run cli -- search <ownerAddress> agent-alpha entropy
# Share a memory between agents
npm run cli -- share agent-alpha agent-beta <memoryId>