Skip to content

Introduction

Declarative cards, multi-stage turn execution, and deterministic state settlement on Effect v4.

Updated

Effect Tavern is a ground-up full-stack harness for AI roleplay and interactive fiction, built on Effect v4, Solid 2.0, UI SDK (@ui-sdk), and Bun.

Instead of relying on prompt incantations, chat-depth injections, and regex scrapers, Effect Tavern treats every card as declarative data plus deterministic rules. Code owns the control loop, seeded dice, state transitions, and prompt-cache boundaries; the LLM is called only at typed stage seams to classify, narrate prose, and extract structured facts.

Explore the Docs

Quick Start

Prerequisites: Bun >= 1.4.5 and Vite+ (vp; Bun installs the packages).

  1. Install workspace dependencies

    vp install
  2. Start the full-stack web workspace

    bun --bun vp run dev

    Opens the Solid 2.0 client with HMR and an in-process /api session backed by .dev/tavern.db. Set MODEL=fake to run without spending API tokens.

  3. Or play and inspect from the terminal

    bun run tavern card install packages/runtime/test/cards/wuxia.yaml
    MODEL=fake bun run tavern play wuxia --greeting 0 --input "走进竹林"
    bun run tavern card check packages/runtime/test/cards/wuxia.yaml
  4. Run static checks & verification

    vp check
    vp run verify
    cd packages/client && vp run verify:ui

Fixture & Sample Cards

The program ships with no cards: a new install’s shelf is empty, and cards arrive as files or from a card library the player adds. The repository keeps four YAML cards as test fixtures in packages/runtime/test/cards/ (with full-length remasters such as samples/life-of-pi/life-of-pi.yaml alongside them)—architectural exemplars and live regression suites, installed like any other card file:

Card ID Mode & Channel Demonstrates
banxing participant / act Pure chat card with zero rules or lore; voice-sample fiction fragment
ri participant / act Multi-stage scale bands, hidden route switches, 3 openings, latching readout
wuxia participant / act Action rolls, readout bands, 3-layer lore, director, world record & table, guard
yandao author / note Protagonist-free world simulation with card-owned pov slot and turn-1 window
life-of-pi (samples/) participant / act Multi-day time loop with post-record passages, digest epoch boundaries & end: true

Type to search…

↑↓ navigate↵ selectEsc close