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

@agentskit/memory

v0.8.1

Published

Persistent and vector memory backends for AgentsKit.

Downloads

1,345

Readme

@agentskit/memory

Persist conversations and add vector search to your agents — swap backends without changing agent code.

npm version npm downloads bundle size license stability GitHub stars

Tags: ai · agents · llm · agentskit · ai-agents · memory · vector-db · embeddings · rag · sqlite · redis · vector-search

Why memory

  • Conversations that survive restarts — SQLite for local development, Redis for production; your agent remembers context across sessions with zero code changes
  • RAG-ready vector search — store and retrieve embeddings with fileVectorMemory (pure JS, no native deps) or Redis vector search for scale
  • Plug any backend — the VectorStore interface is 3 methods; bring LanceDB, Pinecone, or any custom store in minutes
  • One interface, every deployment target — swap from inMemory to sqlite to redis without touching agent code

Install

npm install @agentskit/memory better-sqlite3
# For production:  npm install redis
# For vectors:     npm install vectra

Quick example

import { createRuntime } from '@agentskit/runtime'
import { anthropic } from '@agentskit/adapters'
import { sqliteChatMemory, fileVectorMemory } from '@agentskit/memory'

const runtime = createRuntime({
  adapter: anthropic({ apiKey: process.env.ANTHROPIC_API_KEY, model: 'claude-sonnet-4-6' }),
  memory: sqliteChatMemory({ path: './chat.db' }),
})

// Agent now remembers previous conversations across process restarts
const result = await runtime.run('What did we discuss yesterday?')
console.log(result.content)

With RAG

Use a vector backend with @agentskit/rag createRAG({ embed, store })fileVectorMemory and redisVectorMemory implement VectorMemory for chunk storage and search.

Features

Chat memory (3)

  • fileChatMemory({ path }) — JSON on disk; zero infra.
  • sqliteChatMemory({ path }) — WAL-mode SQLite; indexed by session.
  • redisChatMemory({ client, keyPrefix }) — distributed, serverless-friendly.

All on top of createInMemoryMemory / createLocalStorageMemory from @agentskit/core.

Vector memory (7)

  • fileVectorMemory — pure-JS, file-persisted (good to ~10k vectors).
  • redisVectorMemory — Redis Stack / Redis 8+ HNSW.
  • pgvector — BYO SQL runner (postgres.js, pg, Drizzle, Prisma, Neon).
  • pinecone — managed; namespaces + metadata filters.
  • qdrant — self-hosted or cloud via HTTP.
  • chroma — HTTP collection client.
  • upstashVector — serverless HTTP.

Same 3-method VectorStore contract — swap without touching agent code.

Higher-order wrappers (6)

  • createHierarchicalMemory — MemGPT-style tiers: working / recall / archival. Recipe.
  • createVirtualizedMemory — hot window + cold retriever for long sessions. Recipe.
  • createAutoSummarizingMemory (via @agentskit/core/auto-summarize) — fold oldest turns into a running summary. Recipe.
  • createEncryptedMemory — AES-GCM-256 envelope over any ChatMemory; keys never leave the caller. Recipe.
  • createInMemoryGraph — knowledge graph (nodes + edges + BFS). Recipe.
  • createInMemoryPersonalization + renderProfileContext — per-user trait profile. Recipe.

Memory contract v1 (ADR 0003) — substitutable across runtime, useChat, and every framework binding.

Ecosystem

| Package | Role | |---------|------| | @agentskit/core | Memory, VectorMemory types | | @agentskit/rag | Chunking + retrieval on top of vector memory | | @agentskit/runtime | memory / retriever options | | @agentskit/adapters | Embeddings for RAG |

Contributors

License

MIT — see LICENSE.

Docs

Full documentation · GitHub