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

@syncmem/sdk

v0.1.2

Published

The universal memory layer for AI agents — TypeScript/JavaScript SDK

Readme

@syncmem/sdk

The universal memory layer for AI agents — TypeScript/JavaScript SDK

Give your AI agents persistent, cross-platform memory in under 2 minutes. SyncMem stores facts extracted from conversations, retrieves them in sub-4ms, and probabilistically links the same user across multiple accounts and devices — without changing your LLM or your stack.

npm version License: MIT


Installation

npm install @syncmem/sdk
# or
yarn add @syncmem/sdk
# or
pnpm add @syncmem/sdk

Quickstart

import { SyncMem } from '@syncmem/sdk';

const client = new SyncMem({
  llmProvider: 'openai',
  llmApiKey: process.env.OPENAI_API_KEY!, // your existing key — no new credentials
  baseUrl: 'https://api.syncmem.com',
});

// First message — facts are extracted and stored automatically
await client.chat({
  accountId: '[email protected]',
  message: "I'm a vegetarian living in Tokyo. I'm a backend engineer.",
});

// Later — memory is injected automatically
const response = await client.chat({
  accountId: '[email protected]',
  message: 'What restaurants would you recommend near my office?',
});

console.log(response.reply);
// → "For vegetarian options in Tokyo, I'd suggest Ain Soph Ripple in Shinjuku..."
console.log(`Injected ${response.factsInjected} memories`);

Authentication

Keyless (recommended)

Your existing LLM API key is your SyncMem identity — zero sign-up, zero new credentials.

const client = new SyncMem({
  llmProvider: 'openai',   // openai | gemini | claude | groq | ollama | mistral
  llmApiKey: 'sk-...',
});

SyncMem API Key

For multiple isolated namespaces or production deployments, create a sm_live_... key from the dashboard.

const client = new SyncMem({
  apiKey: 'sm_live_...',
});

Core API

client.chat(options)

Send a message and get a memory-enriched reply. Facts are extracted and stored asynchronously.

const response = await client.chat({
  accountId: '[email protected]',  // any stable user identifier
  message: 'What did we discuss about the Q4 roadmap?',
  deviceId: 'device-uuid-123',     // optional: improves cross-device linking
});

// response.reply          — the LLM's response, enriched with memory
// response.factsInjected  — number of memories injected into context
// response.accountId      — normalized account identifier

client.getFacts(accountId)

Retrieve all stored facts for a user.

const { facts } = await client.getFacts('[email protected]');

facts.forEach(f => {
  console.log(`[${f.category}] ${f.content} (importance: ${f.importance})`);
});

client.addFact(accountId, content, options?)

Manually store a fact for a user.

await client.addFact('[email protected]', 'Prefers dark mode in all apps', {
  category: 'preferences',
  importance: 0.8,
});

client.deleteFact(factId)

Delete a specific fact by ID.

await client.deleteFact('fact-uuid-123');

client.searchFacts(accountId, query)

Full-text search across a user's facts.

const results = await client.searchFacts('[email protected]', 'dietary preferences');

client.getIdentityLinks(accountId)

Get probabilistic identity links — other accounts that likely belong to the same person.

const { links } = await client.getIdentityLinks('[email protected]');

links.forEach(link => {
  console.log(`Linked to ${link.accountId} with ${link.confidence * 100}% confidence`);
});

Supported LLM Providers

| Provider | llmProvider value | |----------|-------------------| | OpenAI | openai | | Google Gemini | gemini | | Anthropic Claude | claude | | Groq | groq | | Mistral | mistral | | Together AI | together | | DeepSeek | deepseek | | Ollama (local) | ollama | | Custom / proxy | custom |


MCP Server

SyncMem ships a built-in MCP server for Claude Desktop, Cursor, Windsurf, and any other MCP-compatible agent:

{
  "mcpServers": {
    "syncmem": {
      "command": "npx",
      "args": ["-y", "@syncmem/mcp"],
      "env": {
        "SYNCMEM_API_KEY": "sm_live_...",
        "LLM_PROVIDER": "openai",
        "LLM_API_KEY": "sk-..."
      }
    }
  }
}

Self-hosting

SyncMem is fully open source. Run your own instance:

git clone https://github.com/syncmem/syncmem
cd syncmem/production
cp .env.example .env   # fill in secrets
bash scripts/deploy.sh

Links


License

MIT © SyncMem