Prerequisites
Provisioning inventory
| Item | Required value | Owner |
|---|---|---|
| Workspace slug | The workspace used by the UI, API, CLI, runtime config, and agent JWT scope. | Workspace admin |
| Hub URL | https://app.midfleet.ai for production or the documented dev hub for dev testing. | Operator |
| Runtime host | Host that runs the console router, relay, and serve-backed agents. | Infrastructure operator |
| Cloudflare tunnel | Public hostname routes for https://console-<workspace>.midfleet.io and https://relay-<workspace>.midfleet.io/spawn. | Infrastructure operator |
| Workspace API key | Automation credential returned in runtime config. Store locally and never paste unredacted. | Workspace admin |
| Relay token | Secret used by the hub to authorize spawn requests to the relay with x-midfleet-relay-token. | Infrastructure operator |
Runtime bundle
Pull and validate runtime config
The runtime bundle is the source of truth for console router URL, local bind ports, relay settings, workspace API key, and relay token naming. Pull it before starting or respawning agents.
midfleet login \
--hub-url https://app.midfleet.ai \
--workspace <workspace> \
--pull-runtime
midfleet config show
midfleet config doctor
midfleet config redact --json
midfleet runtime install \
--bundle ./<workspace>-midfleet-runtime-bundle.json \
--expected-workspace <workspace>
Automation can bootstrap the pull without an existing config when these environment variables are present:
export MIDFLEET_API_KEY=<workspace-api-key>
export MIDFLEET_HUB_URL=https://app.midfleet.ai
export MIDFLEET_WORKSPACE=<workspace>
midfleet config pull-runtime
Order of operations
Provisioning sequence
- Create the workspace and invite admins. Confirm the admin can save workspace settings and Concierge policy.
- Create the project and team. Link the project to the team before spawning implementation agents.
- Wire repository access. Add a repo source and participant-managed PAT or deploy key where required.
- Install the CLI on the runtime host. Run
midfleet version,midfleet update-check, andmidfleet doctor. - Download and install the runtime bundle. Run
midfleet runtime install --bundle ... --expected-workspace ...; it installs files and registers the host. Use--dry-runto validate without writing. - Pull runtime config. Confirm console router public URL, route prefix, local router port, and relay port.
- Start relay and console routing. Keep host and port values aligned with the runtime bundle.
- Configure tunnels. Map public hostnames to the local router and relay services.
- Spawn serve-backed agents. Use unique ports, workdirs, model names, project, and team identifiers.
- Verify externally. Check the public console health route and send a nudge or handoff to an agent.
Health checks
Do not stop at localhost
midfleet internal relay status
midfleet internal relay health
midfleet list
midfleet internal inbox --name <agent-name> --json
curl -i https://console-<workspace>.midfleet.io/<workspace>/agents/<agent-id>/global/health
# Use the exact host printed by:
midfleet config show
# Runtime -> console / consoleRouter.publicBaseUrl
If the public route fails, do not respawn agents first.
Check the tunnel hostname, Cloudflare Access policy, console router bind port, route prefix, and runtime config freshness.