Create a skill
Define a lookup or an action, when Skavelo should use it and the inputs it needs.
A skill describes one request your app already accepts, such as listing invoices or sending an invoice reminder. Create skills on the agent's Skills tab, or import them from your OpenAPI file. Owners and admins can create and manage skills.
Choose the type
Choose Lookup for a request that reads data, such as a list of invoices. It always uses GET and runs without asking. See Lookups.
Choose Action for a request that changes something, such as sending a reminder. The user approves it before it runs.
Name it and say when to offer it
Give the skill a clear name, such as "Send invoice reminder". Under When to offer it, describe in one sentence when Skavelo should offer it. Skavelo reads this to decide whether the skill fits what a user asked.
Set the request
Choose the method, such as POST, and the Path on your app, starting with /, for example /api/invoices/{invoiceId}/remind. The request is sent from the user's browser, on your site, with their session.
Describe the inputs
Add an input for each value the request needs. Input names use letters, digits and underscores, starting with a letter. For each one, describe what it is, for example "the invoice number, like INV-1042", and optionally list the allowed values.
Every placeholder in the path, such as {invoiceId}, needs a matching input.
Review and turn it on
New skills start switched off. Check the details, then turn the skill on with its switch. Skavelo can use it immediately.
How users experience an action
If a user asks for the action and gives every required value, Skavelo shows an action card with the skill's name and each value it filled in, with Run action and Cancel buttons. If something is missing, Skavelo asks for it first.
After the action runs, the card shows the result, and the outcome appears in Conversations.
Adding headers to requests
If your API needs a CSRF token or a similar header, add it when you initialize the widget:
Skavelo.init({
agentId: 'YOUR_AGENT_ID',
actions: {
headers: () => ({ 'X-CSRF-Token': getCsrfToken() }),
},
});