Skip to main content

A veto gate for AI-written code in LangChain / LangGraph — 17 reality gates + frontier review, with veto power. Free to try, no signup.

Project description

verificate-langchain

A veto gate for AI-written code in LangChain / LangGraph. Your agent writes code; Verificate runs it through 17 deterministic reality gates (mock/placeholder veto, invented-API checks, false-completion detection) plus a frontier-model review, and can veto. An agent that ships confident-but-wrong code loses its user's trust — this is the safety net that keeps it shipping.

pip install verificate-langchain

25 free validations per machine — no signup, no token. After that, pass a token (30-day trial, no card: https://verificate.ai/auth/signup).

One-shot check

from verificate_langchain import validate

v = await validate("def refund(order_id, amount):\n    pass  # TODO real refund")
print(v.approved)     # False — the mock refund path is vetoed
print(v.findings)     # ['[code_reality_gate] Placeholder detected ...', ...]

Verdict is truthy iff approved, so if await validate(code): ship(code) reads naturally.

As a LangGraph guardrail node

from verificate_langchain import VerificateGuardrail
from langgraph.graph import StateGraph, START, END

gate = VerificateGuardrail(max_attempts=3)           # optional token=...

g = StateGraph(dict)
g.add_node("write", write_code)                       # your codegen node, sets state["code"]
g.add_node("gate", gate.node)                         # sets state["verdict"] / ["findings"]
g.add_edge(START, "write")
g.add_edge("write", "gate")
g.add_conditional_edges("gate", gate.route, {"fix": "write", "done": END, "give_up": END})
app = g.compile()

The output must pass through the gate node — the veto is structural, not an optional tool call the agent can skip under pressure.

Load the raw tools

from verificate_langchain import load_verificate_tools

tools = await load_verificate_tools()   # validate_ai_output, validate_plan, analyze_code, generate_code
agent = create_react_agent(model, tools + your_other_tools)

What it catches (real, verbatim)

"N+1 synchronous API calls … 100 sequential HTTP roundtrips … will trigger Stripe rate limiting" · "stripe.Inventory is not a valid Stripe SDK resource" · "Stripe API requires integer cents"

Read-only: code is analyzed, never executed, never trained on. https://verificate.ai/privacy

Uses the official langchain-mcp-adapters against the hosted Verificate MCP server. All clients + one-click installs: https://github.com/Verificate-Dev/verificate-mcp-quickstart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verificate_langchain-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verificate_langchain-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file verificate_langchain-0.1.0.tar.gz.

File metadata

  • Download URL: verificate_langchain-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for verificate_langchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bdb861e30fda504600ece25d3d4ec2b6fe329145ce920cffb84008bd49b6d2d7
MD5 f750608ee2dc209b5c36dfa764d57551
BLAKE2b-256 11a8beea526e6b5f3182f44c57477e4334bffe4ac4229d4f06ed06330b484f9b

See more details on using hashes here.

File details

Details for the file verificate_langchain-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for verificate_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88d7fb2979f607a105abb784c864cf77f7bd01d340c9e5da26d395aef621f085
MD5 850a6e22bcc9f37bccb889a9d02949a3
BLAKE2b-256 5760062c753229e24d825a34d06acb99301cd39effa3c48a9fd9c207d3649d15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page