Vincent Policies are programmable guardrails built using Lit Actions that determine whether Vincent Apps can execute specific Abilities on behalf of users. They ensure autonomous agents operate strictly within user-defined boundaries.Documentation Index
Fetch the complete documentation index at: https://litprotocol-vincent.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Policy Lifecycle
Vincent Policies execute in two phases during Ability execution:Precheck
Runs locally to validate that execution will likely succeed. Provides best-effort validation before network resources are used
Only if all policies return
allow results will the Ability’s execute function proceed. After successful execution, the Ability may call the Policy’s commit function to update state.Defining Your Policy
The npm package name of your Policy (e.g.,
@your-org/policy-name)Zod schema defining what parameters Abilities must provide to your Policy
Zod schema for user-configurable boundaries stored securely on-chain
Zod schema for successful precheck return values
Zod schema for denied precheck return values
Async function providing fast, local validation before using network resources
Zod schema for successful evaluation return values
Zod schema for denied evaluation return values
Async function with full blockchain access making final allow/deny decision
Zod schema for parameters passed to commit function
Zod schema for successful commit return values
Zod schema for failed commit return values
Optional async function to update policy state after successful Ability execution
Creating Vincent Policies
Vincent Policies are created usingcreateVincentPolicy from the Vincent Ability SDK:
Example Implementation
Full Spending Limit Policy
Full Spending Limit Policy
Deep Dive Guides
Parameter Schemas
Define parameters from Abilities and user configuration
Precheck Function
Implement fast local validation logic
Evaluate Function
Write blockchain validation with full access
Commit Function
Update state after successful execution

