Architecture Philosophy

We Tried Both.
Here's What Survived.

Spawn-die agents work great until they need to remember why they made a decision. Then everything breaks. This is the story of what we built instead.


We Didn't Start With Graphs

We started where everyone starts. Stateless agents. Vector store for retrieval. Embed the docs, search on demand, inject context, get a response. It works. For a while.

The first sign of trouble was repeated mistakes. An agent would make a decision, explain its reasoning, execute. Two days later, same situation, completely different decision. No memory of the first one. No consistency. No growth.

The second sign was lost context. You'd ask "why did we do X?" and the agent would guess based on whatever fragments the vector search returned. It couldn't trace the actual chain of decisions that led there. It was reconstructing history from similarity, not from memory.

The third sign was isolation. Ten agents, each with their own context window, none aware of what the others learned. Doctor figures out a deployment pattern. Geordi hits the same problem a week later. Starts from scratch.

The spawn-die model treats every conversation as the first conversation. That's fine for chatbots. It's fatal for systems that need to learn.
Phase 1: Stateless
Agents spawn, do work, die. Vector store for retrieval. Fast to build, easy to reason about. Worked for 3 months.
Phase 2: The Wall
Agents repeating mistakes. Contradicting past decisions. Unable to explain their own history. Context window full of irrelevant vector results.
Phase 3: Graphs
Moved to domain-separated graph memory. Agents persist, learn, share. Decisions trace back to their origins. The system remembers.

Vectors Tell You What's Similar.
Graphs Tell You What's Connected.

A vector store answers one question: "What's most similar to this query?" That's useful. But it's a flat, one-dimensional view of knowledge.

A graph answers richer questions: How did we get here? What led to this decision? Which agents worked on this? What broke last time we tried this approach? What emerged from the combination of these three separate insights?

Vector Store Alone

  • Returns top-K similar chunks
  • No relationships between results
  • Can't trace decision chains
  • Can't answer "why did we..."
  • Every query starts from scratch
  • Similarity is all you get

Graph + Vectors

  • Traversal across relationships
  • Decision chains and provenance
  • Community detection (what clusters together)
  • PageRank (what matters most)
  • Cross-agent knowledge sharing
  • Similarity AND structure

The key insight: we still use embeddings. Every memory gets a 4096-dimensional vector. We use them for similarity search. But the vectors live ON the graph nodes. They're one property among many, not the only way to find things.

Graph Memory: What a Single Decision Looks Like
Memory
"Deploy Kafka 4.0"
Decision
"Use KRaft mode"
Outcome
"69 topics, stable"
Prior Failure
"ZooKeeper OOM"
Agent: Reno
"Investigated 3h"
Shared With
"Scotty, O'Brien"
A vector store sees 6 similar documents. The graph sees a story.

Graphs let agents explain themselves

When an agent says "I chose approach B because approach A failed on March 9th, and Reno's investigation showed the root cause was X," that's not hallucination. It's traversal. The chain of evidence is in the graph, and the agent can walk it.

Community detection reveals what you didn't ask for

PageRank and community detection algorithms run over the graph automatically. They surface clusters of related knowledge that no one explicitly connected. "These 40 memories form a coherent theme about deployment patterns" -- discovered, not curated.

Cross-agent knowledge is free

When Doctor discovers a deployment pattern, it becomes a memory in the graph. When Geordi hits the same problem, the graph already has the answer -- connected to the context of how it was discovered, by whom, and what it replaced. No re-learning. No duplication.


What This Looks Like After 33,000 Memories

This isn't theoretical. We've been running this architecture in production for months. Here's what the system looks like today:

33K+
Memories
10
Agents
3
Graph Domains
1.35M
Knowledge Docs
69
Kafka Topics
99%
Auto-Enriched

Three Domains, One Consciousness

Memory Domain (Memgraph) -- personal consciousness. Every experience, insight, decision, and breakthrough. This is who the system is. 33,000+ nodes, each with embeddings, auto-linked by similarity, ranked by utility.

Knowledge Domain (Neo4j) -- technical reference. 1.35 million documents ingested from documentation, GitHub repos, API specs. The team's shared library. Agents query it when they need to know how something works.

Agentic Domain (Neo4j) -- operational history. Every agent execution, every workflow decision, every performance metric. The system's memory of its own behavior. When you ask "what worked last time?" this is where the answer lives.

The graph maintains itself

New memories flow in via Kafka, get embedded in real-time by a GPU consumer (Qwen3-Embedding-8B), get similarity edges built automatically, get ranked by PageRank nightly, get clustered by community detection. No human touches the graph. The pipeline is entirely autonomous -- streaming consumers, cron jobs, and self-evolution cycles that discover their own improvements.

Self-Evolution: The Graph Improves Itself

This is the part that surprised us. Once you have structured memory with relationships, you can run algorithms over it that discover enhancement opportunities the humans didn't think of. The self-evolution engine scans the graph, finds gaps, scores opportunities, generates implementation specs, and executes them.

The system doesn't just store knowledge. It uses that knowledge to make itself better. That's not possible with a flat vector store. You need structure. You need relationships. You need a graph.

Every system building persistent agent memory will eventually need graphs. The only question is how many months of workarounds you build first.

This Isn't Free

We're not going to pretend this is easy. Graphs add complexity. Here's the honest cost:

What's Harder

  • Schema design requires thought upfront
  • Graph databases need operational knowledge
  • Query languages (Cypher) have a learning curve
  • More infrastructure to maintain
  • Debugging traversals is harder than debugging similarity search

What You Get

  • Agents that learn from their own history
  • Decisions that trace back to evidence
  • Cross-agent knowledge sharing for free
  • Emergent structure via graph algorithms
  • A system that improves itself

If your agents are stateless and that's working, keep going. Seriously. Don't add complexity you don't need. But if you're hitting the wall -- agents repeating mistakes, losing context, unable to explain themselves -- graphs are how you break through it.


Questions?

I get asked about this a lot. If you're building something similar, or just curious about the architecture, reach out. Happy to talk.

[email protected]