v0.8.0 · distributed-coordination · Apache-2.0

Memory for AI agents that runs on your hardware — and proves what they did.

ai-memory is the endpoint-resident, model-neutral memory layer for AI agents — local-first Rust + SQLite on your own hardware, from servers to mobile to fully air-gapped, with no cloud dependency and no phone-home. Every state-changing operation lands in an append-only, tamper-evident audit chain — enable attestation and each write is Ed25519-signed at the source — so you can reconstruct what any agent knew, and when. Neutral by construction: any MCP client (Claude, GPT, Grok, Gemini, Llama, local models) reads and writes the same store. It doesn't just retrieve — it governs: typed, deterministic refusals at the endpoint, so the substrate can be stopped and audited without corrupting the record.

Local-first · air-gappable Model-neutral (MCP) 101 MCP tools 92 HTTP routes (78 unique paths) 87 CLI subcommands Ed25519 attested audit chain SQLite + Postgres / AGE NSA CSI MCP 10/10 · 7/7 15,951 / 0 regression suite
brew install alphaonedev/tap/ai-memory   # or: cargo install ai-memory

Append-only signed_events chain with a SHA-256 cross-row hash — verify any window with ai-memory verify-chain. Local-first; no telemetry, no phone-home. Complements your identity plane (Entra / Okta / SailPoint) — it doesn't replace it. Security is self-attested; no third-party audit yet — read the threat model.

📱  Endpoint-class deployment · phone to planet

ai-memory runs on your cellphone. And on your IoT.

Most "AI memory" stacks assume a cloud server, a vector database, and a network. ai-memory ships a Rust core that cross-compiles to iOS, Android, and embedded Linux — the same substrate, the same typed memory + KG + signed reflections, in your pocket. No cloud round-trip. No data leaving the device unless you say so.

The lib target produces an xcframework for iOS (device + sim arm64 + sim x86_64) and a jniLibs/<abi> layout for Android (4 ABIs). FTS5 + WAL + HNSW vector recall + embedder all run on the device CPU. CI runtime-tests on iOS Simulator and Android emulator gate every release.

iOS
aarch64-apple-ios
device + sim
Android
aarch64-linux-android
4 ABIs / jniLibs
Embedded Linux
arm64 / armv7
Raspberry Pi, Jetson
Edge IoT
offline-first
opt-in federation
Why ai-memory

One substrate. Five deployment scales. Identical semantics.

Most AI tooling forces a tier choice up front: a hobby SDK, a cloud SaaS, or a bespoke enterprise rollout. ai-memory is one substrate — memory_store, memory_recall, memory_link, memory_reflect — that scales from a single laptop with one AI assistant to a global hive of attesting NHI agents. Same tools. Same wire format. Same governance.

Reference architectures T1→T5 →
Features

What ships in the binary.

One ai-memory Rust binary exposes three interfaces over a shared storage layer: MCP stdio JSON-RPC, an HTTP API on port 9077, and a clap-based CLI. Pick one or use all three.

Storage

Typed memory, three tiers

Short / mid / long lived rows with auto-promotion on access, sliding-window TTL, FTS5 keyword + HNSW semantic recall, hybrid blended scoring.

Knowledge graph

Typed links, temporal validity

Nine relation kinds (related_to, supersedes, contradicts, derived_from, reflects_on, derives_from, plus the v0.8.0 typed-cognition trio decomposes_into, depends_on, advances) with valid_from / valid_until. Apache AGE acceleration on Postgres.

Attestation

Ed25519 signed reflections

Per-agent keypair signs every link. Append-only signed_events audit chain with cross-row hash chaining. Forensic-bundle export & verify.

Governance

Substrate rules L1–L6

Operator-signed rule layer enforces policy on every write. Fail-CLOSED by default. Real permission system replaces v0.6.x advisory governance.

Hooks

Programmable 25-event pipeline

Subprocess JSON-stdio handlers fire on store, recall, reflect, link, GC, federation push. HMAC-signed webhooks with DLQ + replay.

Federation

Quorum sync, peer attestation

mTLS allowlist, per-message nonce freshness, signature bound to body+nonce. Push DLQ. Operator-controlled trust posture per peer.

Provider-agnostic LLM

15+ vendor backends

Ollama, OpenAI, xAI Grok, Anthropic, Gemini, DeepSeek, Kimi, Qwen, Mistral, Groq, Together, Cerebras, OpenRouter, Fireworks, LMStudio. One env var selects.

Capabilities v3

Pre-computed calibration

LLMs converge on accurate first-answer descriptions. memory_capabilities ships summary, to_describe_to_user, callable_now, agent_permitted_families.

Sidechain transcripts

Compressed conversation replay

zstd-3 BLOBs + memory_replay. Full conversation context preserved out-of-band from the memory row.

Recursive learning

Reflect, atomise, consolidate

memory_reflect with a hard depth cap, atomisation into linked atom rows, consolidation, persona generation, and a skills registry. Agents that improve their own memory — under governance.

Coordination

Distributed-coordination primitives

v0.8.0 Pillar-1: a typed action DAG with state machine, leases + heartbeats, Ed25519-signed inter-agent signals, attested checkpoints, and scheduled routines — the substrate for multi-agent orchestration.

Typed cognition

Goal / Plan / Step lifecycle

v0.8.0 Pillar-2: a typed-cognition vocabulary (Goal/Plan/Step + lifecycle_state) wired into the knowledge graph via the decomposes_into / depends_on / advances relations — plan trees agents can reason over.

Observability

Tracing, metrics, forensics

tracing structured logs, a bare /metrics Prometheus surface, the append-only signed-events audit chain, and verifiable forensic-bundle export for incident response.

