Use the app engine

Orbi.exec runs the same runtime as a workflow node, from the page, without a saved action.

An app action, a workflow node, and an agent tool share one runtimeApp actionWorkflow nodeRuntimeBrowserSQL APIAILead Finder

Run it

Put this in the document and reload the preview.

const response = await Orbi.exec(`async ({ orbi }) => {
  return orbi.project.name
}`)
document.body.textContent = response.result

The page shows the workspace name. response.result is the value your function returns.

When to use an action instead

Use a server action when the page calls the same function more than once. Use Orbi.exec when you want to try a function without saving it. Both receive orbi, browser, ai, leads, and the rest of the runtime.

If this fails: Orbi.exec does not return the workspace name

Read response.result, not the whole response. The function must be an async function expression. A syntax error comes back as the execution error. no paying sponsor means the workspace cannot run code until the sponsor can pay.