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

@memstack/server

v0.6.4

Published

REST API server for MemStack — self-hostable agent memory

Readme

@memstack/server

REST API server for MemStack — self-hostable agent memory. Run anywhere Bun runs.

Installation

npm install @memstack/server
# or via Docker:
docker pull ghcr.io/isiomac/memstack-server:v0.5.0

Quick Start

bun run node_modules/@memstack/server/dist/index.js
# or via Docker:
docker run -p 3000:3000 -e MEMSTACK_STORAGE=memory -e OPENAI_API_KEY=sk-... ghcr.io/isiomac/memstack-server:v0.5.0

Configuration

All via environment variables.

| Variable | Purpose | Default | |---|---|---| | MEMSTACK_STORAGE | Storage backend (memory, disk, markdown, postgres, sqlite, redis) | memory | | MEMSTACK_DIR | Directory for markdown/disk | ./memories | | DATABASE_URL | Postgres connection | — | | SQLITE_PATH | SQLite database path | ./memstack.db | | REDIS_URL | Redis connection | redis://localhost:6379 | | OPENAI_API_KEY | OpenAI LLM + embeddings | — | | ANTHROPIC_API_KEY | Anthropic LLM (summarization) | — | | MEMSTACK_OPENAI_BASE_URL | Custom API endpoint (DeepSeek, etc) | https://api.openai.com/v1 | | MEMSTACK_LLM_MODEL | Model override | gpt-4o-mini | | MEMSTACK_EMBED_ON_STORE | Auto-embed on store | true | | MEMSTACK_API_KEY | Bearer token auth (optional) | — | | MEMSTACK_RATE_LIMIT | Requests/minute limit | 0 (disabled) | | PORT | HTTP port | 3000 |

API Endpoints

| Method | Path | Description | |---|---|---| | POST | /v1/memories | Store a memory | | POST | /v1/memories/batch | Store multiple memories | | POST | /v1/memories/retrieve | Retrieve memories | | POST | /v1/memories/context | Compile LLM-ready context | | POST | /v1/memories/process | Store with auto-enrichment | | POST | /v1/memories/merge | Merge multiple memories | | POST | /v1/memories/purge | Delete all for an actor | | POST | /v1/memories/delete-many | Delete multiple by ID | | POST | /v1/memories/import | Import JSON snapshot | | GET | /v1/memories/:id | Get by ID | | DELETE | /v1/memories/:id | Delete by ID | | POST | /v1/memories/:id/touch | Bump recency | | GET | /v1/memories/count | Count with filters | | GET | /v1/memories/export | Export snapshot | | POST | /v1/summarize | Compress old memories | | GET | /v1/summarize/stream | Stream summary via SSE | | POST | /v1/prune | Remove stale memories | | POST | /v1/prune/dry-run | Preview prune | | GET | /v1/stats/:actorId | Memory diagnostics | | GET | /health | Health check |

Usage Examples

# Health check
curl http://localhost:3000/health

# Store a memory
curl -X POST http://localhost:3000/v1/memories \
  -H "Content-Type: application/json" \
  -d '{"actorId":"agent-1","content":"User reported login bug","importance":0.8}'

# Retrieve
curl -X POST http://localhost:3000/v1/memories/retrieve \
  -H "Content-Type: application/json" \
  -d '{"actorId":"agent-1"}'

# Compile context
curl -X POST http://localhost:3000/v1/memories/context \
  -H "Content-Type: application/json" \
  -d '{"actorId":"agent-1","maxTokens":500}'

# Stream summarization (SSE)
curl -N "http://localhost:3000/v1/summarize/stream?actorId=agent-1&olderThan=2026-01-01T00:00:00Z"

Docker

docker run -p 3000:3000 \
  -e MEMSTACK_STORAGE=postgres \
  -e DATABASE_URL=postgresql://... \
  -e OPENAI_API_KEY=sk-... \
  ghcr.io/isiomac/memstack-server:v0.5.0

License

MIT