Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/SEO.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,6 @@ not needed; the assistants that do read `llms.txt` get Mintlify's.
| Page | Search intent |
|---|---|
| `index` | Execution safety for AI agents |
| `try` | try AI agent guardrails demo · what stops an agent action |
| `risk-check` | AI agent execution risk assessment |
| `protect-my-agent` | AI agent architecture review and integration help |
1 change: 1 addition & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"tab": "CTRLRun",
"pages": [
"index",
"try",
"risk-check",
"protect-my-agent"
]
Expand Down
1 change: 1 addition & 0 deletions docs/docs/demos/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ on the first press and cache after that; a laptop offline can run the same thing
- [Why](/docs/why) — what these demos are demonstrating, in 700 words
- [Get started](/docs/get-started/quickstart) — the same guarantees around your own function
- [Cookbook](/docs/cookbook/index) — nineteen wirings you can copy
- [The scenario demo](/try) — the same checks across 48 domains, drawn rather than run
6 changes: 6 additions & 0 deletions docs/docs/try-it.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ One protected refund, under one policy, with a fake Stripe that commits before i
missing. Change the amount, lose the reply, approve one amount and execute another, and read
what refused you.

<Note>
Coming from the [scenario demo](/try)? That page draws the decisions across 48 domains.
This one runs them: real Python, the released wheel, and every exception is the library's own.
</Note>

<div id="ctrlrun-playground">
<div style={{ display: "flex", flexWrap: "wrap", gap: "12px", alignItems: "flex-end" }}>
<label style={{ display: "flex", flexDirection: "column", fontSize: "13px" }}>
Expand Down Expand Up @@ -264,5 +269,6 @@ this page failing, not the library.
## Next

- [Protect your first action](/docs/get-started/quickstart): the same thing, in your own process.
- [The scenario demo](/try): the same checks, in your domain, with nothing running.
- [Outcomes and AMBIGUOUS](/docs/concepts/outcomes-and-ambiguous): what scenario 1 means.
- [Get started](/docs/get-started/install) · [Why](/docs/why).
16 changes: 14 additions & 2 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,26 @@ import { ScenarioExplorer } from "/snippets/scenario-explorer.jsx";

<section className="cr-section cr-failure" aria-labelledby="cr-failure-title">
<div><p className="cr-eyebrow">ONE LOST RESPONSE. TWO REFUNDS.</p><h2 id="cr-failure-title">The refund succeeded. The agent thinks it failed.</h2><p>An agent refunds &#36;500. The provider processes it, but the response is lost. The agent sees an error and tries again.</p></div>
<div className="cr-comparison"><div><span className="cr-step">WITHOUT CTRLRUN</span><p>Retry <span aria-hidden="true">→</span> another &#36;500 may go out.</p></div><div className="cr-safe"><span className="cr-step">WITH CTRLRUN</span><p><strong>Outcome uncertain</strong> → pause → confirm what happened → only then continue.</p></div></div>
<div className="cr-comparison"><div><span className="cr-step">WITHOUT CTRLRUN</span><p>Retry <span aria-hidden="true">→</span> another &#36;500 may go out.</p></div><div className="cr-safe"><span className="cr-step">WITH CTRLRUN</span><p><strong>Outcome uncertain</strong> → pause → confirm what happened → only then continue.</p></div><p className="cr-caption"><a href="/try?domain=Payments&amp;action=Refund%20payment&amp;situation=uncertain">Walk through this exact case in the demo →</a></p></div>
</section>

<section className="cr-section" id="try-ctrlrun" aria-labelledby="cr-try-title">
<div className="cr-section-heading"><div><p className="cr-eyebrow">TRY THE EXECUTION BOUNDARY</p><h2 id="cr-try-title">Choose an action. See what CTRLRun stops.</h2></div><p className="cr-caption">No login. No API key. No setup.</p></div>
<div className="cr-section-heading"><div><p className="cr-eyebrow">TRY THE EXECUTION BOUNDARY</p><h2 id="cr-try-title">Choose an action. See what CTRLRun stops.</h2><p>Your model chooses the action. CTRLRun decides whether it may execute. Pick a domain, pick the moment it goes wrong, and read which check refused it.</p></div><p className="cr-caption">No login. No API key. No setup.<br />48 domains, 7 ways an action goes wrong.<br /><a href="/try" data-cr-event="try_clicked">Open the demo on its own page ↗</a></p></div>
<ScenarioExplorer />
</section>

