
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@agentskit/memory
Advanced tools
Profile: major-package
Persist conversations and add vector search to your agents — swap backends without changing agent code.
Tags: ai · agents · llm · agentskit · ai-agents · memory · vector-db · embeddings · rag · sqlite · redis · vector-search
packages/memory/.@agentskit/memory gives agents continuity: chat history, vector memory, graph memory, encrypted stores, and local or hosted backends.
Docs: package guide · agent handoff
fileVectorMemory (pure JS, no native deps) or Redis vector search for scaleVectorStore interface is 3 methods; bring LanceDB, Pinecone, or any custom store in minutesinMemory to sqlite to redis without touching agent codenpm install @agentskit/memory better-sqlite3
# For production: npm install redis
# For vectors: npm install vectra
import { createRuntime } from '@agentskit/runtime'
import { anthropic } from '@agentskit/adapters'
import { sqliteChatMemory } 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)
Use a vector backend with @agentskit/rag createRAG({ embed, store }) — fileVectorMemory and redisVectorMemory implement VectorMemory for chunk storage and search.
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.
Use the browser-safe subpath when a host needs validated, bounded storage or
sessionStorage instead of the legacy Core localStorage helper:
import { createWebStorageMemory } from '@agentskit/memory/web-storage'
const memory = createWebStorageMemory({
key: 'app:chat',
getStorage: () => typeof sessionStorage === 'undefined' ? undefined : sessionStorage,
maxMessages: 20,
maxRecordBytes: 1_048_576,
})
Canonical records are runtime validated. Oversized saves reject with
AK_MEMORY_SAVE_FAILED before changing storage. migration may supply legacy
keys and a host-owned parser; a legacy key is removed only after canonical
persistence succeeds.
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.
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.
| 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 |
MIT — see LICENSE.
@agentskit/memorySee CONTRIBUTING.md and the monorepo LICENSE.
FAQs
Persistent and vector memory backends for AgentsKit.
The npm package @agentskit/memory receives a total of 797 weekly downloads. As such, @agentskit/memory popularity was classified as not popular.
We found that @agentskit/memory demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.