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

# Starting Runs (CLI)

> Start Runs, check status, stream messages, respond to human-in-the-loop requests, and stop active Runs with the Duvo CLI.

A Run is one execution of an Agent. Use `duvo runs` to start Runs, check status, stream messages, respond to human-in-the-loop requests, and stop active Runs.

## Starting and inspecting Runs

```bash theme={"dark"}
duvo runs start --agent <agent-id>             # start a Run
duvo runs list --agent <agent-id>               # list Runs for an Agent
duvo runs get <run-id>                         # get Run status
duvo runs messages <run-id>                    # list conversation messages
duvo runs stop <run-id>                        # stop a running Run
```

For teams using Automations, use `--automation <automation-id>` to list only Runs whose Agent belongs to that automation.

```bash theme={"dark"}
duvo runs list --automation <automation-id>
```

Use `--since` and `--until` to list Runs that completed in a fixed window. The `--since` bound is inclusive, and the `--until` bound is exclusive.

```bash theme={"dark"}
duvo runs list --agent <agent-id> \
  --since 2026-08-01T00:00:00Z \
  --until 2026-08-02T00:00:00Z
```

<Tip>
  Add `--json` to any command for machine-readable output suitable for scripting.
</Tip>

Add `--count-only` when you need the matching total without Run rows. All Run filters still apply.

```bash theme={"dark"}
duvo runs list --agent <agent-id> --status completed --count-only
# Total Runs: 42
```

## Streaming a Run live

Add `--follow` to watch messages stream in real time instead of polling `duvo runs get`. It works two ways:

```bash theme={"dark"}
duvo runs start --agent <agent-id> --follow    # start a Run and stream its messages
duvo runs messages <run-id> --follow           # attach to a running Run and follow new messages
```

<Note>
  `--follow` keeps printing new messages until the Run completes, then exits.
</Note>

## Mid-run interaction

Send a message to a Run in progress (for example, to add clarifying instructions):

```bash theme={"dark"}
duvo runs send-message <run-id> \
  --message "Please also check the backup."
```

## Responding to human-in-the-loop requests

When an Agent pauses to ask a human a question or request approval, you can respond from the CLI:

```bash theme={"dark"}
duvo runs respond <run-id> --approve                  # approve a human request
duvo runs respond <run-id> --deny                     # deny a human request
duvo runs respond <run-id> \
  --answer "<question-id>=<answer-text>"             # answer a pending question
```

<Note>
  The `--answer` flag takes a `<question-id>=<answer-text>` pair. Find the `<question-id>` by running `duvo runs messages <run-id>` and looking at the pending human request.
</Note>

## Scripting examples

### Start a Run and wait for it to finish

```bash theme={"dark"}
RUN_ID=$(duvo runs start --agent "$AGENT_ID" --json | jq -r '.run.id')

while true; do
  STATUS=$(duvo runs get "$RUN_ID" --json | jq -r '.run.status')
  case "$STATUS" in
    completed|failed|stopped) break ;;
  esac
  sleep 5
done

echo "Run $RUN_ID finished with status: $STATUS"
```

### Auto-approve any pending human requests on a Run

Useful in trusted batch pipelines where every approval is expected to pass:

```bash theme={"dark"}
duvo runs messages "$RUN_ID" --json \
  | jq -r '.messages[] | select(.type=="human_request" and .status=="pending") | .id' \
  | xargs -I {} duvo runs respond "$RUN_ID" --approve
```

### Forward Run output to a script

```bash theme={"dark"}
duvo runs messages "$RUN_ID" --json \
  | jq -r '.messages[] | select(.role=="assistant") | .content' \
  > run-output.log
```

## Related

<CardGroup cols={2}>
  <Card title="Managing Agents" href="/cli/managing-assignments">
    List and configure the Agents you can start
  </Card>

  <Card title="Cases and Queues" href="/cli/cases-and-queues">
    When Runs are kicked off by Cases on a Queue
  </Card>
</CardGroup>


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