Skip to content

Deployment Contract v1alpha1 ​

Updated: 20 November 2026

The contract describes what should run in a project. plan_deployment checks it strictly: unknown fields are an error (VALIDATION_FAILED), each with its path and, where obvious, the intended field: image directly on the service gives services[0].image: unknown field "image"; did you mean "source.image"? with an example as a hint, as do names from Docker Compose or Kubernetes (memory, environment, command, ports, volumes, replicas, healthcheck) and typos, including swapped letters and a missing unit (memroy in resources gives did you mean "memory_mb"?). The contract's schema with all fields and allowed values is also in the input schema of plan_deployment and apply_deployment, which an agent gets with the tool list. Fields the platform cannot handle yet are rejected with CAPABILITY_UNSUPPORTED instead of being silently ignored.

Structure ​

json
{
  "api_version": "v1alpha1",
  "runtime_class": "starter",
  "region": "eu-central",
  "budget": { "hard_eur_month": 8, "soft_eur_month": 6, "on_exceed": "scale_to_zero", "plan_against": "max" },
  "rollback": { "auto": true, "on": ["health_check_failed", "crash_loop"], "window_s": 300 },
  "services": [ { "name": "web", "source": { "type": "image", "image": "…" } } ]
}

Top level ​

FieldValuesDefaultNote
api_versionv1alpha1–Required
runtime_classstarterstarterproduction → CAPABILITY_UNSUPPORTED
regioneu-centraleu-central
budget.hard_eur_month≥ 0–Can only lower the project budget
budget.soft_eur_month0 to hard80 % of hardWarning above it
budget.on_exceedblock_new, scale_to_zero, stopscale_to_zeroChecked every minute; scale_to_zero works like stop for now
budget.plan_againstmax, typicalmaxWhat the plan checks the budget against: max (24/7) or typical (services with scale-to-zero 176 h per month); with typical the hard budget stops the project at runtime when it is reached (budgets)
rollback.autobooltrue
rollback.onhealth_check_failed, crash_loop, error_ratethe first twoerror_rate has no effect yet
rollback.window_s30–3600300
rollback.error_rate_threshold0–1–CAPABILITY_UNSUPPORTED
services1–10 entries–Required

Service ​

FieldValuesDefaultNote
name^[a-z][a-z0-9-]{1,30}$–Required, unique
sourcesee below–Required
port1–655358080Passed to the app as PORT; leave out with health.type: process
start_commandlist of strings–Replaces entrypoint and command
resources.memory_mb128, 256, 512, 1024, 2048, 4096256Upper limit depends on the trust level
resources.cpushared-0.25, shared-0.5, shared-1shared-0.25
health.typehttp, tcp, processhttphttp expects 2xx or 3xx; process = worker without port and URL, healthy as long as the process runs after the start-up time
health.pathstarts with //
health.interval_s1–30010
health.timeout_s1–602
health.grace_period_s1–60060 (worker: 10, with a volume: 180)Longest start-up time: the instance counts as started as soon as the check passes; if it has not passed by then, HEALTH_CHECK_FAILED
envname ^[A-Z][A-Z0-9_]{0,63}$, value ≤ 4096 characters–PORT is reserved; no secrets, use secrets for those
availability.scale_to_zeroboolfalsetrue: the public service sleeps without requests and is woken by the next one; without it, it runs all the time (scale-to-zero)
availability.idle_timeout_min5–144015Minutes without a request until it sleeps
availability.min_instances0, 10
availability.max_instances1–31That many instances always run, on different runners where there is room; costs N times as much. Above 3 → VALIDATION_FAILED, with a volume, job or scale_to_zero → CAPABILITY_UNSUPPORTED (Several instances)
domains.subdomain^[a-z0-9-]{3,40}$<service>-<project>
domains.customlist of hostnames, at most 5 per service–Custom domains, only for public services, at trust level 1 or higher; a domain only once per contract. See connect your own domain
publicbooltrue (worker: false)false = no public URL, reachable only via connects_to
accessaccount, publicaccountOnly for public services: account = only signed-in members of your account, public = everyone. See security
wafblock, detectblockOnly for public services: block = the edge rejects unambiguous attacks with 403 (WAF_BLOCKED), detect = it only logs. See limits › protection filter
connects_tonames of other services in this contract, or <service>.<project>–The service may reach these services as <service>.<project>.internal on their port (TCP only); everything else stays blocked. Target not in the contract, the service itself, duplicate or a worker → VALIDATION_FAILED. <service>.<project> names a service of another project of your account that shares itself via shared_with (at most 5; otherwise plan CONNECTION_NOT_SHARED). See network
shared_withslugs of other projects of your account–These projects may reach the service via connects_to: ["<service>.<this project>"]; at most 10, only services with a port. The owner confirms a new share by an agent with a passkey. See between your projects
secretslist of names as for env, at most 50–Set values beforehand with set_secrets; passed in as environment variables. Not set → VALIDATION_FAILED. Not PORT, not also in env
egress.modeinternet, allowlistinternetallowlist: the service reaches only the hosts in egress.allow outside. See network
egress.allowat most 50 hostnames such as api.stripe.com or *.github.com–Only with allowlist, then required. *.github.com covers all names below it, not github.com itself. No IP addresses or networks, no wildcard for a whole ending (*.com) → VALIDATION_FAILED
schedule{ cron, command?, timeout_s? (1–3600), timezone? }–Makes the service a job: no permanently running instance, no port, no URL; at every time of the cron expression command (default start_command, otherwise the image) runs once, at most one run per minute, runs never overlap. timeout_s default 600, timezone default Europe/Berlin. Not together with port, public, access, health, availability, domains (VALIDATION_FAILED) or storage (CAPABILITY_UNSUPPORTED). See jobs
storage.volumesat most 2 per service: name ^[a-z][a-z0-9-]{1,30}$, mount_path absolute, size_gb 1–100–Persistent storage, €0.15/GB-month as long as the volume exists. Data persists across deployments, restarts and rollbacks. Not under /bin, /boot, /dev, /etc, /lib*, /proc, /run, /sbin, /sys, /usr; paths must not be nested. Growing works, shrinking does not (VOLUME_SHRINK). Leaving it out removes the volume after approval; it is kept free of charge for 7 days and comes back if it is in the contract again (VOLUME_REMOVAL). A service with a volume is replaced on deployment: the old instance stops, then the new one starts. If get_platform_info shows volumes.available: false, you get CAPABILITY_UNSUPPORTED

