Skip to content

Repository files navigation

Switchyard

Local reliability lab for consequential agentic browser workflows.

Start here: read the engineering case study, then run the three-minute local walkthrough below. It is deliberately built around synthetic, localhost-only fixtures rather than a real portal.

Switchyard lets engineers design, simulate, replay, and inspect workflow agents against synthetic portals. Deterministic policy gates and human approval prevent uncertain or irreversible actions from silently proceeding.

Why it exists

The happy path is the least interesting part of an agent. Switchyard makes drift, disagreement, malformed tool output, expired approval, and missing evidence visible and testable.

What the demo proves

  • A typed plan is generated before execution.
  • Planner, verifier, and policy roles produce separate evidence.
  • The executor is confined to a synthetic local portal.
  • Drift or uncertainty pauses the run instead of guessing.
  • A human approves one bounded next action.
  • The event trace can be replayed and exported.

Explicit limits

This is a local proof-of-work lab. It does not connect to government, visa, banking, healthcare, or customer systems. It does not submit forms, book appointments, accept payments, or handle real personal data.

Reviewer path

  1. Start the local portal and operator console.
  2. Run the happy-path scenario.
  3. Run the drift scenario.
  4. Open the evidence trace and approval decision.
  5. Replay the run and inspect the first divergence.

90-second reviewer walkthrough

  1. Run npm.cmd test to exercise the domain contracts.
  2. Run npm.cmd run dev, then open http://127.0.0.1:4173/.
  3. Choose Vendor intake / selector drift and run it. The verifier produces NEEDS_HUMAN_REVIEW rather than filling a missing field by guesswork.
  4. Inspect the approval boundary. Approving it authorizes only one bounded fixture retry; rejecting it stops the run. Neither path can submit or mutate an external system.
  5. Export or replay the trace to inspect the event sequence and evidence IDs.

Run locally

npm.cmd test
npm.cmd run dev

Open http://127.0.0.1:4173/. The server is dependency-free and the seeded path is deterministic. Use the scenario cards to inspect a completed run, selector drift, and malformed planner output; the latter two cannot silently become success. Export creates a local JSON evidence bundle.

Verification boundary

This local product version includes a browser-native operator console, a Node domain kernel, scenario JSON import/validation, local scenario persistence, deterministic execution, human approval/rejection, replay, and evidence export. It runs without paid APIs or external credentials. The React/Fastify/Playwright adapters described in TRD.md remain a future deployment layer, not a hidden dependency of the usable local product.

The first usable path is: load fixtures/vendor-intake.json, validate and save it, run it, then inspect or export the resulting trace. Built-in drift and malformed-contract scenarios remain available for failure testing.

Verified status

Verified 2026-08-09:

  • npm.cmd test: 8 passed, 0 failed.
  • Covered seeded success, portal drift, malformed planner output, user-authored scenario JSON, external-origin blocking, lookalike/credential/query-string origin rejection, missing fixture values, and incomplete policy contracts.
  • The provider-independent deterministic adapter was exercised; optional model adapters were not.
  • Local HTTP smoke checks returned 200 for the operator console and domain kernel.

About

Data-driven reliability lab for consequential agentic browser workflows

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages