Skip to content

Simulation Sandbox Cookbook

GD2BK1NG edited this page Jan 27, 2026 · 1 revision

Simulation Sandbox Cookbook

Practical patterns for counterfactual reasoning and plan validation

The Simulation Sandbox is one of Syntra Kernel’s most powerful tools.
This cookbook provides practical examples and patterns for using it effectively.


🧪 Running a Basic Simulation

sandbox.simulate:
  plan: "purchase_item"
  branches: 3

Returns:

  • predicted outcomes
  • risk scores
  • branch traces

🔀 Branching Strategies

1. Deterministic Branching

sandbox.simulate:
  plan: "checkout"
  mode: "deterministic"

2. Probabilistic Branching

sandbox.simulate:
  plan: "checkout"
  mode: "probabilistic"
  branches: 10

3. Multi‑Agent Branching

sandbox.simulate:
  plan: "team_navigation"
  agents: ["planner", "navigator"]

🧩 Counterfactual Patterns

What if the budget changes?

sandbox.counterfactual:
  modify: "user_budget = 10"
  plan: "purchase_item"

What if the UI element is missing?

sandbox.counterfactual:
  remove_entity: "button#submit"

🔍 Risk Scoring

Each branch returns:

risk:
  safety: 0.12
  failure: 0.08
  uncertainty: 0.21

🧭 Debugging Simulations

View branch tree

ts.query:
  filter: event_type == "simulation_branch"

Inspect world‑model snapshot

world.snapshot.load:
  id: "snapshot_42"

🌟 Summary

The Sandbox enables:

  • safe experimentation
  • predictive reasoning
  • counterfactual exploration
  • plan validation
  • evolutionary testing

It is essential for safe cognition.

Clone this wiki locally