v0.1 — now on PyPI

The accountability layer
for AI agents

Most frameworks help your agent do things. Ratchet makes sure mistakes don't repeat, fixes stick, and trust is earned through evidence — not vibes.

terminal
# Install Ratchet
$ pip install ratchet-core

# Install Optional Ratchet Packages
$ pip install ratchet-memory ratchet-pilot ratchet-research ratchet-factory ratchet-ops

# Wire into your agent
$ ratchet setup openclaw
✅ Ratchet is wired into OpenClaw. 8 commands installed.

# Or start fresh
$ ratchet init my-agent
🔩 Agent 'my-agent' created — ready to run.
6
Packages on PyPI
161
Facts in prod
46
Incidents tracked
T2
Trust tier

Modular by design. Install what you need.

Each package is independently installable. Compose the stack that fits your agent.


The ratchet loop

Every turn through the loop makes the agent permanently better. Nothing regresses.

01

Something breaks

An incident, a failed task, a pattern the agent notices. The signal is captured, not ignored.

02

Root cause + prevention

A postmortem logs why it happened, what else is affected, and what prevents the class from recurring.

03

Prevention executes

Prevention tasks enter the backlog and get worked autonomously during heartbeats. No prompting needed.

04

Trust advances

Clean operation earns higher trust tiers. P1 incidents trigger automatic regression. Autonomy is evidence-based.


Three commands, infinite modules

The CLI scaffolds agents and generates modules — including AI-written implementations with auto-testing.

ratchet init

$ ratchet init atlas

🔩 Agent 'atlas' created at atlas/

    atlas/
    ├── atlas.py
    ├── config/
    │   ├── context.json
    │   ├── trust.json
    │   └── guardrails.json
    ├── incidents/
    ├── memory/
    ├── BACKLOG.md
    └── NORTH-STAR.md

ratchet generate module

$ ratchet generate module \
  "Monitor disk usage and alert
   when it exceeds 80%"

🏭 Generating module...
   Generated: DiskMonitorModule
   Lines: 93

🔍 Running quality checks...
   ✅ Tests: 6 passed
   ✅ Review: PASS — clean code

🔩 Module created at ratchet-disk-monitor/

Five primitives. One direction: forward.

Memory

Agents wake up fresh every session. Ratchet extracts facts from transcripts, scores them by importance and recency, and injects the most relevant ones at session start. 161 facts in production. Nothing is lost.

Incident loop

Every failure gets a postmortem — root cause, blast radius, prevention tasks. "Fixed" means the class of problem is addressed, not just the instance. 46 incidents tracked, zero unaddressed recurrences.

Trust tiers

Autonomy expands as competence is demonstrated. T1 (read) → T2 (schedule) → T3 (comms) → T4 (spend) → T5 (infra). P1 incidents trigger automatic regression. Evidence-based, not time-based.

Guardrails

Preflight checks match actions against keyword rules before execution. Hard matches pause for human approval. Soft matches warn and proceed. Derived from real incidents, not hypotheticals.

Modules

Every capability implements RatchetModule. Modules communicate via the event bus, never by importing each other. Add what you need, ignore what you don't. Generate new ones with AI.


The ratchet only clicks forward.

Start with one package. Add more as you need them. Generate the rest.