# Install

> Install the convoy CLI and the convoyd server, set a provider key, and start the server.

Convoy ships as two Go binaries. `convoy` is the CLI. `convoyd` is the server that holds every swarm. `convoyd` carries a third piece, the Python runner `convoy-runner`, which is the process it starts for each agent.

## Requirements

| Requirement | Needed for |
| --- | --- |
| macOS or Linux, on arm64 or x86_64 | The release binaries, and the copy of Claude Code that the Claude Agent SDK brings |
| Go 1.25 or newer | Only when building `convoy` and `convoyd` from source |
| [`uv`](https://docs.astral.sh/uv/), on convoyd's `PATH` | The runner. convoyd carries the Python runner inside its binary and starts it through `uv`, which fetches Python 3.12 and the agent SDKs the first time. Driver plugins written in Python start the same way |
| `git`, on convoyd's `PATH` | Swarms that use a [provider type](/docs/providers/) from a repository. convoyd fetches types with it |
| A provider API key | Every provider you declare, set in `convoyd`'s environment |

You do not install Python, the agent SDKs, or Claude Code yourself. The Claude Agent SDK brings its own copy of Claude Code on macOS and Linux.

## Install the binaries

The install script downloads the latest release for your platform, checks its checksum, and puts `convoy` and `convoyd` in `~/.local/bin`:

```sh
curl -fsSL https://raw.githubusercontent.com/convoyharness/convoy/main/install.sh | sh
```

`CONVOY_INSTALL_DIR` chooses another folder, and `CONVOY_VERSION` a release other than the latest, such as `v0.1.0`. The archives themselves are on the [releases page](https://github.com/convoyharness/convoy/releases), one per platform, with a `checksums.txt`.

With Go, build both from source instead:

```sh
go install github.com/convoyharness/convoy/cmd/convoy@latest github.com/convoyharness/convoy/cmd/convoyd@latest
```

From a checkout, build them in place:

```sh
go build -o bin/ ./cmd/convoy ./cmd/convoyd
```

Both are single executables. `convoy version` and `convoyd --version` print the release they were built from.

`convoy` never holds state. It reads the files in the current folder or calls the `convoyd` API, and exits. `convoyd` is the only long-running process.

## The runner comes with convoyd

There is no runner to install. The Python runner, `convoy-runner`, is inside the `convoyd` binary. The first time `convoyd` starts, it unpacks the runner into your user cache folder (`~/Library/Caches/convoy/runner` on macOS, `~/.cache/convoy/runner` on Linux) and has `uv` build its environment: Python 3.12, `claude-agent-sdk`, and `openai-agents`.

```console
$ convoyd
09:06:24 INFO  preparing the built-in runner: the first start downloads the agent SDKs and can take a minute
09:06:38 INFO  the built-in runner is ready seconds=14
```

That first start takes about fifteen seconds on a fast connection and longer on a slow one, and leaves about 450 MB on disk, most of it the copy of Claude Code that the Claude Agent SDK brings. Later starts take under a second. `convoyd` does this before it serves, so a swarm never waits on it, and a problem with the runner stops `convoyd` at start instead of failing your first agent.

If `uv` is not on `PATH`, `convoyd` says so and exits. Install it with `curl -LsSf https://astral.sh/uv/install.sh | sh` or `brew install uv`.

To run a runner of your own instead, such as a checkout you are changing, pass `--runner /path/to/convoy-runner` or set `CONVOYD_RUNNER`. `convoyd` then runs that executable as it is, and needs no `uv`. `--runner-dir` moves the folder the built-in runner is unpacked into.

The same Python package is the SDK that [driver plugins](/docs/providers/writing/#a-driver-plugin) build on; they depend on `convoy-runner` without the agent SDKs and bring their own.

## Set provider keys

A `provider` block names an environment variable; it never contains a key. `convoyd` reads that variable from its own environment when it starts a runner and passes the value into the runner's environment. Keys are not stored in the swarm bundle or the database, and no endpoint returns them.

```sh
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
```

If a provider omits `api_key`, the SDK's default variable is used: `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`. `convoy run` is refused with `missing_env` if a declared variable is not set in `convoyd`'s environment. Set the keys in the shell that starts `convoyd`, not the shell that runs `convoy`.

## Start convoyd

```sh
convoyd
```

With no flags, `convoyd` listens on `127.0.0.1:7070`, keeps its database in `./convoy.db` and agent work folders under `./.convoy/`, and serves the [Web UI](/docs/runtime/web-ui/) at the same address. On a terminal it prints where it is listening, which runner it uses, and which provider keys it found.

| Flag | Environment | Default | Meaning |
| --- | --- | --- | --- |
| `--port` | `CONVOYD_PORT` | `7070` | Listen port |
| `--db` | `CONVOYD_DB` | `./convoy.db` | SQLite file holding specs, events and messages |
| `--work-dir` | `CONVOYD_WORK` | `./.convoy/work` | Root of agent work folders |
| `--runner` | `CONVOYD_RUNNER` | the runner inside `convoyd`, started through `uv` | A runner executable to use instead |
| `--runner-dir` | `CONVOYD_RUNNER_DIR` | `<user cache dir>/convoy/runner` | Where the built-in runner is unpacked |
| `--token` | `CONVOYD_TOKEN` | empty | Token the CLI must present. Empty means requests from loopback need none |
| `--public-url` | `CONVOYD_PUBLIC_URL` | `http://127.0.0.1:<port>` | Address runners use to reach `convoyd` |
| `--max-processes` | `CONVOYD_MAX_PROCESSES` | `50` | Most runner processes alive at once, overseers included. Extra agents wait in Pending |
| `--provider-dir` | `CONVOYD_PROVIDER_DIR` | `./.convoy/providers` | Where driver plugin packages are kept |
| `--overseer-provider` | | none | Built-in provider type for the default overseer: `claude_agent_sdk`, `openai_agents` or `openai_compatible` |
| `--overseer-model` | | none | Model for the default overseer |

A swarm's own `overseer` attribute wins over the two overseer flags. A run with neither is refused. See [the overseer](/docs/concepts/overseer/). The full server reference is on [convoyd](/docs/runtime/).

## Point the CLI at the server

The CLI talks to `http://localhost:7070` unless told otherwise. Set `CONVOY_URL`, or pass `--server` on any command.

```sh
export CONVOY_URL=http://localhost:7070
export CONVOY_TOKEN=...   # only if convoyd was started with --token
```

`--dir <path>` selects the folder of `.cvy` files; the default is the current folder.

## Next

Run a swarm in five minutes with the [quickstart](/docs/quickstart/), or write one by hand in [your first swarm](/docs/first-swarm/).
