All work

Case study · 01

lori.pet

An AI companion that remembers across sessions, speaks in a consistent voice, and runs a layered narrative state — built and operated solo on a low-spec server.

StatusIn production
Year2025 — Present
RoleSolo, full stack

Problem

Most companion AI products treat conversation as stateless. Each chat starts fresh, the character drifts, and there's no real sense of continuity. The interesting problem isn't whether a model can converse — it's whether a character can feel like a continuous presence across weeks of interaction, on a budget that fits a solo project.

Constraints

Lori GM Console login screen — dark interface with halftone ASCII portrait
Entry GM console login — dark interface, halftone portrait. Operators-only side of the product.

Approach

Backend in FastAPI. Frontend in Next.js. PostgreSQL with pgvector for a multi-type memory layer: episodic memories, semantic facts, and diary entries — each retrieved with composite scoring at conversation time. Anthropic API for cognition, ElevenLabs for voice synthesis.

The character system is the differentiator. A canonical character bible defines voice, history, and behaviour phases. Memory retrieval is layered into the system prompt at runtime — recent context, relevant long-term memories, current narrative phase — so the model has the right state to respond in character without needing fine-tuning.

Quest and crisis subsystems run alongside conversation, gating which narrative beats unlock based on relationship state. Daily literary diary generation runs as a background job on a cheaper model tier.

Lori GM Console — method catalog showing 7 production methods with tagging, branch locks, and per-user assignment workflow
Backend GM console — method catalog and per-user assignment, narrative control plane behind the chat.

Decisions

Result

Running in production. Survives unattended deploys via CI. The memory architecture supports the character maintaining continuity across months of interaction. The same patterns — layered memory, character-driven state, low-cost deployment — transfer cleanly to other companion, agent, and narrative AI projects.