Sign In

@agentskit/memory

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentskit/memory

Persistent and vector memory backends for AgentsKit.

Source
npmnpm
Version
0.4.0
Version published
Weekly downloads
1K
17.07%
Maintainers
1
Weekly downloads
 
Created
Source

@agentskit/memory

Persistent and vector memory backends for AgentsKit.

Install

npm install @agentskit/memory

Then install the backend(s) you need:

npm install better-sqlite3  # for sqliteChatMemory
npm install vectra           # for fileVectorMemory (default, pure JS)
npm install redis            # for redisChatMemory / redisVectorMemory

Backends

FactoryContractUnderlying libNative?
sqliteChatMemory({ path })ChatMemorybetter-sqlite3Yes
redisChatMemory({ url })ChatMemoryredisNo
redisVectorMemory({ url })VectorMemoryredis + RediSearchNo
fileVectorMemory({ path })VectorMemoryvectraNo (pure JS)

Quick example

import { sqliteChatMemory, fileVectorMemory } from '@agentskit/memory'

// Chat persistence
const chatMemory = sqliteChatMemory({ path: './chat.db' })

// Vector search
const vectorMemory = fileVectorMemory({ path: './vectors' })
await vectorMemory.store([{
  id: 'doc-1',
  content: 'AgentsKit is awesome',
  embedding: [0.1, 0.2, 0.3, ...],
}])
const results = await vectorMemory.search([0.1, 0.2, 0.3, ...], { topK: 5 })

Custom vector store

Bring your own vector backend (LanceDB, usearch, Pinecone, etc.):

import type { VectorStore } from '@agentskit/memory'

const myStore: VectorStore = {
  async upsert(docs) { /* your logic */ },
  async query(vector, topK) { /* your logic */ },
  async delete(ids) { /* your logic */ },
}

const memory = fileVectorMemory({ path: './vectors', store: myStore })

Docs

Full documentation

FAQs

Package last updated on 06 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts