Skip to main content

Serverless Functions

Serverless Functions provide a lightweight way to run custom logic inside the GlobalAI platform. They allow you to execute discrete operations, such as data processing or external system calls, without provisioning or managing dedicated servers.

Functions are managed as part of the Infrastructure module and are typically executed from automation workflows when specific logic is required.

Purpose of Serverless Functions

Serverless Functions are designed to handle focused computational tasks within a larger automation flow.

  • Workflows control the sequence of steps.
  • Functions execute the logic at individual steps.

This separation allows workflows to remain readable and declarative, while complex logic is encapsulated in reusable functions.

OpenFaaS-based execution

GlobalAI uses OpenFaaS to provide its serverless capabilities. Functions are defined as container images compatible with OpenFaaS and run within your own infrastructure.

This approach allows you to:

  • Run functions on-premise or in a private cloud
  • Avoid reliance on public cloud serverless services
  • Maintain control over data residency and security

While similar in concept to cloud services such as AWS Lambda or Azure Functions, GlobalAI functions are designed to run entirely within your managed infrastructure.

Key capabilities

Serverless Functions support the following capabilities:

  • On-premise execution: Functions run inside your own network or data center, using infrastructure you control.

  • OpenFaaS compatibility: You can use standard OpenFaaS container images to define and deploy functions.

  • Resource configuration: CPU and memory limits can be defined per function to control resource usage.

  • Interactive testing: Functions can be executed directly from the platform using the Run action to validate inputs and outputs.

  • Schema definition: Input and output schemas can be defined using JSON Schema, enabling smooth integration with workflow nodes and clearer data contracts.

Common use cases

Serverless Functions are commonly used for:

  • Data transformation: Reformat, validate, or enrich data passed between workflow steps.

  • System integration: Connect to external or legacy systems that do not have native integrations.

  • Operational logic: Retrieve infrastructure or runtime information and use it to influence workflow behavior.

  • Reusable computations: Encapsulate complex logic—such as calculations or database updates—into a single reusable function.

Now that you understand how Serverless Functions work, explore how to create and use them in practice.