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

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 get <run-id>                         # get Run status
duvo runs messages <run-id>                    # list conversation messages
duvo runs stop <run-id>                        # stop a running Run
```

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

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

`--follow` keeps printing new messages until the Run completes, then exits.

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

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.

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

* [Managing Agents](/cli/managing-assignments) — list and configure the Agents you can start
* [Cases and Queues](/cli/cases-and-queues) — when Runs are kicked off by Cases on a Queue
