Skip to content
Docs

Serverless Functions

Serverless functions are the core unit of compute on the platform. Each function is an isolated handler that receives an event and a context and returns a result—whether you invoke it from the editor, from async jobs, or through HTTP routes on the gateway.

Run in the test panel sends your JSON as the event object directly, with no API Gateway wrapper. HTTP routes instead pass an API Gateway–style event with a string body. Handlers often branch on typeof event.body === 'string' (Node.js) or the equivalent check so that both invocation paths work.

How to create functions#

  • From the UI — click + New Function on the Functions page. Optionally upload a .zip archive with your code.
  • Drag and drop — drop files or folders onto the file tree in the editor sidebar.

Function configuration#

SettingDefaultDescription
Handlerindex.handlerThe entry point, written as file.export.
Runtimenodejs22Node.js 22, Python 3.12, or Go 1.22
Timeout5 000 msMaximum execution time before the platform stops the function.
Memory256 MBMemory limit for the function's container. Default 256 MB; the minimum is 64 MB and the maximum is 2,048 MB (2 GB).
Network—Enable to allow outbound HTTP/TCP connections from the function. This is the only switch: turn it on and the function's containers get network on the next invocation. Off by default.
System packages—Optional. OS packages for the function image are listed in inquir.yaml next to the code: build.system.presets (ffmpeg, imagemagick, libvips, poppler, tesseract, ghostscript, fonts) and build.system.packages (Debian package names). A headless browser for Puppeteer or Playwright is a package list too: packages: [chromium, fonts-liberation, fonts-noto-color-emoji], then launch /usr/bin/chromium with --no-sandbox. Node.js and Python; Go is coming soon. The editor completes and checks the file.

Hot containers#

Click Deploy to build the function and roll it out to a replica on the compute plane. A replica keeps your handler loaded, so later invocations skip the cold-start work of starting a container, booting the runtime and loading your handler.

Replica lifetime and scaling depend on the function policy, keep-warm settings and available capacity. An idle replica may stop and need to start again on the next invocation; additional replicas are subject to scaling and resource limits.

Deploy needs no server setting: it is available on every installation.

Test panel#

The IDE separates execution from configuration: Run and Deploy are in the bottom dock; configuration and the AI assistant are in the right inspector.

  • Run passes your JSON as the event. Enable Stream for supported streaming handlers. Navigating to another page inside the console or switching functions does not cancel the run; Stop sends cancellation. Closing the browser or losing the connection is different: use an asynchronous job when execution must survive a client disconnect.
  • Config in the right inspector contains the handler, execution settings, network access and environment variables. Use Deploy in the bottom dock to follow deployment progress and build logs.
  • Traces — recent runs of this function, using the same trace model as the Executions page.
  • AI — the in-editor assistant, available when your deployment enables it.