Skip to main content
  • Method: whatHappened
  • Scope: run:read
  • Transports: HTTP RPC, WebSocket RPC
  • Request: { runId, nodeId?, iteration? }
  • Response: { runId, nodeId, iteration, scope, summary, agentId, source, cached, generatedAtMs }
Omit nodeId to summarize the whole run (scope: "run"); pass it to summarize one node (scope: "node", iteration defaults to the node’s latest iteration). The Smithers Monitor uses this to show a plain-language recap at the top of a clicked node. The Gateway never calls an LLM itself. When the host wired a narrator via the Gateway whatHappened option (the smithers CLI narrates with its cheapest usable local agent, gpt-5.6-luna first), summary is that agent’s recap and source is "agent" with agentId naming the narrator. Without a narrator, or when every narrator attempt fails, the Gateway answers with a deterministic fact recap built from the run/node rows (source: "facts", agentId: null), so the method always returns a usable summary. Summaries for terminal runs and nodes (finished, failed, cancelled) are cached per state fingerprint; cached: true reports a cache hit. Live targets are re-summarized on every call. Errors are versioned as v1 and include InvalidRequest, Unauthorized, Forbidden, RunNotFound, NodeNotFound, and Internal.