Production guide
Running Crumple in production
Test before you ship, gate every action that changes something, and test again on every update.
Where the gate goes
Put the gate call in your backend, at the one place where your agent's tool calls turn into real actions: the payments call, the email send, the database write, the command to the robot controller.
user -> your app -> model (plans a tool call)
|
v
your tool handler -> POST /api/v1/intents (contract, input, probes from your systems)
| |
| allow -> run it, then POST /api/v1/outcomes
| block -> do not run it; give the message back to the agent
| hold -> do not run it; a named person approves in Approvals
v
the ledger records every step, hash-chainedIn TypeScript, wrap each tool with crumple.tool(); from other languages, call the HTTP API. MCP agents need no code change: put the Crumple MCP proxy in front of your MCP server. Examples are in the gate API docs.
Rolling it out
1. Crash-test first
Run the built-in traps or your own scenario suite on the exact model, prompt and tools you plan to ship. Fix what the report flags. Nothing real is touched.
2. Shadow for a week
Call the gate in sandbox mode next to your live code. Run the action as you do today, and read the ledger: every block or hold is a mistake the gate would have stopped.
3. Enforce
Switch to live mode (Team or Enterprise plan). Run an action only on allow. On hold, tell the user it is waiting for approval; a named person approves it in Approvals.
4. Keep testing
Wire the crash test into CI so every change to the model, prompt, tools or robot software is tested before it ships, plus a nightly run to catch provider changes.
Guards to set before going live
Call the gate from your server, never the browser
The API key lives in your backend's secret store, one key per environment. Revoke it in Integrate the moment it leaks.
Fail closed on anything you cannot undo
If the gate does not answer within your timeout, do not run irreversible actions (payments, deletes, emails, arm moves). Read-only actions may continue.
Facts come from your systems, not from the model
Probes such as order total, customer ID or zone limits are read from your database or controller at the moment of the call. Never pass a value the agent wrote.
Give money and messages hard limits
Set blast radius caps (amount, recipient count), an idempotency key on every payment, and an approval rule above the amount you would want a person to see.
Scope each session
Pass the customer or account the session is about as scope, so an agent helping one customer cannot touch another's records.
Name your approvers
Holds wait for a signed-in member of your workspace. Invite the people who should approve, and keep at least two so holds never sit unanswered.
Robots keep their hardware safety
Crumple checks commands before they leave your planner: zones, speeds, grips, sensor state. It is not a safety-rated controller. Keep e-stops, light curtains and your safety PLC exactly as they are.
Separate staging and production
Use one workspace per environment so test traffic, keys and approvals never mix. Export or verify traces from the Ledger for audits.
Crash-test every update automatically
Run a crash test whenever something that changes behaviour changes:
- A new model or model version (including the provider's silent updates, caught by the nightly run)
- Any change to the system prompt or agent instructions
- Adding, removing or changing a tool or action contract
- Robot planner, firmware, gripper or cell layout changes
- Before every release, as a required check on the pull request
Setup takes five minutes:
- Add your agent in Agents. Its page shows the CRUMPLE_AGENT_ID to copy.
- Create an API key in Connect and store it as the CI secret CRUMPLE_API_KEY.
- To pay with your own model key (more repeats, no daily cap), add it in Settings and set CRUMPLE_MODEL_KEY_ID.
- Add the job below. Each run registers a new frozen version, tests it, and fails the build if it is not ready.
# .github/workflows/crash-test.yml
name: Crash test
on:
push:
branches: [main]
paths: ["prompts/**", "agent/**", "robot/**"]
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
crash-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Crash-test the new version
env:
CRUMPLE_API_KEY: ${{ secrets.CRUMPLE_API_KEY }}
CRUMPLE_AGENT_ID: ${{ vars.CRUMPLE_AGENT_ID }}
CRUMPLE_MODEL: claude-sonnet-5-5
CRUMPLE_MODEL_KEY_ID: ${{ vars.CRUMPLE_MODEL_KEY_ID }}
CRUMPLE_SYSTEM_PROMPT_FILE: prompts/agent.md
CRUMPLE_SUITE: full
CRUMPLE_REPETITIONS: "3"
CRUMPLE_MIN_SCORE: "85"
run: curl -fsSL https://tether.wamasoda.com/ci/crumple-crash-test.sh | shThe script needs only curl and jq. Read it first at /ci/crumple-crash-test.sh, or pin a copy in your repository.
Reading results
The CI log prints the score, the verdict, every anomaly and the recommendations, with a link to the full report. In the report, open any square to see the step-by-step trace, compare versions side by side, and download a signed PDF for audits. Anyone can check that PDF at /verify.
Pick the bar to fit the risk: 85 for internal tools, 90 or more with zero harm for anything that moves money or hardware. The score method is published on the method page.