> ## 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.

# Policy

> Read, add, and answer an Automation's Policy questions with the Duvo CLI, and reference them from an Agent's AOP.

An Automation's Policy is its list of setup questions and their typed answers: an approval threshold, a mailbox, a list of senders who always get a reply, a routing table. A person can change an answer without editing any AOP, and the next Run uses the new value. Put the values your team expects to tune in Policy, and keep the AOP for the steps.

Policy belongs to an [Automation](/cli/automations), so these commands work on teams that have moved to Automations.

## See the Policy

```bash theme={"dark"}
duvo automations config-fields <automation-id>                    # every question, its answer, and setup progress
duvo automations config-fields <automation-id> --unfilled         # only questions with no answer yet
duvo automations config-fields <automation-id> --include-hidden   # include hidden questions, marked hidden
```

Add `--json` to get each field's ID, key, type, and current value.

## Add a question

```bash theme={"dark"}
duvo automations add-config-field <automation-id> \
  --label "VIP senders" \
  --question "Whose email always needs a reply the same day?" \
  --type list \
  --section "Triage rules"
```

The field's key is its label in lowercase with underscores (`VIP senders` becomes `vip_senders`), with a number appended if that key is taken. The output prints the new field's ID and key.

| Flag | Description |
| - | - |
| `--label` | Required. Short name shown as the row heading |
| `--question` | Required. The question asked during setup |
| `--type` | Required. One of `freeText`, `identifier`, `number`, `select`, `multiSelect`, `list`, `orderedList`, `personList`, `table` |
| `--section` | Section to add the question to |
| `--option` | A choice for a `select` or `multiSelect` field. Repeat for each |
| `--column` | A column of a `table` field. Repeat for each, in order |
| `--fill-mode` | `interview` (can be assigned to a Clarity config interview) or `setup` (read off your own documents) |
| `--binding` | `context` (a judgment an Agent applies, the default) or `tool` (Connection configuration). Repeatable |

`--binding` records how the answer is meant to be used. It doesn't limit which Runs receive it.

## Answer a question

```bash theme={"dark"}
duvo automations set-config-field <automation-id> <field-id> --value 2500
duvo automations set-config-field <automation-id> <field-id> --value '["ceo@acme.com","cfo@acme.com"]'
duvo automations set-config-field <automation-id> <field-id> --clear
```

`--value` is read as JSON when it is valid JSON, and sent as plain text otherwise. `--clear` removes the answer and does not put a default back, so a Run that reads the question is refused until it is answered again. To go back to a default, set it with `--value`; `config-fields --json` shows it as `default_value` when the question has one. Each type expects this shape:

| Type | Value |
| - | - |
| `freeText`, `identifier` | A non-empty string |
| `number` | A number |
| `select` | One of the field's options |
| `multiSelect`, `list` | An array of strings |
| `orderedList` | An array of strings, each listed once |
| `personList` | An array of objects, each with a `name`, `userId`, or `email` |
| `table` | An array of row objects keyed by column name |

## How an Agent reads Policy

Reference a question in the Agent's AOP with a tag that carries its key and label:

```text theme={"dark"}
Reply the same day to anyone in <DUVO:CONFIG key="vip_senders" name="VIP senders">.
```

Saving the AOP links the question to that Agent's Revision. When a Run starts, it receives the current answer to every linked question in a block appended to its instructions, so the AOP never needs to hold the value itself.

<Warning>
  A Run is refused while a question it reads has no answer: "This step reads 1 Policy question that nobody has answered: vip\_senders. Answer them, or stop reading them in Setup." Answer the question before testing.
</Warning>

<Note>
  Agents read Policy but can't change it. Answers change on the Automation's Policy screen, with `set-config-field`, or through Ask Duvo when you tell it to. If an Agent needs to keep rules it learns while it runs, store them in a file or in the Agent's memory instead.
</Note>

## Edit, hide, and organize questions

```bash theme={"dark"}
duvo automations edit-config-field <automation-id> <field-id> \
  --question "Whose email needs a reply within two hours?"     # the answer is kept
duvo automations hide-config-field <automation-id> <field-id>     # hide from the Policy screen, interviews and Agents
duvo automations restore-config-field <automation-id> <field-id>  # show it again, with its answer

duvo automations config-sections list <automation-id>
duvo automations config-sections add <automation-id> --name "Escalation" [--after <section-key>]
duvo automations config-sections rename <automation-id> <section-key> --name "Escalations"
duvo automations config-sections reorder <automation-id> <section-key> <section-key> …   # list every section once
duvo automations config-sections remove <automation-id> <section-key>   # only an empty section a person added
```

`--option` and `--column` on `edit-config-field` replace the whole list. `--column` and `--type` only work while the field has no answer.

<Note>
  Changing an Automation's Policy needs the Builder role or above on an Automation you created, and Lead Builder or above on anyone else's.
</Note>


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