Audrey
Why Audrey Exists
Agents forget the exact mistakes they made yesterday. They repeat broken commands, lose project-specific rules, miss contradictions, and treat every new session like a cold start.
Audrey turns those hard-won lessons into a local memory runtime:
memory_recallfinds durable context by semantic similarity.memory_preflightchecks prior failures, risks, rules, and relevant procedures before an action.memory_reflexesconverts remembered evidence into trigger-response guidance agents can follow.memory_validatecloses the loop after the action —helpful,used, orwrongoutcomes feed salience and decay.memory_dreamconsolidates episodes into principles and applies decay.audrey impactandaudrey doctortell a human or CI system whether the runtime is doing real work and is actually ready.
It is not a hosted vector database, a notes app, or a Claude-only plugin. Audrey is a SQLite-backed continuity layer that can sit under any local or sidecar agent loop.
Related MCP server: GoodMemory
Quick Start
Requires Node.js 20+.
npx audrey doctor
npx audrey demodoctor verifies Node, the MCP entrypoint, provider selection, memory-store health, and host config generation. demo runs a no-key, no-host, no-network proof: it creates temporary memories, records a redacted failed tool trace, generates a Memory Capsule, proves recall, prints Memory Reflexes, and deletes the demo store.
Expected first-run shape:
Audrey Doctor v0.22.2
Store health: not initialized
Verdict: readyAfter the first real memory write, doctor should report the store as healthy.
Install Into Agent Hosts
Preview host setup without editing config files:
npx audrey install --host codex --dry-run
npx audrey install --host claude-code --dry-run
npx audrey install --host generic --dry-runGenerate raw config blocks:
npx audrey mcp-config codex
npx audrey mcp-config generic
npx audrey mcp-config vscodeClaude Code can be registered directly:
npx audrey install
claude mcp listAll local MCP paths default to local embeddings and one shared SQLite-backed memory directory. Use AUDREY_DATA_DIR to isolate projects, tenants, or host identities.
Installer-generated host config does not include provider API keys by default. Prefer setting ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, or GEMINI_API_KEY in the host runtime environment; use npx audrey install --include-secrets only if you explicitly accept argv/config exposure.
Use With Ollama And Local Agents
Ollama runs models; Audrey supplies memory. Start Audrey as a local REST sidecar and expose its routes as tools in your agent loop:
AUDREY_AGENT=ollama-local-agent npx audrey serve
curl http://localhost:7437/health
curl http://localhost:7437/v1/statusRunnable example:
AUDREY_AGENT=ollama-local-agent npx audrey serve
OLLAMA_MODEL=qwen3 node examples/ollama-memory-agent.js "What should you remember about Audrey?"Core sidecar tools:
Agent Need | REST Route |
Check memory before acting |
|
Get reflex rules for an action |
|
Store a useful observation |
|
Recall relevant context |
|
Get a turn-sized memory packet |
|
Check health |
|
What Ships
Surface | Status |
MCP stdio server | 20 tools plus status/recent/principles resources and briefing/recall/reflection prompts |
CLI |
|
REST API | Hono server with |
JavaScript SDK | Direct TypeScript/Node import from |
Python client |
|
Storage | Local SQLite plus |
Deployment | npm package, Docker, Compose, host-specific MCP config generation |
Safety loop | preflight warnings, reflexes, redacted tool traces, contradiction handling |
Memory Model
Audrey is built around the parts of memory that matter for agents:
Episodic memory: specific observations, tool results, preferences, and session facts.
Semantic memory: consolidated principles extracted from repeated evidence.
Procedural memory: remembered ways to act, avoid, retry, or verify.
Affect and salience: emotional weight and importance influence recall.
Interference and decay: stale, conflicting, or low-confidence memories lose authority over time.
Contradiction handling: competing claims are tracked instead of silently overwritten.
Tool-trace learning: failed commands and risky actions become future preflight warnings.
The product bet is simple: the next generation of useful agents will not just retrieve facts. They will remember what happened, decide whether a memory is still trustworthy, and use that memory before touching tools.
Use Audrey From Code
JavaScript
import { Audrey } from 'audrey';
const brain = new Audrey({
dataDir: './audrey-data',
agent: 'support-agent',
embedding: { provider: 'local', dimensions: 384 },
});
await brain.encode({
content: 'Stripe returns HTTP 429 above 100 req/s',
source: 'direct-observation',
tags: ['stripe', 'rate-limit'],
});
const memories = await brain.recall('stripe rate limit');
await brain.waitForIdle();
brain.close();Python
pip install audrey-memoryfrom audrey_memory import Audrey
brain = Audrey(base_url="http://127.0.0.1:7437", agent="support-agent")
memory_id = brain.encode("Stripe returns HTTP 429 above 100 req/s", source="direct-observation")
results = brain.recall("stripe rate limit", limit=5)
brain.close()Production Readiness
Audrey is close to a 1.0-ready local memory runtime, but production depends on how it is embedded. Treat it like stateful infrastructure.
Release gates used for this package:
npm run release:gate
npx audrey doctor
npx audrey demoRecommended runtime checks:
npx audrey doctor --json
npx audrey status --json --fail-on-unhealthy
npx audrey install --host codex --dry-runProduction controls you still own:
Set one
AUDREY_DATA_DIRper tenant, environment, or isolation boundary.Pin
AUDREY_EMBEDDING_PROVIDERandAUDREY_LLM_PROVIDERexplicitly.Back up the SQLite data directory before provider or dimension changes.
Keep API keys and raw credentials out of encoded memory content.
Use
AUDREY_API_KEYif the REST sidecar is reachable beyond the local process boundary.Run
npx audrey dreamon a schedule so consolidation and decay stay current.Add application-level encryption, retention, access control, and audit logging for regulated environments.
Environment Variables
Variable | Default | Purpose |
|
| SQLite memory store path. Use one per tenant or agent identity for isolation. |
|
| Logical agent identity stamped on writes. |
|
|
|
| auto |
|
|
| Local embedding device ( |
|
| REST sidecar port. |
|
| REST sidecar bind address. Set to |
| unset | Bearer token required for non-loopback REST traffic. |
|
| Set to |
|
| Set to |
| unset | Colon/semicolon-separated extra roots for |
|
| Set to |
|
| Set to |
|
| Set to |
|
| Set to |
|
| Set to |
|
| Default Memory Capsule character budget. |
Benchmarks
Audrey ships two benchmark commands.
Performance snapshot
npm run bench:perf-snapshot measures encode and hybrid recall latency at multiple corpus sizes against the in-process mock provider. It reports p50/p95/p99 plus machine provenance so the numbers are reproducible and honest about what they cover.
npm run build
npm run bench:perf-snapshot # default sizes 100, 1000, 5000
node benchmarks/perf-snapshot.js --sizes 1000,10000 --json # custom shapeSample output from benchmarks/snapshots/perf-0.22.2.json (24-core Ryzen 9 7900X3D, Node 25.5.0, mock 64-dim embedding, hybrid recall, limit 5):
Corpus size | Encode p50 (ms) | Encode p95 (ms) | Recall p50 (ms) | Recall p95 (ms) | Recall p99 (ms) |
100 | 0.33 | 0.63 | 0.52 | 1.3 | 3.1 |
1,000 | 0.31 | 1.3 | 0.63 | 0.99 | 7.0 |
5,000 | 0.29 | 1.7 | 2.1 | 2.5 | 18.0 |
These numbers cover Audrey's own pipeline (SQLite + sqlite-vec + hybrid ranking) and exclude embedding-provider cost. Real-world recall p95 with a local 384-dim provider is typically 5–15× higher; with a hosted provider it is dominated by the API round-trip. Run on your own hardware before quoting numbers anywhere.
Behavioral regression suite
npm run bench:memory:check is a release gate. It runs a small set of retrieval and lifecycle scenarios (information extraction, knowledge updates, multi-session reasoning, conflict resolution, privacy boundary, overwrite, delete-and-abstain, semantic/procedural merge) against Audrey and three weak baselines (vector-only, keyword+recency, recent-window) and asserts Audrey doesn't regress. The baseline comparisons exist to catch correctness regressions in retrieval logic, not to make marketing claims.
npm run bench:memory # full regression suite (writes JSON + report)
npm run bench:memory:check # release gate, exits non-zero on regressionCommand Reference
# First contact
npx audrey doctor
npx audrey demo
# MCP setup
npx audrey install --host codex --dry-run
npx audrey mcp-config codex
npx audrey mcp-config generic
npx audrey install
npx audrey uninstall
# Health and maintenance
npx audrey status
npx audrey status --json --fail-on-unhealthy
npx audrey dream
npx audrey reembed
# Closed-loop visibility
npx audrey impact
npx audrey impact --json --window 7 --limit 5
# Tool-trace learning
npx audrey observe-tool --event PostToolUse --tool Bash --outcome failed
npx audrey promote --dry-run
# REST sidecar
npx audrey serve
docker compose up -d --buildThe Node sidecar defaults to 127.0.0.1:7437. The Docker image intentionally binds inside the container on 3487; override the published host port with AUDREY_PUBLISHED_PORT when using Compose.
Documentation
Public setup, runtime, benchmark, and command guidance is maintained in this README.
Development
npm ci
npm run release:gate
python -m unittest discover -s python/tests -v
python -m build --no-isolation pythonOn some locked-down Windows hosts, Vitest/Vite can fail before tests start with spawn EPERM. That is an environment process-spawn blocker, not an Audrey runtime failure. Use npm run release:gate:sandbox, direct dist/ smokes, and GitHub Actions as the release evidence path.
License
MIT. See LICENSE.
Available Tools
23 toolsmemory_capsuleD
Inputs: query (required), cwd, mode, limit, +5 more.
memory_consolidateD
Inputs: min_cluster_size, similarity_threshold.
memory_decayD
Inputs: dormant_threshold.
memory_dreamD
Inputs: min_cluster_size, dormant_threshold, similarity_threshold.
memory_encodeD
Inputs: source (required), content (required), tags, affect, +4 more.
memory_exportD
Inputs: no named parameters.
memory_forgetD
Inputs: id, purge, query, all_agents, +1 more.
memory_greetingD
Inputs: scope, context.
memory_groundD
Inputs: cwd.
memory_guard_afterD
Inputs: receipt_id (required), cwd, tool, files, +9 more.
memory_guard_beforeD
Inputs: action (required), cwd, mode, tool, +11 more.
memory_importD
Inputs: snapshot (required).
memory_introspectD
Inputs: no named parameters.
memory_observe_toolD
Inputs: tool (required), event (required), cwd, files, +7 more.
memory_preflightD
Inputs: action (required), cwd, mode, tool, +10 more.
memory_promoteD
Inputs: yes, limit, target, dry_run, +3 more.
memory_recallD
Inputs: query (required), mood, tags, after, +8 more.
memory_recent_failuresD
Inputs: cwd, limit, since, include_resolved.
memory_reflectD
Inputs: turns (required).
memory_reflexesD
Inputs: action (required), cwd, mode, tool, +11 more.
memory_resolve_truthD
Inputs: contradiction_id (required).
memory_statusD
Inputs: no named parameters.
memory_validateD
Inputs: id (required), outcome (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
With zero descriptions, many tools overlap heavily in apparent purpose: memory_consolidate vs memory_encode vs memory_promote, memory_reflect vs memory_dream vs memory_introspect, and memory_guard_before vs memory_preflight vs memory_guard_after are all indistinguishable from names alone. An agent would have to guess which of several memory-write or memory-maintenance tools to call.
Every tool uses a uniform memory_ prefix with snake_case, giving a strong predictable family pattern. The only deviation is mixing action verbs (recall, forget, validate) with noun-style names (memory_status, memory_greeting, memory_recent_failures, memory_capsule), which is minor but noticeable.
23 tools is on the heavy side for a memory subsystem, and several (dream, greeting, reflexes, capsule) look like niche extras rather than core operations. Without descriptions it is hard to justify each tool earning its place in such a large surface.
The names suggest broad lifecycle coverage: encode/recall for storage, consolidate/decay/forget for maintenance, export/import for portability, plus validation, introspection, and guardrails. However, with no descriptions the surface cannot be verified, and there is no obvious plain update/edit or search/query tool distinct from recall.
Maintenance
Related MCP Connectors
Memory, reflection and safety for AI agents. Hosted or local, no vector database.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.1Functional Source , Version 1.1, ALv2 Future
- AlicenseBqualityBmaintenanceLocal-first, auditable memory for Codex, Claude Code, and MCP clients. It stores scoped user/project memory in SQLite or Postgres, serves read-only recall and inspection tools by default, and supports opt-in governed writeback with review and forget controls.8159 npm21MIT
- AlicenseNot gradedqualityFmaintenanceLocal-first, auditable memory for AI agents. Provides durable context for MCP hosts with SQLite storage, CLI, and MCP tools for memory management.2Apache 2.0
- AlicenseNot gradedqualityDmaintenancePersistent memory MCP server for AI agents, featuring a visual interface to browse, search, edit, and delete memory. It provides tools for capturing episodes, recalling, consolidating, crystallizing traits, and forgetting, with local SQLite storage and optional authenticated web UI.MIT