Functions

Write once, and let AI agents, automations and external systems call it

A function is a saved Supsis script with defined inputs. It runs on the server with the Supsis SDK, without building an automation; AI agents call it as a tool, automations and chatbots as a block, and external systems over HTTP.

  • Reuse
  • New skills for AI
  • External system connection
getOrderStatus.js
async function run({ orderId }) {
  const res = await fetch(`/orders/${orderId}`)
  return res.json()
}
200 · 84ms{ "status": "shipped", "eta": "2026-10-24" }

Defined inputs

You define the inputs the function expects with a name, description, default value and options; type conversion and required-field checks are done automatically.

Ready-made libraries

Supsis SDK, axios, lodash, moment, OpenAI, JSDOM and validator come ready. You just return the result with return.

Create with AI

You can create the function with AI or ask the expert. Previous versions are saved and restored whenever you want.

Run logs and testing

Every run is recorded; console.log output, errors and usage appear in the test panel and the run log.

Example functions

The types of functions teams write most often.

Order status lookup

Look up an order in your own system and return the result.

How does it work?

  1. 1

    Write the function

    Write the script, or create it with AI, for a calculation, an external API call or a combination of several Supsis actions in one step.

  2. 2

    Test it

    Fill in the inputs and run it from the test panel to see the output and logs.

  3. 3

    Call it from anywhere

    Open it to AI agents, use it as an automation and chatbot block, or call it over HTTP from external systems.

FAQ

Functions: Frequently Asked Questions

Usage, limits and security.

An automation is a flow tied to an event. A function is a reusable script with defined inputs; automations, chatbots, AI agents and external systems can all call the same function.

Supsis Ai

Functions

Try Free for 7 Days