simulate_intervention()
KeyThe knock-on engine. Fits or loads a mechanism per node on the approved DAG (DoWhy-GCM — linear or spline from as-of data, or asserted elasticities labeled assumed), then applies do(X=x) and draws interventional samples. Returns the expected change and interval for every downstream variable, the causal path it travelled, every assumption on that path — and a suggested experiment when the intervals are too wide to act on.
simulate_intervention(intervention, targets, as_of)→ KNOCK-ON REPORTCallable over MCP as simulate_intervention(intervention, targets, as_of). REST mirror POST /v1/simulate Planned — alpha is MCP-only
The knock-on question, answered before the action: cut the discount tier, and what ripples? do(X=x) on the approved graph returns every downstream variable — win rate −2.1pp [±1.4], gross margin +3.4pp [±0.9], revenue net +$210k [−40k, +485k] — with the path each effect travelled and every assumption on it labeled fit-from-data or assumed. When the interval is too wide to act on, it tells you which experiment would narrow it.
Over MCP, your agent invokes it on its own when the moment calls for it — just describe the situation. A Python SDK for headless runtimes is planned; this is what the call will look like.
| Param | Type | Description |
|---|---|---|
| interventionREQUIRED | object | The do() — variable and value, e.g. {"discount_tier": "removed"}. |
| targets | string[] | Downstream variables to report. Default: all descendants. |
| as_of | timestamp | Fit mechanisms from data as of this moment. Default now. |
Run this call right here. The response is canned and spec-true — the exact shape your agent gets back over MCP, on sample data.
Sandbox — canned, spec-true responses. No key, no server, no live data.
// Press RUN to call simulate_intervention() in the sandbox.
