> 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/get_session.md).

# Conductor Get Session

Reads a Conductor agent session: details, whether the agent is idle, working or errored, and recent transcript messages. 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 Get Session

### What it is

Get a Conductor agent session: its details, whether the agent is idle, working or errored, and recent transcript messages.

### How it works

The block calls `GET /v0/sessions/{id}` and `GET /v0/sessions/{id}/status`, then reads the transcript through `GET /v0/sessions/{id}/messages`. The API only pages from the start in ascending order (100 rows per request at most), so by default the block locates the end of the transcript with cheap one-row probes and returns the newest `message_limit` messages; with `after` it instead reads the next `message_limit` messages following that message, which is how to poll incrementally (`next_after` is the row ID to pass on the next call). `after` takes a transcript row ID, such as `next_after` from Send Message, Create Session, Create Workspace or a previous Get Session call; the prompt ID those blocks return as `message_id` / `initial_message_id` is a different namespace that the API rejects with 404, so when it is passed the block locates the prompt's row itself (newest 300 rows, then up to 1000 older ones) and pages from there, reporting that row ID through `next_after` when nothing follows it yet. `has_more` reports whether older (default) or newer (`after`) messages exist beyond the slice; set `message_limit` to 0 to skip the transcript. `latest_reply` is the newest message with visible agent text, so trailing tool, lifecycle or status events do not hide the answer. Live rows are `userMessage` prompts and `agent` events wrapping the harness's raw payload; only Claude `assistant` text parts and completed Codex `agentMessage` items count as visible text. Pass `message_id` to also fetch one message via `GET /v0/messages/{id}` (a transcript row ID, not a send receipt).

### Inputs

| Input          | Description                                                                                                                                                                                                                                                                                                      | Type | Required |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | -------- |
| session\_id    | Session ID                                                                                                                                                                                                                                                                                                       | str  | Yes      |
| message\_limit | How many transcript messages to return: the most recent ones, or the ones following `after` when it is set; 0 skips the transcript                                                                                                                                                                               | int  | No       |
| after          | Read forward from this message (exclusive) instead of returning the most recent messages. Accepts a transcript row ID (next\_after from a previous call or from Send Message / Create Session) or the prompt ID those blocks return as message\_id / initial\_message\_id, which is resolved to the prompt's row | str  | No       |
| message\_id    | Also fetch this single message by its transcript row ID (not a prompt ID returned by Send Message)                                                                                                                                                                                                               | str  | No       |

### Outputs

| Output         | Description                                                                                                                                     | Type                   |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| error          | Error message if the operation failed                                                                                                           | str                    |
| session        | Session: id, name, model, resolvedModel, effort, fastMode, deepLink, archivedAt                                                                 | Dict\[str, Any]        |
| status         | idle, working or error                                                                                                                          | str                    |
| error\_message | Last session error, if any                                                                                                                      | str                    |
| messages       | Transcript messages, oldest first: id, sessionIndex, type, content, receivedAt                                                                  | List\[Dict\[str, Any]] |
| latest\_reply  | Text of the newest agent message with visible text in the returned transcript slice                                                             | str                    |
| has\_more      | True when the transcript has messages beyond the returned slice: older ones by default, newer ones when after is set                            | bool                   |
| next\_after    | Transcript row ID of the last returned message (or the row `after` resolved to when nothing followed it); pass it as after to read what follows | str                    |
| message        | The single message requested by message\_id                                                                                                     | Dict\[str, Any]        |
| deep\_link     | Link that opens the session                                                                                                                     | str                    |

### Possible use case

**Poll a long task**: Check `status` on a schedule and read `latest_reply` once it turns `idle`.

**Incremental transcript**: Keep the last message id and pass it as `after` to fetch only what is new.

***


---

# 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/get_session.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.
