Production memory for AI agents and MCP workflows.
Audrey gives agents a local, inspectable memory layer that can encode episodes, consolidate them into principles, detect contradictions, and let stale knowledge decay instead of accumulating forever.
Most AI memory tools are storage wrappers. They save facts, retrieve facts, and keep everything forever. That leaves real production problems unsolved:
- Old information stays weighted like new information.
- Raw events never become reusable operating knowledge.
- Conflicting facts quietly coexist.
- Model-generated mistakes can get reinforced into false "truth."
Audrey models memory as a working system instead of a filing cabinet.
| Brain Structure | Audrey Component | What It Does |
|---|---|---|
| Hippocampus | Episodic Memory | Fast capture of raw events and observations |
| Neocortex | Semantic Memory | Consolidated principles and patterns |
| Cerebellum | Procedural Memory | Learned workflows and conditional behaviors |
| Sleep Replay | Dream Cycle | Consolidates episodes into principles and applies decay |
| Prefrontal Cortex | Validation Engine | Truth-checking and contradiction detection |
| Amygdala | Affect System | Emotional encoding, arousal-salience coupling, and mood-congruent recall |
- Local SQLite-backed memory with
sqlite-vec - MCP server for Claude Code with 13 memory tools
- JavaScript SDK for direct application use
- Health checks via
npx audrey status --json - Optional local embeddings and optional hosted LLM providers
- Strongest production fit today in financial services ops and healthcare ops
npx audrey installAudrey auto-detects providers from your environment:
GOOGLE_API_KEYorGEMINI_API_KEY-> Gemini embeddings (3072d)- no embedding key -> local embeddings (384d, MiniLM, offline-capable)
AUDREY_EMBEDDING_PROVIDER=openai-> explicit OpenAI embeddings (1536d)ANTHROPIC_API_KEY-> LLM-powered consolidation, contradiction detection, and reflection
Quick checks:
npx audrey status
npx audrey status --json
npx audrey status --json --fail-on-unhealthynpm install audreyZero external infrastructure. One SQLite file.
import { Audrey } from 'audrey';
const brain = new Audrey({
dataDir: './agent-memory',
agent: 'support-agent',
embedding: { provider: 'local', dimensions: 384 },
});
await brain.encode({
content: 'Stripe API returned 429 above 100 req/s',
source: 'direct-observation',
tags: ['stripe', 'rate-limit'],
context: { task: 'debugging', domain: 'payments' },
affect: { valence: -0.4, arousal: 0.7, label: 'frustration' },
});
const memories = await brain.recall('stripe rate limits', {
limit: 5,
context: { task: 'debugging', domain: 'payments' },
});
const dream = await brain.dream();
const briefing = await brain.greeting({ context: 'debugging stripe' });
brain.close();Every Claude Code session gets these tools after npx audrey install:
memory_encodememory_recallmemory_consolidatememory_dreammemory_introspectmemory_resolve_truthmemory_exportmemory_importmemory_forgetmemory_decaymemory_statusmemory_reflectmemory_greeting
npx audrey install
npx audrey uninstall
npx audrey status
npx audrey status --json
npx audrey status --json --fail-on-unhealthy
npx audrey greeting
npx audrey greeting "auth"
npx audrey reflect
npx audrey dream
npx audrey reembedgreeting and reflect are designed for Claude Code hooks, so you can wire them into session start and stop automation.
Audrey is strongest today in workflows where memory must stay local, reviewable, and durable:
- Financial services operations: payments ops, fraud and dispute workflows, KYC/KYB review, internal policy assistants
- Healthcare operations: care coordination, prior-auth workflows, intake and referral routing, internal staff knowledge assistants
Audrey is a memory layer, not a compliance boundary. For regulated environments, pair it with application-level access control, encryption, retention, audit logging, and data-minimization rules.
Production guide: docs/production-readiness.md
Industry demos:
- Episodic: raw events and observations
- Semantic: consolidated principles
- Procedural: reusable workflows and actions
- Causal: relationships that explain why something happened
Audrey scores memories using source reliability, evidence agreement, recency decay, and retrieval reinforcement. That helps keep direct observations above guesses and keeps stale or weakly supported knowledge from dominating recall.
brain.dream() runs the full maintenance path:
- Consolidate related episodes into principles.
- Apply decay so low-value memories lose weight over time.
- Report memory health and current stats.
When evidence conflicts, Audrey tracks the contradiction instead of silently picking a winner. Resolutions can stay open, be marked resolved, or become context-dependent.
const brain = new Audrey({
dataDir: './audrey-data',
agent: 'my-agent',
embedding: {
provider: 'local', // mock | local | gemini | openai
dimensions: 384,
device: 'gpu',
},
llm: {
provider: 'anthropic', // mock | anthropic | openai
apiKey: process.env.ANTHROPIC_API_KEY,
},
consolidation: {
minEpisodes: 3,
},
context: {
enabled: true,
weight: 0.3,
},
affect: {
enabled: true,
weight: 0.2,
},
decay: {
dormantThreshold: 0.1,
},
});Recommended production checks:
# Human-readable status
npx audrey status
# Monitoring-friendly status
npx audrey status --json --fail-on-unhealthy
# Scheduled maintenance
npx audrey dream
# Repair vector/index drift after provider or dimension changes
npx audrey reembed- Contributing guide: CONTRIBUTING.md
- Security policy: SECURITY.md
- CI workflow: .github/workflows/ci.yml
npm ci
npm test
npm run pack:checkCurrent validated baseline:
npm testnpm run pack:check
MIT. See LICENSE.