gitwtfhub

wtf is consequent?

pedroshakoor/consequent — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · developerComplexity · 4/5LicenseSetup · moderate

TL;DR

An open-source safety gate that agents must pass through before taking real-world actions, evaluating risk and logging every decision.

Mindmap

mindmap
  root((Consequent))
    What it does
      Gates agent actions
      Runs critic pass
      Logs decisions
    Tech stack
      Python
      FastAPI
      SQLite
    Use cases
      Safety checkpoint
      Audit trail
      Autonomy throttle
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Add a safety checkpoint that reviews and approves AI agent actions before they execute.

REASON 2

Build an audit trail that records every agent decision and its outcome for accountability.

REASON 3

Automatically reduce an agent's autonomy when its predictions repeatedly diverge from reality.

What's in the stack?

PythonFastAPISQLiteAsync SQLAlchemy

How it stacks up

pedroshakoor/consequent0xhassaan/nn-from-scratch3ks/embedoc
Stars00
LanguagePythonPythonPython
Last pushed2023-06-08
MaintenanceDormant
Setup difficultymoderatemoderatehard
Complexity4/54/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Alpha-stage software, requires configuring an evaluator provider before it does anything useful.

MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice is kept.

Wtf does this do

Consequent is an open-source accountability layer for AI agents: a system that sits between an agent and the real world and decides whether any given action is allowed to proceed. Instead of executing actions directly, agents submit structured contracts through Consequent. Each contract describes the intended action, what the world should look like afterward, a rollback plan if something goes wrong, a confidence score, and an irreversibility rating. Consequent then runs two evaluation passes, a consequence evaluator that assesses the impact, and a separate adversarial critic pass that looks for flaws in the reasoning, before deciding whether to approve, reject, or escalate to a human. Only approved actions reach the executor. Every decision is recorded in an append-only tamper-evident ledger using hash-chain verification, creating a permanent audit trail. After each action executes, Consequent compares the predicted world state against the actual result. Repeated divergences between what an agent predicted and what actually happened trigger an automatic reduction in that agent's autonomy level. The system is alpha-stage and written in Python. It runs as a FastAPI service, uses SQLite for local persistence, and exposes an async Python SDK. The evaluator interface is provider-neutral, meaning you can plug in any model that supports OpenAI-compatible endpoints, a local model, or a hosted large language model without changing the gate, ledger, or executor logic. Upcoming roadmap items include a production PostgreSQL profile, a human approval UI, first-party executor plugins for shell, browser, and cloud APIs, and a signed ledger export. MIT licensed.

Yoink these prompts

Prompt 1
Show me how to wire Consequent as a gate in front of my existing autonomous agent's action executor.
Prompt 2
Explain how to write an execution contract for Consequent that includes a rollback plan and confidence score.
Prompt 3
Help me plug a different LLM provider into Consequent's evaluator interface instead of the offline local evaluator.
Prompt 4
Walk me through setting up Consequent's FastAPI service locally with SQLite for a quick demo.

Frequently asked questions

wtf is consequent?

An open-source safety gate that agents must pass through before taking real-world actions, evaluating risk and logging every decision.

What language is consequent written in?

Mainly Python. The stack also includes Python, FastAPI, SQLite.

What license does consequent use?

MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice is kept.

How hard is consequent to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is consequent for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.