Function Parameters
The execute function receives two parameters:object
required
Object containing the ability parameters
object
required
Context object provided by the SDK with helpers and metadata
Response Schemas
Success Response
ZodSchema
required
A Zod schema that defines the structure of successful execution results. Include details about the completed operation, such as transaction hashes, amounts transferred, or other relevant outcomes.
Failure Response
ZodSchema
required
A Zod schema that defines the structure of failed execution results. Include error details to help the executor understand what went wrong, including error codes, reasons, and relevant context.
- Success Schema
- Failure Schema
If any unhandled error occurs during execution, the Vincent Ability SDK automatically returns a fail result with the error message.
Executing Vincent Policy Commit Functions
After your ability’s execute function successfully completes, the last step should be calling the commit functions for any supported Vincent Policies that have them. These commit functions allow policies to update their internal state based on what actions your ability performed. For our token transfer ability example, after successfully executing the transfer, we call the Vincent spending limit policy’s commit function to update the amount spent:Example Implementation
Full token transfer ability implementation
Full token transfer ability implementation
Next Steps
Supporting Policies
Learn how to integrate Vincent Policies with your Ability
Publishing
Deploy and publish your Ability to the Vincent Registry

