verification • AI Agent SDK
Verification Hooks Protocol for PraisonAI Agents.
verification
AI Agent
Verification Hooks Protocol for PraisonAI Agents.
Provides protocols for verification hooks that can be used with Agent autonomy. Verification hooks run after file writes or at configured checkpoints to validate agent actions (e.g., run tests, lint, build).
Usage:
from praisonaiagents.hooks import VerificationHook, VerificationResult
class TestRunner(VerificationHook):
name = "pytest"
def run(self, context=None):
# Run tests and return result
return VerificationResult(
success=True,
output="All tests passed",
details={"tests_run": 10, "passed": 10}
)
agent = Agent(
instructions="...",
autonomy=True,
verification_hooks=[TestRunner()]
)Import
from praisonaiagents.hooks import verificationClasses
VerificationResult
Result of a verification hook execution.
VerificationHookProtocol for verification hooks.
BaseVerificationHookBase class for verification hooks.
CommandVerificationHookVerification hook that runs a shell command.
FileCheckHookDeclarative file-assertion verification hook (no shell involved).