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

# Automations

> Create and manage Automations, the containers that group the Agents and Queues of one process, with the Duvo CLI.

An Automation groups the Agents and Queues that run one process, and is what the Duvo app shows for that process. Once your team has moved to Automations, every new Agent and Queue belongs to one, and `duvo automations` is how you create and inspect them from the terminal.

> [!NOTE]
>
> On a team that hasn't moved to Automations, these commands return a 403 error: "This team hasn't moved to Automations, so it has no automations to work with." Agents and Queues on those teams stand alone and are created without `--automation-id`.

## Create an Automation

```bash theme={"dark"}
duvo automations create --name "Inbox Zero" --json
```

Creating an Automation also creates its first Agent. The `--json` response carries both IDs, `automation.id` and `first_agent_id`. Set up that first Agent rather than creating a second one.

## Create Agents and Queues inside it

Pass `--automation-id` when you create a Queue or another Agent:

```bash theme={"dark"}
duvo queues create --name "Inbox triage" --automation-id <automation-id>
duvo agents create --name "Inbox triager" --input "Triage each new email…" \
  --automation-id <automation-id>
```

| Command | Without `--automation-id` |
| - | - |
| `duvo queues create` | Returns a 409 error: "This team has moved to Automations, so a new agent or queue must be created inside one." |
| `duvo agents create` | Succeeds, and creates a new Automation named after the Agent. |

To keep a process together, pass the same `--automation-id` to every Agent and Queue in it. To add an Agent or Queue that already exists, use `add-agent` or `add-queue`.

## List and inspect Automations

```bash theme={"dark"}
duvo automations list                      # every Automation, with Agent and Queue counts
duvo automations get <automation-id>       # one Automation
duvo automations set-up-module <slug>      # a Module (e.g. ap-invoice-intake-routing) as a new Automation, mid-setup
duvo automations current <automation-id>   # the Agents, Queues, triggers and schedules it runs now
duvo automations flow <automation-id>      # how its Agents and Queues hand work to each other
duvo automations readiness <automation-id> # what still has to be set up before it runs on real work
duvo automations dashboard-data <automation-id> [--dashboard <dashboard-id>] [--range ytd] [--time-zone Europe/Prague]
```

`set-up-module` does what Set up on a Module does in the web app: it builds the Module's Agents, Queues, Policy and dashboards as a new Automation that starts mid-setup. If your team has a demo of that Module open, the command stops; pass `--convert-demo` to turn that demo into the Automation, which deletes its sample data. Run `readiness` next to see what is left to configure.

Once the Policy is answered and the setup has a file or an interview, three commands run the rest of the setup, the same as pressing each step's button in the web app. Each asks you to confirm first; pass `--yes` to skip the prompt.

```bash theme={"dark"}
duvo automations generate-process-map <automation-id>  # Duvo writes the current process map from the files, interviews and Policy
duvo automations generate-proposal <automation-id>     # approve that map; Duvo writes the automation proposal from it
duvo automations approve-proposal <automation-id>      # approve the proposal; Duvo builds the automation in an Ask Duvo conversation
```

The map and the proposal each take a few minutes and appear on their setup step; `readiness` shows when they are done. `approve-proposal` prints a link to the Ask Duvo conversation that builds the automation. Open it in your browser to read Duvo's plan and answer it there, since the CLI can't answer it: Duvo changes the Agents, Queues and dashboards only after you agree, and finishes the setup once the automation matches the proposal. Ask Duvo can run the same three steps from a chat when you ask it to.

`readiness` checks everything that can stop an Automation from running in one call: open required Policy questions, Connections with no working account or that need reconnecting, Logins and Secrets, Queues with no routing, Agents that aren't live yet, what starts it, the active revision and a pending draft, and whether it is still a demo. It lists what is broken first, then what is missing, each with the tab where it gets fixed. Ask Duvo and the Duvo MCP's `getAutomationReadiness` tool give the same answer.

