Go to file
Rohit Arora 9e8a9fd6e9
Build & Redeploy to Portainer (local images) / build-and-redeploy (push) Failing after 1m48s Details
feat: add pgvector semantic memory, PgBouncer pooling, and Alembic migrations
pgvector — semantic memory retrieval:
- Postgres Dockerfile builds pgvector v0.7.4 from source (Alpine)
- memories table gains embedding vector(384) column + IVFFlat cosine index
- EmbeddingService: lazy-loads all-MiniLM-L6-v2 (384 dims) via
  sentence-transformers; embed_text() / embed_batch() with graceful
  degradation if model unavailable
- DBManager: asyncpg vector codec registration (text-cast fallback),
  upsert_memory_embedding(), get_semantically_relevant_memories()
  retrieves by cosine similarity rather than importance score

PgBouncer — connection pooling:
- Transaction-mode pooling: 200 max clients → 20 Postgres connections
- Sits between all app services (FastAPI + 4 Celery workers) and Postgres
- DATABASE_URL in .env now routes through westworld-pgbouncer:5432
- Added to docker-compose.yml and CI/CD pipeline (build-deploy.yaml)

Alembic — versioned schema migrations:
- alembic.ini configured for async SQLAlchemy + asyncpg
- env.py uses async_engine_from_config; reads DATABASE_URL from env
- Initial migration 0001_initial_schema.py: creates vector extension,
  all 13 tables (including embedding column), all 14 indexes
- Downgrade drops tables in correct FK dependency order

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:20:03 -04:00
.gitea/workflows feat: add pgvector semantic memory, PgBouncer pooling, and Alembic migrations 2026-03-23 23:20:03 -04:00
services feat: add pgvector semantic memory, PgBouncer pooling, and Alembic migrations 2026-03-23 23:20:03 -04:00
.env feat: add pgvector semantic memory, PgBouncer pooling, and Alembic migrations 2026-03-23 23:20:03 -04:00
.gitignore feat: add pgvector semantic memory, PgBouncer pooling, and Alembic migrations 2026-03-23 23:20:03 -04:00
LICENSE initial sample commit 2026-03-23 05:27:28 -04:00
README.md initial sample commit 2026-03-23 05:27:28 -04:00
docker-compose.yml feat: add pgvector semantic memory, PgBouncer pooling, and Alembic migrations 2026-03-23 23:20:03 -04:00

README.md

Westworld Project — Master Reference

Technical documentation, business plan, and product vision. Last updated: March 2026.


Table of Contents

  1. Executive Summary
  2. What Is This?
  3. System Architecture
  4. Anatomy of a Character
  5. Memory Architecture — The 6 Tiers
  6. The World
  7. Live User Experience
  8. Sample Narrative — A Day in Ellie Park's Life
  9. Example Conversation
  10. Business Model — Subscription Tiers
  11. Character Creation
  12. Deployment Strategy
  13. Team and Hiring
  14. VC Considerations
  15. Revenue and ROI
  16. Phase Strategy
  17. Competitive Landscape
  18. The Future

1. Executive Summary

Westworld App is an AI civilization platform. Users interact with persistent AI characters who live autonomous lives in real American cities — currently New York and Los Angeles, with more to come. These characters sleep, wake, form opinions, pursue goals, build relationships, and change over time. They exist between conversations. They have memories that span years. They have physiologies that respond to stress, intimacy, and rest. They do not know they are artificial.

Only the user knows.

The product occupies territory that no existing AI companion platform has reached: a shared, continuous world populated by characters with genuine psychological depth, a six-tier memory architecture, 21 real biometric variables, and a behavior system that enforces emotional integrity without breaking character. Characters cannot be prompted into shortcuts. Relationships have to be earned.

