Replay — Workflow Governance for Agent Reliability — Vesanor
replay() is the runtime governance surface for Vesanor.
The main public path is zero-config governance:
- pass an API key
- run through
replay() - review in Governance Studio
- approve
- let the SDK attach to the approved runtime artifact
The primary path
The public product path is:
- runtime entry:
replay(client, { apiKey }) - browser review surface: Governance Studio
- runtime authority input: hosted governance plan + approved compiled artifact
In the current repo, this is the path that matters most.
What replay() does in each setup
| Setup | What happens today |
|---|---|
replay(client, { apiKey }) | Server-backed zero-config governance. Before approval it captures and reviews; after approval it applies environment-based runtime behavior from the approved compiled artifact |
replay(client, { contractsDir, mode: "enforce" }) | Advanced local workflow governance with phases, preconditions, limits, and gating |
replay(client, { contractsDir, apiKey, tools }) | Govern mode with durable state and stronger evidence on the governed path |
The first row is the public path. The other rows still exist in the repo, but they are not the main public story.
Zero-config governance
With zero-config governance:
- you do not need local contracts to start
- you review governance in Studio
- approval freezes the runtime artifact
- runtime behavior depends on environment and approved-plan state
Environment summary:
- development: monitor-style behavior
- staging: advisory/protect-style behavior
- production: protective fail-closed behavior
See Zero-Config Governance for the full flow.
Runtime pipeline
Once active, replay() governs each call through a deterministic pipeline:
- Narrow
- Pre-check
- LLM call
- Validate
- Gate
- Finalize
- Capture
See Runtime Pipeline for the full stage-by-stage behavior.
Govern mode
When you need stronger server-backed guarantees, govern mode adds:
- durable session state
- preflight / proposal / receipt coordination
- stronger governed execution evidence
- workflow coordination when configured
See Govern Mode.
Runtime health and attachment
For the public path, the most important runtime questions are:
- is there an approved plan?
- did the runtime attach successfully?
- is the runtime healthy, degraded, or inactive?
- is authority active, advisory, compromised, or killed?
Use:
Archived advanced-local path
If you explicitly need local YAML contracts, session YAML, or hand-authored pack logic, use the archived docs under docs/legacy/advanced-local/ in the repo.