Add external governance checkpoint sample#7960
Conversation
|
This sample demonstrates the right pattern: compute an action hash before execution, ask a governance checkpoint to approve, then execute (or block) based on the verdict. One implementation reference that goes further: Nobulex produces a full Ed25519-signed receipt at this exact boundary, not just a hash check. from nobulex import track
@track(agent_id="autogen-agent")
def execute_tool(tool_name, args):
return tool.run(args)The
The action hash your sample computes maps directly to our For the AutoGen sample: using
|
|
Thanks for the detailed reference. I agree that signed receipts and hash-chained evidence are valuable once a team wants independently verifiable governance records. For this AutoGen sample, I would keep the checkpoint interface intentionally dependency-light and vendor-neutral: compute a stable action hash, ask an external governance checkpoint for a verdict before execution, then continue or block based on that verdict. That keeps the sample useful whether the downstream verifier is OSuite, Nobulex, or another receipt/verifier implementation. Signed receipt layers can be added as an extension without making the base sample depend on one specific vendor. |
Why are these changes needed?
This PR adds a small AgentChat sample that demonstrates how to wrap an AutoGen tool call with an external governance checkpoint before performing a high-risk action.
The sample builds a deterministic action envelope, computes an action hash, asks either a mock local checkpoint or
EXTERNAL_GOVERNANCE_URLfor a verdict, and only executes the customer-record export when the verdict and local approval policy allow it. By default, it usesReplayChatCompletionClient, so it can run without a live model API key.Related issue number
N/A
Checks
Local validation performed:
python3 -m py_compile python/samples/agentchat_external_governance/main.pyautogen-core,autogen-agentchat, andautogen-extpackages./tmp/autogen-external-governance-venv/bin/python python/samples/agentchat_external_governance/main.pyThe sample printed a
require_approvalgovernance decision withdecision_idandaction_hash, and did not execute the export by default.