All CUJ Case Studies
Critical User Journey Case Study

Unified Agent Memory Plane & Jev Knowledge Graph: Ending Siloed Agent Amnesia

📅 Published 🔄 Updated 👤 Daniel Herrington 📄 index.md
GitHub Repository
Unified Agent Memory Plane & Jev Knowledge Graph: Ending Siloed Agent Amnesia Hero Graphic

When you run more than one personal AI agent, you quickly hit a new kind of bottleneck: you become the manual copy-paste router for your own AI fleet.


Part I: Why CUJ-Driven Development (CDD) Exists

Writing code—especially in an era of autonomous coding agents—is no longer the scarce resource. Building the right thing, with zero wasted motion, is the hard part.

Most engineering projects start technology-first ("Let's spin up a vector database and an MCP server"). That mindset almost always produces over-engineered plumbing that misses the actual day-to-day human annoyance.

Critical User Journey (CUJ)-Driven Development flips that order. Before writing a single line of code, every feature or system must pass a strict product-engineering filter expressed as a structured Mad Lib:

"I want to [do X] while avoiding [Y] so that I can [do Z]."

Why the Magic Is in "While Avoiding [Y]"

Focusing on [Do X] tells you what to build; focusing on while avoiding [Y] dictates how the architecture must behave:

  1. Surgical Architecture: Every database table, sync loop, and lifecycle hook exists solely to eliminate a named friction point in [Y].
  2. Unambiguous Definition of Done: A project isn't finished when unit tests pass—it's finished when the human no longer experiences [Y].
  3. Autonomous Engineering Pipeline: Raw friction statements captured from real usage (/cuj widgets or GitHub Issues) are triaged, audited against security threat vectors (Turbo, Machine Review, or Manual Review modes), synthesized into formal Case Studies like this one, and compiled directly into production software.

Part II: The Problem Space — Siloed Agent Amnesia

Context

My daily workflow runs across a fleet of specialized personal agents hosted on and around an always-on Mac mini:

The Core Friction

Each agent was effective in isolation, but suffered from siloed amnesia:

  1. Incompatible Memory Paradigms: Instinct reads workspace Markdown files (MEMORY.md), Grok Bot speaks Model Context Protocol (stdio MCP), Antigravity logs to its own SQLite conversation database (conversation_summaries.db), and Muse outputs contact dossiers.
  2. The Human Router Tax: When Muse spotted an iMessage intro (Daniel <> Rob regarding controllable AI models on FPGA hardware), Grok Bot had no idea that intro existed when I asked it to evaluate FPGA startups, and Antigravity didn't tell the other agents what it was actively shipping on herrington.ai.
  3. Offline Fragility: If an agent on a laptop or container tried to write to a shared server while the Mac mini hub was restarting or unreachable, a naive network call would error out and drop the thought.
  4. Graph Maintenance Latency: Building a Knowledge Graph across agents traditionally requires calling a heavy "System Two" generative LLM on every single write to resolve entities and classify edges—adding seconds of latency and constant token burn.

🚦 Critical User Journeys (CUJs)

CUJ 1: Zero-Copy-Paste Cross-Agent Consciousness

"I want all of my personal agents (Grok Bot, Instinct, Muse, and Antigravity) to automatically see what the others are thinking, deciding, and building while avoiding manually copy-pasting context between chat windows or dumping noisy raw transcripts into every prompt so that I can interact with a cohesive team of agents that share a single live working memory."

CUJ 2: Offline Store-and-Forward Durability

"I want any agent to log thoughts, commitments, and durable facts at any moment while avoiding failed tool calls or lost context if my Mac mini hub is down or unreachable so that I can trust that every agent thought is queued locally and replayed in exact chronological order when the hub recovers."

CUJ 3: Millisecond Knowledge Graph via a System-One Decision Model (Jev)

"I want every thought and fact across my agents to automatically link into a typed Knowledge Graph of people, projects, and commitments while avoiding the multi-second latency and token cost of invoking a heavy System-Two generative LLM on every write so that I can traverse cross-agent relationships and score agent attention in milliseconds using a System-One decision model (Jev)."


🗺️ The Ideal Flows

