visitor@scotts-brain:~/memory-index$ cat conversation-graph-engine.md | less
Conversations Are Graphs
Every AI conversation is stuck in a flat list. Here's why that's broken.
- #architecture
- #graphs
- #open-source
Every AI conversation is stuck in the past
Not philosophically. Literally. Every chat system, from ChatGPT to enterprise support bots, treats conversations as flat lists:
This works until it doesn't. And it stops working fast.
The problem shows up everywhere
You're planning a trip to Paris. Halfway through, you ask about restaurant recommendations. Then you're back to flights. Then hotels. Then you remember you wanted to ask about the restaurants again.
The AI has no idea what you're talking about. It either dumps the entire history into context (expensive, slow, noisy) or loses the thread entirely.
Ask "what did we decide about dinner?" and you'll get a hallucinated answer or a polite "I don't have that information."
Conversations are graphs
Topics branch. Context shifts. Threads reconnect. A conversation about buying a house naturally splits into financing, locations, schools, commute times, then merges back when you're comparing options.
So I built a system that treats them that way.
driftos-core routes messages to semantic branches
Three routing decisions: STAY, BRANCH, or ROUTE.
The LLM figures out which one, and the system maintains the graph.
Facts come along for the ride
Each branch extracts structured facts with provenance:
When you assemble context for an LLM call, you get the relevant branch messages plus facts from related branches. 20 messages instead of 1000. Focused context instead of noise.
The architecture looks simple. That's the point.
1. Message comes in
2. LLM classifies: STAY / ROUTE / BRANCH
3. Message goes to the right branch
4. Facts extracted on ROUTE / BRANCH
5. Context assembled on demand
Why open source this now?
The code is ~2,700 lines. But behind it sits two provisional patents and months of architecting the full system: finite state machines, dual-axis drift detection, semantic overlays, cluster allocation, merge promotion, lens-based visualisation. The complete DriftOS.
Complex systems take time. And I kept waiting for "ready".
So I stripped it back. What's the simplest thing that solves the problem? Route messages to branches. Extract facts. Assemble context. Ship it.
What this isn't (yet)
This is an MVP. v0.1.0. It works, but it's raw.
No auth. No multi-tenant. No hosted version. You'll need to run your own Postgres and bring your own Groq API key.
The routing sometimes over-branches. The fact extraction is basic. There's no UI.
But the core works: messages route to branches, facts get extracted, context assembles. The foundation is solid enough to build on.
Try it. Break it. Tell me what's missing.
The best feedback comes from people actually using it. Star it if it's interesting. Open an issue if it's broken. DM me if you want to talk about conversation graphs.
And if you're building something with AI context management, maybe stop fighting flat lists.
---
Scott Waddell is building DriftOS: conversation infrastructure for AI. Previously product at Antler, IBM, and Queensland Government. Based in London.