Sources ​

Ready-made image

json
{ "type": "image", "image": "ghcr.io/acme/app:1.2.3" }

OCI reference with tag or digest, linux/amd64. Pinned to a digest at planning.

From a private registry with pull_secret, the name of a secret of the service with the value user:token:

json
{ "type": "image", "image": "ghcr.io/acme/app:1.2.3", "pull_secret": "REGISTRY_AUTH" }

Set the secret beforehand with set_secrets; it is not passed in as an environment variable. Not set or without : → VALIDATION_FAILED, rejected by the registry → REGISTRY_AUTH_FAILED. See ready-made image.

Follow new images of the tag automatically with auto_deploy:

json
{ "type": "image", "image": "ghcr.io/acme/app:main", "auto_deploy": { "track": "tag" } }

track is tag (default, follow the tag in image) or a version pattern such as 1.x / 1.4.x (highest matching version MAJOR.MINOR.PATCH, the tag in image is the start version), approval is none (default, roll out at once) or owner (every new image waits for a passkey approval, 24 hours). image needs a tag, not a digest (VALIDATION_FAILED); not for upload. See auto-deploy.

Upload of a ready-made image

json
{ "type": "upload", "artifact_id": "art_…" }

artifact_id from create_upload with an OCI layout; nothing is built. See image without a registry.

Upload with a Dockerfile

json
{ "type": "upload", "artifact_id": "art_…", "context_dir": ".", "dockerfile": "Dockerfile" }

artifact_id from create_upload. context_dir relative to the archive root, dockerfile relative to context_dir.

Git

json
{ "type": "git", "repo": "acme/shop", "branch": "main", "auto_deploy": { "approval": "owner" }, "pull_requests": "check" }

repo is a GitHub repo connected in the portal, branch without a value is the default branch; dockerfile, context_dir and build_size as for upload. auto_deploy ({} or with approval: "owner") rolls out every push, pull_requests (check or off) checks pull requests. See build from Git. As long as the platform's GitHub App is not set up, type: "git" gives CAPABILITY_UNSUPPORTED.

Several contracts per project ​

A contract contains at most 10 services; connects_to reaches services of the same contract and shared services of other projects of your account. Services missing from the contract stay unchanged and are not deleted. Their costs do count in the budget check, though. The trust level limits the total number of services.

The full JSON schema is returned by get_platform_info(topic: "contract_schema").