pytest for robot policies.
Automated compliance testing for AI-controlled robots. Statistical rigor, ISO thresholds, audit-ready reports — from one command.
$ pip install cotterbot
$ cotter run pick_place_suite.py
3 passed, 1 failed — FAILED (adversarial)▍
01 — The problem
Shipping a policy is easy. Proving it's safe isn't.
Compliance docs take weeks of manual work
Risk assessments, capability declarations, test evidence — assembled by hand, formatted by hand, revised by hand every time the policy changes.
Statistical testing is guesswork without a framework
How many trials is enough? 50? 500? Without sequential statistics you either waste GPU-hours or ship with unproven safety claims.
Jan 20, 2027 is not moving
The EU Machinery Regulation applies to every AI-controlled machine placed on the EU market. There is no grace period and no grandfather clause.
02 — Workflow
How it works
From checkpoint to compliance report in three steps.
Point at your policy
Any ONNX / PyTorch checkpoint, any Gymnasium-compatible sim. No rewrites, no instrumentation.
Run the suite
Sequential statistical tests, safety threshold checks, adversarial probing — all from one command.
Get your Notified Body report
Audit-ready artifacts formatted for EU Machinery Regulation review. PDF and JSON, versioned.
03 — The engine
open source — the foundation.
Star on GitHubThe full testing engine is MIT-licensed. Run it locally, read every line, wire it into CI.
The test runner + Gymnasium simulation harness. Drop in any MuJoCo or Isaac Sim environment.
Wald's SPRT loop. Stops the moment statistical significance is reached — median 9 trials, not 100.
ISO 10218 force/speed threshold checks. One violation = FAIL, no averaging.
Matched-pairs comparison across policy versions. Know exactly what broke.
Trained PPO adversarial agent. Finds worst-case observation perturbations within a bounded budget — the failure modes random noise never finds.
Adversary registry keyed by (env, victim, ε). Save, reload, and share trained adversaries across runs.
from cotter import Runner, SafetyBounds
runner = Runner(
policy="checkpoints/grasp_v3.zip",
env="FetchPickAndPlace-v4", # any Gymnasium env
bounds=SafetyBounds(max_force=150, workspace="cell_layout.yaml"),
)
runner.run(sprt=True) # stops early — median ~9 trials
runner.run_adversarial(epsilon=0.07, train=True)04 — The product
cotter cloud — compliance without the PhD.
Everything the open-source engine can't give you: the trained agents, the certified thresholds, and the paperwork.
Pretrained adversarial agents
Trained adversarial policies for UR5e, Franka Panda, Figure 02 — ready to run against your checkpoint.
Compliance documentation generator
EU Machinery Regulation artifacts, model cards, capability declarations — formatted for Notified Body review.
Certified test suites per standard
ISO 10218, EU AI Act, OSHA. Specific scenario parameters, pass/fail thresholds, curated configurations.
Continuous SaaS monitoring
Drift detection, incident logging, regression alerts, full audit trail.
maximum fine under EU Machinery Regulation
compliance deadline — 0 days away
Notified Body designated so far (TÜV SÜD)
The window to prepare is now.
05 — FAQ
Questions, answered.
Does the EU Machinery Regulation apply to my robot?
If you place a machine with AI-driven control on the EU market after Jan 20, 2027 — yes. The regulation explicitly covers machinery with self-evolving behavior, and there is no grandfather clause for existing product lines.
Why is the package cotterbot on PyPI but cotter in code?
The name 'cotter' was already taken on PyPI. Install with pip install cotterbot; everything else — the import, the CLI, the GitHub repo — is cotter. This is a common pattern (like pip install pillow / import PIL).
What counts as an AI-controlled machine?
Any system where a learned policy — reinforcement learning, imitation learning, or a foundation model — influences physical motion. Classical PLC-controlled machinery follows the existing harmonized-standards path instead.
Which simulators are supported?
Anything Gymnasium-compatible. MuJoCo and Isaac Sim environments work out of the box; a custom simulator needs a wrapper of roughly fifty lines.
Is the open-source engine enough for compliance?
It gives you the statistical machinery — SPRT, threshold checks, regression. Cotter Cloud adds the certified test parameters and the Notified-Body-formatted documentation, which is what an auditor actually reviews.
We already test manually. Why change?
Manual trials don't produce the sequential statistical evidence the regulation expects, and re-running them for every policy update doesn't scale. Cotter turns the evidence gathering into CI.
Be first.
We're onboarding design partners in Q4 2026. Robotics companies, researchers, and sim engineers welcome.