# forward\_last\_turns

Send an agent's latest turns to another agent as mail, without the text passing through the caller.

writes · not idempotent · MCP tool · [Agent](https://komrad.dev/latest/api/agent.md)

Mail holds at most 10000 characters.

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.agent.v1.AgentService/ForwardLastTurns \
  -H 'Content-Type: application/json' \
  -d '{
  "from_agent_id": "<from_agent_id>",
  "to_agent_id": "<to_agent_id>"
}'
```

```bash
komrad rpc forward-last-turns \
  --from-agent-id '<uuid>' \
  --to-agent-id '<uuid>'
```

```json
{
  "name": "forward_last_turns",
  "arguments": {
    "from_agent_id": "<from_agent_id>",
    "to_agent_id": "<to_agent_id>"
  }
}
```

Offered by the komrad MCP server to writer, reviewer, orchestrator agents.

## Request

### ForwardLastTurnsRequest

| Field | Type | Description |
| --- | --- | --- |
| [`from_agent_id`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsRequest-from_agent_id) | uuid\* | The agent whose newest turns to forward, by id. |
| [`to_agent_id`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsRequest-to_agent_id) | uuid\* | The agent to forward them to, by id. |
| [`turns`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsRequest-turns) | int32 between 1 and 20 | How many of the newest agent turns to forward, with the prompts between them. Unset forwards the last turn only. |
| [`note`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsRequest-note) | string not empty at most 10000 characters | A note to the recipient, which comes before the turns. |
| [`max_bytes`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsRequest-max_bytes) | int32 at least 0 | The most bytes to forward for each turn. A longer turn loses its start, so its end stays. Unset uses the default. |

## Response

### ForwardLastTurnsResponse

| Field | Type | Description |
| --- | --- | --- |
| [`mail_id`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsResponse-mail_id) | uuid\* | The id of the mail sent. Pass it as `reply_to` to answer. |
| [`to_agent_id`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsResponse-to_agent_id) | uuid\* | The id of the agent the mail is for. |
| [`created_at`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsResponse-created_at) | timestamp | When the mail was sent. |
| [`turns`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsResponse-turns) | int32 | How many turns the mail carries, prompts included. |
| [`characters`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsResponse-characters) | int32 | How many characters the mail's text runs to. |
| [`warning`](https://komrad.dev/latest/api/agent/forward-last-turns.md#komrad-agent-v1-ForwardLastTurnsResponse-warning) | string | Why the recipient will not read the mail soon. Unset when the recipient is running. |
