Worked example Instrumented boundary Govern multi-agent frameworks →

Govern a LangGraph multi-agent system with GOVENANT

Use GOVENANT and LangGraph together — govern the multi-agent frameworks, not the framework. Wrap the loop. Ledger every act. Prove delivery.

The use case

A data team ships a LangGraph system: a planner, three specialists, and a critic, handing off through a shared state graph in production.

The challenge

When an output is wrong, no one can say which node did what, whether the critic actually ran, or whether a tool call that “succeeded” changed anything downstream. The graph is a black box the moment it leaves a notebook.

What the record reveals

Riding the checkpointer and callbacks, every node’s tool calls become append-only action rows with verified outcomes. The record shows the critic silently short-circuited on 12% of runs and one specialist’s “done” never wrote to the warehouse — invisible before, a query now.

How it maps

The substrate: The framework’s own callbacks and middleware: run IDs, tool inputs/outputs, and cost — everything an append-only action row needs.

The path — Instrumented boundary: Add a thin hook at the action boundary — no access to prompts, reasoning, or models — so every action and its outcome is recorded.

GOVENANT shapeLangGraph source
Action row (ledger)Each tool call, captured in an on_tool_end callback: run_id, node, tool, input/output summary, token cost
OwnerThe graph node that made the call
Lever + ownership gateThe tool + a pre-call check (unowned tool → converted to a request, not executed)
DutyA node that must run every cycle (e.g. the critic) — its absence is a coverage miss
Verified outcomeA verify(tool, output) check of the DOWNSTREAM effect (row written, API 2xx) — never the tool’s return value
SubstrateThe checkpointer state + callback stream; the ledger ships to any SQL store your app already uses
govenant_hook.py — a LangGraph callback (excerpt)
# Rides LangGraph's callbacks. Reads NO prompts, reasoning, or model — only
# the action boundary: what was called and whether the effect verifiably landed.
from govenant import ledger  # thin client over the append-only action-row table

def on_tool_end(run_id, node, tool, tool_input, tool_output, cost, verify):
    delivered = verify(tool, tool_output)      # check the downstream effect...
    ledger.write_action(                        # ...not the trusted return value
        action_id=run_id, owner=node, lever=tool,
        input=summarize(tool_input), output=summarize(tool_output),
        cost=cost, delivered=delivered,
    )

def gate(node, tool):                           # ownership gate at the chokepoint
    if not owns(node, tool):
        raise NotOwned(node, tool)              # out-of-charter call -> a request

Run it

  1. Register the callback on your graph (or wrap the tool node) — it fires on every tool call.
  2. Provide a verify(tool, output) that checks the real downstream effect for each tool, and an owns(node, tool) map for the gate.
  3. Ship action rows to any SQL store; mark completion delivered only when verify passes.
  4. Connect the free hosted audit (it speaks MCP) or sweep the store directly — read-only.

The substrate shapes and acceptance tests are open (CC BY 4.0): developer integration · the portable schema.

What you can claim

From day one of a real integration you can wear the Built-on GOVENANT badge under its four rules — real integration, a disclosure line, a link to the standard, no certification implication. From there the ladder is public: Logged → Gated → Delivered → Earned. Levels are self-assessed against the open standard and published to the registry with their probe logs, open to anyone’s challenge — no authority hands out stamps, which is exactly why a published record means something.

Status — kept honest

This example is a worked mapping with read-only code — adapt the object/field names to your environment. It will never say “supported” or “certified” before a working example lands and its record is public — progress lives in the GitHub issue. Holding our own examples to the standard’s claims discipline is the product.

All sample projects · Govern multi-agent frameworks · All integrations · Run the audit