Packages

API reference for every consensus-tools package.

The consensus-tools monorepo is organized into five tiers (0 through 4). Dependencies flow strictly downward: a package in Tier 2 may depend on Tier 0 and Tier 1, but never on Tier 3 or 4. This layering is enforced in CI via dependency-cruiser.

Which package do I need?

I want to...

  • Wrap any AI agent with 3 lines of code → universal
  • Add consensus to a function call → wrapper
  • Run a full job board with agents → core + policies
  • Evaluate AI agent outputs → evals
  • Gate risky AI actions → guards
  • Build DAG workflows → workflows
  • Manage persona reputation → personas
  • Choose a storage backend → storage
  • Expose consensus via HTTP API → sdk-node
  • Use consensus in Claude Code → mcp
  • Just need the types → schemas

Package table

TierPackageDescription
0schemasZod schemas and TypeScript types
0secretsAES-256-GCM credential encryption
1guardsGuard evaluation engine
1telemetryOpenTelemetry tracing and metrics
1evalsAI agent output evaluation framework
1personasPersona packs, reputation engine, and respawn
1storageIStorage interface with JSON, SQLite, and memory backends
1integrationsGitHub and Linear adapters
1notificationsMulti-channel HITL dispatch (Slack, Teams, Discord, Telegram)
1sdk-clientLightweight client SDK
2coreJob engine and consensus ledger
2policies9 pluggable consensus resolution algorithms
3workflowsDAG workflow engine
3wrapperRuntime decision firewall for function calls
4universal3-line governance facade with LLM Persona mode
4sdk-nodeNode.js server SDK with HTTP API
4mcpModel Context Protocol server (31 tools)
4openclawOpen consensus protocol implementation
4cliCommand-line interface

For how these tiers are enforced, see Architecture.