by kaicianflone · 8mo ago · 0 comments
The coordination and consistency problems the paper describes are what the monorepo is designed around. Giving agents auditable stake in decisions. Happy to share more if anyone’s working in this space.
import { consensus } from "@consensus-tools/wrapper";
const safeSend = consensus(sendEmail, {
reviewers: [humanReviewer, aiSafetyReviewer],
strategy: { mode: "unanimous" },
hooks: { onBlock: (ctx) => audit.log("blocked", ctx) },
});
await safeSend({ to: "user@example.com", body: "Hello" });
The call to sendEmail doesn't execute until every reviewer votes. Strategy modes handle the consensus logic (unanimous, majority, weighted, etc.), and guards can ALLOW, BLOCK, REWRITE, or escalate to REQUIRE_HUMAN before anything fires.The monorepo has 9 built-in policy types and 7 guard types designed so you can drop governance into an existing agent system without rewriting your orchestration.
Repo's at github.com/consensus-tools if you want to poke around.