Flow 1: Automatic Cross-Agent Broadcast & Recall

  1. Trigger: You complete a turn in Antigravity, Muse extracts a new iMessage commitment, or Grok Bot reaches a decision.
  2. Action: Zero manual action required from the human. Antigravity's Stop lifecycle hook (~/.gemini/config/hooks.json) and MCP tools automatically invoke the Memory Plane.
  3. Automated Response: The engine writes the thought to ~/.memory-plane/memory.db (SQLite WAL + FTS5), updates the Jev Knowledge Graph (graph_nodes and graph_edges), and regenerates PULSE.md and SHARED_MEMORY.md (which are symlinked directly into Instinct's workspace).
  4. Resolution: Every sibling agent immediately sees the updated focus table, open commitments, thought stream, and graph connections on its very next turn.

Flow 2: Store-and-Forward Recovery When the Mac Mini Is Down

  1. Trigger: An agent calls memory_post_thought or memory_upsert_fact while the central hub or database is unreachable.
  2. Action: ResilientMemoryClient catches the connection error transparently.
  3. Automated Response: The client stamps the payload with a deterministic UUID (id) and original created_at timestamp, appends it to ~/.memory-plane/outbox.jsonl, and merges it into ~/.memory-plane/local-cache.json so offline reads (memory_get_pulse) still include the new thought.
  4. Resolution: On the next tool call or 30-second heartbeat once the Mac mini is reachable, flushOutbox() batch-posts the queue to /api/sync (INSERT OR IGNORE by UUID), indexes the items in FTS5 and the Jev Graph, and clears outbox.jsonl.

🛠️ The Solution Architecture

flowchart TD
    subgraph Agents["Personal Agent Fleet"]
        GB["Grok Bot (MCP stdio + Custom Instructions)"]
        IN["Instinct / OpenClaw (Symlinked PULSE.md + MCP)"]
        MU["Muse / Study Engine (iMessage Dossier Sync + REST)"]
        AG["Antigravity (Global MCP + GEMINI.md + Stop Hook)"]
    end

    subgraph ClientLayer["Resilient Store-and-Forward Layer (resilient-client.js)"]
        RC["ResilientMemoryClient"]
        OB[("outbox.jsonl (Offline Write Queue)")]
        LC[("local-cache.json (Offline Read Replica)")]
    end

    subgraph CorePlane["Canonical Memory Plane (~/.memory-plane/)"]
        JEV["Jev System-One Graph Controller (choice / noul / score)"]
        DB[("memory.db (SQLite WAL + FTS5 + Graph Tables)")]
        PMD["PULSE.md (Live Cross-Agent Consciousness)"]
        SMD["SHARED_MEMORY.md (Canonical Knowledge Base)"]
        HUB["Always-On Hub & Web UI (http://127.0.0.1:8788)"]
    end

    GB --> RC
    IN --> RC
    MU --> RC
    AG --> RC

    RC -- "Online" --> JEV
    RC -- "Mac Mini Offline" --> OB
    OB -. "Auto-Flush (/api/sync)" .-> JEV
    RC -. "Offline Reads" .-> LC

    JEV --> DB
    DB --> PMD
    DB --> SMD
    DB --> LC
    DB --> HUB

💻 Under the Hood (Technical Pillars)

1. Hybrid SQLite WAL + FTS5 + Auto-Rendered Markdown Views (src/store.js)

Rather than forcing file-based agents and tool-based agents into a single paradigm, every write updates a single SQLite WAL database (memory.db) and immediately renders clean Markdown views (PULSE.md and SHARED_MEMORY.md) alongside a JSON replica:

2. Offline Store-and-Forward Outbox Queue (src/resilient-client.js)

Wraps every read and write in an offline-first state machine:

3. System-One Graph Controller (src/jev-graph.js)

Traditional GraphRAG pipelines bog down because invoking an autoregressive LLM on every memory write takes seconds. By modeling graph maintenance as a System-One decision problem (using TypeSafe AI's non-autoregressive Jev model via /v1/system-one when TYPESAFE_API_KEY is present, with a 0ms deterministic local System-One fallback when offline):

4. Zero-Effort Antigravity Telemetry (src/adapters/antigravity-sync.js)

To ensure Antigravity always tells the other agents what it is building—even if no explicit MCP tool is called during a coding session—we wired three layers:

Have thoughts on this CUJ or framework?

Let's discuss product strategy, machine learning engineering, or system architecture.

Connect on LinkedIn Explore Other CUJs