See what's new in v0.8.0 → · Distributed coordination → · Atlas: everything on one page → · Heterogeneous AI NHI assessment →

Install

Pick your platform. Three minutes to first recall.

A single static Rust binary — no daemons required to get started. The full install matrix (Windows, Docker, .deb, .rpm, source, mobile FFI) lives in the install reference.

macOS · Linux
Homebrew
brew install alphaonedev/tap/ai-memory
Fedora · RHEL
COPR
sudo dnf copr enable alpha-one-ai/ai-memory
sudo dnf install ai-memory
Any platform · Rust
cargo
cargo install ai-memory
Container · Plan C
Docker
docker run --rm -it \
  ghcr.io/alphaonedev/ai-memory:0.8.0
iOS · Android
Mobile FFI
# release artifacts
ai-memory-ios.xcframework.tar.gz
ai-memory-android.tar.gz
Source
Build from git
git clone https://github.com/alphaonedev/ai-memory-mcp
cd ai-memory-mcp && cargo build --release
Quickstart for non-technical users →   3-minute engineer quickstart
Configure the LLM backend

Plug ai-memory's smart / autonomous tier into any LLM.

ai-memory ships a provider-agnostic LLM client. Any of 16+ backends — local Ollama, LMStudio, vLLM, llama.cpp server, xAI Grok, OpenAI, Anthropic, Google Gemini, DeepSeek, Kimi (Moonshot), Qwen (DashScope), Mistral, Groq, Together, Cerebras, OpenRouter, Fireworks — configured via a [llm] section in ~/.config/ai-memory/config.toml (recommended, post-#1146) or via AI_MEMORY_LLM_BACKEND env vars (override path).

No GPU required. Nothing here is hard-wired to a GPU, to Ollama, or to Gemma — those are the local-first default, not a requirement. Wherever you have API access, run on hosts with no GPUs, and want autonomous mode with --profile full, point [llm] at a remote cloud API (e.g. OpenRouter as a low-cost example) or an internal air-gapped HA inference endpoint. See the No GPU required — any LLM backend walkthrough on the autonomous page.

Single source of truth. config.toml is consumed by every surface — the MCP server, the HTTP daemon, ai-memory atomise, ai-memory curator, the boot banner, and the ai-memory doctor reachability probe — so they all report the same backend. Example for xAI Grok 4.3:

schema_version = 2

[llm]
backend     = "xai"
model       = "grok-4.3"
base_url    = "https://api.x.ai/v1"
api_key_env = "XAI_API_KEY"            # env-var name (inline keys rejected at parse time)

Export XAI_API_KEY in your shell rc; the MCP config stays minimal (no env: block needed). The override path — an env: block on the MCP server config — still works and takes precedence; it's useful for CI / per-session tweaks but shell exports do NOT reach the MCP-spawned subprocess.

Running under launchd / systemd? A serve or curator --daemon started by a service manager does NOT inherit a shell-rc export either — its env comes only from the unit/plist. Prefer api_key_file = "…/api.key" (mode 0400, env-independent) or declare the key in the unit's Environment= / plist EnvironmentVariables dict.

Canonical config schema →   Per-vendor recipes →   Standalone CLI / HTTP daemon setup
Migrating to v0.8.0

Already running v0.6.4 or v0.7.x? The upgrade is one boot.

v0.8.0 migrates your existing database in place. The sqlite schema steps up to v70 on the first ai-memory serve after the upgrade (a v0.7.x DB steps v57 → v70; a v0.6.4 DB walks the full ladder). It is non-destructive — every existing memory carries forward unchanged, archive → restore is lossless, and new columns default to safe values for legacy rows. Typical downtime is 30 seconds to 2 minutes on a laptop-sized database.

Step 1 · Back up

Copy the DB + sidecars

Stop the daemon, then copy ai-memory.db and any -wal / -shm sidecars to a .bak.pre-v08 file. Verify it with PRAGMA integrity_check.

Step 2 · Upgrade

Install v0.8.0 & boot once

Install the new binary, then run ai-memory serve. The schema ladder migrates automatically and you are back online when it finishes.

Step 3 · Roll back if needed

File restore is the escape hatch

The ladder is idempotent on replay but not reversible in place. To roll back, restore the .bak.pre-v08 file and reinstall the prior binary.

Walk-me-through-it migration guide →   Deep technical companion   Postgres migration
Integrate

Talk to your AI assistant of choice.

ai-memory speaks the Model Context Protocol over stdio JSON-RPC, plus an HTTP REST API for any client that prefers HTTP. Out of the box it pairs with Claude Code, Cursor, ChatGPT desktop, and any MCP-compliant harness.

Full integration guide — any AI, any harness →

Docs by audience

Pick your role. We will get to the point.

Four pathways, each answering one question in the first paragraph. Reference material lives in the linked docs; the audience pages stay short.

Working refs: install-quickstart · integration-guide · enterprise-deployment. AI-NHI design essays: What · How · Why. A2A federation: see A2A messaging for the federation peer-to-peer recall walkthrough.

Reference architectures

Five topologies. One playbook each.

Each tier has a reproducible reference deployment: which interfaces are enabled, which backend is selected, which governance posture, which federation mode. Pick the tier that fits today; the upgrade path to the next tier is documented.

Deep dives

Admin & operator

Run it in production.

Operator-grade documentation for SRE, platform, and security teams. Hardening, observability, upgrade paths, governance rule signing, forensic export — everything you would expect for a substrate that holds your agents' identities.

Reference

Dig deeper.

The full docs surface — concept pages, API, guides, ADRs — lives alongside the source.