agentskit.js
Packages

@agentskit/memory

Chat memory + vector stores + hierarchical / encrypted / graph / personalization wrappers.

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.

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 }) },
})

Surface

  • Chat: fileChatMemory · sqliteChatMemory · redisChatMemory.
  • Vector: fileVectorMemory · redisVectorMemory · pgvector · pinecone · qdrant · chroma · upstashVector.
  • HoF wrappers: createHierarchicalMemory · createEncryptedMemory · createInMemoryGraph · createInMemoryPersonalization.

Recipes

Source

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

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

On this page