Interworky
  • Home
  • Introduction to Interworky
  • Getting Started
    • Account Setup Guide
  • Integration Tutorials
    • WordPress
    • Wix
    • Squarespace
    • Duda
    • Odoo
    • Next.js
    • React
  • Django
  • Features Overview
    • AI Agent Customization
      • Website Sync
      • Naming & Personality
      • Profile Picture
      • Opening Statement
      • First Message
      • Custom Knowledge Base
      • Customizing the Theme
      • Knowledge Files
    • Capabilities
      • Managed Capabilities
      • Custom Capabilities
      • Importing Custom Capabilities via Postman Collection
    • Interworky Dashboard
    • Interworky AI Agent
    • Post-Visit Survey AI Agent
    • Appointments System
  • Support and Resources
Powered by GitBook
On this page
  1. Features Overview
  2. Capabilities

Custom Capabilities

Custom capabilities allow you to add new functionalities or modify existing ones. This is done by defining specific instructions for how your AI Agent should handle certain requests.

PreviousManaged CapabilitiesNextImporting Custom Capabilities via Postman Collection

Last updated 3 months ago

Custom capabilities allow you to add new functionalities or modify existing ones. This is done by defining specific instructions for how your AI Agent should handle certain requests.

Interworky Custom Capabilities right now supports HTTP 1.1 Request Only - AKA REST APIs

Defining a Custom Capability

Each custom capability requires several components:

Capability Name:

  • Use a unique identifier without spaces (underscores can be used if needed).

Example: user_login, report_incident.

Capability Description

  • Provide a clear, human-readable explanation of what the capability does.

Example: This capability logs the user in with an email and password.

Aim for clarity to ensure that others understand the function.

When to Use Capability

  • Explain the context or scenario in which the capability should be triggered.

Example: Use this capability when a user requests to log in, or when email verification is needed.

This guidance helps ensure the capability is employed appropriately.

Capability Endpoint

  • The end point where you capability is deployed

Example: https://myserver.com/login

avoid adding trailing slashes to your endpoint

Capability HTTP Verb

  • The HTTP Verb used for the request

(POST, DELETE, GET, PUT) are the supported HTTP VERB at the moment

Capability Arguments (Dynamic Data)

When defining a custom capability, you must specify the data required to fulfill the request. This includes both the information explicitly defined by you (such as the user’s email or password) and data that is automatically extracted from your endpoint and authentication settings. Here’s how Interworky handles this:

• Automatic Extraction of Path Parameters:

If your capability endpoint includes parameters prefixed with a colon (for example, /api/:user-id/email/:user-email), Interworky automatically:

  1. Identifies these colon-prefixed parameters.

  2. Converts parameter names by replacing any hyphens with underscores.

  3. Appends a suffix (e.g., _INPATH) to clearly denote that the data is derived from the URL path.

  4. Marks these parameters as required and sets their type as a string, ensuring that they are captured during the conversation.

  • Bearer Token Authentication Support:

For endpoints that require Bearer token authentication (tested with JWT):

  1. Interworky detects whether the request requires a Bearer token.

  2. If needed, it automatically adds a dynamic parameter named IW_TOKEN (all uppercase), which is marked as a required string.

IW_TOKEN parameter is used to securely pass the JWT token in the authentication header.

By automatically handling these dynamic parameters, Interworky simplifies the process of integrating REST APIs into your AI Agent. The system ensures that all necessary data is gathered seamlessly during user interactions, allowing your backend to process requests accurately and efficiently.

Example: For a login capability, the AI Agent might need to gather the user’s email and password.

The agent collects this information through natural language conversation and then sends the data to your backend. The backend processes the request and sends a response back to the AI Agent, which then presents the results to the user.

Interworky Custom Capabilities supports Bearer Token only and was tested against JWT only

Adding a Custom Capability