> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/send_message.md).

# Conductor Send Message

Sends a prompt to a Conductor agent session and, by default, waits for the agent to finish and returns its reply. Requires your own Conductor API key, created at [app.conductor.build/users/api-keys](https://app.conductor.build/users/api-keys) and added through AutoGPT’s credentials UI. Select that credential for each Conductor block; no server-wide default key is used.

## Conductor Send Message

### What it is

Send a prompt to a Conductor agent session and, by default, wait for the agent to finish and return its reply.

### How it works

The block posts `{message}` to `POST /v0/sessions/{id}/messages` and returns the receipt (`message_id`, `state` queued or sent, `deep_link`). With `wait_for_reply` (the default) it then polls every `poll_interval_seconds`: each poll reads the transcript rows that arrived since the previous one and then `GET /v0/sessions/{id}/status`, so the status is never older than the rows it is judged against. The receipt ID is the prompt's `content.id` in the transcript, not its row ID, and the API only accepts row IDs as `after` cursors; the block looks for that row among the newest 300 rows, then in up to 1000 older rows, and otherwise resolves the turn from agent rows tagged with the receipt as their `turnId`, reporting the omitted history through `truncated`. Either way it returns the prompt row's ID as `next_after`, ready to pass to Get Session's `after` (without `wait_for_reply` it checks the newest rows once; while the prompt is still queued and has no row, `next_after` is the receipt itself, which Get Session also resolves). It finishes when the session reports `error`, or `idle` after the turn has progressed past its startup events (Claude `system`/`command_lifecycle`, Codex `thread.started`/`turn.started`), reading the transcript once more for rows written just before the status changed; a session that is idle because the prompt is still queued, or has only launched the agent, is not treated as finished. `reply` joins the visible agent text of the turn (Claude `assistant` text, completed Codex `agentMessage` items); `messages` has the raw rows of the turn, newest kept when a turn exceeds 1000 rows (`truncated` is set). `timeout_seconds` is a wall-clock bound: sleeps and requests are capped by it, nothing is requested once it has elapsed, and when it elapses `timed_out` is set and whatever arrived so far is returned. The block's own execution cap is two hours, so `timeout_seconds` is limited to that.

### Inputs

| Input                   | Description                                       | Type | Required |
| ----------------------- | ------------------------------------------------- | ---- | -------- |
| session\_id             | Session to send the prompt to                     | str  | Yes      |
| message                 | Prompt for the agent                              | str  | Yes      |
| wait\_for\_reply        | Wait until the agent is idle and return its reply | bool | No       |
| timeout\_seconds        | How long to wait for the reply                    | int  | No       |
| poll\_interval\_seconds | Seconds between status checks while waiting       | int  | No       |

### Outputs

| Output          | Description                                                                                                                                                                                  | Type                   |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| error           | Error message if the operation failed                                                                                                                                                        | str                    |
| message\_id     | ID of the sent prompt                                                                                                                                                                        | str                    |
| state           | queued or sent                                                                                                                                                                               | str                    |
| deep\_link      | Link that opens the message                                                                                                                                                                  | str                    |
| next\_after     | Transcript row ID of the prompt's row; pass it as `after` to Get Session to read the agent's turn. Falls back to message\_id while the prompt has no row yet, which Get Session also accepts | str                    |
| session\_status | idle, working or error once waiting finished                                                                                                                                                 | str                    |
| reply           | Text the agent produced in response                                                                                                                                                          | str                    |
| messages        | Raw transcript messages after the prompt                                                                                                                                                     | List\[Dict\[str, Any]] |
| timed\_out      | True when the wait ended before the agent went idle                                                                                                                                          | bool                   |
| truncated       | True when the turn produced more messages than are kept; messages holds the newest ones and reply may be incomplete                                                                          | bool                   |
| error\_message  | Session error, if any                                                                                                                                                                        | str                    |

### Possible use case

**Conversational driver**: Let AutoPilot steer a coding agent turn by turn: send a prompt, read `reply`, decide the next instruction.

**Fire and forget**: Turn `wait_for_reply` off to queue several prompts and check back later with Get Session.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://agpt.co/docs/integrations/block-integrations/send_message.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
