Skip to content

Go to the docs contents

Your first deployment

Your agent handles the deployment from start to finish. It connects while, writes while.yaml, sends your code, and gives you your app’s address.

Updated November 3, 2026.

View as Markdown

Prerequisites

  • An app in Node.js, Python or Go, or with its Dockerfile.
  • An AI agent: Claude Code, Codex, Cursor or Gemini CLI in a terminal, or a conversation with Claude, ChatGPT or Mistral Vibe.

Step 1: Give your agent these instructions

In a terminal, open your agent in your app’s folder. In a conversation, your agent takes the code from the conversation. Then give it these instructions:

Instructions
Read while.sh/agents and help me get started with while.

Without an account, your agent deploys your app as a trial. With your account, it connects while’s MCP server, https://app.while.sh/mcp. On the first call, a page opens in your browser: there you authorize while, and you choose the app your agent works on.

Step 2: Your agent prepares the deployment

Your agent reads while’s catalog: what your app must follow, and the building blocks it can declare. It then writes while.yaml at the root of your app:

while.yaml
apiVersion: while/v1
project: mon-appli
services:
  - name: web
    port: 3000
    health: { path: /health }

Your app listens on the port given by the PORT variable, and answers on its health path as soon as it can serve. The other rules are in What your app must follow.

Step 3: Your agent sends the code

With a terminal, your agent sends the archive of your sources with a curl command, or pushes to the project’s git repository at while. In a conversation, it writes the files with while’s tools.

while then builds your app’s image and runs your tests. The new version gets its first visitors once it answers on its health path.

Step 4: Open your app

Your agent gives you your app’s address, for example https://mon-appli.while.cloud, over HTTPS.

When something breaks

A failing test stops the deployment, and your agent reads the error. A version that doesn’t answer on its health path never gets traffic, and the previous one stays live. Your agent reads the logs, fixes the problem and deploys again.

Next steps

Give your AI the message, and it takes care of the rest

Give this to your AI

Read while.sh/agents and help me get started with while.

Copy the message

In 3 minutes, with no sign-up, the tool has its own address. To keep it, create your account.

For a company project, write to the while team: hello@while.sh