Skip to main content
Vincent Abilities are modular, executable functions that define what operations your App can perform on behalf of users. This guide explains their structure, lifecycle, and implementation details.

Ability Lifecycle

Vincent Abilities execute in two phases to ensure reliability and security:
1

Precheck

Runs locally to validate that execution will likely succeed. This also runs precheck on the Vincent Policies to ensure they are valid as well
2

Execute

Runs in the Lit Action environment to perform the actual operation. Policies also run their evaluate function here
Only if all policies return allow results will your Ability’s function execute. After successful execution, the Ability can optionally call Policy commit functions to update state.

Defining Your Ability

string
required
The npm package name of your Ability (e.g., @your-org/ability-name)
string
required
A clear description of what your Ability does
ZodSchema
required
Zod schema defining the input parameters your Ability requires
SupportedPolicies
required
Array of supported Vincent Policies, created with supportedPoliciesForAbility()
ZodSchema
Zod schema for successful precheck return values
ZodSchema
Zod schema for failed precheck return values
function
required
Async function that validates execution will likely succeed
ZodSchema
Zod schema for successful execution return values
ZodSchema
Zod schema for failed execution return values
function
required
Async function that performs the actual Ability operation

Creating Vincent Abilities

Vincent Abilities are created using createVincentAbility from the Vincent Ability SDK:

Example Implementation

Deep Dive Guides

Parameter Schemas

Define and validate your Ability’s input parameters

Supporting Policies

Integrate Vincent Policies with your Ability

Precheck Function

Implement validation logic before execution

Execute Function

Write your main execution logic