Skip to content

Features

Functions

Run your own server code in Dexto Cloud, as an API, as tools for agents, or as a Site's backend.

A Function is server code that Dexto runs for you. It answers web requests, keeps its secrets out of browsers and agents, and needs no server of yours. You can ask Dexto to write and deploy one, or deploy your own.

A Function runs in one of two places:

  • On its own, at its own address. Use it for an API, for tools other agents and programs call over MCP and OpenAPI, or for a webhook a service sends to.
  • Mounted by a Site, at routes such as /api. It is the Site’s backend: it ships and goes live with each release of the Site. See Sites.
  • Publish tools. A Function on its own can publish its operations as MCP tools and an OpenAPI API from one definition, so agents and programs call the same code. A Site’s Function can add its tools to the Site’s own MCP endpoint.
  • Keep secrets. It declares the API keys it needs by name. You enter each value once on a secure Dexto page; it is never put in the code, the chat or the agent’s hands.
  • Use Dexto. It can be given its own Dexto API key, which acts as its Cloud project, to run agents, generate media or call models.
  • Know the visitor. A Site’s Function is told who is signed in to the Site on every request, and its code reads it with one call, never from a cookie or token.
  • Stay private, or not. A Function on its own is private by default: callers need a Dexto credential. You can make the whole Function, or chosen paths such as a webhook, public.

Each request runs for at most 30 seconds. A response can stream, for example to relay an agent’s reply as it is written.

Each call is charged to the Function’s Cloud project from your organization’s credits, by how long it runs, and counts toward the project’s monthly spend limit. Once the credits run out or the limit is reached, calls are refused. A Function a Site mounts is charged the same way, to the Site’s Cloud project.

Ask Dexto to build it, or deploy a packed Function from your own agent or terminal:

  • CLI: dexto cloud functions deploy (add --public for public access). See Sites and Functions.
  • MCP: dexto_function_deploy, after uploading the package with dexto_upload_prepare.
  • HTTP API: POST /v1/functions/deployments with a developer API key that has functions:write. Call a published operation with POST /v1/functions/{project_id}/operations/{operation}. See the OpenAPI document.

Not sure a Function is what you need? See Choose what to build.