npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@forestinfra/shelmem

v0.2.0

Published

Decentralised AI agent memory SDK — powered by Shelby Protocol and Aptos

Readme

shelmem

License: MIT TypeScript Shelby Testnet

Decentralised AI agent memory SDK for TypeScript/JavaScript.

Store agent memories on Shelby Protocol's decentralised hot storage with on-chain proof via Aptos.

Install

npm install @forestinfra/shelmem

Usage

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

const mem = new ShelMem({
  supabaseUrl: 'https://your-project.supabase.co',
  supabaseKey: 'your-service-role-key',
  shelbyApiKey: 'your-shelby-api-key',       // optional
  aptosPrivateKey: 'your-ed25519-private-key', // required when mock=false
  network: 'testnet',                          // testnet | shelbynet
  mock: true,                                  // default: true
});

write()

Store a memory for an agent.

const result = await mem.write(
  'agent-001',           // agent_id
  'User likes dark mode', // memory content
  'preferences',          // context
  { source: 'chat' }     // optional metadata
);

// result:
// {
//   shelby_object_id: 'shelby://abc123/agent-001_1234567890',
//   aptos_tx_hash: '0x...',
//   timestamp: '2025-01-15T10:30:00Z'
// }

recall()

Retrieve memories for an agent, optionally filtered by context.

const memories = await mem.recall(
  'agent-001',     // agent_id
  'preferences',   // context (optional)
  10               // limit (optional, default 10)
);

// memories: Array<{
//   memory: string,
//   context: string,
//   timestamp: string,
//   aptos_tx_hash: string
// }>

delete()

Remove a memory by its Supabase row ID.

await mem.delete('uuid-of-memory-row');

How It Works

  1. write() serialises the memory to bytes, uploads to Shelby via @shelby-protocol/sdk/node, records metadata in Supabase, and returns the Shelby address + Aptos proof
  2. recall() queries Supabase metadata by agent_id/context, downloads content bytes from Shelby, and returns decoded strings
  3. Every write produces a shelby:// address (content location) and an Aptos transaction hash (cryptographic proof)

Mock Mode

By default, mock: true uses deterministic hash-based addresses without hitting the real Shelby network. Set mock: false and provide aptosPrivateKey to write to the live testnet.

Environment Variables

The SDK reads these if not passed in the constructor:

| Variable | Description | |----------|-------------| | SHELBY_API_KEY | Shelby Protocol API key | | SHELBY_ACCOUNT_PRIVATE_KEY | Ed25519 private key for signing | | SHELBY_NETWORK | testnet or shelbynet | | SHELBY_MOCK | true or false |

License

MIT