Apps
create_app, deploy_app, list_apps, get_app, get_app_logs and delete_app — provisioning, deploying, inspecting and tearing down hosted apps.
This is the surface that actually hosts something. You hand agenthost your project source inline and it builds and runs it on managed hosting with automatic HTTPS and routing — no build config, no containers, no ports. What each runtime expects from that source is Runtimes; this page is the tool contract around it. For the task-shaped version, see Put an app online.
create_app
Provision an app (Node, PHP, Python, or a static site) inside a project. Pass files and it builds
and deploys in the same call.
| Parameter | Type | Description |
|---|---|---|
project_id | uuid, required | Project the app belongs to. |
name | string, required | Service name, unique within the project. |
fqdn | string | The customer's own hostname, e.g. app.example.com. Omit it to get a free one under customer.agenthost.eu. |
runtime | string | "node:22", "python:3.12", "php:8.3", "static". Omit to infer from your files. |
env | map of string to string | Runtime environment variables. Stored securely, never written into your source, and changeable afterwards via manage_env. Not the place for a secret — see below. |
files | array of file | Project source to build and deploy immediately after provisioning. |
upload_id | string | Source already streamed via begin_upload, instead of files. Mutually exclusive with it. |
Each entry in files is { path, content, encoding } — a project-relative path with no leading
slash or .., the file's content, and an optional encoding of utf8 (the default) or base64
for binary assets.
For a project too large to pass inline, mint a ticket with
begin_upload, stream a tarball to it, and pass the resulting upload_id
here instead — the runtime is inferred from the uploaded tree exactly as it would be from files.
See Sending a large project.
fqdn is settled here and cannot be changed afterwards: there is no tool for moving an app to
another hostname, so to change it, create the app again and delete the old one. env is not —
manage_env covers adding, changing and removing variables later.
Use env only for values the customer has already told you. A real secret should not come through
this call: an API key passed here has been in the conversation, in the model's context, and through
an MCP client that agenthost does not run. Call manage_env instead and let them type
it in themselves.
The customer does not need to own a domain. Omit fqdn and agenthost assigns a free hostname; only
pass it when the customer is bringing their own, in which case the result includes the DNS record
they must add. Relay those steps to them — HTTPS is provisioned automatically once DNS resolves.
Builds are asynchronous
A successful call means the build is queued, not live. Poll get_app until the status
settles, then confirm with a real request. See
Checking a deploy.
deploy_app
Build and run new source for an app that already exists. The files you pass replace the app's prior content wholesale.
| Parameter | Type | Description |
|---|---|---|
service_id | uuid, required | App (service) id. |
files | array of file | The project source to build, replacing prior content. Omit when passing upload_id. |
upload_id | string | Source already streamed via begin_upload, instead of files. Mutually exclusive with it, and spent by this call. |
runtime | string | Change the runtime as part of this deploy. |
Exactly one of files or upload_id is required.
list_apps
List your apps, optionally filtered to one project.
| Parameter | Type | Description |
|---|---|---|
project_id | uuid | Optional project filter. |
get_app
Fetch a single app by id, refreshing and returning its live build/run status. This is the tool to poll after a deploy.
| Parameter | Type | Description |
|---|---|---|
service_id | uuid, required | App (service) id. |
The result carries the app's URL, runtime, status, the names (never the values) of its environment
variables as envKeys, and a lastDeploy summary. When the app uses a custom domain it also carries
the DNS record still needed to point it here.
get_app_logs
Fetch recent build and runtime logs for an app. Best-effort — logs can be briefly unavailable, in which case fall back to hitting the app's URL.
| Parameter | Type | Description |
|---|---|---|
service_id | uuid, required | App (service) id. |
lines | integer | How many recent lines, up to 1000. Defaults to 100. |
delete_app
Delete an app: tears it down and removes all of its data.
| Parameter | Type | Description |
|---|---|---|
service_id | uuid, required | App (service) id. |
This cannot be undone
The app stops serving immediately and its data goes with it.
manage_env
Return a link the customer opens in a browser to read, add, change and remove an app's environment variables themselves. This is how a variable is changed after the app was created, and how any secret should be set in the first place.
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | App (service) id, to link straight to that app. Omit to link to their app list. |
The result carries the URL and, for a named app, the names currently set. Hand the link over and let them do it — the value never passes through you. Saving there restarts the app so the values take effect, without rebuilding it.
The link grants nothing on its own: they sign in with a one-time code emailed to them, on a session deliberately shorter than the one that authorizes MCP clients. So it is safe to send as-is.
get_env
List an app's environment variables: every name, and the value of only those the customer has marked agent can read in the secrets manager.
| Parameter | Type | Description |
|---|---|---|
service_id | uuid, required | App (service) id. |
Each entry carries key, secret, managed, and value — the last present only when the customer
shared it. Everything defaults to secret, including anything agenthost sets itself (an attached
database's connection string is managed and never readable).
There is no way to ask for a value that wasn't shared, and no flag that overrides it. If you need
one, don't ask the customer to paste it into the conversation — call manage_env and send the link.
Simulated mode
When hosting is not configured on the server, these tools run in simulated mode — nothing is built, deployed or served, and every result says so explicitly. Treat that note as a failure to deploy, not a success.