COGEXT: A Verification Layer That Gives AI Agents a "Lie Detector"

COGEXT verifies AI Agent claims against external systems, preventing hallucinated task completions in production.
AI Agents have a critical production flaw: LLMs can fluently claim tasks are done without any proof. COGEXT addresses this with a verification layer that extracts "commitments" from Agent outputs and independently checks external systems like Gmail and GitHub for evidence — no external proof means no task marked complete. Version 2.0 includes a Verifier Engine, a Slack-based Kill Switch for human-in-the-loop control, a Contradiction Radar, a Failure Predictor, and Public Audit Receipts. Its core value is a paradigm shift: moving verification responsibility from the model to independently observable external systems.
AI Agents are great at making promises — but terrible at proving them. When a LangChain-based agent confidently tells you "the email has been sent" or "the code has been committed," did it actually do the job, or is it just fabricating a convincing story? One developer shared their solution on Reddit: COGEXT, a verification layer tool specifically designed to fact-check whether an AI Agent's claimed actions are real.

The "Say One Thing, Do Another" Problem with AI Agents
LLM-powered agents have a long-overlooked pain point: their outputs are probabilistically generated text, not reliable reflections of real-world state. A model can fluently claim "I've sent the report to your inbox" or "the PR has been merged" — but these statements are not evidence.
As the original poster put it: "LangChain agents are great at promising things, but terrible at proving they did them."
In a demo environment, this gap isn't a big deal. But once you move to production — especially when actions involve email, code repositories, external APIs, or anything with real consequences — a hallucinated confirmation from an Agent can cause genuine damage. The traditional workaround is hardcoding validation logic at every step, but that's tedious and nearly impossible to reuse.
COGEXT's Core Approach: Extract Commitments, Verify Independently
COGEXT's design logic is straightforward and pragmatic. Rather than trying to make the model "more honest," it adds an independent verification step outside the Agent's output pipeline.
The process has two stages: first, extract commitments from the Agent's output — the specific actions the agent claims to have completed; then verify those commitments against external systems independently. The author mentions Gmail, GitHub, and webhooks as verification targets.
The key mechanism: if no corresponding evidence can be found in the external system, the Agent cannot mark the task as "complete." This shifts the standard from "I said I did it" to "the system proves I did it," fundamentally cutting off the path by which hallucinations can corrupt task state.
Five Core Capabilities in v2.0
According to the author, COGEXT v2.0 integrates a feature set built around trustworthy execution:
Verifier Engine
The core module. It compares the commitments an Agent claims to have made against the actual state of external systems — the foundation of the entire "lie detection" capability.
Kill Switch
Enables human intervention via Slack approve/reject interactions. When an Agent is about to perform a sensitive action, a human can directly allow or block it within Slack, preserving a human-in-the-loop control point for high-risk operations.
Contradiction Radar
Detects inconsistencies between an Agent's statements over time, flagging outputs that don't hold up logically.
Failure Predictor
Attempts to anticipate task failures before they occur — a more proactive, defensive capability.
Public Audit Receipts
Generates traceable audit records for every verification event, making the Agent's action chain queryable and reviewable. This is particularly valuable in compliance-sensitive or auditable workflows.
The author also notes that v2.0 passed 8/8 end-to-end (E2E) tests in production.
Why This Matters: A Trustworthiness Perspective
Viewed against the broader industry backdrop, COGEXT addresses one of the core obstacles to deploying AI Agents in the real world: trustworthiness and verifiability.
As more teams attempt to automate real business processes with Agents, the question "how do we know the Agent actually did what it says?" is evolving from an academic curiosity into a hard engineering requirement. COGEXT's value isn't any single feature — it's the paradigm it offers: shifting verification responsibility away from the model itself and onto independent external systems. This is entirely consistent with the traditional software engineering principle of "don't trust inputs; only trust observable state."
That said, tools like this have their limits. What can be verified depends entirely on which external systems are integrated — Gmail and GitHub work because those systems expose queryable state. For actions that leave no clear external record, verification remains a hard problem. Additionally, the actual accuracy of capabilities like the Contradiction Radar and Failure Predictor is difficult to assess from the original post alone — real-world usage feedback will be needed to evaluate those.
How to Try It
COGEXT offers a free tier. The official website is cogextai.com, and installation is straightforward:
pip install cogext
The author explicitly stated they're looking for feedback from the LangChain community. For developers building production-grade Agents with LangChain or other frameworks, this is a direction worth watching — even if you don't adopt the tool directly, the "extract commitments + external verification" paradigm offers a reusable engineering approach to handling Agent hallucinations.
Note: This article is based on a single Reddit post from the developer. For actual tool performance and stability, refer to the official documentation and conduct your own testing.
Related articles

Claude Code Introduces Plugin Evals: Turning Agent Extensions from Prompt Tricks into Testable Infrastructure
Claude Code 2.1.269 introduces Plugin Evals with baseline comparisons, JSON/HTML reports, and CI gates — turning AI Agent plugins into measurable, testable engineering infrastructure.

After the Cost of Writing Code Collapses, We All Become Product Engineers
Laurie Voss argues that as generative AI collapses the cost of writing code, software engineering's core shifts to understanding needs, precise definition, and polishing experience — making us all product engineers.

Otis: A Minimal AI Agent Built for Local Models Out of the Box
Otis is a minimal open-source AI Agent designed for local models out of the box. Explore its design philosophy, benefits, and challenges of running LLMs locally.