Rhaqim

ProductsGo

CoNexus

Interactive narrative platform. LLM orchestration, media pipelines and vector search behind a real-time story runtime.

LiveGoSince 2023-nowMIT

CoNexus turns a prompt into a story you can walk through. Every turn, several models run at once: one writes the prose, others read what it wrote and derive continuity, imagery and structure from it. The hard part was never the model call. It was everything around it.

I built it from the first commit and still lead it. Two of the libraries on this site, buckt and loom, exist because CoNexus needed them first.

What it does

A session is a branching narrative. The player acts, a lead agent streams prose back token by token, and follower agents analyse that prose concurrently to keep the world consistent, generate imagery and title the chapter. Sessions can be forked at any point to explore an alternative path, with the original left untouched.

Everything is persisted (history, state, cost, every intermediate result) so a session can be replayed, audited or resumed weeks later.

Architecture

LayerResponsibility
Story runtimeTurn orchestration, streaming, branching, replay
Agent layerVersioned prompts and agents per modality, hook pipeline
Media pipelineAsync image and video generation, derivative processing
RetrievalVector search over prior turns and world state for continuity
StorageMedia, derivatives and metadata across local disk and object storage
IdentityWallet-linked accounts and on-chain entitlements

The runtime is Go. Postgres holds sessions, steps and state; Redis handles transient session data and fan-out; vector search backs narrative continuity. Media lands wherever it’s cheapest to keep.

What came out of it

Three problems turned out to be general enough to extract into their own libraries rather than keep as application code.

Media storage. Uploading, organising and serving generated media across providers without pinning the application to one of them became buckt: folder hierarchies, metadata, image derivatives, dedup and live backend migration.

Agent orchestration. Versioned agents and prompts, session branching, hook pipelines, cost budgets, judge scoring and a test harness became loom, the same runtime, now modality-agnostic and reusable.

Evaluation. Narrative quality is not a unit test. Scoring outputs with a model against explicit rubric dimensions, and comparing two variants pairwise, became loom’s judge subsystem.

Extracting them made CoNexus smaller and easier to reason about. It also meant the interesting parts survive independently of any one product.