> ## Documentation Index
> Fetch the complete documentation index at: https://piloop.autoresearch.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Several campaigns

> One agent runs a campaign in each of your repos, and one daemon serves all of them.

You can run several campaigns at the same time and talk to one agent about all of them.

## One project for each repo

A campaign is a **project**, and a project is one repo with its own `piloop.toml`. To improve two repos, set up two
projects.

Several goals for one artifact, such as the accuracy and the serving cost of one model, are not several projects. They
are [tracks](/concepts/tracks) of one project.

## Set up each campaign

Set up each project as in the [Quickstart](/quickstart): open your agent, name the repo, and tell it what to improve.

```text theme={null}
Use piloop on ~/projects/search to cut the p95 latency of the query endpoint.
```

The agent runs the setup in that repo. It registers the project with `piloop init`.

One daemon serves every registered project. Only one daemon runs for each `PILOOP_HOME` (default `~/.piloop`). When
the daemon already runs, the new project needs no second one.

## Orchestrate them from one agent

Ask one agent to orchestrate every campaign:

```text theme={null}
Orchestrate all my piloop campaigns.
```

Without a project name, `piloop inbox wait` waits for every project. So one wait covers all the campaigns, and it
returns when any of them needs the orchestrator:

```bash theme={null}
PILOOP_ACTOR=orchestrator piloop inbox wait --timeout 1800
```

Each inbox item in its output names its project. The agent then decides and records each decision on the row that the
decision is about, so every decision stays with its project. When every project that it watches has stopped, the
agent reports the results and stops the loop.

Run at most one orchestrator for each campaign. If one agent orchestrates every campaign, do not start a second
orchestrator for one of them: two orchestrators answer the same escalation twice.

## See every campaign

* `piloop watch` lists every project first. Press `enter` to open one.
* `piloop status` without a name, outside a project repo, shows every project when more than one is active.
* `piloop inbox` lists the items of every project.

Each project ends by itself at the limits in its own `[stop]` table. `piloop stop` stops the daemon, so it pauses
every campaign at the same time. The projects stay active, and the next `piloop serve` continues all of them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.