Functions & Agents

Turn backend code into a callable function

Deploy Node.js, Python or Ruby from source and call it over HTTPS, with verified user context for signed-in callers.

Functions & Agents product screenshot
functions
volcano cloud functions deploy --allScanning volcano/functions/...Found 3 function(s)✓ 3/3 functions deployment startedvolcano cloud functions invoke summarize --payload '{"id":42}'200  {"summary":"…"}  · 412 msvolcano cloud functions logs summarize --type runtime --follow# same endpoint answers from whichever region is closest
Overview

The handler is the easy part

Getting a handler to production usually means an image, a registry, a cluster, an autoscaler, a load balancer and somewhere to keep secrets. None of that is the feature you set out to build.

With Volcano you deploy source. It detects the runtime, installs dependencies, deploys to your project’s regions and serves one HTTPS endpoint. Secrets arrive as environment variables, logs stream to your terminal, and a cron expression schedules a run.

User identity

Know who called your function

Volcano validates the user’s token and adds __volcano_auth to the event. Check permissions against it in your handler.

  • Read user_id, email, role and project_id
  • Forward access_token to call another function as the user
  • Set visibility to authenticated to admit signed-in users
event.__volcano_auth
{  user_id:      '8f1c4b0e-…',  email:        'ada@acme.com',  role:         'authenticated',  project_id:   '…',  access_token: 'eyJhbGciOi…'}signature already checked before your code ran
Regions

Call one URL across your deployed regions

Each function gets one geographically routed HTTPS endpoint. Functions deploy to all configured regions, or to a subset you pick in project settings on Superagent.

  • Publish one URL for callers
  • Check deployed_regions to see where the function runs
  • Manage region settings at the project level
us-westOregon, USA
us-eastN. Virginia, USA
eu-westDublin, Ireland
eu-centralFrankfurt, Germany
sa-eastSão Paulo, Brazil
ap-northeastTokyo, Japan
ap-southeastSingapore
ap-southeast-2Sydney, Australia
CoverageNearFar
one endpoint · answered from the closest region
Logs and schedules

Debug a run or put it on a schedule

Follow build and runtime logs from the CLI. For recurring work, attach a cron expression: a five-field schedule evaluated in UTC.

  • Read logs by function or deployment
  • Schedules require Superagent
  • Identify scheduled runs with __volcano_schedule
volcano cloud functions logs summarize --type runtime -f
12:04:01  [us-east-1]  start  request 4c1e…12:04:01  [us-east-1]  fetched 128 rows12:04:02  [us-east-1]  done in 940 ms12:05:00  [eu-west-1]  start  scheduled runfollowing · ctrl-c to stop
Capabilities

What functions include

Node.js, Python and Ruby

Node.js 22 and 24, Python 3.10–3.14, and Ruby 3.3, 3.4 and 4.0. Python 3.10 is deprecated.

30-second or 3-minute timeouts

30 seconds per call on Hobby, 180 on Superagent. Move longer jobs to durable functions.

One HTTPS endpoint

Call the same URL across the function’s deployed regions.

Verified user context

Read the signed-in caller’s identity from event.__volcano_auth.

Recurring jobs

Run from once a minute to once every 31 days with cron.

Build and runtime logs

Search past logs or stream new ones as the function runs.

Code

Deploy, call and schedule a function

JavaScript
const { Client } = require('pg'); const { databaseConnectionString } = require('@volcano.dev/sdk'); exports.handler = async (event) => { const auth = event.__volcano_auth; if (!auth) { return { statusCode: 401, body: JSON.stringify({ error: 'sign in required' }) }; } // Connect as the caller so row-level security applies to this query the // same way it would from the browser. Omit userId for admin access. const db = new Client({ connectionString: databaseConnectionString(process.env.DATABASE_URL, { userId: auth.user_id, }), }); await db.connect(); try { const { rows } = await db.query( 'select title, body from notes where id = $1', [event.id], ); if (rows.length === 0) { return { statusCode: 404, body: JSON.stringify({ error: 'not found' }) }; } return { statusCode: 200, body: JSON.stringify({ summary: summarize(rows[0]) }) }; } finally { await db.end(); } };
Use cases

What people run on them

volcano.dev/dashboard/edge-function
Deployed functions with their runtime and visibility
Platform

Works with the rest of Volcano

Databases and vector
  • Apply Postgres row policies

    Save DATABASE_URL as a project variable and connect as the caller, so row-level security applies to their queries.

Authentication
  • Use the caller’s session

    Authentication supplies verified user context when a signed-in user invokes the function.

File storage
  • Save results to storage

    Read files from a bucket and upload generated reports for the app to download.

Durable functions
  • Continue beyond one request

    Use a durable function for multi-step work that saves progress and resumes after a failure or wait.

Frequently asked questions

Read the docs
Which languages can I use for serverless functions?

Volcano supports Node.js 22 and 24, Python 3.10–3.14, and Ruby 3.3, 3.4 and 4.0. Run volcano cloud functions runtimes for the current list.

What is the function timeout on Volcano?

Each invocation gets up to 30 seconds on Hobby or 180 seconds on Superagent. A durable function can run for up to a year by saving progress across invocations.

Can I choose where my functions run?

Yes, on Superagent: pick a subset of regions in project settings. Otherwise functions deploy to all configured regions. Callers use one geographically routed HTTPS endpoint.

How do I authenticate calls to a serverless function?

Set visibility to authenticated and invoke with a user’s access token. Volcano validates it and adds __volcano_auth to the event. New functions are private, and authenticated also admits anonymous sign-ins.

How do I keep API keys out of my function code?

Put them in volcano/volcano.env and run volcano cloud variables deploy. Your function reads them as environment variables at runtime, and the file stays out of your code.

Can a serverless function receive webhooks?

Yes, set visibility to public, invocation_mode to http and http_auth_mode to none. This lets webhooks arrive without a Volcano token. Verify the sender’s signature in your handler.

Deploy your first function

Build, deploy, and scale on Volcano's global platform — free to start, with no infrastructure to manage.

Checkout more features