Apply a rule
Connect a policy decision to an action in your application, with the core SDK or an adapter for your agent framework.
SDK quickstart
Start with a decision you can follow from policy to outcome. The quickstart shows how a core SDK or Enforce adapter lets an allowed action proceed and blocks a denied action.
Developer · Free for 60 days
Connect your agents, test your policies, and bring colleagues into human review. Inspect and export the evidence together.
For pre-production evaluation. No payment details or staff approval. Your 60 days start when your account is ready.
Open Tools and SDKs in the customer portal for SDK access and installation instructions.
Choose a core SDK for your language. Add an Enforce adapter only when it owns the framework operation you want to control.
Connect a policy decision to an action in your application, with the core SDK or an adapter for your agent framework.
An allowed action proceeds. A denied action is blocked before it takes effect, so you can check the result against your application's records.
Review the policy result and reported outcome together in the customer portal, with session details available when you need them.
After installing the Python core SDK from Tools and SDKs, set VERIPROOF_API_KEY to the application key from the application's Set up SDK tab. Run this with test data:
import asyncio
from veriproof_sdk import Veriproof
async def test_action(context):
context.throw_if_stopped()
return {"receipt": "test-only"}
async def main():
async with Veriproof.from_env() as vp:
result = await vp.govern("payment.create", {"amount": 40}, test_action, facts={"payment_amount": 40})
print(result.status, result.evidence_reference)
asyncio.run(main())
Create a Development policy that blocks payment.create when payment_amount is above your test threshold, and deploy the rule in Enforce. Increase the amount, rerun the example, and confirm the action is stopped before it runs. The sample function creates no real payment. To send these cases to an authorized reviewer instead, set up human review.
The developer guide includes the sample code and verification steps. A setup or telemetry integration can record context, but it cannot block protected work. Check the framework matrix before choosing a package.