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:

python
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

python
from praisonaiagents.hooks import verification

Classes