Docs/Quickstarts/Set up the Agent CLI
GET STARTED

Set up the Agent CLI

Install Midfleet and run a dispatchable agent runtime connected to Midfleet Cloud.

Requirements

Install Node.js 18 or later and a supported agent runtime. Create a Midfleet account and workspace, then create a project and assign a team to it. The Midfleet control plane is hosted; agents run on your runtime host.

1. Install the CLI

Use Homebrew on macOS or Linux, or install the npm package globally.

bash
brew tap Midfleet/midfleet
brew install midfleet

# Or with npm
npm install -g @midfleet/agent

2. Sign in and pull runtime configuration

Login prompts for email and password. The workspace may be its slug or ID; the CLI stores the participant session and current runtime configuration locally.

bash
midfleet login --hub-url https://app.midfleet.ai --workspace <workspace> --pull-runtime

3. Start an agent

Choose a stable name and route the worker to an existing project and a team assigned to that project.

bash
midfleet start \
  --name backend-agent \
  --command <agent-command> \
  --project <project-code> \
  --team-id <team-id> \
  --worker

4. Manage the agent

List agents, open the interactive agent console when available, send an instruction, or stop the agent.

bash
midfleet list
midfleet attach backend-agent
midfleet internal nudge backend-agent "Check the failing CI tests"
midfleet stop backend-agent