@agentskit/memory
Chat memory + vector stores + hierarchical / encrypted / graph / personalization wrappers.
@agentskit/memory is the layer you add when your agent needs continuity. Without it, every run starts cold. With it, the system can remember conversations, preferences, retrieved context, and higher-order abstractions over time.
#When to reach for it
- You need persistent chat history (file / SQLite / Redis).
- You need vector search (pgvector / Pinecone / Qdrant / Chroma / Upstash / Redis / file).
- You need MemGPT-style tiered memory, or client-side encryption, or a knowledge graph.
#Best fit
- Start here when the same user, workflow, or corpus needs to persist across sessions.
- Pair with
@agentskit/runtimefor agent continuity. - Pair with
@agentskit/ragfor retrieval-heavy assistants. - Pair with
@agentskit/observabilityif you need visibility into memory behavior and quality.
#Install
npm install @agentskit/memory#Hello world
import { pgvector, createHierarchicalMemory } from '@agentskit/memory'
import { Pool } from 'pg'
const pool = new Pool({ connectionString: process.env.DATABASE_URL })
const vectors = pgvector({
runner: { query: async (sql, params) => ({ rows: (await pool.query(sql, params)).rows }) },
})In most real products, memory is the difference between a clever demo and a useful system.
#Surface
- Chat:
fileChatMemory·sqliteChatMemory·redisChatMemory. - Vector:
fileVectorMemory·redisVectorMemory·pgvector·pinecone·qdrant·chroma·upstashVector. - HoF wrappers:
createHierarchicalMemory·createEncryptedMemory·createInMemoryGraph·createInMemoryPersonalization.
#Recipes
- Persistent memory
- Virtualized memory
- Hierarchical memory
- Encrypted memory
- Vector adapters
- Graph memory
- Personalization
#Stability
- Version:
0.6.1 - Tier: beta
- Contract: evolving
- Roadmap: see packages roadmap for what this package needs to reach v1.0.
#Related
#Source
npm: @agentskit/memory · repo: packages/memory
Explore nearby
- PeerPackages overview
Every AgentsKit package at a glance — what it does, when to reach for it, where to read the deep dive.
- PeerRoadmap
Per-package stability status, current version, and what each package needs to reach v1.0.
- Peer@agentskit/core
Shared contract layer — TypeScript types, headless chat controller, stream helpers. Zero-dep, under 10 KB gzipped.