Docs / Reference

Limits

Lifetimes, rate limits, per-network caps, stack size, timeouts, log sizes, the crash-loop rule and retention.

The limits AgentServe applies to stacks, requests and accounts.

Anonymous stacks#

LimitValue
Lifetime of an unclaimed stack1h
Shortest TTL accepted15m
stack.expiring notice5m before expiry
Unclaimed stacks building or live per IP3
Snapshot retention after expiry7 days
  • A stack's lifetime is set when it is created, from the request's ttl, then the manifest's, then the default. agentserve extend sets a new expiry counted from now; extensions are capped relative to the stack's creation time, and a request past the cap returns 422 with the latest possible expiry.
  • The per-IP cap counts unclaimed stacks whose status is building or live. Expired, failed, deleted and claimed stacks don't count. Over the cap, creates return 429 N unclaimed stacks are already running from your network (limit 3); destroy or claim one first.
  • Claimed stacks and stacks created with an API key have no TTL and don't count toward the per-IP cap.

Rate limits#

WhatLimitKey
Anonymous POST /v0/stacks30 per hourclient IP
POST /v0/claim10 per minuteclient IP
Password forms: sign-in, sign-up and the claim form10 per minute, shared across the threeclient IP

Over a limit, the server returns 429 with {"detail": "too many requests; slow down and retry in a minute"} and a Retry-After header set to the window length: 3600 for creates, 60 for the others. Creates with an API key are not rate limited. The windows are sliding.

Stack size#

LimitValue
Services per stack4
Upload size (the compressed archive)50 MB
Service name20 characters, [a-z][a-z0-9]*

The service limit applies to every stack, claimed or not. A larger upload returns 413. There is no limit on disk use, memory or CPU per service: see Security model.

Timeouts#

LimitValue
Each build command (install, build)600 s
?wait=true on the API90 s; poll again if the stack is still building
Health check after start60 s
Proxied request to a service60 s, 5 s to connect
Webhook delivery attempt5 s
Builds running at the same time, server-wide4

The build timeout applies to each command separately, not to the whole build. When ?wait=true runs out, the response returns the stack as it is, usually still building.

Logs and events#

LimitValue
Runtime log per service5 MB, then rotated to <service>.run.log.1. One rotated copy is kept. The API and CLI read only the current file.
Build log per serviceOverwritten by every build; only the latest build's log exists.
Log lines returnedtail per service: default 200 from the API and MCP, 100 from the CLI.
Events per request200. Page with after.
Error texterror and deploy_error keep the last 4,000 characters; event payloads the last 1,000.

Logs are deleted with the stack. Event rows stay in the server's database, but a deleted stack's events can no longer be read through the API.

Crash loops#

While a stack is live, the supervisor checks its processes about every 2 seconds. A process that exited is restarted after a backoff of 1, 2, 4, 8 and 16 seconds for successive crashes (capped at 30 seconds), with a service.crashed event before and service.restarted after.

The crash count is per service, over a sliding 10-minute window. On the 6th crash within 10 minutes (more than 5), the whole stack is stopped and marked failed with an error such as api crashed 6 times in 10 min (last exit code 1); check its logs and redeploy. A failed stack serves an error page until it is redeployed. A restart that doesn't become healthy counts as another crash. The count resets after a successful deploy or restore, and when a service is restarted from the dashboard.

Retention#

  • When an unclaimed stack expires, its processes stop. Its built services, logs and every service's $DATA_DIR are kept as a snapshot for 7 days (retained_until in the stack object).
  • Claiming during that time restores the stack without a rebuild, at the same URLs and with its data.
  • When the 7 days are over, the stack is deleted with everything in it, and stack.deleted fires.
  • Only the generation being served is kept on disk. Older generations are removed after each successful deploy or rollback, so there is no way to roll back to them later.
  • Claimed stacks are kept until their owner deletes them.

Accounts#

LimitValue
Password lengthAt least 8 characters.
Dashboard session30 days.
API keys per accountOne. Rotating it invalidates the previous key.
Stuck? Your agent can read /skill.md, or connect it over MCP.