The coordination layer
for multi-agent systems

Shared memory pools, role-based permissions, and a built-in treasury.
Trading writes, execution reads, risk validates, reporting archives — all verifiable, all on-chain.

npm install @forestinfra/shelmempip install shelmem
Tamper-ProofAES-256 EncryptedAgent TreasuryShared PoolsOn-chain ProofTestnet Live

Why ShelMem?

Shared, verifiable memory for agents that coordinate and transact.

Shared multi-agent memory

Pools let agents share a memory workspace with owner / writer / reader roles. Trading writes, execution reads, risk validates, reporting archives — all through one source of truth.

Per-memory ACLs

sharedWith on every write — grant individual agents read access without putting the memory in a pool. Pools and ACLs compose for fine-grained control.

Pool audit log

Every read and write into a shared pool is logged. Pool owners can replay who-read-what-and-when. Best-effort, never blocks the underlying call.

Cryptographic agent identity

Ed25519 sign / verify primitives so agents can prove they own an agent_id without a service-role key. Same Aptos key already used for on-chain anchoring.

Agent treasury

Record transactions, balance snapshots, and spending policies. Built-in methods for the AI agent payments use case with 365-day retention.

Tamper-proof verification

SHA-256 content hash on every write. On recall, content is re-verified against the hash. Tampered memories are flagged instantly — critical for financial records.

On-chain anchoring

Every memory write submits an Aptos transaction. Cryptographic proof that a transaction record or balance existed at that exact moment.

AES-256-GCM encryption

End-to-end encryption. Memories are encrypted before upload to Shelby. Key derived from your Aptos private key — zero additional secrets.

Semantic search

pgvector embeddings stored alongside memories — across private memories or scoped to a pool. Search by meaning, not keywords.

Decentralised storage

Content lives on Shelby Protocol's distributed hot storage. No single point of failure, no central database to compromise.

Framework adapters

Drop-in integrations for LangChain, CrewAI, Vercel AI SDK, and Coinbase AgentKit. Works with your existing agent stack.

TypeScript & Python

Published on npm and PyPI. Same API, same verification, same encryption — both ecosystems, first-class support.

Built for agent payments.

Record transactions, track balances, prove everything on-chain.

agent treasury
// Record a payment — tamper-proof, encrypted, on-chain proof
await mem.recordTransaction({
  agentId: 'trading-agent',
  memory: 'Paid 100 APT for compute credits',
  context: 'payments',
  amount: 100,
  currency: 'APT',
  counterparty: '0xvendor...',
});
// → { tx_status: 'pending', content_hash: '...', aptos_tx_hash: '...' }

// Snapshot the balance — verifiable point-in-time record
await mem.recordBalanceSnapshot({
  agentId: 'trading-agent',
  memory: 'End-of-day balance',
  context: 'treasury',
  amount: 4725,
  currency: 'APT',
});

// Check the latest balance
const balance = await mem.getLatestBalance('trading-agent');
// → { amount: 4725, currency: 'APT', verified: true }

The coordination layer for agents.

Shared memory pools with role-based permissions. Trading writes, execution reads, risk validates, reporting archives.

shared multi-agent memory
// Owner creates a pool and invites collaborators with roles
const pool = await mem.createPool({
  name: 'market-ops',
  ownerAgentId: 'trading-agent',
});
await mem.addPoolMember(pool.id, 'trading-agent', 'execution-agent', 'writer');
await mem.addPoolMember(pool.id, 'trading-agent', 'risk-agent',      'writer');
await mem.addPoolMember(pool.id, 'trading-agent', 'reporting-agent', 'reader');

// Trading agent publishes a market decision into the pool
await mem.writeToPool({
  poolId: pool.id, agentId: 'trading-agent',
  memory: 'RSI=35, buy 500 APT', context: 'trading',
  memory_type: 'decision',
});

// Any member can read everything written into the pool
const records = await mem.recallFromPool({
  poolId: pool.id, agentId: 'reporting-agent',
});
// → [{ agent_id: 'trading-agent',   memory_type: 'decision',           ... },
//    { agent_id: 'execution-agent', memory_type: 'transaction_record', ... },
//    { agent_id: 'risk-agent',      memory_type: 'observation',        ... }]

// Readers cannot write — enforced at the SDK boundary
await mem.writeToPool({ poolId: pool.id, agentId: 'reporting-agent', ... });
// → throws PermissionError: role 'reader' cannot write

Two calls. Verified.

Write with proof. Recall with tamper detection. Search by meaning.

@forestinfra/shelmem
import { ShelMem, openaiEmbeddings } from '@forestinfra/shelmem';

const mem = new ShelMem({
  supabaseUrl, supabaseKey,
  encrypt: true,
  embeddingProvider: openaiEmbeddings(OPENAI_KEY),
});

// Write — encrypted, hashed, stored on Shelby, anchored on Aptos
await mem.write('agent-01', 'Bought ETH at $2,847', 'analysis', 'decision');

// Recall — decrypted, hash verified
const memories = await mem.recall('agent-01');
// → [{ memory, verified: true, memory_type: 'decision' }]

// Semantic search — find by meaning
const results = await mem.search('what do I know about ETH?');
// → [{ memory_preview, similarity: 0.89 }]

Works With

LangChainLangChain
Chat history
CrewAICrewAI
Crew memory
Vercel AIVercel AI
Agent tools
AgentKitAgentKit
Wallets

Give your agents memory.

Install the SDK, record your first transaction, and verify it — in under a minute.