Functions

Deploy backend logic from agent workspaces.

Let agents create, deploy, invoke, and inspect JavaScript functions for APIs, webhooks, data transformations, scheduled jobs, and product automation.

Start now
Computer Agents function resource
Fully managed

Create backend logic from the same workspace where agents write, test, and deploy code.

Global invocation

Expose APIs, webhooks, transformations, and automation handlers that run on demand.

Connected resources

Bind functions to databases, auth, secrets, web apps, and agent runtimes.

Secure by default

Keep credentials out of code and control access through managed project resources.

Pricing

Functions are the lightest backend surface for bursty APIs, webhooks, jobs, and automation.

Function pricing in Compute Tokens
Active execution
0.1 CT / active execution minute

Billed while the function is actively handling work.

Idle function
No idle runtime charge

A deployed function can stay available without the continuous runtime rate of a web app or agent runtime.

Connected resources
Normal resource usage applies

Databases, auth modules, computers, agent runtimes, and other bound resources keep their own pricing model.

SDK functionality

The JavaScript and Python SDKs expose the full function lifecycle: creation, deployment, rollback, invocation, analytics, logs, bindings, files, runtime inspection, and secrets. Deployed Node functions can also import computer-agents/runtime/server for runtime access to bound resources.

SDK functionality
LifecycleCreate, list, get, update, and delete the resource through the product manager or the generic resources manager.
DeploymentsDeploy, list deployment history, and roll back to a previous deployment from JavaScript or Python.
InvocationInvoke live routes directly from the SDK for health checks, smoke tests, backend calls, and CI workflows.
OperationsRead analytics, request logs, runtime logs, runtime config, and deployed runtime state from one resource surface.
BindingsList, create, update, and remove bindings to databases, auth modules, secrets, web apps, functions, and runtimes.
FilesList, read, write, upload, download, and delete files that belong to the deployed resource.
SecretsList, create, read, update, and delete secrets scoped to the resource without checking values into source files.
Read bound resources inside a function
Loading...

How to set it up

Start from the workflow that fits the job: script infrastructure with the SDK, operate directly in Develop, or ask an agent to create the function from project context.

Via SDK

Create, deploy, invoke, inspect, and bind functions from JavaScript or Python when infrastructure should be scripted.

On the platform

Create a Function resource in Develop, choose the source computer and folder, bind resources, and deploy from the UI.

By agent

Ask a project agent to write the function, connect the required resources, deploy it, test it, and document the endpoint.

1. Create the function handler
Loading...
2. Upload the code to a computer
Loading...
3. Create, deploy, and invoke the function
Loading...

How to deploy

A deployment turns source code in a computer or project workspace into a callable backend resource that can use the rest of the project.

How to deploy
Prepare the handlerCreate a small endpoint with a health path, predictable inputs, and a clear response contract.
Create the resourcePoint the function at a source computer, source folder, and nodejs22 runtime.
Bind dependenciesAttach the database, auth module, secret store, web app, or agent runtime the function needs.
Deploy and testDeploy the function, invoke the health route, and run a representative payload before connecting traffic.
Document the contractRecord the endpoint, required bindings, expected payloads, and operational owner inside the project.

How to manage

Functions are operational resources, not snippets. Keep status, logs, analytics, files, bindings, and runtime configuration visible so production behavior is easy to understand.

How to manage
AnalyticsTrack request volume, errors, and active execution patterns so function behavior is visible over time.
LogsUse request and runtime logs to debug payloads, dependency failures, and external API issues.
Runtime stateInspect runtime configuration and files when a function was generated or modified by an agent.
BindingsReview connected databases, auth modules, secrets, and upstream apps before making changes.
Smoke testsUse SDK invocation after deployment and after every significant source change.
Inspect production behavior
Loading...