InteractiveStoryTask
Generates complete choose-your-own-adventure narratives with branching paths, state tracking, and multiple distinct endings. Ideal for training scenarios, games, and educational content.
Side-Effect Safe
GPT-4 Preferred
Multi-Phase Process
⚙️ ExecutionConfig.json
{
"premise": "A detective in a neon-soaked cyberpunk city discovers a memory chip that shouldn't exist.",
"genre": "sci-fi",
"tone": "dark",
"num_decision_points": 5,
"choices_per_decision": 3,
"track_state_variables": true,
"state_variables": ["credibility", "health", "evidence"],
"writing_style": "descriptive"
}
→
👁️ Session UI: Story Map
START: Opening
The rain in Sector 4 tastes like copper and ozone. You adjust your collar as the neon sign above the noodle shop flickers...
→ [Continue to: decision_1]
decision_1: The Alleyway Encounter
A figure steps from the shadows, hand resting on a pulsed-laser grip. "Hand over the chip, detective."
- 1. [Fight] Draw your service weapon. (health -10)
- 2. [Talk] "I'm just a guy looking for noodles." (credibility +5)
- 3. [Run] Bolt for the crowded main street.
Test Workspace: InteractiveStoryTask
Explore the generated story maps, transcripts, and summaries from recent test runs.
Configuration Parameters
| Field | Type | Default | Description |
|---|---|---|---|
premise * |
String | - | The starting scenario or core concept for the story. |
genre |
String | "fantasy" | Story genre (e.g., sci-fi, mystery, horror). |
target_audience |
String | "young_adult" | Target demographic (children, adult, etc.). |
tone |
String | "serious" | Narrative tone (dark, humorous, etc.). |
num_decision_points |
Int | 5 | Number of branching points (Range: 1-20). |
choices_per_decision |
Int | 3 | Options per branch (Range: 2-5). |
track_state_variables |
Boolean | true | Enable tracking of inventory, stats, or relationships. |
state_variables |
List<String> | null | Specific variables to track (e.g., "health", "gold"). |
prevent_dead_ends |
Boolean | true | Ensures all paths lead to a meaningful ending. |
num_endings |
Int | 3 | Distinct conclusions to generate (Range: 1-10). |
optimize_replay_value |
Boolean | true | Ensures paths are significantly different. |
segment_word_count |
Int | 300 | Target length for each narrative node (100-1000). |
writing_style |
String | "descriptive" | Prose style (e.g., action-packed, dialogue-heavy). |
point_of_view |
String | "second_person" | Narrative perspective (first, second, or third). |
input_files |
List<String> | null | Glob patterns for context files (e.g., world-building docs). |