functions.do

Deploy Functions Globally in Seconds

Write TypeScript functions with full type safety and deploy to edge locations worldwide. Zero cold starts with automatic scaling.

Read the docs
index.tsfunctions.do
import { $, db, ai } from 'sdk.do' // Order processing function with fraud detectionexport async function processOrder(order: any) {  const fraudCheck = await ai.generate({    prompt: `Analyze order for fraud: ${JSON.stringify(order)}`,    schema: $.Security.analyzes.FraudRisk  })   if (fraudCheck.riskScore > 0.8) throw new Error('High fraud risk')   await db.update('orders', order.id, { status: 'processing' })  return { ...order, validated: true }} // Webhook handler with semantic routingexport async function handleWebhook(webhook: any) {  if (webhook.source === 'stripe') return processPayment(webhook.data)  if (webhook.source === 'shopify') return syncInventory(webhook.data)  return { status: 'ignored' }}

One of 48 primitives

functions.do sits in Workflows: triggers, steps and functions. Every .do shares one grammar, Business-as-Code, and one SDK.

Business

Goals, plans and the work itself

Workflows

Triggers, steps and functions

Data

Records, vocabulary and search

Insight

Measure, test and trace

Build

Ship from code, CLI or MCP

Frequently asked questions

Build your 1-person unicorn

Write the business. Agents run it around the clock.

Read the docs