osFoundry / Platform
Serverless functions
Lambda-style functions per app — cold start in 40ms, no provisioning, billed per millisecond.
What it is
Serverless functions in osFoundry are Lambda-style backend handlers that belong to a single app. When you build an app in the workspace, you can attach functions that run server-side logic — handling a form submission, calling an external API with a stored key, transforming data before it reaches the client — without standing up or managing any server yourself. There is nothing to provision: you write the handler, deploy the app, and the function backend comes up with it. Cold start lands around 40ms, so the first request after idle behaves close to a warm one, and you are billed per millisecond of execution rather than for reserved capacity, which means an idle function costs nothing.\n\nInside osFoundry, functions are provisioned per app install rather than as one shared pool, so each app gets its own isolated execution environment scoped to that app's data and secrets. Because every app also ships with a bundled per-instance Postgres schema (CRUD, a JSONB document store, key-value, and pgvector), a function can read and write its app's state directly instead of reaching across a network boundary to a separate database service. This keeps an app's frontend, its backend logic, and its data as one deployable unit inside the same workspace where you run chat, agents, code, and knowledge.\n\nThis matters because most \"add a backend\" moments in a small app are the expensive part: choosing a host, wiring a runtime, keeping something warm, and paying for it whether or not traffic arrives. Per-app serverless functions collapse that into deploying the app. You keep osFoundry's BYOK posture — your own API keys, no reseller markup on the models your functions call — and you only pay for the compute a function actually uses, measured to the millisecond.
Key capabilities
- Cold-start in about 40ms, so requests hit warm-fast latency without you pre-warming or keeping instances alive
- No provisioning: write the function against your app, ship it, and osFoundry stands up the backend on deploy
- Billed per millisecond of actual execution, with zero cost when a function sits idle
- One isolated function environment per app, scoped to that app's data and secrets rather than a shared pool
- Pairs with each app's bundled per-instance Postgres schema, so a function can read and write app state directly
Use cases
- App builder: adds a form-submission handler and a scheduled data cleanup to a room app without standing up any separate backend service
- Solo developer: calls a third-party API from a function using a stored key, so the secret never ships to the client bundle
- Data-focused team: runs a function that reads and writes the app's bundled Postgres schema to aggregate records before returning them to the UI
Frequently asked questions
What is the cold start latency for an osFoundry serverless function?
Cold start is around 40ms, so the first request to an idle function returns close to warm-path latency. You do not need to pre-warm functions or keep a minimum number of instances running to hit that.
How am I billed for serverless functions?
You are billed per millisecond of actual execution time. There is no flat monthly fee for a function and no charge while it sits idle — you pay only for the compute a request consumes. Any model calls a function makes still run on your own BYOK keys, so there is no reseller markup on that side.
Do I have to provision or manage a server?
No. There is nothing to provision, scale, or keep alive. You write the function against your app and deploy the app; osFoundry stands up the isolated per-app backend for you. Each app gets its own function environment scoped to that app's data and secrets, and it can read and write the app's bundled Postgres schema directly.