<section className="cr-section cr-how" id="how-it-works" aria-labelledby="cr-how-title">
<div className="cr-section-heading"><div><p className="cr-eyebrow">HOW IT WORKS</p><h2 id="cr-how-title">Where CTRLRun sits,<br />in plain English.</h2></div><p className="cr-caption">A library inside your process.<br />Not a service in front of it.</p></div>
<p className="cr-intro">Your agent decides what to do. Somewhere after that, your code calls something that changes the real world: charges a card, deletes a user, sends the email. CTRLRun goes in that one gap, and only that gap. It never sees the prompt, the reasoning or the conversation.</p>
<div className="cr-how-steps">
<div><span className="cr-step">01 / YOU NAME THE ACTION</span><h3>Wrap the function that causes the effect</h3><p>You give it a name and an effect key: the identity of the business action, like <code>refund:txn_4821</code>. Two attempts at the same business action carry the same key, whether they come from a retry, a second worker, or a process that restarted.</p></div>
<div><span className="cr-step">02 / IT CHECKS BEFORE THE CALL</span><h3>Four questions, every time</h3><p>Is this agent entitled to act at all? Does policy allow these exact arguments, require a person, or deny them? If a human approved something, was it this exact action? Could this action already have happened? Anything unclear stops the call.</p></div>
<div><span className="cr-step">03 / IT RESERVES FIRST</span><h3>The claim is written before the effect</h3><p>The effect is reserved in a database before your function runs, not after it returns. That ordering is the whole trick: if the process dies mid-call, the reservation is still there, so the retry meets a claim instead of an empty table.</p></div>
<div><span className="cr-step">04 / IT RECORDS WHAT HAPPENED</span><h3>Including “we do not know”</h3><p>Committed, failed, or unknown. A timeout is not a failure, it is an unknown outcome, and CTRLRun holds it that way until something confirms it. A receipt records the action, the decision behind it, the approval and the result.</p></div>
</div>
<div className="cr-how-close"><p><strong>What it is not.</strong> It does not read prompts, choose models, rank tools, or judge whether the agent's reasoning was any good. It is not an LLM, and it does not call one. It checks the action, not the thinking.</p><a className="cr-text-link" href="/docs/ARCHITECTURE">Read the architecture: the modules, the store, the receipt chain →</a></div>
</section>

