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

memweave

v0.4.0

Published

Graph-native memory CLI for AI agents — persistent, multi-agent, cross-session context

Readme

weave

Graph-native memory CLI for AI agents. Chat with AI that actually remembers — across sessions, across agents.

  ◈ weave v0.1.0
  graph-native memory for AI agents

What is Weave?

Weave is a terminal CLI agent (like Claude Code) with a twist: persistent, graph-structured memory. Every conversation is remembered. Memories are connected by semantic similarity, temporal sequence, and shared entities. Your agents build knowledge over time — they never cold-start.

Built on the MemWeave memory architecture:

  • Multi-layer memory graph — semantic, temporal, causal, and entity edges
  • Tiered memory — working → short-term → long-term → archival with automatic promotion and decay
  • Multi-agent — spawn multiple agents with different personas that share a memory fabric
  • Hybrid retrieval — vector similarity + graph traversal for smarter recall
  • Local-first — works with just hash-based embeddings + SQLite, no cloud required for memory

Install

npm install -g weave-cli

Or from source:

git clone <repo>
cd cliproject
npm install
npm run build
npm link

Quick Start

# Initialize
weave init

# Set your API key
weave config set apiKey sk-your-openai-key

# Start chatting (memories persist automatically)
weave chat

# Or use Anthropic
weave config set provider anthropic
weave config set apiKey sk-ant-your-key
weave config set model claude-sonnet-4-20250514
weave chat

# Or use Ollama (local, no API key required)
weave config set provider ollama
weave config set model llama3.2
weave chat

# Or use LM Studio (local; start a model in LM Studio first)
weave config set provider lmstudio
weave config set model local-model
weave chat

Commands

Chat

weave chat                          # interactive chat with memory
weave chat --agent researcher       # chat as specific agent
weave chat --model gpt-4o-mini      # use a different model
weave chat --provider anthropic     # use Anthropic
weave chat --provider ollama        # use Ollama (local)
weave chat --provider lmstudio      # use LM Studio (local)

In-chat slash commands: | Command | Description | |---------|-------------| | /help | Show available commands | | /memory | Show working memory | | /recall <query> | Search all memories | | /agents | List all agents | | /switch <agent> | Switch to another agent | | /stats | Memory statistics | | /compact | Run memory consolidation | | /save | Force save | | /clear | Clear chat history (keeps memories) | | /exit | Exit weave |

Agents

weave agent spawn researcher --role "ML Researcher"
weave agent spawn engineer --role "Software Engineer" --model gpt-4o-mini
weave agent list
weave agent inspect researcher
weave agent kill researcher

Memory

weave memory add "The deadline is March 15" --agent researcher
weave memory search "project deadline"
weave memory search "tech stack" --agent researcher
weave memory list
weave memory list --agent researcher
weave memory consolidate               # promote, merge, decay, prune

Configuration

weave config set apiKey sk-...
weave config set provider openai       # or anthropic, ollama, lmstudio
weave config set model gpt-4o
weave config set baseURL http://localhost:11434/v1  # for ollama/lmstudio (optional)
weave config set embeddingBackend local # or openai
weave config list
weave config get provider

Workspaces

weave workspace create ml-research
weave workspace list
weave chat --workspace ml-research

Diagnostics

weave doctor                           # system health check

Memory Architecture

Working Memory (L1)   ← In-context, immediate access
       ↓ eviction
Short-Term Memory (L2) ← Recent, fast retrieval
       ↓ consolidation (importance-based)
Long-Term Memory (L3)  ← Consolidated, graph-structured
       ↓ aging
Archival Memory (L4)   ← Old, rarely accessed

Memories are automatically:

  • Embedded using local hash projections (zero-latency) or OpenAI embeddings
  • Linked by semantic similarity, temporal order, and shared entities
  • Scored by importance × recency × access frequency
  • Promoted from short-term to long-term when importance ≥ 0.4
  • Decayed over time, with archival memories pruned when importance drops below 0.01
  • Merged when duplicates are detected (cosine similarity ≥ 0.92)

Architecture

src/
├── core/
│   ├── types.ts        # Core type definitions
│   ├── embedding.ts    # Local hash + OpenAI embedding backends
│   ├── graph.ts        # Multi-layer memory graph with retrieval
│   ├── storage.ts      # SQLite persistence
│   ├── agent.ts        # Per-agent memory + extraction
│   └── fabric.ts       # Memory fabric orchestrator
├── llm/
│   └── provider.ts     # OpenAI + Anthropic with streaming
├── ui/
│   ├── theme.ts        # Terminal colors, icons, components
│   └── chat.ts         # Interactive chat REPL
├── config.ts           # Configuration management
└── index.ts            # CLI entry point

Config Storage

All data lives in ~/.weave/:

~/.weave/
├── config.json          # Global configuration
└── workspaces/
    ├── default.db       # Default workspace (SQLite)
    └── ml-research.db   # Named workspaces

Requirements

  • Node.js ≥ 18
  • An API key (OpenAI or Anthropic) for chat

License

MIT