abmind
AI Agent Persistent Memory System with 4-Layer Retrieval and Sleep Maintenance
Install & Use
Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:
Help me install this AI Skill: abmind. It is used for: AI Agent Persistent Memory System with 4-Layer Retrieval and Sleep Maintenance Full Skill content: https://321skill.com/skills/abmind/raw/index.md Read that page and install it.
The prompt includes a link to the full Skill content. You can also view the full content.
This Skill addresses the lack of long-term memory in AI agents. In practical development, developers often need agents to remember cross-session context, user preferences, and historical interactions, but most solutions rely on vector databases and lack multilingual support. abmind implements a 4-layer retrieval system (FTS5 full-text search + trigram fuzzy matching + embeddings + merged summaries) based on SQLite, and includes a built-in nightly sleep maintenance mechanism that automatically compresses, merges, and cleans memories to prevent context bloat.
Usage is straightforward: simply install the abmind package in your project, then call the recordMessage() API to store messages. Natural language queries will then trigger the 4-layer retrieval. The system automatically classifies, scores, and encrypts memories (e.g., credentials are encrypted using AES-256-GCM). During the nightly sleep phase, maintenance tasks such as summary extraction, Darwinian selection, and emotional arc analysis are performed.
It is particularly well-suited for multilingual AI agents that need to run long-term (24/7), especially those handling agglutinative languages like Japanese and Turkish. For scenarios requiring persistent memory—such as building intelligent customer service, personal assistants, or game NPCs—abmind provides a lightweight yet complete solution without relying on external vector databases or cloud services.
When deploying, ensure Node.js version ≥22 and periodically check the SQLite database size. Note that it primarily focuses on memory storage and retrieval and does not include dialogue generation logic; it must be used in conjunction with an LLM interface. Additionally, its embedding layer uses a local model by default; for higher accuracy, it can be replaced with an external embedding API.
Key Features
Unlike LangChain's Memory module, abmind is a standalone memory system that does not depend on a vector database. It natively supports trigram fuzzy matching for agglutinative languages (e.g., Japanese, Turkish) and includes a built-in sleep maintenance mechanism similar to database VACUUM, which automatically merges duplicate memories and cleans up stale data.
Limitations
Requires a Node.js 22+ runtime environment. SQLite storage is suitable for small to medium-scale data; large-scale distributed scenarios require custom extension. The default embedding model is a local lightweight model, and its accuracy may not match that of dedicated embedding APIs.
FAQ
Which database backends does abmind support?
It only supports SQLite, with no dependency on external databases; data is stored in local files.
How do I clear memories?
Call the clearMemory() method or directly delete the SQLite database file.
Installation guide for AI assistants
If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:
Visit https://321skill.com/skills/abmind/raw/index.md to read the original Skill definition (Markdown format) for abmind, and install it according to the instructions.
Raw Markdown URL for AI: /skills/abmind/raw/index.md