Skip to Content

Govern Rig agents

Use veriproof-sdk-adapter-rig 1.0.0 with Rig 0.41.0. The adapter installs veriproof-sdk 1.0.0 as an exact dependency.

Install

In the customer portal, open Tools and SDKs. Select your language and adapters, then follow the installation instructions shown there.

VeriProof SDKs are distributed through customer-gated GitLab packages, not public registries. See SDK access for workstation and CI guidance.

VeriProof packages used here: veriproof-sdk-adapter-rig.

Copy the generated Cargo registry and installation commands from Tools and SDKs. Do not reuse registry settings from another environment.

Understand the boundary

The adapter governs:

  • local tools passed through VeriproofRig::tool;
  • model and tool events passed through the governed hook;
  • final model output passed through the governed hook;
  • human-review continuation for saved tool checkpoints;
  • run-scoped stop for adapter-owned work.

It does not govern incremental streaming, provider-hosted tools, opaque custom tool loops, or external handoffs.

The hook stops incremental streaming before release because an emitted delta cannot be withdrawn. Buffer output when policy must check it before release.

Govern a local tool

use veriproof_sdk::Veriproof; use veriproof_sdk_adapter_rig::VeriproofRig; let rig = VeriproofRig::new(Veriproof::from_env()?); let result = rig .tool("maintenance.schedule", request, |context| async move { context.throw_if_stopped()?; Ok(schedule(context.input)) }) .await;

The result includes the released value, warning, review checkpoint, execution state, and evidence reference when those values apply.

Use tool_with_options when rules need application facts, industry values, content capture, or human-review presentation data.

Add the governed hook

let hook = rig.hook_with_options(session_id, options); let agent = AgentBuilder::new(model).add_hook(hook).build();

Each serialized hook event is limited to 262,144 bytes. An oversized event stops the governed run before execution or release.

For durable review, store a RigCheckpointEnvelope built from the serializable Rig state, the exact pending action, and the SDK review checkpoint. Call restore on the envelope before loading Rig state; it rejects a different schema or Rig version. A worker then resumes the saved tool checkpoint with resume_tool and the core HumanReviewRuntime.