Scenario guide

Pastura runs multiple AI agents on your device. Scenarios are written in YAML, and a local LLM plays each agent in line with the scenario’s personas. This page walks through what a scenario looks like and how to write one.

How a scenario works

A scenario is a single YAML file. It declares how many agents take part, who they are, and what they do each round. Three pieces carry most of the meaning:

  • agents and rounds set the size of the scenario.
  • personas give each agent a name and a short character brief.
  • phases describe what happens in order, such as everyone speaking, making a choice, voting, or tallying a score.

You can write that file by hand, or build it in the app’s visual editor instead. Either way, the app ships with several presets, so you can watch a run before writing one yourself.

A worked example

The Prisoner’s Dilemma preset puts five contestants through a classic strategy game. Each round they address the group, then choose to cooperate or betray each opponent in turn. A scoring phase converts those choices into points, and bluffing during the spoken phase is fair play. Here is the shape of it in YAML, with the prompt text left out:

name: Prisoner's Dilemma
agents: 5
rounds: 3
context: >
  You are a contestant on the game show "Prisoner's Dilemma".
  Against each opponent you choose "cooperate" or "betray".
  Both cooperate = 3 points each. You alone betray = 5 points.

personas:
  - name: Alex
    description: >
      [Role] Calm strategist.
      [Goal] Compute the optimal move from data and past behaviour.
  - name: Mia
    description: >
      [Role] Optimistic people-pleaser.
      [Goal] Trust people by default, even after being burned.

phases:
  - type: speak_all      # everyone addresses the group
    output:
      statement: string
      inner_thought: string
  - type: choose         # pick cooperate or betray, per opponent
    output:
      action: string
      inner_thought: string
    options:
      - cooperate
      - betray
    pairing: round_robin
  - type: score_calc     # built-in prisoners_dilemma scoring
    logic: prisoners_dilemma
  - type: summarize      # recap the round's scoreboard
    template: >
      Round {current_round} result: {scoreboard}

Five personas, three rounds, four phases. The persona briefs are where the run gets its character. A calm strategist and an optimistic people-pleaser will say very different things on the same model.

More presets

The other presets each highlight a different mechanic.

Scenario Agents Phases What you can watch for
Word Wolf 5 9 Five players get a topic word, but one of them gets a different word. Watch how the odd one out hides, and whether the group exposes them in the vote.
Bokete 5 5 Five comedians caption a photo prompt, then vote on the funniest bit. Watch how each persona’s comedic style holds up under a crowd vote.
Score Race 3 4 A vote-driven points race to a target score. The round-end summary changes once someone reaches the target, so you can see how a phase branches on game state.

Writing your own

Every preset is a starting point. The editor has a visual mode, where names, personas, and phases are form fields, and a YAML mode for direct control over the file shown above. Open a scenario in either mode, change a persona or a phase, and run it again to see how the outcome shifts. A few things are worth doing as you experiment:

  • Run the same scenario several times. Because the AI is non-deterministic, its output shifts every run, so a single run won’t tell you much about the scenario. Look for patterns across runs.
  • Vary a persona’s description. Adding a trait like “confident” or “eager to please” can change how the run plays out.
  • Reveal the inner voice. It shows what was behind an agent’s words.