Deploying Functions
Deploying a function takes your TypeScript code, compiles it, and uploads it to our cloud infrastructure where it runs on the edge.
Deployment Process
Section titled “Deployment Process”When you click the Deploy button in the editor header:
- Source retrieval — your TypeScript source code is fetched from the sandbox
- Transpilation — TypeScript is compiled to JavaScript
- Secret binding — all secrets you have configured are attached as environment variables
- Upload — the compiled code and bindings are uploaded to our cloud infrastructure
- 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.
When to Deploy
Section titled “When to Deploy”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.
What Gets Deployed
Section titled “What Gets Deployed”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
Deploy Failures
Section titled “Deploy Failures”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.