Memory infrastructure for AI

Roux is a memory framework
for AI companions
and agents.

It handles persistent state, episodes, and relationships across sessions — so your characters remember. Built for production, designed to stay cheap at scale.

AI companions and agents have a memory problem. Every time a session ends, the context window empties — and with it, everything your system learned about the user. The relationship starts over. The character forgets.

This isn't a model limitation. It's an infrastructure gap.

  • "The NPC who forgets you betrayed them last session."
  • "The companion who reintroduces themselves every conversation."
  • "The agent whose context window balloons into hundreds of dollars per user."

These are engineering problems. Roux solves them at the data layer, before they reach your model.

How Roux works

Data flow, not magic.

Roux architecture diagram: episode detection feeds into fact extraction, which stores typed records into a memory store (Postgres with pgvector for facts and Neo4j for relationships), then retrieval and context assembly composes bounded context for the agent layer.

Roux treats memory as a structured data problem. When a session ends, an episode detector classifies the interaction into typed events — facts learned, relationships formed, significant moments. These aren't embeddings of raw text; they're structured, typed records.

Storage is deliberately heterogeneous. Factual memories live in Postgres with pgvector for semantic retrieval. Relationships — who knows whom, what was promised, how trust has evolved — live in Neo4j, where graph traversal outperforms any embedding similarity search.

The retrieval layer composes context from both sources before each session. Context assembly is deterministic, auditable, and bounded — no surprise token bloat.

Episode detection is the design choice that matters most. Instead of summarizing everything, Roux decides what's worth remembering — a fundamentally different question that keeps storage costs bounded as usage scales.

Production record

01

Running in production for 18+ months as the memory layer for a personal AI companion project.


02

Designed to support multi-tenant SaaS at $3.50–4 per user per month at projected scale, validated by a 28-day cost simulation.


03

Built on FastAPI, Postgres + pgvector, Neo4j, Redis, Docker. No proprietary abstractions. Swap any layer.

Live demo

Watch it work.

The read-only observability dashboard of a Roux instance running with seeded simulation data. Watch episodes form, facts get extracted, and the relationship graph evolve.

Open the dashboard →

Built for

AI companions & assistants

Characters that accumulate real relationship history. Companions that remember without being told.

Narrative AI & dungeon masters

World state that persists across sessions. NPCs with consistent memories. Consequences that stick.

Long-running agents

Research assistants, customer support, planning agents — anywhere work spans multiple sessions.

Anywhere context matters

If your system needs to answer "what happened last time?" — Roux is the infrastructure layer.

About

James

Senior frontend engineer with 17 years in the industry and 8+ years building production systems in React and TypeScript. Based in Portland, OR.

Currently between roles and open to senior frontend and AI engineering opportunities. Roux grew out of a long-running personal AI project — building the infrastructure I needed and didn't find anywhere else.

Get in touch