Open Source / Apache 2.0 + MIT

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.

The Engine

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

~/ terminal

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 types

Tier 2 — Engine

Job engine, ledger, 9 consensus algorithms

Tier 3 — Orchestration

DAG workflows, runtime decision firewall

Dependencies flow downward only (Tier 0 → 4). Enforced by dependency-cruiser in CI.

16
Packages
9
Consensus Algorithms
7
Guard Types
29
MCP Tools
The Architect

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

1

Analyze

Scans your project (package.json, tsconfig, .env), detects stack and frameworks.

2

Discover

Asks about governance needs, maps to guard domains and risk levels.

3

Recommend

Generates customized architecture diagram with package recommendations.

4

Setup

Installs packages, creates config, scaffolds starter code.

5

Prove

Runs a live evaluation with sample data, shows audit trail.

6

Extend

Shows paths to workflows, custom guards, MCP tools, dashboards.

Install in One Prompt

Smart 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

TypeScriptPythonLangChainNext.jsExpressFastifyLangGraphCrewAIAutoGen

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.

View /docs/llms.txt

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)