Skip to content

Ask the docs

Answers come only from these docs and are written by an AI model (Gemini), so check the linked pages. Your question is not kept. Do not include personal details or keys.

Deploy to staging on Flow, check the release and promote it to production.

Deploy the starter to Flow, test the staged version and promote it without rebuilding. To run on your own infrastructure instead, follow the self-hosting guide.

Set up the project

From the agent’s folder, sign in and set up its keys if you have not already:

Terminal
npx @flow-engineer/flow login
npx @flow-engineer/flow setup

The deploy command uses FLOW_FRAMEWORK_CLOUD_KEY. The starter’s buildAgent already accepts options.host and passes it to createAgent.

Deploy to staging

Terminal
npx @flow-engineer/flow deploy
npx @flow-engineer/flow deploy status

deploy sends the project’s .env values as secrets, builds the agent and follows the deployment to live. The default environment is staging.

Check it worked: deploy status shows the live version and the URL the host reports. Exercise a request, then inspect its log lines:

Terminal
npx @flow-engineer/flow logs --since 15m

Promote the checked version

After checking staging, promote its live version:

Terminal
npx @flow-engineer/flow deploy promote

Promotion uses the staged version without a new build. Production has its own secrets.

The starter exports an MCP server in src/mcp.ts for the host to serve beside the agent. Connect its public URL through the MCP setup.

The buildAgent contract and secrets

For a custom entry point, accept the host options and pass them as host: options.host to createAgent. Do not spread them into the agent options. Production expects the host’s durable store instead of an agent’s own database.

deploy needs package.json, package-lock.json and src/agent.ts. It uploads the project without node_modules, Git data or environment files, then sends eligible environment values separately as secrets. Use --no-secrets to skip sending them.

The deployment reference covers secret updates, flags, JSON output and exit codes.