You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@aitytech/agentkits-memory

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aitytech/agentkits-memory

Persistent memory system for AI coding assistants via MCP. Works with Claude Code, Cursor, Copilot, Windsurf, Cline.

Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
28
-42.86%
Maintainers
1
Weekly downloads
 
Created
Source

AgentKits Logo

AgentKits Memory

by AityTech

npm License Claude Code Cursor Copilot Windsurf Cline

Persistent Memory System for AI Coding Assistants via MCP

Fast. Local. Zero external dependencies.

Store decisions, patterns, errors, and context that persists across sessions.
No cloud. No API keys. No setup. Just works.

Quick StartWeb ViewerFeaturesEcosystemagentkits.net

Features

FeatureBenefit
100% LocalAll data stays on your machine. No cloud, no API keys, no accounts
Blazing FastNative SQLite (better-sqlite3) = instant queries, zero latency
Zero ConfigWorks out of the box. No database setup required
Cross-PlatformWindows, macOS, Linux - same code, same speed
MCP Servermemory_save, memory_search, memory_recall, memory_list, memory_status
Web ViewerBrowser UI to view, add, edit, delete memories
Vector SearchOptional HNSW semantic similarity (no external service)
Auto-CaptureHooks for session context, tool usage, summaries

Web Viewer

View and manage your memories through a modern web interface.

npx agentkits-memory-web

Then open http://localhost:1905 in your browser.

Memory List

Browse all stored memories with search and namespace filtering.

Memory List

Add Memory

Create new memories with key, namespace, type, content, and tags.

Add Memory

Memory Details

View full memory details with edit and delete options.

Memory Detail

Quick Start

1. Install

npm install @aitytech/agentkits-memory

2. Configure MCP Server

Add to your .mcp.json (or .claude/.mcp.json):

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["agentkits-memory-server"]
    }
  }
}

3. Use Memory Tools

Once configured, your AI assistant can use these tools:

ToolDescription
memory_saveSave decisions, patterns, errors, or context
memory_searchSearch memories using semantic similarity
memory_recallRecall everything about a specific topic
memory_listList recent memories
memory_statusCheck memory system status

CLI Commands

# Start MCP server
npx agentkits-memory-server

# Start web viewer (port 1905)
npx agentkits-memory-web

# View stored memories (terminal)
npx agentkits-memory-viewer

# Save memory from CLI
npx agentkits-memory-save "Use JWT with refresh tokens" --category pattern --tags auth,security

# Setup hooks for auto-capture
npx agentkits-memory-setup

Programmatic Usage

import { ProjectMemoryService } from '@aitytech/agentkits-memory';

const memory = new ProjectMemoryService({
  baseDir: '.claude/memory',
  dbFilename: 'memory.db',
});
await memory.initialize();

// Store a memory
await memory.storeEntry({
  key: 'auth-pattern',
  content: 'Use JWT with refresh tokens for authentication',
  namespace: 'patterns',
  tags: ['auth', 'security'],
});

// Query memories
const results = await memory.query({
  type: 'hybrid',
  namespace: 'patterns',
  content: 'authentication',
  limit: 10,
});

// Get by key
const entry = await memory.getByKey('patterns', 'auth-pattern');

Auto-Capture Hooks

The package includes hooks for automatically capturing AI coding sessions:

HookTriggerAction
contextSession StartInjects previous session context
session-initFirst User PromptInitializes session record
observationAfter Tool UseCaptures tool usage
summarizeSession EndGenerates session summary

Setup hooks:

npx agentkits-memory-setup

Or manually copy hooks.json to your project:

cp node_modules/@aitytech/agentkits-memory/hooks.json .claude/hooks.json

Memory Categories

CategoryUse Case
decisionArchitecture decisions, ADRs
patternReusable code patterns
errorError solutions and fixes
contextProject context and facts
observationSession observations

Storage

Memories are stored in .claude/memory/memory.db within your project directory.

.claude/memory/
├── memory.db          # SQLite database
└── memory.db-wal      # Write-ahead log (temp)

CJK Language Support

AgentKits Memory has automatic CJK support for Chinese, Japanese, and Korean text search.

Zero Configuration

When better-sqlite3 is installed (default), CJK search works automatically:

import { ProjectMemoryService } from '@aitytech/agentkits-memory';

const memory = new ProjectMemoryService('.claude/memory');
await memory.initialize();

// Store CJK content
await memory.storeEntry({
  key: 'auth-pattern',
  content: '認証機能の実装パターン - JWT with refresh tokens',
  namespace: 'patterns',
});

// Search in Japanese, Chinese, or Korean - it just works!
const results = await memory.query({
  type: 'hybrid',
  content: '認証機能',
});

How It Works

  • Native SQLite: Uses better-sqlite3 for maximum performance
  • Trigram tokenizer: FTS5 with trigram creates 3-character sequences for CJK matching
  • Smart fallback: Short CJK queries (< 3 chars) automatically use LIKE search
  • BM25 ranking: Relevance scoring for search results

Advanced: Japanese Word Segmentation

For advanced Japanese with proper word segmentation, optionally use lindera:

import { createJapaneseOptimizedBackend } from '@aitytech/agentkits-memory';

const backend = createJapaneseOptimizedBackend({
  databasePath: '.claude/memory/memory.db',
  linderaPath: './path/to/liblindera_sqlite.dylib',
});

Requires lindera-sqlite build.

API Reference

ProjectMemoryService

interface ProjectMemoryConfig {
  baseDir: string;              // Default: '.claude/memory'
  dbFilename: string;           // Default: 'memory.db'
  enableVectorIndex: boolean;   // Default: false
  dimensions: number;           // Default: 384
  embeddingGenerator?: EmbeddingGenerator;
  cacheEnabled: boolean;        // Default: true
  cacheSize: number;            // Default: 1000
  cacheTtl: number;             // Default: 300000 (5 min)
}

Methods

MethodDescription
initialize()Initialize the memory service
shutdown()Shutdown and persist changes
storeEntry(input)Store a memory entry
get(id)Get entry by ID
getByKey(namespace, key)Get entry by namespace and key
update(id, update)Update an entry
delete(id)Delete an entry
query(query)Query entries with filters
semanticSearch(content, k)Semantic similarity search
count(namespace?)Count entries
listNamespaces()List all namespaces
getStats()Get statistics

Requirements

  • Node.js >= 18.0.0
  • MCP-compatible AI coding assistant

AgentKits Ecosystem

AgentKits Memory is part of the AgentKits ecosystem by AityTech - tools that make AI coding assistants smarter.

ProductDescriptionLink
AgentKits Engineer28 specialized agents, 100+ skills, enterprise patternsGitHub
AgentKits MarketingAI-powered marketing content generationGitHub
AgentKits MemoryPersistent memory for AI assistants (this package)npm

agentkits.net

Star History

Star History Chart

License

MIT

Give your AI assistant memory that persists.

AgentKits Memory by AityTech

Star this repo if it helps your AI remember.

Keywords

mcp

FAQs

Package last updated on 02 Feb 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