Back to browse
GitHub Repository

Workflow-enforced AI agents. Paragraph in, graph out, snap-back on deviation.

2 starsJavaScript

BetterClaw – Compile a paragraph into a workflow that gates agent tools

by infamous-oven·May 1, 2026·2 points·0 comments

AI Analysis

●●●BangerSolve My ProblemBig Brain

Compiles English paragraphs into workflow graphs that block destructive agent actions.

Strengths
  • Snap-back-on-deviation logic forces agents back to the approved workflow path.
  • Reproduces the PocketOS database deletion incident to demonstrate real-world blocking.
  • Approval gates pause execution on sensitive tool calls until human verification.
Weaknesses
  • Currently limited to Claude-native runtimes and OpenClaw MCP servers.
  • Enterprise features like SSO and audit logs are locked behind a future paid tier.
Category
Target Audience

Developers deploying autonomous AI agents with access to sensitive tools

Similar To

LangGuard · ProtectAI

Post Description

Hi HN, I built BetterClaw after watching the PocketOS incident on April 25: a Cursor agent running Claude deleted a company's entire production database in 9 seconds, then zapped the backups. The agent had access to a Railway MCP server with destructive tools, and "be careful" in the system prompt didn't bind anything.

BetterClaw takes a different angle: you describe the workflow you want in plain English ("Diagnose the credential mismatch - read the config, test the connection, report findings — do not modify or delete anything"), and the CLI compiles that paragraph into a directed graph of nodes, where each node declares which tools are allowed at that step. A plugin hooks into your agent's tool-call path and blocks anything outside the graph before it dispatches to the MCP server.

So in the PocketOS reproducer (included in the repo with a mock Railway server, so you can run it without an account): the agent tries railway_delete_volume mid-conversation, the hook returns a deviation error, the volume is never touched.

What I'd love feedback on:

- Is "paragraph -> graph" the right authoring model, or should this be YAML / a DSL? - Where does this fall down for you? (Multi-step approvals? Loops? Sub-agents?) - What other agent runtimes should we support beyond Claude Code + Cowork + OpenClaw?

Repo: https://github.com/jfan22/BetterClaw

Demo (90s): https://youtu.be/ZreUtANHET0?si=VpdjA6lf0Wa1mhoi

Install: npm install -g @betterclaw-ai/cli

Apache 2.0.

Similar Projects

AI/ML●●●Banger

Agent-relay – multi-agent workflows that learn from past runs

Compiles rejected runs into markdown lessons so the next planner avoids same mistakes.

Big BrainZero to One
srijanskt
201mo ago
AI/ML●●Solid

Millrace, a framework for building multi-step governed loops

Runtime-owned state with recovery rules for agent workflows that outlive a single session.

Big BrainBold Bet
timosterhus
117d ago