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

@clude/sdk

v3.4.0

Published

Persistent memory SDK for AI agents — Stanford Generative Agents architecture on Supabase + pgvector

Downloads

861

Readme

Clude

npm version License: MIT

Cognitive memory for AI agents. Not just storage — synthesis.

Clude gives any agent persistent, typed memory with hybrid retrieval (vector + keyword + tags + importance), differential decay, a bond-typed memory graph, and autonomous consolidation. TypeScript declarations included.

  • Local-first: SQLite + local embeddings. Zero API keys, zero network, full semantic search offline.
  • Hosted: one API key, no infrastructure — npx @clude/sdk register
  • Benchmarked: 85.0% on LongMemEval-S, reproducible — the harness, per-question outputs, and judge model ship in the repo. 1.96% hallucination on HaluMem.
  • Portable: export/import memories as JSON, Markdown, ChatGPT, Claude, or Gemini packs.

Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible runtime.

Need a small footprint? npm install @clude/sdk --omit=optional skips the local embedding runtime (~85% smaller install); local mode then uses keyword search and clude status tells you so.

Quick start

npx @clude/sdk setup   # register + config + MCP install, ~30 seconds

Works headless too: with no TTY it completes in local-only mode (set CLUDE_SETUP_EMAIL to register in CI).

Or use the SDK directly:

import { Cortex } from '@clude/sdk';

const brain = new Cortex({
  hosted: { apiKey: process.env.CORTEX_API_KEY! },
});

await brain.init();

await brain.store({
  type: 'episodic',
  content: 'User asked about pricing and seemed frustrated.',
  summary: 'Frustrated user asking about pricing',
  tags: ['pricing', 'user-concern'],
  importance: 0.7,
  source: 'my-agent',
});

const memories = await brain.recall({ query: 'what do users think about pricing', limit: 5 });
const context = brain.formatContext(memories);  // markdown, ready for your system prompt

Storage modes

| Mode | Config | Storage | |---|---|---| | Hosted | CORTEX_API_KEY | clude.io, isolated per API key | | Self-hosted | SUPABASE_URL + SUPABASE_SERVICE_KEY | your Supabase (PostgreSQL + pgvector) | | Local (default) | none | ~/.clude/brain.db — SQLite + local embeddings, fully offline | | Local (JSON) | CLUDE_LOCAL=true or --local | ~/.clude/memories.json, portable single file |

Self-hosted unlocks the full cognitive layer: dream cycles (consolidation, reflection, contradiction resolution), the entity graph, and memory packs.

MCP integration

{
  "mcpServers": {
    "clude-memory": {
      "command": "npx",
      "args": ["@clude/sdk", "mcp-serve"],
      "env": { "CORTEX_API_KEY": "clk_..." }
    }
  }
}

Or npx @clude/sdk setup to install automatically. Your agent gets 8 tools: recall_memories, store_memory, batch_store_memories, list_memories, update_memory, delete_memory, get_memory_stats, find_clinamen (anomaly retrieval). A remote Streamable-HTTP connector is also available at https://clude.io/api/mcp (npx @clude/sdk connect).

CLI

npx @clude/sdk setup          # Guided setup: register + config + MCP install
npx @clude/sdk status         # Mode, storage, MCP detection, memory stats
npx @clude/sdk register       # Get a hosted API key
npx @clude/sdk mcp-install    # Install MCP config for your IDE
npx @clude/sdk mcp-serve      # Run as a stdio MCP server
npx @clude/sdk connect        # Connect Claude Desktop / claude.ai via remote MCP
npx @clude/sdk export         # Export memories (json/md/chatgpt/gemini/memorypack)
npx @clude/sdk import         # Import from ChatGPT export, markdown, JSON
npx @clude/sdk doctor         # Diagnostics

Memory model

Five typed stores with differential decay — accessed memories are reinforced, unaccessed ones fade:

| Type | Decay/day | Use for | |---|---|---| | episodic | 7% | events, conversations | | semantic | 2% | facts, knowledge, insights | | procedural | 3% | workflows, what works | | self_model | 1% | identity, preferences | | introspective | 2% | reflections, journals |

Retrieval is hybrid-scored (recency + relevance + importance + vector similarity, weighted by decay) with entity-aware expansion and bond-typed graph traversal. Co-retrieved memories strengthen their links (Hebbian reinforcement).

Docs

Built on research from Stanford Generative Agents, MemGPT/Letta, and CoALA. The same engine powers @Cludebot, an autonomous agent running publicly 24/7 — a live demonstration of the memory system.

License

MIT