Skip to content

Deploying Functions

Deploying a function takes your TypeScript code, compiles it, and uploads it to our cloud infrastructure where it runs on the edge.

When you click the Deploy button in the editor header:

  1. Source retrieval — your TypeScript source code is fetched from the sandbox
  2. Transpilation — TypeScript is compiled to JavaScript
  3. Secret binding — all secrets you have configured are attached as environment variables
  4. Upload — the compiled code and bindings are uploaded to our cloud infrastructure
  5. Status update — the function status changes to Deployed and the deploy timestamp is recorded

The entire process takes a few seconds. You will see a loading spinner on the Deploy button and a success notification when complete.

You should deploy after:

  • The AI agent finishes writing or modifying your code
  • You add, change, or delete a secret (secrets are bound at deploy time)
  • You want to test your function with real traffic

There is no auto-deploy — you always control when your function goes live.

Each deployed function is a standalone serverless script. The script name is derived from your account, portal, and function name. Deployed functions:

  • Run on a global edge network
  • Have access to all secrets you configured as environment variables
  • Can make outbound HTTP requests to any external API
  • Are tagged with your portal ID and user email for tracking

If deployment fails, the function status changes to Failed and you will see an error notification. Common causes:

  • Syntax errors in your code — ask the agent to fix the issue
  • Missing secrets — if your code references a secret that has not been created
  • Service errors — temporary infrastructure issues (try deploying again)

A failed deploy does not affect any previously deployed version. The last successful deployment continues to run.