Two projects.
Everything you need.
The consensus-tools SDK gives you the engine. The consensus-engineer skill gives you the architect. Both open source, both production-grade.
consensus-tools monorepo
A pnpm + Turbo monorepo with 16 packages across 5 strict dependency tiers. Decision infrastructure for agentic pipelines: guard any function, evaluate any action, orchestrate any workflow. Apache 2.0 licensed, local-first, zero external dependencies required.
Get Started
Wrapper — gate any function
@consensus-tools/wrapper wraps any async function with a consensus gate. Reviewers score the output, strategy decides allow / block / retry / escalate.
const safeDeploy = consensus({
name: "deploy-to-prod",
fn: deploy,
reviewers: [securityReview, complianceReview],
strategy: { strategy: "threshold", threshold: 0.7 },
});
// result.action => "allow" | "block" | "escalate"Guards — evaluate actions
@consensus-tools/guards ships 7 built-in guard types with weighted voting: code_merge, deployment, send_email, publish, support_reply, agent_action, permission_escalation.
const votes = evaluatorVotes({
action: { type: "code_merge", payload: { files } },
context: {},
});
const result = finalizeVotes(votes, "code_merge");
// => { decision: "ALLOW", risk_score: 0.34 }Workflows — orchestrate pipelines
@consensus-tools/workflows is a DAG engine with guard nodes, human-in-the-loop pauses, and cron scheduling.
const workflow = await runner.createWorkflow("PR Review", {
nodes: [
{ id: "guard", type: "guard", config: { guardType: "code_merge" } },
{ id: "approve", type: "hitl", config: { channel: "slack" } },
{ id: "merge", type: "action", config: { action: "github.merge_pr" } },
],
});Architecture — 5 Dependency Tiers
Tier 0 — Foundations
Schemas, secrets, and shared typesTier 1 — Primitives
Guards, telemetry, evaluators, integrationsTier 2 — Engine
Job engine, ledger, 9 consensus algorithmsTier 3 — Orchestration
DAG workflows, runtime decision firewallTier 4 — Interface
SDKs, CLI, MCP tools, dashboardDependencies flow downward only (Tier 0 → 4). Enforced by dependency-cruiser in CI.
consensus-engineer skill
A Claude Code skill that analyzes your project, recommends the right consensus-tools integration, scaffolds the setup, and proves it works — all in an interactive 6-phase conversation.
The 6-Phase Flow
Analyze
Scans your project (package.json, tsconfig, .env), detects stack and frameworks.
Discover
Asks about governance needs, maps to guard domains and risk levels.
Recommend
Generates customized architecture diagram with package recommendations.
Setup
Installs packages, creates config, scaffolds starter code.
Prove
Runs a live evaluation with sample data, shows audit trail.
Extend
Shows paths to workflows, custom guards, MCP tools, dashboards.
Install in One Prompt
Clone the consensus-engineer skill from https://github.com/consensus-tools/consensus-tools/tree/main/skills/consensus-engineer into my agent's skills directory (~/.claude/skills/consensus-engineer for Claude Code). Copy SKILL.md, README.md, and llms.txt. Then reload plugins and run /consensus-engineer to start the interactive setup.
What It Detects
What It Produces
- consensus.config.ts
- Scaffolded starter code
- Live evaluation with sample data
- Audit trail artifact
llms.txt
We publish a machine-readable llms.txt containing the complete consensus-tools API reference, guard domains, policy algorithms, and integration patterns. LLMs and AI agents can use this to understand our ecosystem without scraping docs.
Built for engineers who ship agents to production
Open-source decision infrastructure. No vendor lock-in, no external dependencies. Run locally or embed directly in your agentic pipeline.
Apache 2.0 (SDK) / MIT (Skill)