OpenAbby agents keep two memories in sync — one written for humans, one built for machines — stitched together by a rescue hook that saves knowledge from the context window before it's compacted away, and topped with a learning loop that turns corrections into behavior.
Most agent frameworks pick a side: either flat files the model edits, or an opaque vector store. OpenAbby runs both, deliberately. The file layer is auditable — you can open it and read what your agent believes. The semantic layer is searchable by meaning. A compaction-time flush keeps them in agreement.
Every agent owns a directory of markdown. The agent edits it with three tools — memory_read, memory_write, memory_search — and a file watcher hot-reloads identity files straight into the system prompt the moment they change. Nothing about what the agent believes is hidden from its operator.
The persona. Personalized per agent at provisioning time, so each deployment introduces itself with its own identity and address.
Curated long-term memory. Deliberately overwritten — not appended — so the agent must decide what deserves permanence.
The daily journal. Append-only, one file per day. This is where the compaction flush lands notes rescued from the context window.
Who the user is. Pre-seeded from a team roster at provisioning — a freshly-created agent already knows its person on first contact.
Supporting bootstrap files, all watched and hot-reloaded. Editing a file is editing the agent's mind — no restart required.
Before the agent claims it doesn't know something, a humility pass greps the workspace first. "I don't know" is only allowed after actually looking.
Underneath the files sits a vector store of extracted knowledge — and this is where the biology-inspired mechanics live. Memories here aren't rows that sit still; they age, reinforce, merge, and get promoted.
Every memory carries a confidence score with an exponential 30-day half-life. Each time a memory is touched again, its half-life stretches by 1.5× — so three reinforcements make it over three times more durable. Unused memories fade below threshold, get archived, and are eventually pruned. Different types age at different speeds: preferences outlive trivia.
Periodically the engine does what brains do at night: it merges near-duplicates by embedding similarity, asks a model to derive higher-level insights from clusters of related memories, prunes the dead, and promotes frequently-reinforced, high-confidence items into core knowledge. The agent doesn't just store — it digests.
Recall isn't a flat scan over every vector. Search descends category-first — find the relevant topics, then the best memories within them — mirroring how human recall moves from theme to detail.
"Always answer in bullet points" is not the same kind of fact as "the user's dog is named Piper." An intent classifier spots durable instructions, stores them deduplicated by content hash, and injects the active set every single turn — no retrieval roulette for the things that must always hold.
A background pass extracts entities — people, organizations, projects, technologies — and typed relationships (works_at, uses, depends_on) from conversation, populating a graph nobody has to maintain by hand.
Tier one is a per-agent SQLite database — private, local, zero-dependency. Tier two is an optional shared Postgres + pgvector store, so a fleet of agents can pool what they learn, with a Redis cache in front.
The agent never has to remember to remember. Two hooks wrap every single exchange.
Every long-running agent eventually fills its context window and must summarize old messages away. In most systems, detail is simply lost. In OpenAbby, a before-compact hook fires first: a cheap sidecar model — never the expensive primary brain — reads the messages about to be destroyed and writes the durable facts into the daily journal. Context isn't lost; it's demoted from RAM to disk, where memory search can still find it. The main model pays nothing for its own bookkeeping.
Above both memory layers sits a separate system for learning from mistakes. Facts tell the agent what's true; lessons tell it how to behave. When a user corrects the agent — or something fails — that signal becomes policy.
Corrections, frustration, and failures are spotted as learning signals in the conversation stream.
A reflection pass asks: what's the general lesson here — not just what went wrong this once?
The lesson is inferred and written down as a candidate policy snippet, tied to its evidence.
Approved lessons shape future behavior — the same mistake shouldn't need correcting twice.
Dual representation, kept honest. Human-auditable markdown and machine-searchable vectors describing the same mind — synced by the compaction flush rather than drifting apart.
Memories age like memories. Exponential decay, reinforcement-extended half-lives, archival, and pruning — instead of an ever-growing pile of stale embeddings.
Consolidation generates, it doesn't just compress. The maintenance pass produces new higher-level insights from clusters of old memories.
The brain never does the bookkeeping. All extraction, flushing, and graph-building runs on a cheap sidecar model — the primary model's tokens go to the user.
Agents are born knowing their person. Roster-driven pre-seeding of user_profile.md means the first conversation is never a cold start.
Facts, instructions, and lessons are three different things — stored, retrieved, and applied through three different mechanisms, because they fail differently when conflated.