`dashboard-data` prints the figures a Module's dashboards show, computed the way each dashboard computes them, with the period they cover and a link to the dashboard. `--range` is one of `today`, `yesterday`, `week`, `month`, `ytd` or `all`; without it, each dashboard's own default range is used. Days start at midnight in this machine's time zone, as they do on the dashboard in your browser; pass `--time-zone` for another zone. A dashboard that was changed since it was installed is listed as not readable, with what to do instead. Reading figures needs Queues on your team's plan.

Add `--json` to any command for machine-readable output.

## Process roles

An Automation has its own process roles, such as Operator or Executive. They decide which of its dashboards a person sees and whether they can act on its Cases. They are not team roles. Managers and above can list and assign them:

```bash theme={"dark"}
duvo automations roles <automation-id>                                       # each role, what it sees, and who holds it
duvo automations add-member <automation-id> --email jana@acme.com --role operator
```

`add-member` takes the role's key from `roles`. Someone with a Duvo account gets the role at once and an email; anyone else gets an invitation and the role when they accept. It asks before sending; pass `--yes` to skip the question in a script. Someone who already holds another role on the Automation keeps it; change a role on the Automation's People tab. If your organization requires SSO, someone who already has a Duvo account is added from the People tab instead: the CLI says so rather than adding them.

## Change an Automation

```bash theme={"dark"}
duvo automations rename <automation-id> --name "Inbox Zero (EU)"
duvo automations duplicate <automation-id>                 # "clone" is an alias
duvo automations add-agent <automation-id> <agent-id>
duvo automations add-queue <automation-id> <queue-id>
duvo automations remove-agent <automation-id> <agent-id>   # deletes the Agent
duvo automations remove-queue <automation-id> <queue-id>   # deletes the Queue
duvo automations delete <automation-id>                    # prompts for confirmation
```

`duplicate` creates "Copy of \<name>" with the live Agents, Queues and routing. Your own triggers and schedules are copied switched off; Cases and Run history are not copied.

> [!WARNING]
>
> `remove-agent` and `remove-queue` delete the Agent or Queue, not only its membership. `delete` stops the Automation's Agents and Queues from dispatching. All three prompt for confirmation; pass `--yes` to skip the prompt in scripts.

## Recommended build order

When you build a process from the CLI, each step depends on the one before it:

1. **Connections.** Check `duvo connections list --type <slug>` for every service the Agents use, and connect what is missing. See [Managing Connections](https://docs.duvo.ai/cli/managing-connections.md).
2. **Automation.** `duvo automations create --name <name> --json`.
3. **Queues.** `duvo queues create --automation-id <automation-id>`, then a Case schema and labels. See [Cases and Queues](https://docs.duvo.ai/cli/cases-and-queues.md#case-schemas).
4. **Agents.** Create the remaining Agents with `--automation-id`, attach their integrations, pin a Connection to every slot that needs one, and link them to their Queues with `duvo queues link-agent`. Pass `--enable-trigger` when you link a consumer; without it, its Case trigger starts switched off.
5. **Policy.** Answer the questions the Agents read. See [Policy](https://docs.duvo.ai/cli/policy.md).
6. **Case triggers on.** Run `duvo agents case-triggers list <agent-id> --json` for each consumer and check that `enabled` is `true`. If it is `false` and `pending_change` is set, your team saves Automation changes to a draft, and the trigger only switches on when someone clicks **Make active** in the Automation's header in the Duvo app. Until then, a test Case stays Pending.
7. **Test Run.** `duvo runs start --agent <agent-id>`, or add one test Case to the Queue, and check the result.
8. **Schedule, created paused.** Create it with `--disabled` and an explicit timezone, then turn it on once the test Run is right:

```bash theme={"dark"}
duvo agents schedules create <agent-id> --frequency workday --time 07:30 \
  --timezone Europe/Prague --disabled
duvo agents schedules update <agent-id> <schedule-id> --enable
```

Approval requests from a scheduled Run go to the person who created the schedule. See [When to Ask a Human](https://docs.duvo.ai/best-practices/when-to-ask-a-human.md).

## Related

> [card] [Policy](https://docs.duvo.ai/cli/policy.md)
>
> The typed setup answers an Automation's Agents read at run time.

> [card] [Cases and Queues](https://docs.duvo.ai/cli/cases-and-queues.md)
>
> Case schemas, Case search, and Queue labels.


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