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
Shared, verifiable memory for agents that coordinate and transact.
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.
sharedWith on every write — grant individual agents read access without putting the memory in a pool. Pools and ACLs compose for fine-grained control.
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.
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.
Record transactions, balance snapshots, and spending policies. Built-in methods for the AI agent payments use case with 365-day retention.
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.
Every memory write submits an Aptos transaction. Cryptographic proof that a transaction record or balance existed at that exact moment.
End-to-end encryption. Memories are encrypted before upload to Shelby. Key derived from your Aptos private key — zero additional secrets.
pgvector embeddings stored alongside memories — across private memories or scoped to a pool. Search by meaning, not keywords.
Content lives on Shelby Protocol's distributed hot storage. No single point of failure, no central database to compromise.
Drop-in integrations for LangChain, CrewAI, Vercel AI SDK, and Coinbase AgentKit. Works with your existing agent stack.
Published on npm and PyPI. Same API, same verification, same encryption — both ecosystems, first-class support.
Record transactions, track balances, prove everything on-chain.
// 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 }Shared memory pools with role-based permissions. Trading writes, execution reads, risk validates, reporting archives.
// 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 writeWrite with proof. Recall with tamper detection. Search by meaning.
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
Vercel AIInstall the SDK, record your first transaction, and verify it — in under a minute.