Open Source ยท Apache 2.0

Give your AI agent
a real brain

Persistent memory across sessions. 4-layer recall, sleep maintenance, emotion tagging. SQLite-backed, offline-capable, works with any MCP host.

$ npm install abmind

Why abmind?

AI agents forget everything between sessions. abmind fixes that.

๐Ÿ”

4-Layer Recall

FTS5 full-text search, trigram fuzzy matching, semantic vector embeddings, and consolidated summaries. Every query hits all four layers and merges results.

๐Ÿง 

Sleep Maintenance

24-step overnight consolidation cycle. Promotes important memories, demotes stale ones, checks contradictions, builds emotional arcs, compresses old data.

๐Ÿ’œ

Emotion Tagging

25 emotion types with scoring. Memories carry emotional context that shapes recall priority. High-emotion memories are automatically promoted to core tier.

๐Ÿ›ก๏ธ

Injection Scanner

14 detection categories block prompt injection, jailbreak attempts, and malicious input before it reaches memory. Fail-closed by default.

๐Ÿ“ฆ

Zero Dependencies on Hosts

Pure logic, no transport, no platform coupling. Works as an MCP server, CLI tool, OpenClaw plugin, or direct in-process integration.

๐Ÿ”’

Offline & Local

SQLite + local Ollama embeddings. Your memories stay on your machine. No cloud dependency for core functions. CIA+AAA security model on every memory.

4
Recall layers
24
Sleep maintenance steps
14
Injection scanner categories
900+
Tests

Architecture

abmind is the brain โ€” pure logic, pluggable into any body.

  Your Agent (kiro-cli, Claude Code, Cursor, OpenClaw, custom)
       โ”‚
       โ”‚  MCP / CLI / Plugin / Direct
       โ–ผ
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  abmind                                      โ”‚
  โ”‚                                             โ”‚
  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
  โ”‚  โ”‚ Recall   โ”‚  โ”‚ Store    โ”‚  โ”‚ Sleep     โ”‚ โ”‚
  โ”‚  โ”‚ 4-layer  โ”‚  โ”‚ Extract  โ”‚  โ”‚ 24-step   โ”‚ โ”‚
  โ”‚  โ”‚ search   โ”‚  โ”‚ Classify โ”‚  โ”‚ Maintain  โ”‚ โ”‚
  โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
  โ”‚       โ”‚              โ”‚              โ”‚       โ”‚
  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ” โ”‚
  โ”‚  โ”‚  SQLite  ยท  FTS5  ยท  Embeddings  ยท  Sigs โ”‚ โ”‚
  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Works Everywhere

Four integration paths โ€” at least one always works in your environment.

Environment MCP Server CLI (steering) Direct (AB Slot) Native Plugin
kiro-cliโœ“โœ“โœ“โ€”
Claude Codeโœ“โ€”โ€”โ€”
Cursorโœ“โ€”โ€”โ€”
OpenCodeโœ“โ€”โ€”โ€”
OpenClawโœ“โ€”โ€”โœ“
AgentBridgeโ€”โ€”โœ“ nativeโ€”

Quick Start

Up and running in under a minute.

CLI
# Install
npm install -g abmind

# Store a memory
abmind store --translated "User prefers dark mode and vim keybindings" --memory-type preference --chat-id 0

# Recall memories
abmind recall --translated "editor preferences" --chat-id 0

# Check status
abmind status

# Run sleep maintenance
abmind sleep-state                          # Show candidates
abmind sleep-apply --promote 42,43 --demote 17  # Apply decisions
abmind sleep-report                         # Dream report