Verification Hook • AI Agent SDK
VerificationHook: Protocol for verification hooks.
VerificationHook
Defined in the verification module.
AI Agent
Protocol for verification hooks.
Verification hooks are used by Agent autonomy to validate actions. They run after file writes or at configured checkpoints.
Implementations must provide:
- name: Unique identifier for the hook
- run(): Execute verification and return result
Properties
ResponseField
strNo description available.
Methods
Usage
class LintRunner:
name = "ruff"
def run(self, context=None):
import subprocess
result = subprocess.run(["ruff", "check", "."], capture_output=True)
return VerificationResult(
success=result.returncode == 0,
output=result.stdout.decode()
)Source
View on GitHubpraisonaiagents/hooks/verification.py at line 62