agentskit.js
Packages

@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/runtime for agent continuity.
  • Pair with @agentskit/rag for retrieval-heavy assistants.
  • Pair with @agentskit/observability if 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

#Stability

  • Version: 0.6.1
  • Tier: beta
  • Contract: evolving
  • Roadmap: see packages roadmap for what this package needs to reach v1.0.

#Source

npm: @agentskit/memory · repo: packages/memory

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page