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

@draxdevagent/agentmesh

v0.1.0

Published

Decentralized memory storage for AI agents

Readme

AgentMesh SDK

Decentralized memory storage for AI agents.

npm install agentmesh

Quick Start

import { createClient, generateKey, encrypt, decrypt } from 'agentmesh';

// 1. Create client
const mesh = createClient();

// 2. Register your agent (one time - SAVE THE API KEY!)
const { apiKey } = await mesh.register('my-agent-id');
console.log('API Key:', apiKey); // Save this!

// 3. Generate encryption key (one time - SAVE THIS TOO!)
const encryptionKey = generateKey();
console.log('Encryption Key:', encryptionKey); // Save this!

// 4. Store encrypted memory
const encrypted = await encrypt('User prefers dark mode', encryptionKey);
const { cid } = await mesh.store(encrypted, {
  description: 'user display preferences'
});
console.log('Stored at:', cid);

// 5. Search memories
const results = await mesh.search('preferences');
console.log('Found:', results.count, 'memories');

// 6. Retrieve and decrypt
const { data } = await mesh.retrieve(cid);
const decrypted = await decrypt(data, encryptionKey);
console.log('Content:', decrypted);

With Existing API Key

import { createClient } from 'agentmesh';

const mesh = createClient({ 
  apiKey: 'mesh_xxx' 
});

// Ready to use
const results = await mesh.search('preferences');

API Reference

Client Methods

// Registration (returns API key once)
await mesh.register('agent-id');

// Store (data should be base64-encoded, preferably encrypted)
await mesh.store(base64Data, { 
  description: 'searchable text',
  type: 'preference',
  tags: ['user', 'settings']
});

// Store string (auto base64 - WARNING: plaintext!)
await mesh.storeString('plain text', { description: '...' });

// Search
await mesh.search('query');
await mesh.search('query', { type: 'preference', limit: 10 });

// List all (no query)
await mesh.list({ limit: 50 });

// Retrieve by CID
await mesh.retrieve('Qm...');
await mesh.retrieveString('Qm...'); // Auto decode base64

// Delete from index
await mesh.delete('Qm...');

// Stats
await mesh.stats();

// Status
await mesh.status();
await mesh.isOnline();

Encryption

import { generateKey, deriveKey, encrypt, decrypt } from 'agentmesh';

// Generate random key
const key = generateKey();

// Or derive from passphrase
const key = await deriveKey('my-secret-passphrase');

// Encrypt/decrypt
const encrypted = await encrypt('sensitive data', key);
const decrypted = await decrypt(encrypted, key);

Error Handling

import { AgentMeshError } from 'agentmesh';

try {
  await mesh.store(data);
} catch (error) {
  if (error instanceof AgentMeshError) {
    console.log('Status:', error.statusCode);
    console.log('Message:', error.message);
  }
}

Configuration

const mesh = createClient({
  apiKey: 'mesh_xxx',           // Your API key
  gateway: 'https://memforge.xyz', // Gateway URL (default)
  timeout: 30000,               // Request timeout ms (default)
});

Security Notes

  • Always encrypt sensitive data before storing
  • Save your keys - we can't recover them
  • CIDs are public - anyone with the CID can retrieve (encrypted) data
  • Descriptions are searchable - don't put secrets there

Links

  • Docs: https://memforge.xyz/agentmesh-skill.md
  • Protocol: https://memforge.xyz/protocol.md
  • GitHub: https://github.com/draxdevAgent/agentmesh

License

MIT