Live demo · Synthetic data, real pipeline
Service incident room
A field issue comes in. The system retrieves evidence, an AI drafts a plan, deterministic rules decide what a person may approve, and the decision is saved with a receipt. It runs live below, on Cloudflare's free tier.
Receipt from the sandbox store
Loading scenarios…
- Network hop
- In-process
- Running
- Done
- Fault
- 01 · Browser → API Field report Idle Case sent to the incident API.
- 02 · In-process Asset lookup Idle Synthetic asset record from a fixture adapter.
- 03 · In-process Retrieval Idle BM25 ranking over synthetic runbook sections.
- 04 · → Workers AI AI draft Idle Drafts steps from a closed action catalog.
- 05 · In-process Policy gate Idle Fixed rules decide what may be approved.
- 06 · Human Your decision Idle A person records the decision.
- 07 · → D1 Receipt Idle The decision is saved to D1 with a receipt.
Stages marked <1 ms did their work in-process on the server, with no network call. Cloudflare's clock only advances on network I/O, so it cannot time that work more finely. The trip from your browser is not included. Some stages finished within the same frame. They are drawn in arrival order, up to 0.18 s apart, so the sequence stays readable. The times on stages 01 to 05 are the server's own measurements.
Evidence the system retrieved
Returned by the server for this run. Scores are the raw BM25 values it reported; bars are relative to the top result. A document applies only when its controller revision matches the asset.
What the model proposed
Steps may only come from a closed catalog of four actions, and every step must cite exhibits. The server drops unknown actions and citations before the gate runs. Hover a citation to see its exhibit.
Deterministic checks
Plain code, not the model. A passing check closes its contact. The combined result decides which decisions a person may record, and the model cannot change it.
Your decision
The same tools, published to AI agents
The workflow above calls get_incident and search_service_docs in-process. /api/mcp publishes those two functions over the Model Context Protocol, so any MCP client can discover and call them. Read-only by design: no inference, no writes, bounded synthetic inputs. The tool list below is fetched live from the endpoint when this section comes into view.
Tool cards appear here after tools/list returns.
How it is built, and where the honesty lines are
Design choices
- The model proposes; code disposes.
- The draft may only use four catalog actions and must cite exhibits. Five deterministic rules compute the allowed decisions, and the server runs them again before it saves anything.
- A person is the only approver.
- Approve exists only when every check passes. The browser cannot send a decision the gate did not permit; the API rejects it, and a repeated decision returns the same receipt.
- Honest degradation.
- If Workers AI or D1 is unavailable, the page says so, shows an authored reference draft labeled as not AI, and keeps approval closed.
- Budgeted for the free tier.
- Live drafts are capped per day with a single D1 row; each costs about 17 neurons against a free allowance of 10,000.
- One code path.
- The MCP tools call the same functions as the workflow, so what an agent sees is what the page ran.
Stack
- Runtime
- Cloudflare Pages Functions · no framework · no build step
- Streaming
- Server-sent events over fetch; each stage event carries the server's measured duration
- Retrieval
- BM25 over 10 original runbook sections, in-process, scores and applicability exposed
- Model
- Workers AI · @cf/meta/llama-3.1-8b-instruct-fast · JSON-schema response format · temperature 0.1 · 360-token cap
- Guardrails
- Closed action catalog · server-side citation validation · five deterministic rules · gate re-run on review
- Storage
- D1 (SQLite): runs, decisions, sandbox tickets, daily live-draft budget
- MCP
- Streamable HTTP · protocol 2025-06-18 · readOnlyHint annotations · shared handlers
- Tests
- node:test: the three gate outcomes, citation validation, MCP discovery and calls, the no-AI path
Real versus synthetic
| Component | Nature | This session |
|---|---|---|
| Assets, readings, parts, failures | Synthetic Fixtures | — |
| Runbook sections | Synthetic Original text | — |
| Retrieval and ranking | Real BM25 over synthetic text | No run yet |
| AI draft | Real Workers AI when bound | No run yet |
| Policy gate | Real Deterministic code | No run yet |
| HTTP API and event stream | Real Cloudflare Pages Functions | No run yet |
| Decision storage | Real D1 when bound | No decision yet |
| MCP endpoint | Real Read-only protocol | Not checked |
| Enterprise, repair, or machine systems | None Not connected | — |
Every asset, reading, document, part, and failure on this page is invented. No Cummins, MuleSoft, Snowflake, repair system, or machine is connected. The pipeline, the model call, the rules, the database writes, and the MCP endpoint are real.