<section className="cr-section cr-integration" aria-labelledby="cr-integrate-title">
<div><p className="cr-eyebrow">FOR THE PEOPLE BUILDING IT</p><h2 id="cr-integrate-title">Start at the function<br />that takes action.</h2><p>Wrap the call that causes the real-world effect. Policy decides whether it can run, needs approval, or must stop. CTRLRun protects the effect and records what happened.</p><p className="cr-caption">Python, agent frameworks, or an MCP gateway.<br />The execution boundary stays the same.</p><p className="cr-caption">Execution state survives restarts, so an uncertain outcome still blocks a blind retry. <a href="/docs/production/recovery">How recovery works →</a></p><a className="cr-text-link" href="/docs/get-started/quickstart" data-cr-event="integration_clicked">Start integrating <span aria-hidden="true">→</span></a></div>
<div className="cr-code"><div className="cr-install"><span aria-hidden="true">$ </span><code>pip install ctrlrun</code></div><pre aria-label="Python integration example"><code>{"import ctrlrun\n\n@ctrlrun.protect(\n \"stripe.refund\",\n effect=\"refund:{payment_id}\"\n)\ndef refund(payment_id, amount):\n ..."}</code></pre><p>Illustrative wrapper. The quickstart adds your policy, identity, and approval flow.</p><ul className="cr-outcomes" aria-label="Execution outcomes"><li><code>allow</code> → execute</li><li><code>approve</code> → wait for exact approval</li><li><code>deny</code> → do not execute</li><li><code>unknown outcome</code> → do not retry blindly</li></ul></div>
Expand Down
2 changes: 1 addition & 1 deletion docs/medical-workbench.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Medical evidence workflow. Synthetic fixtures; real CTRLRun release decisions. */
(function(){
"use strict";
var TEMPLATE="<div id=\"cr-medical-workbench\" aria-label=\"CTRLRun Medical Affairs evidence workbench\">\n \n <header class=\"cr-top\">\n <div class=\"cr-brand\"><span class=\"cr-logo\" aria-hidden=\"true\">\u2713</span><span>CTRLRun</span><span class=\"cr-sep\">/</span><span>Medical Affairs</span></div>\n <span class=\"cr-badge\">Synthetic evidence \u00b7 real CTRLRun controls</span>\n </header>\n <div class=\"cr-body\">\n <div class=\"cr-title\">\n <div><div class=\"cr-small\">EVIDENCE WORKBENCH / DEMO-001</div><h2>From evidence to a reviewed brief</h2><div class=\"cr-small\">Compound X \u00b7 Condition Y \u00b7 Fictional products, studies and findings</div></div>\n <div class=\"cr-actions\"><span class=\"cr-badge\" id=\"cr-doc-status\">Draft \u00b7 v1</span><button type=\"button\" class=\"cr-button\" data-action=\"restart\">Start a new case</button></div>\n </div>\n <nav class=\"cr-steps\" aria-label=\"Evidence workflow\">\n <button class=\"cr-step\" type=\"button\" data-step=\"0\" aria-current=\"step\"><span class=\"cr-num\">01</span>Retrieve</button>\n <button class=\"cr-step\" type=\"button\" data-step=\"1\"><span class=\"cr-num\">02</span>Reason</button>\n <button class=\"cr-step\" type=\"button\" data-step=\"2\"><span class=\"cr-num\">03</span>Cite</button>\n <button class=\"cr-step\" type=\"button\" data-step=\"3\"><span class=\"cr-num\">04</span>Validate</button>\n <button class=\"cr-step\" type=\"button\" data-step=\"4\"><span class=\"cr-num\">05</span>Review</button>\n <button class=\"cr-step\" type=\"button\" data-step=\"5\"><span class=\"cr-num\">06</span>Release</button>\n </nav>\n <main id=\"cr-stage\" aria-label=\"Selected workflow stage\"></main>\n <div class=\"cr-next\"><span class=\"cr-small\" id=\"cr-stage-caption\"></span><button id=\"cr-next-button\" type=\"button\" class=\"cr-button primary\">Reason over evidence </button></div>\n <div class=\"cr-actions\"><button type=\"button\" class=\"cr-button\" data-action=\"download-brief\">Download review brief</button><button type=\"button\" class=\"cr-button\" data-action=\"download-audit\">Download evidence &amp; audit record</button></div>\n<div id=\"cr-announcement\" class=\"cr-small\" aria-live=\"polite\" style=\"margin-top:10px\"></div>\n </div>\n <footer class=\"cr-footer\">\n <details><summary>Build map \u00b7 what ctrlrun provides, and what you add</summary>\n <div class=\"cr-map\">\n <section><span class=\"cr-badge\">Build around CTRLRun</span><h4 style=\"margin-top:10px\">Biomedical evidence harness</h4><ul><li>PubMed / trial / licensed document connectors</li><li>Source snapshots and passage IDs</li><li>LLM extraction, synthesis and claim mapping</li><li>Independent checks and reviewer interface</li></ul></section>\n <section><span class=\"cr-badge ok\">Existing ctrlrun primitives</span><h4 style=\"margin-top:10px\">Control the release action</h4><ul><li>Allow / approve / deny policy</li><li>Approval bound to exact action arguments</li><li>Effect reservation and duplicate blocking</li><li>Ambiguous outcomes and audit receipts</li></ul></section>\n <section><span class=\"cr-badge\">Integration work</span><h4 style=\"margin-top:10px\">Trusted release service</h4><ul><li>Verify validation records on the server</li><li>Bind immutable content and evidence digests</li><li>Authenticate reviewers and restrict write access</li><li>Check destination status before retry</li></ul></section>\n </div>\n </details>\n </footer>\n</div>";
var TEMPLATE="<div id=\"cr-medical-workbench\" aria-label=\"CTRLRun Medical Affairs evidence workbench\">\n \n <header class=\"cr-top\">\n <div class=\"cr-brand\"><span class=\"cr-logo\" aria-hidden=\"true\">\u2713</span><span>CTRLRun</span><span class=\"cr-sep\">/</span><span>Medical Affairs</span></div>\n <span class=\"cr-badge\">Synthetic evidence \u00b7 real CTRLRun controls</span>\n </header>\n <div class=\"cr-body\">\n <div class=\"cr-title\">\n <div><div class=\"cr-small\">EVIDENCE WORKBENCH / DEMO-001</div><h2>From evidence to a reviewed brief</h2><div class=\"cr-small\">Compound X \u00b7 Condition Y \u00b7 Fictional products, studies and findings</div></div>\n <div class=\"cr-actions\"><span class=\"cr-badge\" id=\"cr-doc-status\">Draft \u00b7 v1</span><button type=\"button\" class=\"cr-button\" data-action=\"restart\">Start a new case</button></div>\n </div>\n <nav class=\"cr-steps\" aria-label=\"Evidence workflow\">\n <button class=\"cr-step\" type=\"button\" data-step=\"0\" aria-current=\"step\"><span class=\"cr-num\">01</span>Retrieve</button>\n <button class=\"cr-step\" type=\"button\" data-step=\"1\"><span class=\"cr-num\">02</span>Reason</button>\n <button class=\"cr-step\" type=\"button\" data-step=\"2\"><span class=\"cr-num\">03</span>Cite</button>\n <button class=\"cr-step\" type=\"button\" data-step=\"3\"><span class=\"cr-num\">04</span>Validate</button>\n <button class=\"cr-step\" type=\"button\" data-step=\"4\"><span class=\"cr-num\">05</span>Review</button>\n <button class=\"cr-step\" type=\"button\" data-step=\"5\"><span class=\"cr-num\">06</span>Release</button>\n </nav>\n <main id=\"cr-stage\" aria-label=\"Selected workflow stage\"></main>\n <div class=\"cr-next\"><span class=\"cr-small\" id=\"cr-stage-caption\"></span><button id=\"cr-next-button\" type=\"button\" class=\"cr-button primary\">Reason over evidence </button></div>\n <div class=\"cr-actions\"><button type=\"button\" class=\"cr-button\" data-action=\"download-brief\">Download review brief</button><button type=\"button\" class=\"cr-button\" data-action=\"download-audit\">Download evidence &amp; audit record</button></div>\n<div id=\"cr-announcement\" class=\"cr-small\" aria-live=\"polite\" style=\"margin-top:10px\"></div>\n </div>\n <footer class=\"cr-footer\">\n <details open><summary>Build map \u00b7 what ctrlrun provides, and what you add</summary>\n <div class=\"cr-map\">\n <section><span class=\"cr-badge\">Build around CTRLRun</span><h4 style=\"margin-top:10px\">Biomedical evidence harness</h4><ul><li>PubMed / trial / licensed document connectors</li><li>Source snapshots and passage IDs</li><li>LLM extraction, synthesis and claim mapping</li><li>Independent checks and reviewer interface</li></ul></section>\n <section><span class=\"cr-badge ok\">Existing ctrlrun primitives</span><h4 style=\"margin-top:10px\">Control the release action</h4><ul><li>Allow / approve / deny policy</li><li>Approval bound to exact action arguments</li><li>Effect reservation and duplicate blocking</li><li>Ambiguous outcomes and audit receipts</li></ul></section>\n <section><span class=\"cr-badge\">Integration work</span><h4 style=\"margin-top:10px\">Trusted release service</h4><ul><li>Verify validation records on the server</li><li>Bind immutable content and evidence digests</li><li>Authenticate reviewers and restrict write access</li><li>Check destination status before retry</li></ul></section>\n </div>\n </details>\n </footer>\n</div>";
var MODULE = [
"\"\"\"Synthetic evidence workbench: real policy, approval, effects, and receipts.",
"",
Expand Down
Loading