# Build an interactive short drama

**Last Train to the Moon** is the reference project for Vifu Content Runtime.
It is a five-act portrait story with four Agent characters, free-text
interactions, fixed choices, a host action, three endings, and localized
releases.

The example is intentionally application-specific. Vifu does not prescribe a
story schema, timeline editor, media format, or rendering system. The Content
Runtime plugin supplies those parts and uses Vifu for canonical project and
Agent identity, provider access, runtime channels, and traces.

## Watch the completed experience

<video
  controls
  playsInline
  preload="metadata"
  poster="/docs/tutorials/last-train-to-the-moon/13-endpoint-game.png"
  src="/docs/tutorials/last-train-to-the-moon/last-train-gameplay.mp4"
  style={{ width: "100%" }}
/>

## What the example contains

- five acts and three conditional endings;
- four project Agents and one fixed player identity;
- fixed choices and free-text Agent interactions;
- a host action completed by the presentation client;
- portrait backgrounds, character poses, music, and voice assets;
- English, Japanese, and Simplified Chinese content; and
- one versioned source compiled into playable releases.

## How the pieces fit together

```mermaid
flowchart TD
  Editor[Canvas or Short Drama editor] --> Source[Content Runtime source]
  Source --> Compiler[Short Drama plugin compiler]
  Compiler --> Release[Immutable content release]
  Host[Web or native host] --> Vifu[Vifu project RPC]
  Vifu --> Release
  Release --> Session[Interactive session]
  Session -->|Agent effect| Vifu
  Vifu --> Gateway[Agent Gateway]
```

The editor and host are replaceable product surfaces. The Short Drama plugin
defines the source language and compiles it into systems installed on Vifu's
headless Bevy runtime. The Content Runtime service stores the example's private
drafts, media, releases, and sessions.

## Agent interactions

An Agent interaction is part of the story graph rather than an unrestricted
chat box. The plugin decides when an interaction begins, which Agent profile it
uses, what public story state is available, and how the result advances the
scene. Agent execution still goes through Vifu's authenticated callback, so the
plugin never receives provider credentials.

This separation also makes the interaction observable. The application owns
the story outcome; Vifu owns the Agent invocation and trace.

## Host actions

Some actions belong to the presentation host. The example includes a hold
gesture that the web client renders and completes. The runtime pauses at the
host action, the client performs the interaction, and the session resumes with
the result.

The same pattern can represent camera input, engine-owned objects, device
motion, or another interface that should not be implemented inside the
headless runtime.

## Reuse the pattern

A training simulator, character experience, product walkthrough, or game can
use the same architecture:

1. define an application source and command model;
2. implement the behavior as an embedded plugin or runtime service plugin;
3. attach the plugin to a canonical Vifu project;
4. invoke project Agents through the Vifu callback; and
5. render the application through the host that fits the product.

Continue with [Authoring and releases](/docs/examples/authoring-and-releases)
to see how this example turns editable source into a stable release.
