# si agent

Run and resume coding agents

Source: https://slashinfra.com/docs/cli/agent
Last modified: 2026-11-30T16:36:19.000Z

Run and resume coding agents

## Usage

```bash
si agent [OPTIONS] <COMMAND>
```

## Flags

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

## si agent run

Run an agent and stream its output. The agent runs with full access inside the SVM: it edits files and runs commands without asking.

```bash
si agent run [OPTIONS] --agent <AGENT> [SVM] [-- <PROMPT>...]
```

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `svm` | `SVM` | The SVM to use; defaults to the one set with si use |  |  |
| `prompt` | `PROMPT` | The prompt, after --; a lone - reads it from standard input |  |  |

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--agent`required | `AGENT` | The coding agent: claude, codex or opencode |  |  |
| `--cwd` | `CWD` | The working directory in the SVM; the home directory by default |  |  |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

## si agent sessions

List sessions, newest first

```bash
si agent sessions [OPTIONS] [SVM]
```

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `svm` | `SVM` | The SVM to use; defaults to the one set with si use |  |  |

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--agent` | `AGENT` | Only the sessions of this agent: claude, codex or opencode |  |  |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

## si agent send

Send text to a session

```bash
si agent send [OPTIONS] [SVM] [SESSION] [-- <MESSAGE>...]
```

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `svm` | `SVM` | The SVM to use; defaults to the one set with si use |  |  |
| `session` | `SESSION` | The agent session id, as listed by si agent sessions |  |  |
| `message` | `MESSAGE` | The message, after --; a lone - reads it from standard input |  |  |

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--agent` | `AGENT` | The coding agent; by default the agent of the session |  |  |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

## si agent attach

Open a terminal in a session

```bash
si agent attach [OPTIONS] [SVM] [SESSION]
```

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `svm` | `SVM` | The SVM to use; defaults to the one set with si use |  |  |
| `session` | `SESSION` | The agent session id, as listed by si agent sessions |  |  |

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--agent` | `AGENT` | The coding agent; by default the agent of the session |  |  |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |
