# Agent Session Update Tool

`agent_session_update` renames a session, changes its colour (the colour its dew and chat bubbles are drawn in), or both.

## When to Use

A session is one conversation of an agent role, and its title is the name a person knows that conversation by. A session takes a name it is given by setting its own title: omit `session_id` and state `title`. `agent_update` renames the role for every session of it, and is not how a session names itself.

Every session is given a colour when it opens, one none of its agent's other live sessions has while any is free. Change it when a person asks, or when two sessions worked with side by side are hard to tell apart.

A stated title is an assigned name, so the session is no longer named from its messages.

## Parameters

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `session_id` | string | no | Session id from `session_list` or `agent_session_create`. Omitted, the calling session; required for a caller that is not a session |
| `title` | string | no | The session's new name. Surrounding whitespace is trimmed; not blank |
| `color` | `ruby` \| `amber` \| `forest` \| `emerald` \| `teal` \| `sapphire` \| `amethyst` \| `lotus` \| `tangerine` \| `white` | no | The session's new colour |

At least one of `title` and `color` is required.

## Returns

| Field | Type | Description |
|-------|------|-------------|
| `session_id` | string | The session that changed |
| `title` | string | Its title as now stored |
| `color` | string | Its colour as now stored |

## Errors

- No `session_id` from a caller that is not a session: refused, naming `session_id` as required.
- Neither `title` nor `color`: refused, as there is nothing to change.
- A `title` that is blank once trimmed: refused with "A session title cannot be blank".
- A session id that does not exist in the workspace: "Session not found: <id>".
