Parameters from Abilities
TheabilityParamsSchema
defines what parameters Vincent Abilities must provide when your Policy evaluates their execution request. The Vincent Ability receives these parameters from the ability executor, and the Vincent Ability SDK handles passing these parameters to your policy as abilityParams
.
Schema Definition
A Zod schema object that defines the structure and validation rules for parameters passed from Abilities to your Policy. These parameters should be what your policy requires to make its checks and validations.
amount
of tokenAddress
would exceed the Vincent App User’s configured spending limit by querying its database or smart contract.
Common Patterns
- Financial Policies
- Access Control
- Rate Limiting
User-Defined Parameters
TheuserParamsSchema
defines the structure of on-chain parameters that Vincent App Users configure for your policy. These parameters are fetched from the Vincent smart contract during execution of your Policy’s precheck and evaluate functions.
Schema Definition
A Zod schema object that defines user-configurable boundaries stored securely on-chain. These parameters are unique to each Ability and App combination, and cannot be altered by the App or ability executor during execution.
Validation Best Practices
- Keep Ability Params Minimal - Only require parameters you actually need for policy decisions
- Make User Params Flexible - Provide sensible defaults and optional parameters for user convenience
- Use Descriptive Validation - Add custom error messages to help with debugging
- Consider Future Needs - Design schemas that can evolve without breaking existing deployments