> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rerun.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Messages and runs

> Talk to a coworker, then read what it actually did.

A run is one execution of a coworker. These three tools are how you test a coworker without first inventing a routine for it, and how you find out why the answer was not what you expected.

## send\_message

Talks to a coworker and waits for its answer.

**agentId** `string` *required*

**message** `string` *required*

**sessionId** `string`

Continue an earlier conversation. Omit to start a new one.

**waitSeconds** `number`

How long to wait for the answer. Default `120`, maximum `600`.

If the coworker is still working when the wait runs out, the call returns `status: "running"` with a `runId`, a `note`, and the run carries on in the background. Poll `get_run` for the result.

```json Response theme={"system"}
{
  "runId": "…",
  "status": "done",
  "sessionId": "…",
  "provider": "anthropic",
  "model": "claude-sonnet-5",
  "trigger": "api",
  "steps": 7,
  "inputTokens": 18422,
  "outputTokens": 913,
  "totalTokens": 19335,
  "costUsd": 0.0741,
  "startedAt": "2026-08-15T09:12:04.000Z",
  "finishedAt": "2026-08-15T09:12:41.000Z",
  "error": null,
  "output": "Done. I added 14 rows to the leads table and flagged 3 duplicates."
}
```

> [!NOTE]
>
> A coworker can pause mid-run to ask you something or request an approval. When that happens the run finishes with the question waiting in the app, and `output` carries the coworker last message. See [Human in the loop](https://docs.rerun.build/agents/human-in-the-loop.md).

## list\_runs

Recent executions of a coworker, newest first.

**agentId** `string` *required*

**limit** `number`

Default `20`, maximum `200`.

Each run carries the same fields as the response above, without `output`. Use it to see whether a scheduled task or a webhook actually did anything.

The `trigger` field tells you where the run came from: `chat`, `api`, `schedule:<slug>` or `trigger:<slug>`.

## get\_run

One execution: its status, output, error, token usage and cost.

**agentId** `string` *required*

**runId** `string` *required*

**includeToolCalls** `boolean`

Also return every tool the coworker called, with its input and its result. Each `input` and `result` keeps its first 2,000 characters; a longer one ends with `… [truncated] N more chars elided to save context`, and the full payload is not available over the API.

```json Response with includeToolCalls theme={"system"}
{
  "runId": "…",
  "status": "error",
  "error": "App notion is not connected",
  "output": null,
  "toolCalls": [
    {
      "step": 1,
      "tool": "memory_recall",
      "input": "{\"query\":\"weekly report format\"}",
      "result": "{\"memories\":[…]}",
      "isError": false,
      "durationMs": 82
    }
  ]
}
```

Run statuses are `running`, `done`, `error` and `cancelled`. `costUsd` is the model cost of that run, and is `null` while it is still running.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.