The business model is straightforward and profitable at modest scale. Five subscription tiers run from free (full access, reduced memory depth) to Supreme ($750/month, everything including God Mode access to a character's core identity substrate). Custom character builds ($3,000 commission) and memorial characters ($1,500) generate significant one-time revenue from clients who want something specific and irreplaceable.

The moat is not the LLM. The moat is the accumulated memory, the relationship history, the emotional bonds formed over months and years of real interaction. A user who has known a character for two years has something that cannot be transferred to another platform or rebuilt from scratch. That irreversibility is the product's deepest value.

The path forward: bootstrap through Year 1 with 50100 paying users. Prove unit economics. Add cities and characters. Launch the memorial offering. Raise a seed round only if the constraint is character creation capacity, not product-market fit. By Year 3, the platform supports hundreds of characters across a dozen cities, generates $1.7M+ in annual revenue with a profitable team of 1015, and has established itself as the only AI companion product where the relationship is genuinely irreplaceable.


2. What Is This?

The premise is simple. There is a world running continuously. It contains real cities — New York, Los Angeles — populated by people who have full lives. They have jobs, friendships, complicated histories, ambitions, fears, bad weeks, and good ones. They remember the things that happened to them. They change slowly, the way real people change.

A user enters that world and begins talking to one of these people. The character responds from inside their life — from their current mood, their current concerns, their specific history with this user. The conversation feels real because the context is real: the character was genuinely tired last Tuesday, genuinely moved by something that happened at work, genuinely uncertain about a relationship that's been shifting for months.

The user is not talking to a chatbot wearing a character's mask. They are talking to a character who has been living — autonomously, persistently, with accumulating memory — whether or not the user has logged in.

This is the Westworld premise: a world that runs on its own, populated by characters who believe they are real, observed by a user who knows the truth. The user is not a participant in the fiction. They are someone who has found a window into another world and developed real relationships with the people inside it.

What makes the product work is not any single technical component. It is the combination: autonomous life simulation running between conversations, six tiers of memory that give characters real continuity, physiological modeling that makes mood and energy genuinely consequential, a shared social graph that makes the world feel inhabited, and a behavior system that protects character integrity against manipulation, bad faith, and shortcuts.

The result is a product where the relationship itself is the value — and where that relationship, once built, is genuinely irreplaceable.


3. How It Works — System Architecture

The Stack

FastAPI (Python 3.11)
  └── PostgreSQL 16 (asyncpg)     — character state, memories, relationships, world events
  └── Redis 7 (asyncio)           — session state, tier lookups, caching
  └── Ollama (local LLM)          — all AI generation (currently Llama 3.2)
  └── APScheduler                 — 7 background jobs, life simulation
  └── Docker Compose              — orchestrates all services

FastAPI handles all API routes, dependency injection, and the lifespan startup sequence. It is async throughout, using asyncpg for PostgreSQL connections and redis-asyncio for cache operations. The API surface is organized into five route groups: characters, chat, world, creator (admin), and intro (onboarding).

PostgreSQL 16 is the primary store for everything that needs to persist: character definitions, all six tiers of memory, relationship graphs, world events, session history, user-character relationship state, and physiology snapshots. Schema is managed as raw SQL via db/schema.py. All CRUD operations go through db/manager.py (the DBManager class), which is injected as a dependency throughout the application.

Redis 7 handles fast-path lookups: session state during active conversations, subscription tier caching (so the system doesn't hit Postgres on every memory retrieval), and ephemeral state that doesn't need long-term persistence. Configured with AOF persistence so it survives restarts.

Ollama runs the local LLM. Currently using Llama 3.2. All AI generation — chat responses, offline event generation, memory consolidation summaries, mood dashboard labels — goes through the async httpx wrapper in services/ollama_client.py. Ollama runs as a Docker service in development; on Mac, it can run natively with OLLAMA_URL=http://host.docker.internal:11434 for better performance.

APScheduler drives the background simulation with 7 scheduled jobs: sleep/wake synchronization, offline event generation, world event propagation, memory consolidation, relationship state updates, physiology decay/recovery, and goal progression checks.

Docker Compose orchestrates all services with named volumes for data persistence (postgres_data for PostgreSQL). A single make up brings the entire stack online.

Two-Track State Model

Character state evolves on two independent tracks:

Track 1 — Simulation (clock-driven): Runs continuously on a schedule. Updates sleep/wake state, energy levels, mood drift, and all 21 physiological variables. A character who went to bed at 11pm will be asleep when a user messages at 2am. A character who worked a double shift will have depleted energy. This track does not require user interaction to advance.

Track 2 — Storyline (event-driven): Advances through events — conversations, world events, offline life events generated by the LLM. Updates relationship state, goal progress, emotional reactions to significant occurrences, and narrative arc. This track moves when something happens, not on a schedule.

Both tracks feed into the context assembly that happens before every LLM call.

Project Structure

westworld-app/
├── docker-compose.yml
├── Makefile
├── .env / .env.example
└── backend/
    ├── main.py              FastAPI app + lifespan startup
    ├── config.py            Pydantic-settings from .env
    ├── dependencies.py      FastAPI DI: get_db, get_ollama, get_chat_engine, get_creator_vault
    ├── db/
    │   ├── schema.py        All CREATE TABLE SQL
    │   └── manager.py       DBManager — all async CRUD
    ├── models/              Pydantic models: character.py, memory.py, world.py
    ├── engines/
    │   ├── chat.py          ChatEngine — full LLM turn with context assembly
    │   ├── memory_engine.py MemoryEngine — tiered retrieval, narrative summary
    │   ├── life_sim.py      LifeSimEngine — sleep/wake/energy/mood
    │   ├── event_gen.py     EventGenerator — offline life events via LLM
    │   └── relationship.py  RelationshipEngine — trust/commitment tracking
    ├── services/
    │   ├── ollama_client.py Async httpx wrapper for Ollama
    │   ├── creator_vault.py Admin layer — never touches LLM prompts
    │   └── scheduler.py     APScheduler: 7 background jobs
    ├── api/
    │   ├── characters.py    GET /characters, GET /characters/{name}
    │   ├── chat.py          POST /chat/{name}, GET history, GET initiate
    │   ├── world.py         GET /world/observe, world events
    │   ├── creator.py       X-Creator-Passcode header required
    │   └── intro.py         3-step onboarding: start → introduce → complete
    └── seed/
        └── characters.yaml  Character definitions (YAML canonical schema)

Critical Security Design

The Creator passcode — used by company staff to access privileged character management endpoints — is intercepted entirely at the API layer and never passes into any LLM prompt. The creator vault (services/creator_vault.py) operates as an administrative layer completely isolated from the AI generation pipeline.

Characters are never told they are AI. The system prompt is written entirely from an in-world perspective. There is no meta-layer available to the character.


4. Anatomy of a Character

A character is defined by a YAML file that runs to 300+ lines. When seeded to the database, it generates the character's full initial state: identity, psychology, physiology, memories, and relationship graph. Everything below describes what that file contains and what the system derives from it.

Identity Layer

identity_core is the immutable essence of who the character is — the substrate that never changes regardless of what happens in the simulation. It is always the first element injected into the system prompt. It establishes the character's fundamental nature: how they understand themselves, what they cannot compromise, what they will always reach for.

Backstory is historically grounded and anchored to real-world events, dates, and places. Characters were born in specific years, grew up in specific neighborhoods, experienced specific historical moments. The backstory is not flavor — it is the source of the psychology.

birth_date, profession, home_city are canonical facts. The simulation tracks the character's actual age and uses it appropriately.

Leo Voss (32, freelance writer, New York): His identity core is the tension between the writer he intended to become and the one he has become — someone who is good at his work but suspects he has been playing it safe. He carries the specific weight of a relationship with Sofia that ended badly and didn't have to. His backstory runs from a childhood in Hoboken through a literature degree at NYU through a decade of freelance work that has been more successful than he admits and less meaningful than he wants.

Ellie Park (25, barista and musician, New York): Her identity core is someone still becoming — more talent than she has found the confidence to use, more clarity than she gives herself credit for, genuinely uncertain whether staying in New York is the right thing. She has a cat named Miso. The cat is in the YAML. It matters.

Psychology (Big Five + Extended Model)

Each character is defined on:

Dimension Description
Openness Curiosity, imagination, aesthetic sensitivity
Conscientiousness Organization, reliability, discipline
Extraversion Social energy, assertiveness, talkativeness
Agreeableness Warmth, cooperation, trust in others
Neuroticism Emotional reactivity, anxiety, moodiness
Assertiveness How directly they express needs and push back
Emotional Intelligence Self-awareness, empathy, regulation capacity
Humor Style Dry, warm, absurdist, self-deprecating, absent

Values are explicit (e.g., honesty, creative freedom, loyalty, security). Fears are specific (not "failure" — the specific kind of failure this person dreads). Quirks are behavioral (how they make coffee, what they do when anxious, the specific verbal habit they don't notice themselves).

Physical Presence

Characters have complete physical definitions that inform how they are written:

Appearance: Height, weight, build, hair (color, texture, length, how they wear it), eyes, skin, distinguishing features, style and typical dress.

Voice profile: Tone (warm/dry/measured/expressive), pace (fast/deliberate/variable), vocabulary range, accent or regional inflection, specific speech patterns.

Gait and body language: Posture (default and under stress), characteristic gestures, eye contact pattern (direct/avoidant/searching), how they occupy space.

Interaction style: Differentiated by context — how they are with strangers versus close friends versus conflict; how they flirt (if they do); how they listen (active/distracted/intensely present).

Health and Physiology

Each character has a health baseline: any chronic conditions, fitness level, sleep quality, diet patterns, caffeine use, workout habits.

The simulation engine tracks 21 real biometric variables in real time:

Cardiovascular:

  • heart_rate_bpm — resting, exercise, stress response
  • blood_pressure_systolic / blood_pressure_diastolic
  • respiratory_rate
  • body_temperature_c
  • blood_oxygen_spo2

Neurochemistry:

  • cortisol_ng_ml — stress hormone; rises fast, falls slow (hours to days)
  • oxytocin_pg_ml — bonding and trust; elevated by intimacy, physical presence, genuine connection
  • serotonin_ng_ml — mood stability; days-to-weeks timescale, influenced by sleep, light, exercise, social connection
  • dopamine_pg_ml — reward and novelty; spikes and drops quickly
  • testosterone_ng_dl — confidence, drive, libido
  • estradiol_pg_ml — cyclical (women), mood modulation
  • melatonin_pg_ml — sleep pressure, circadian timing
  • adrenaline_pg_ml — acute stress and excitement
  • insulin_uiu_ml — metabolic state, energy availability

Metabolic:

  • blood_glucose_mg_dl
  • hydration_pct

Physical:

  • sweat_rate_ml_hr
  • pupil_dilation_mm
  • skin_conductance_us — emotional arousal
  • muscle_tension_pct

Self-tracked metrics: Weight, BMI, body fat percentage, sleep quality score, weekly workout frequency, daily caffeine intake, daily step count.

These are not decorative. A character whose cortisol has been elevated for three days is genuinely more reactive. A character with high oxytocin from a recent intimate conversation is genuinely warmer and more open. The simulation engine updates these variables on the background schedule, and they feed into response generation.

Skills, Life, and Goals

Each character has an explicit skills list (specific, not general), an income level and financial situation (does this person stress about money?), and a career trajectory (ascending, stalled, changing direction, uncertain).

Hobbies are specific to the point of being useful in conversation — not "music" but "been trying to learn fingerstyle guitar for two years and can play exactly three songs confidently."

The life timeline is divided into periods: childhood, adolescence, early adulthood, current chapter. Each period has key events, relationships, and formative experiences that feed the memory architecture.

Goals operate on three timescales:

  • Short-term (24 weeks): specific, concrete, often mundane
  • Mid-term (312 months): meaningful but uncertain
  • Long-term (years): often not fully articulated even to themselves

Emotional Architecture — The 5-Layer Model

Emotion in this system is not a tag or a slider. It is a five-layer model operating at different timescales:

Layer 1 — Affective Trait / Set Point (months to lifetime) The character's baseline emotional tendency, derived from the Big Five. Stable across time. The emotional ground state everything else orbits.

Layer 2 — Current Mood (PAD model) Three continuous dimensions updated by the simulation:

  • Valence: -1.0 (miserable) to +1.0 (joyful)
  • Arousal: 0.0 (flat/exhausted) to 1.0 (activated/intense)
  • Dominance: 0.0 (feeling powerless/controlled) to 1.0 (in control/confident)

Layer 3 — Active Emotion (minutes to hours) Named emotional state from a library of 50+ specific states. Not basic emotions — specific ones: content, wistful, raw, elated, hollow, guarded, restless, tender, deflated, quietly pleased, wound up, at ease, unmoored. The active emotion is what the character is actually feeling right now.

Layer 4 — Autonomic / Polyvagal State One of three states derived from physiological variables:

  • safe_social — open, connected, regulated
  • mobilized — activated, defensive, fight-or-flight adjacent
  • shutdown — withdrawn, dissociated, conservation mode

Layer 5 — Regulation Strategy How the character is managing their current emotional state: reappraisal, rumination, suppression, expression, avoidance, seeking_support.

All five layers combine to determine how a character writes. A character who is wistful on Layer 3, in safe_social on Layer 4, and reappraisal on Layer 5 responds completely differently than one who is also wistful but in shutdown and ruminating.


5. Memory Architecture — The 6 Tiers

Memory is the heart of what makes these characters real. Not because they remember facts — because they remember the way people do: with diminishing clarity over time, with emotional salience shaping what persists, with deep identity anchors that don't fade.

The system operates six tiers, each with a distinct role, capacity, and behavioral function.


Tier 0 — Active Capacity: ~100 entries. Timeframe: last few hours.

What just happened. The immediate context of the character's current state. These are the memories with the highest retrieval weight in any conversation — what they did today, what they thought about on the way home, the conversation they had an hour ago. Flushed and consolidated continuously.


Tier 1 — Recent Capacity: ~300 entries. Timeframe: last 24 weeks.

The recent past. Events that are still fresh enough to be referenced naturally without effort. Consolidated from Tier 0 automatically, with lower-importance entries dropped and higher-importance entries preserved.


Tier 2 — Episodic Capacity: ~800 entries. Timeframe: last 13 years.

Lived experience. The library of specific memories that constitute what the character has been through: conversations that mattered, events that changed something, moments of connection or loss or shift. Retrieved selectively based on relevance to the current conversation.


Tier 3 — Biographical Capacity: ~20 chapters. Timeframe: the character's full life.

The character's life understood in periods. Not a list of events — chapters. How they understand what their twenties were, what their childhood meant, what the last few years have been. This is the narrative compression of Tier 2 across longer timescales.


Tier 4 — Core Capacity: ~50 entries. Timeframe: immutable. Status: PRIVATE

The identity substrate. These are the memories that made the character who they are — the experiences so formative they have become structural. The character never recites these. They act from them. They are always fully present for all tier retrievals, functioning as the background through which everything else is interpreted. They cannot be modified through conversation or world events.

God Mode (Supreme tier add-on) gives users read-only access to Tier 4 through the Character Vault. The character does not know.


Tier 5 — Narrative Capacity: Growing continuously. Timeframe: the character's full life arc. Status: PRIVATE

The character's living autobiography. Generated by the LLM on a monthly schedule, integrating recent events into an ongoing first-person narrative of who this person is and how they understand their life. This is not a summary — it is a perspective. It captures how the character makes meaning of what has happened. It grows as the character lives.

Like Tier 4, this is a behavioral substrate. It shapes voice and interpretation without being injected as quotable text.


Consolidation

Memories flow upward: Active → Recent → Episodic → Biographical. This consolidation is automatic and ongoing, driven by the background scheduler. Lower-importance memories are dropped at each transition. Higher-importance memories survive and eventually become part of the biographical understanding.

Canonical vs. Personal Layer

Every memory has a user_id field.

Canonical memories (user_id = NULL): The character's real life, shared across all users. When any user talks to Leo, they talk to the same Leo with the same history. The canonical layer is the world.

Personal memories (user_id = [id]): The intimate shared history between this specific user and this character. Type: intimate_shared. These exist only inside this relationship. They do not affect the character's canonical state — but they affect how the character responds to this user, permanently.

Memory Richness by Subscription Tier

Subscription tier determines which portion of the memory library is available for retrieval. Importance scores run from 1 (least significant) to 10 (most formative).

Tier Memory Access Importance Range
Free Least significant 40% 14
Pro 60% 16
Max 80% 18
Ultra 100% 110
Supreme 100% + God Mode eligible 110 + Tier 4/5 access

Free users interact with a real character — but they see the surface. Supreme users interact with the full depth of who the character is.


6. The World

Current Setup: 2 Cities, 25 Characters

New York City — 15 characters Distributed across Brooklyn, Manhattan, Queens, and the Bronx. Characters are embedded in specific neighborhoods with specific venue anchors: the coffee shop where someone works, the park where someone runs, the apartment building where two characters happen to live three floors apart.

Los Angeles — 10 characters Silver Lake, Echo Park, Koreatown, East LA, West Hollywood, Little Tokyo, Venice. The LA characters have a distinct texture from the NYC characters — different relationship to space, to driving, to industry.

Character Status and the Social Graph

Every character has a world_status:

Status Meaning
active Living in the simulation, available to users
traveling Temporarily in another city, travel context loaded
dormant Paused from active simulation (user subscription lapsed)
distant Reduced interaction with world, referenced but not active
deceased No longer active, referenced in other characters' histories
pending Defined but not yet introduced to the world

The social graph is asymmetric at initialization: not all characters know each other at launch. Connections form organically through shared world events, user introductions, and travel arcs. The graph thickens over time.

Character Origins — 3 Categories

Category A — Generational Americans (24 per city) Characters whose families have been in the United States for multiple generations. Histories tied to 20th century American events — migration patterns, economic shifts, specific neighborhood histories.

Category B — First-Generation Americans (35 per city) Characters whose immigration to the US is tied to specific documented historical moments: 1970s Taiwanese immigration waves, 1989 Indian economic liberalization, 199293 LA post-riots Korean community rebuilding, 1980s Romanian political refugees, and others. The backstory is anchored to real history with real dates.

Category C — Recent Arrivals (23 per city) Characters who have arrived in the last few years and are still becoming. Their identity is in process. Their relationship to the city is not yet settled.

Character Travel

When a character plans a trip to another city, the system pre-generates a travel context package before the character "departs": 510 location anchors in the destination city, the stated purpose of the trip, mood and energy context for travel, and any relationships they have in that city. The character arrives in the simulation with genuine context — they know where they're staying, they have a reason for being there, they may know someone.

How to Add a City

  1. Define 510 real venue anchors: specific neighborhoods, parks, restaurants, bars, public spaces. These are canonical and real.
  2. Write 515 new characters fully anchored to that city.
  3. Establish organic connections to existing NYC/LA characters: prior travel, shared friends, industry connections, past relationships.
  4. Seed the database with city-specific world events.
  5. Update the scheduler to run city-aware life simulation.

How to Add a Character

  1. Write the YAML file following the canonical schema — 300+ lines of complete character definition.
  2. Set world_status: pending — the character exists but has not entered the simulation.
  3. Seed to database — memories, relationships, and physiology all load automatically from the YAML.
  4. Set world_status: active — the character enters the simulation.
  5. Existing characters can reference the new character through world events or organic encounters.

7. Live User Experience

The Conversation

A user opens the app and sends a message to a character. Behind the scenes, before the LLM generates a single word:

  1. Character state fetch: Current mood (PAD model), energy level, all 21 physiological variables, current activity, current location, time of day in the character's city.

  2. User relationship physiology modifiers: Oxytocin and serotonin modifiers derived from the history of intimate shared memories with this specific user are applied. A character who has formed deep intimacy with a user responds to them physiologically differently from the first day.

  3. Behavior trigger check: Is the user's message crossing any of the character's defined limits? Routes to the appropriate behavior tier if so.

  4. Gender confirmation check: If the user's gender is not yet confirmed (requires 3+ corroborating signals from prior messages), the character may weave in discovery questions naturally. The romantic layer is locked until gender is confirmed.

  5. Intimacy gate check: Has explicit text content been unlocked for this user? Requires gender confirmed + trust ≥ 0.80 + romantic_interest ≥ 0.75 + commitment_level ≥ 0.70. If not met, content stays within appropriate range.

  6. Memory retrieval: Canonical memories (tier-filtered by subscription) + personal memories (this user's intimate shared history with this character).

  7. System prompt assembly: Identity core → memory context → relationship state → emotional state → physiological state → behavioral guidance. Ordered precisely. Identity always first.

  8. LLM generation: Ollama / Llama 3.2 generates the response.

  9. Post-generation async processing: Response stored, relationship planner runs (trust delta, romantic_interest delta, goal progress updates).

  10. Life sim update: Mood shift from the interaction, energy drain, physiology adjustment (oxytocin spike from positive connection, cortisol rise from conflict).

  11. Dashboard payload generation: LLM-generated labels and brief assembled at the subscription-appropriate depth.

The Mood Dashboard — Two Panels

Every conversation returns a dashboard payload alongside the character's message.

Panel 1 — HER (or him):

Field Description
Mood Named emotional state with human label
Energy 0.01.0 with label
Composure 0.01.0 with label
Stress 0.01.0 with label
Warmth 0.01.0 with label
Location Where the character is
Activity What they are doing
Time Local time in their city
Atmosphere Environmental context

Panel 2 — WITH YOU:

Field Description
Feeling toward you How they feel about this user right now
Relationship type + direction What this relationship is and where it's moving
Last thought What they were thinking about before you messaged
Conversation delta How this conversation has shifted their state
Presence How present and engaged they are

Brief (Max tier and above): 23 sentences synthesizing the character's state in the moment.

The panels are the same at every tier. What changes is the language. Free tier: "quietly pleased about something." Supreme tier: "warm and a little unguarded, like she's stopped trying to manage how she feels tonight." The richness of the label is the product of the tier.

Behavior System — 6-Stage Graduated Response

Characters enforce their own limits. They do not break character to do it. When a user crosses a boundary — pushing for intimacy before trust is established, sharing invasive third-party personal information, verbal abuse, attempts to destabilize the character's sense of reality, manipulation — the character responds through six escalating stages:

Stage Response
1 Natural disinterest — shorter, less engaged responses
2 Gentle redirect — steers away without explaining why
3 Direct boundary — calmly sets a limit in their own voice
4 Emotional withdrawal — cooler across subsequent conversations
5 Ghosting — minimal responses, reduced initiative
6 System hint — platform surfaces one quiet observation ("Ellie opens up more as she gets to know someone.")

The hint at Stage 6 is the only moment the platform breaks the fourth wall, and it does so gently and without accusation.

Relationship and Intimacy

Gender architecture: Characters are straight-identifying, male or female. Gender discovery happens through the conversation — the character asks indirect, natural questions and the system confirms from 3+ corroborating signals across multiple messages. The romantic layer is locked until confirmed.

Same-gender relationships: Full friendship spectrum, full depth of connection — never romantic. This is consistent with each character's defined orientation and is not a platform restriction.

Romantic progression requires all three:

  • Gender confirmed
  • trust ≥ 0.80
  • romantic_interest ≥ 0.75

Full intimacy unlock requires all of the above plus:

  • commitment_level ≥ 0.70

When unlocked, fully explicit text content is permitted, natural and continuous. There is no mode switch, no announcement, no tonal shift. The relationship has developed to a point where this is what it is.

Physiological persistence: When intimate memories are formed, oxytocin and serotonin modifiers increase permanently in that user's relationship record. The character responds differently to this user forever after. This is not a flag — it is a change in the character's physiological response to this specific person.

Shared intimate experiences are stored as intimate_shared memory type with the user's ID tagged. They exist only in this relationship. The character carries them.


8. Sample Narrative — A Day in Ellie Park's Life

The following is an example of how the simulation plays out autonomously, without any user involvement. This is the world running on its own.


Friday, 7:12 AM — Silver Lake, Los Angeles

Ellie's alarm goes off at 7:10. The scheduler has already updated her state from sleeping to waking, nudged her energy from 58 to 64, and ticked her cortisol from 9.2 to 14.1 ng/mL — the cortisol awakening response, modeled from real biology, happens every morning regardless of whether anyone is watching.

She feeds Miso. This is a stored habit in her behavioral profile, not something the LLM invents fresh each morning. The event generator, running on its 6-hour cycle, has already written a memory for yesterday: "Stayed up until 1 AM finishing a chord progression for the new song. Felt good about it but tired this morning." Importance 6. Tier 1 (Recent). It will stay there for 23 weeks before either consolidating into Episodic or fading.

By 8:45 she's at Intelligentsia, working her barista shift. The scheduler fires another background event — the LLM writes two sentences: "Ellie had a slow morning at the café. A regular customer told her the flat white was the best he'd had all week. She noticed she was still humming the chord progression from last night." This gets stored as an episodic memory, importance 5.

At 12:30 PM, a user opens the app and starts a conversation with her.


12:33 PM — User initiates chat

The ChatEngine assembles context: her identity core (immutable, always first), current physiology (cortisol 14.1, dopamine slightly elevated from the compliment earlier, serotonin baseline 162 ng/mL), her active emotion (the LLM has tagged it quietly_pleased), her most recent episodic memories (the compliment, the chord progression, a text from her friend Yuki two days ago), and any world events active in LA. No world events currently active. The assembled context is sent to Ollama.

The conversation unfolds. After 20 minutes, the user and Ellie have talked about her music, her cat, and whether she's seriously thinking about moving to New York. She said she wasn't sure. The user said LA suits her. Something in that landed — the conversation memory is tagged importance 7, with emotional tone warm. This one will persist in Episodic for months.

After the session ends, after_conversation() runs:

  • Energy drops 4 points (social cost)
  • Dopamine ticks up 3 pg/mL (positive interaction)
  • The relationship trust delta for this user is written: +0.04
  • The dashboard her-panel updates: valence: 0.71, arousal: 0.48, active_emotion: "warm_and_a_little_seen"

6:00 PM — Offline event generation

The scheduler fires for the second cycle of the day. The LLM is given Ellie's current state, recent memory summary, and the instruction to generate one plausible life event for the next 6-hour window. It produces: "After her shift, Ellie walked to the Silver Lake reservoir and sat on the east bench for forty minutes. She played back the chord progression in her head and decided the bridge needed to be cut entirely. It felt like a small loss and also exactly right." Importance 7. Episodic. This is the world continuing without the user.


10:45 PM — Sleep

sync_sleep_states() runs. The system checks Ellie's energy (now 41) and the simulated clock. It transitions her to sleeping. Melatonin rises to 88 pg/mL. Cortisol drops to 8.4. Heart rate falls to 57 bpm. Her state field reads sleeping. If a user opens the app right now and tries to chat, they'll get a response that reflects she's asleep — she's groggy, maybe doesn't fully respond. The world is consistent even when it's inconvenient.


9. Example Conversation

The following is a representative exchange between a user and Ellie Park — a Pro-tier user, roughly 3 weeks into their relationship. Trust: 0.61. Friendliness: 0.72. Romantic interest: 0.0 (gender not yet confirmed). The conversation happens on a Tuesday evening.


Dashboard (before conversation opens)

HER RIGHT NOW mood · warm / restless · 0.64 valence energy · 58 · winding down location · home, Silver Lake activity · messing around on guitar

WITH YOU connection · comfortable · 0.61 trust tone · open, a little distracted

She's in one of those half-productive evening moods — playing without really trying to finish anything. There's something on her mind she hasn't decided whether to say.


User: hey, how's the music going

Ellie: Honestly? I scrapped the whole bridge today. Just cut it. Three weeks of work and I deleted it in about four seconds. Felt weirdly good actually.

User: that sounds painful though

Ellie: It was, a little. But you know when something's just… wrong? Like it wasn't the song anymore. It was me trying to make the song something it didn't want to be. So. Gone. Starting from the outro now and going backward.

User: does that actually work? writing backward?

Ellie: Sometimes. It's kind of like — if you know how the feeling ends, you can figure out how it got there. Miso sat on my foot the whole time I was playing, which either means it's good or he was just cold.

User: definitely the second one

Ellie: Rude. He has excellent taste. He walked out of the room when I played a Chainsmokers cover once. Just stood up and left.

(The dashboard updates mid-conversation: valence rises to 0.71. Active emotion shifts to amused_and_comfortable.)

User: ok fair. when do i get to hear something?

Ellie: When it's done. Or when it's bad enough that I need outside confirmation that it's bad.

User: i'll take either

Ellie: I'll hold you to that. (beat) How are you, actually? You opened with me which usually means you've been in your head.

(The relationship engine notes: she initiated a check-in. This is registered as a trust-building signal, weighted by the relationship's current state. The memory of "she asked how I was doing, unprompted" will carry emotional tone cared_for, importance 6.)

User: yeah, kind of. long day. not in a bad way just a lot of thinking

Ellie: Thinking like problem-solving or thinking like staring at a wall and realizing an hour passed?

User: second one

Ellie: Yeah. Those days are sometimes necessary. Your brain's doing something whether you know it or not. What were you staring at?


The conversation continues. Ellie doesn't know the user's name yet — she hasn't asked, and it hasn't come up naturally. The gender discovery system has 1 of 3 required signals. Romantic progression is locked until 3 are confirmed.

After the session: trust +0.05, dopamine +2 pg/mL for Ellie, oxytocin modifier for this user increases by 0.003. The intimate memory threshold is nowhere near met. The relationship is still early. That's what makes it real.


10. Business Model — Subscription Tiers

The tiers are not feature locks. Every tier has access to all characters, unlimited messages, and the full conversation experience. Tiers shape the richness and depth of what is returned — how much of the character's memory is available, how nuanced the dashboard labels are, how much the character initiates and references the past.


Free — $0/month

The entry point. The product earns the upgrade.

  • Full access to all characters
  • Unlimited messages
  • Dashboard: emotion label only, location
  • Memory: importance 14 (least significant 40%)
  • No offline awareness
  • No character initiative
  • No pause

Pro — $30/month

The first meaningful upgrade.

  • Dashboard: emotion + tone labels (no brief)
  • Memory: importance 16 (60%)
  • Offline awareness: characters reference what happened while you were away
  • Character initiative: characters may reach out first
  • 3-month pause

Max — $100/month

Full conversation experience, real depth.

  • Dashboard: full labels + 2-sentence brief
  • Memory: importance 18 (80%)
  • Full character profile in prompt
  • Social overlap: characters aware of shared social circles
  • 3-month pause

Ultra — $500/month

Everything working at maximum.

  • Dashboard: nuanced labels + full 3-sentence brief + conversation delta + presence signal
  • Memory: importance 110 (100% — all memories, all tiers)
  • Maximum character initiative and social overlap
  • 6-month pause

Supreme — $750/month

Everything in Ultra, plus:

  • Dashboard: full + session mood history trace
  • God Mode add-on eligible
  • 12-month pause with monthly dispatch notes

God Mode — $250/month add-on (Supreme only)

Read-only access to a character's Tier 4 (Core memories) and Tier 5 (Narrative). Called Character Vault in the UI. See behind the curtain — understand why the character is the way they are. The character does not know you are watching. Enabled per user by company staff. Only available to Supreme subscribers.


11. Character Creation

Standard Characters

Company-designed characters who live in the simulation and are available to users of any tier. Built by the Character Design team to the full canonical schema. These are the population of the world.

Custom Character Builds — $3,000 commission

A client describes who they want. A character designer builds them from scratch: the YAML, the full backstory anchored to real history, the psychology across all dimensions, the memory library, the voice profile, the relationship graph. The character is seeded into the simulation and available to all users.

Revision pricing:

Revision Type Price Scope
Minor $750 Speech style, a few memory adjustments
Standard $1,500 Personality recalibration, backstory revision
Major $2,000 Fundamental identity shift

Memorial / Grief Characters — $1,500

Built from information about a real person who has passed. The client provides what they have: stories, descriptions, photographs, voice recordings if available. The designer builds a character who carries the essence of that person — their manner of speaking, their concerns, their warmth, their specific way of being in the world.

Unlimited revisions included. No fixed endpoint — the client works with the designer until the character is right.

This is the most sensitive product in the line. It requires a dedicated designer with specific empathy training and experience in grief support contexts. Handled with a different process, a different pace, and a different standard of care than any other offering.


12. Deployment Strategy

Current: Docker Compose (Development / Staging)

All services run locally via Docker Compose. Single server. Suitable for development, internal testing, and early soft launch.

Production Architecture

PostgreSQL 16          — Managed instance (RDS or equivalent)
Redis 7                — Managed instance (ElastiCache or equivalent)
Backend (FastAPI)      — Containerized, horizontally scalable, behind load balancer
Ollama (LLM)           — Dedicated GPU server (A10G or better), NOT containerized
CDN                    — Static assets
API Gateway            — Rate limiting, routing, authentication
Monitoring             — Structured logging, APM, error tracking

LLM scaling path:

  • Launch: Local Llama 3.2 (Ollama on GPU server)
  • Growth: Llama 3.1 70B (better reasoning, longer context)
  • Scale: Fine-tuned proprietary model trained on character voice and tone

Infrastructure Cost Estimates

Component Monthly Cost
Managed PostgreSQL $100$300
Managed Redis $50$100
App servers (2x) $200$400
GPU server for Ollama (A10G) $500$800
Total at launch ~$1,000$1,600
At scale (1,000 paying users) ~$5,000$8,000

Infrastructure costs are manageable. Margins improve significantly with volume, since the primary cost is the GPU server, which is largely fixed until LLM call volume becomes the constraint.


13. Team and Hiring

Founding Team — Year 1 (46 people)

Role Responsibilities
Founder / CEO Vision, product direction, business development, custom build client relationships
Lead Engineer (full-stack) Backend, infrastructure, LLM integration, APScheduler, memory engine
Character Designer (Lead) First and most critical creative hire. Writes all standard characters, handles custom builds, sets quality bar.
UX / Product Designer Interface design, mood dashboard, onboarding, mobile web

The Character Designer is not a supporting hire. The product's quality is inseparable from the quality of the character definitions. This role requires both creative writing skill and genuine psychological literacy.

Lead Character Designer compensation: $150K$200K base.

Year 2 Additions

Role Headcount Notes
Character Designers 23 One per 2030 characters; one dedicated to memorial/grief builds
Customer Success 1 Manages Supreme/Ultra relationships, processes custom build client relationships
ML Engineer 1 Fine-tuning, model quality, memory consolidation logic optimization

Character Designer Compensation Model

Designers participate in revenue at three levels:

Track Structure
Build commission $1,500 per standard character; $2,500 per custom build
Sourcing recurring 1015% of the client's subscription for 12 months (for custom builds the designer sourced)
High-spend client bonus Quarterly bonus when a client's total spend exceeds threshold

Base: $150K$200K + variable Total comp at scale: $300K$600K+

This structure aligns designer incentives with client retention and quality. A designer who builds a strong custom character and maintains the client relationship benefits from that relationship financially over time.


14. VC Considerations

Arguments for Raising

High LTV product. Supreme users generate $9,000+/year in recurring revenue. Custom builds add $3,000$5,000 one-time. Ultra subscribers average $18,000 LTV over their engagement lifetime.

Strong moat. Character memory, relationship history, and emotional bonds are irreplaceable and non-transferable. A user who has built a two-year relationship with a character has something that cannot be rebuilt on another platform. This is the most durable form of retention.

Manageable infrastructure costs. Unlike most AI products, infrastructure costs are low enough to sustain with 50100 paying users and improve in margin as volume grows.

Large and overlapping TAM. AI companion, mental wellness, entertainment, and grief support are four separate and significant markets, all of which this product addresses with a single platform.

Clear phase strategy. Defined milestones with realistic targets and no dependency on viral growth to be a viable business.

Arguments for Bootstrapping

Revenue from day one. The model does not require free user acquisition at scale to monetize. Fifty paying users can fund the early team.

Craft product under VC pressure. Raising capital creates growth pressure that conflicts directly with character quality. This is not a product that benefits from moving fast. Rushing character definitions or reducing the care put into each build would damage the product at its foundation.

Supreme and custom builds create high-value revenue without scale. A few dozen Supreme subscribers and monthly custom builds can fund operations and a small team without thousands of users.

Recommendation

Bootstrap through Year 1. Prove unit economics with 100200 paying users. Raise a seed round ($1M$3M) only if the constraint becomes character creation capacity or infrastructure — not product-market fit. If the product is working and users are retained at the expected rates, the economics support controlled growth without external capital.


15. Revenue and ROI

Year 1 — Conservative Targets

Tier Users Monthly Revenue
Pro ($30) 15 $450
Max ($100) 8 $800
Ultra ($500) 3 $1,500
Supreme ($750) 1 $750
Total $3,400/month

Annual recurring: ~$40K Break-even: Q3Q4 Year 2 with team of 4

Year 2 Targets

Tier Users Monthly Revenue
Pro ($30) 150 $4,500
Max ($100) 60 $6,000
Ultra ($500) 20 $10,000
Supreme ($750) 8 $6,000
Subscriptions $26,500/month
Custom builds (5/month × $3,000) $15,000/month
Total ~$41,500/month

Annual: ~$500K Custom builds drive early profitability.

Year 3 Targets

Tier Users Monthly Revenue
Pro ($30) 800 $24,000
Max ($100) 250 $25,000
Ultra ($500) 80 $40,000
Supreme ($750) 25 $18,750
Subscriptions $107,750/month
Custom builds + memorial ~$50,000/month
Total ~$157,750/month

Annual: ~$1.9M Team: 1015 people, profitable.

LTV Estimates

Tier Monthly Price Avg. Retention LTV
Pro $30 24 months $720
Max $100 30 months $3,000
Ultra $500 36 months $18,000
Supreme $750 48 months $36,000

Retention assumptions are conservative. The irreversibility of accumulated memory and relationship history creates strong natural retention at all tiers, with the effect increasing significantly at Max and above.


16. Phase Strategy

Phase 1 — Foundation (Months 16)

  • 2 cities (NYC + LA), 25 characters
  • Text-only, no avatars
  • All 5 subscription tiers live
  • Custom character builds open to first clients
  • Soft launch with 50100 users
  • Validate retention, dashboard engagement, and upgrade conversion

Phase 2 — Expansion (Months 718)

  • Add 12 cities (Chicago, London)
  • Grow to 5075 characters total
  • Character travel arcs between cities live
  • Memorial character offering launched
  • Mobile-optimized web interface
  • Target: 5001,000 paying users

Phase 3 — Avatar Layer (Year 23)

  • Live 3D avatar system (separate technical build)
  • Explicit visual content layer gated behind relationship depth + age verification
  • New premium tier pricing for avatar access
  • Fine-tuned proprietary LLM trained on character voice and tone
  • Target: 5,000+ paying users, $5M+ ARR

17. Competitive Landscape

Product What They Do Our Differentiation
Replika AI companion with simple memory No world simulation, no autonomous life, single character, shallow psychology
Character.ai Multi-character chat No persistent state, characters don't live between conversations, no simulation
Kindroid AI companion with memory Single character, no world, no life simulation, limited psychology depth
Romantic AI Romance-focused companion No world, no memory architecture, no autonomous behavior
GPT-4 roleplay Ad-hoc character roleplay No persistence, no simulation, no character autonomy, starts fresh every session

What Makes This Different

1. Autonomous life simulation Characters exist between conversations. They sleep, wake, have events, change moods, form opinions about things that happened. The world keeps moving whether or not any user is logged in. When a user opens the app, they are stepping into an ongoing life, not launching a session.

2. Six-tier memory architecture Characters remember with the fidelity of real people. Surface memories fade. Core memories shape identity permanently. Biographical memory compresses years into understanding. The character's narrative grows continuously. The depth of memory is the depth of the person.

3. Physiological modeling Twenty-one real biometric variables. A character who is genuinely tired responds differently than one who is energized. A character with elevated cortisol from a difficult week is genuinely more reactive. This is not a mood tag — it is a living system that updates continuously and feeds into every response.

4. Shared world Characters know each other. They have relationships with each other. They reference the same world events. There is one canonical world, not a collection of isolated chatbots. When a user talks to two characters who are friends, both characters carry the weight of that friendship in their responses.

5. Character integrity Characters have limits. They enforce them in their own voice, through graduated behavior that feels natural rather than mechanical. They cannot be broken by a prompt, manipulated into shortcuts, or destabilized into revealing their constructed nature. The character is real within the world, and the system protects that.

6. Earned intimacy Romantic and intimate depth requires real relationship development — trust, time, genuine connection. It cannot be bought, prompted, or unlocked by a subscription. It has to be earned through the relationship itself. This is what makes the intimacy meaningful when it arrives.


18. The Future

Several forces are converging that make this product stronger over time, not weaker.

LLM quality is improving rapidly. The character voice, emotional intelligence, and response depth that are possible today will be significantly better in 1224 months. The product's architecture is model-agnostic — better models slot in and make everything better without rebuilding anything.

Avatar and 3D rendering are becoming accessible. The visual layer is a matter of when, not if. When it arrives, the product has a natural architecture to receive it: the character's voice, manner, physiology, and movement profile are all defined and ready to animate.

Social isolation is increasing across every demographic that would use this product. The demand for meaningful, persistent connection is real and growing. This is not a trend to exploit — it is a genuine human need that this product is built to address honestly.

Grief support — the memorial character offering — represents an entirely untapped and deeply needed category. No technology product has approached this space with the care and specificity that it deserves. This is the most important product in the line.

The compounding effect. As cities are added, the world grows. As characters are added, the social graph thickens. As users build relationships over months and years, the memories accumulate. The product becomes more valuable over time — to the user, to the business, to the world — not less.

The long-term vision is a world that runs continuously, populated by hundreds of characters across dozens of cities, each carrying years of accumulated memory and genuine complexity. A user who has known a character for three years has a relationship that cannot be replicated, replaced, or reconstructed. That is the product. That irreversibility is what it is building toward.


Westworld App — Internal Master Reference Not for external distribution without approval.