# uip agent input / output

> The agent tool manages an agent project's I/O schema through two sibling command groups, `uip agent input` and `uip agent output`. Both write directly to the agent project on disk (purely local — no login required), and both keep `agent.json`'s `inputSchema` / `outputSchema` in sync with the schema copies in `entry-points.json`. Run [`uip agent validate`](./uip-agent-validate.md) afterwards to confirm both files still agree.

The agent tool manages an agent project's I/O schema through two sibling command groups, `uip agent input` and `uip agent output`. Both write directly to the agent project on disk (purely local — no login required), and both keep `agent.json`'s `inputSchema` / `outputSchema` in sync with the schema copies in `entry-points.json`. Run [`uip agent validate`](./uip-agent-validate.md) afterwards to confirm both files still agree.

:::note
`uip agent input` and `uip agent output` are **two separate command groups** — there is no combined `uip agent io` verb. Invoke them directly (`uip agent input add …`, `uip agent output add …`).
:::

All subcommands honor the [global options](./global-options.md) (`--output`, `--output-filter`, `--log-level`, `--log-file`). Exit codes follow the [standard contract](./exit-codes.md).

---

## uip agent input

Add and remove parameters on the agent's **input** schema.

### Synopsis

```
uip agent input add    <name> --type <type> [--description <text>] [--path <dir>]
uip agent input remove <name>                                      [--path <dir>]
```

### uip agent input add

Add an input parameter.

#### Arguments

- `<name>` *(required)* — Parameter name. Becomes a key in `inputSchema.properties`.

#### Options

| Flag | Default | Required | Purpose |
|---|---|---|---|
| `--type <type>` | — | yes | JSON Schema type. One of: `string`, `number`, `boolean`, `object`, `array`. |
| `--description <desc>` | — | | Human-readable description, written into the property's `description`. |
| `--path <path>` | `.` | | Path to the agent project directory. |

#### Example

```bash
uip agent input add email \
  --type string \
  --description "User email" \
  --path ./my-agent
```

#### Data shape (`--output json`)

```json
{
  "Code": "AgentInputAdd",
  "Data": {
    "Status": "Input added",
    "Name": "email",
    "Type": "string"
  }
}
```

### uip agent input remove

Remove an input parameter.

#### Arguments

- `<name>` *(required)* — Parameter name.

#### Options

| Flag | Default | Purpose |
|---|---|---|
| `--path <path>` | `.` | Path to the agent project directory. |

#### Example

```bash
uip agent input remove email --path ./my-agent
```

#### Data shape (`--output json`)

```json
{
  "Code": "AgentInputRemove",
  "Data": {
    "Status": "Input removed",
    "Name": "email"
  }
}
```

A missing input fails with `Input "<name>" not found` and exit code `1`.

---

## uip agent output

Add and remove fields on the agent's **output** schema.

### Synopsis

```
uip agent output add    <name> --type <type> [--description <text>] [--path <dir>]
uip agent output remove <name>                                      [--path <dir>]
```

### uip agent output add

Add an output field.

#### Arguments

- `<name>` *(required)* — Field name. Becomes a key in `outputSchema.properties`.

#### Options

| Flag | Default | Required | Purpose |
|---|---|---|---|
| `--type <type>` | — | yes | JSON Schema type. One of: `string`, `number`, `boolean`, `object`, `array`. |
| `--description <desc>` | — | | Human-readable description. |
| `--path <path>` | `.` | | Path to the agent project directory. |

#### Example

```bash
uip agent output add summary \
  --type string \
  --description "Result summary" \
  --path ./my-agent
```

#### Data shape (`--output json`)

```json
{
  "Code": "AgentOutputAdd",
  "Data": {
    "Status": "Output added",
    "Name": "summary",
    "Type": "string"
  }
}
```

### uip agent output remove

Remove an output field.

#### Arguments

- `<name>` *(required)* — Field name.

#### Options

| Flag | Default | Purpose |
|---|---|---|
| `--path <path>` | `.` | Path to the agent project directory. |

#### Example

```bash
uip agent output remove summary --path ./my-agent
```

#### Data shape (`--output json`)

```json
{
  "Code": "AgentOutputRemove",
  "Data": {
    "Status": "Output removed",
    "Name": "summary"
  }
}
```

A missing output fails with `Output "<name>" not found` and exit code `1`.

---

## Related

- [`uip agent validate`](./uip-agent-validate.md) — verifies that `inputSchema` / `outputSchema` in `agent.json` match the schemas in `entry-points.json`. Run after any batch edit.
- [`uip agent config`](./uip-agent-config.md) — read / write other `agent.json` keys that are not I/O schema fields.
- [`uip agent tool`](./uip-agent-tool-manage.md), [`uip agent context`](./uip-agent-context-manage.md), [`uip agent escalation`](./uip-agent-escalation-manage.md) — resource-kind management siblings.

## See also

- [Global options](./global-options.md), [Exit codes](./exit-codes.md).
