Docs / Get started
Quickstart
Install the CLI, deploy a two-service app, and claim it.
This walk-through installs the agentserve CLI, deploys a two-service app (a FastAPI backend plus a
React/Vite frontend) and claims it into a new account. It takes a few minutes, most of it spent on the frontend's
npm install, which runs on AgentServe, not on your machine.
You need uv to install the CLI. Nothing else: the build runs on AgentServe.
Deploy and claim#
-
Install the CLI#
uv tool install agentserve agentserve --helpThe CLI deploys to
https://agentserve.sh. You don't need an account yet. -
Deploy#
Point the CLI at a project directory. This one,
todo-app, has a FastAPIbackendand a Reactfrontend, wired together by anagentserve.yamllike the one in Multi-service stacks:agentserve deploy ./todo-appThe CLI packs the directory into a tar.gz (skipping
node_modules,.git, virtualenvs and similar), uploads it, and waits for the build. The manifest setsttl: 1h. When the stack is live you get something like:✓ todo-app stk_3f9a1c2b7d4e [live] api python-3.12 https://api-todo-app-8c1f.agentserve.sh web static https://web-todo-app-8c1f.agentserve.sh Expires in 59 min. To keep it, open: https://agentserve.sh/claim/CLM-7KQ4-XM2P-9RTWThe CLI also writes
.agentserve/stack.jsoninto the project directory. It holds the stack id and the manage token, so the nextdeployfrom that directory updates the same stack. It is git-ignored automatically; don't commit it. If the linked stack was deleted, the CLI says so and creates a new one; if it expired, the CLI stops and points at the claim URL.--newalways starts a separate stack. -
Open the URLs#
Open the
webURL in your browser and add a few todos. The frontend was built withVITE_API_URLset to theapiURL, and the API allows theweborigin throughCORS_ORIGINS; both come from${...}references in the manifest.curl https://api-todo-app-8c1f.agentserve.sh/todosThe API stores todos in SQLite under
$DATA_DIR, which survives redeploys, expiry and claiming. -
Look around with the CLI#
Point them at the project directory:
agentserve status ./todo-app agentserve logs ./todo-app --service api agentserve logs ./todo-app --build agentserve events ./todo-appstatusshows the services and the expiry,logsshows runtime logs (or build logs with--build), andeventslists what happened to the stack, such asservice.building,service.readyandstack.live. -
Claim it#
Open the claim URL. The page shows the stack, its services and how long it has left. Enter an email and a password of at least 8 characters: a new email creates an account, an existing one signs you in. Submit, and the stack is yours.
The confirmation page shows your API key once. Copy it now; it is stored only as a hash and can't be shown again (you can rotate it later from
/account). The stack no longer has a TTL, and it appears in/dashboard. -
Deploy straight into your account#
With the key in the environment, new deploys go directly into your account, with no claim code and no TTL:
export AGENTSERVE_API_KEY="as_live_..." agentserve deploy ./my-app
You don't have to wait for the TTL to run out. A claim URL works while the stack is live and for 7 days after it expires. Claiming an expired stack restores it from its snapshot at the same URLs.
Clean up#
To remove a stack and its data, run agentserve destroy ./todo-app. This deletes the
processes, the files and the credentials, and removes the local .agentserve/stack.json. For a claimed
project you can also delete it from its settings page in the dashboard.
Next#
- How it works: states, TTLs, snapshots and tokens.
- Multi-service stacks: write your own
agentserve.yaml. - Connect your agent: let Claude Code, Cursor or another agent deploy for you.