Skip to main content

SDK Overview

GridStudio’s Custom Function SDK allows developers to extend the platform with custom logic written in JavaScript. Depending on the function type, the sdk object provided as a parameter offers different capabilities optimized for either client-side or server-side execution.

There are two main SDK contexts:

  • Client SDK: Available for functions that run in the browser, primarily Custom View.
  • Server SDK: Used for all other function types running on the server.

Further details and API references for both SDKs will be provided in their respective sections.


Custom Function Types

GridStudio supports multiple types of custom functions, each serving a specific purpose within the platform:

Custom View (Client)

Client-side functions that allow developers to create custom UI components or entire views within the GridStudio interface. These functions leverage the client SDK and can use built-in UI components provided by GridStudio.


Custom Flow Node (Server)

These are functions that can be added as nodes in agent or workflow flows. They are executed server-side and can handle business logic, integrations, or data transformations.


Server Side Method (Server)

Reusable server-side functions that can be invoked by other functions—either from server or client. These methods are also accessible via API endpoints if exposed.

// Example usage
CustomFunction(async function ({ sdk }, reject, resolve) {
const Samples = await sdk.customCollection("samples");
const { datas, options } = await Samples.listAsync();

resolve(datas);
});

AI Tool (Server)

These are function tools designed to be used by AI Agents (LLMs) within AI Nodes. They enable agents to take actions, retrieve data, or trigger logic during conversations.


Cron Job (Server)

Server-side scheduled jobs that run at specified intervals. Useful for background tasks such as syncing data, sending reminders, or triggering workflows.


Custom App Setup (Server)

Used during the installation phase of a published app from GridStore. Ideal for seeding initial data, setting configurations, or running setup routines when a tenant installs an app.