> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.islo.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.islo.dev/_mcp/server.

# Get a line run as a conversation

GET https://api.islo.dev/factory/line-runs/{run_id}/conversation

Reference: https://docs.islo.dev/api-reference/factory/get-factory-line-run-conversation

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `run_id` (string, required)

## Response

### 200

Successful Response

- `composer` (LineRunConversationComposer, required)
- `items` (list of LineRunConversationItemsItems, required)
- `version` (integer, required)
- `manager_running` (boolean, optional, default: false)
- `surfaces` (list of SurfaceOpened, optional)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### LineRunConversationComposer

- `state`: `awaiting_answer` (AwaitingAnswer)
  - `item_id` (string, required)
- `state`: `awaiting_decision` (AwaitingDecision)
  - `item_id` (string, required)
- `state`: `closed` (Closed)
- `state`: `idle` (Idle)
- `state`: `working` (Working)

### LineRunConversationItemsItems

- `kind`: `control` (ControlItem)
  - `action` (enum, required)
    - Allowed values: `stopped`, `steered`, `retried`, `cancelled`
  - `actor` (LineRunConversationItemsItemsDiscriminatorMappingControlActor, required)
  - `at` (datetime, required)
  - `id` (string, required)
  - `reason` (string, optional, nullable)
  - `target_stage` (string, optional, nullable)
- `kind`: `decision` (DecisionItem)
  - `at` (datetime, required)
  - `id` (string, required)
  - `options` (list of DecisionOption, required)
  - `stage_name` (string, required)
- `kind`: `manager_message` (ManagerMessageItem)
  - `at` (datetime, required)
  - `id` (string, required)
  - `status` (string, required)
  - `session` (SessionRef, optional, nullable) — A compute-plane agent session, addressed the way the compute API reads one.
  - `transcript` (AgentTurnRef, optional, nullable) — Public conversation pointer; archive locations stay in the control plane.
  - `transcript_summary` (AgentTranscriptSummary, optional, nullable)
- `kind`: `question` (QuestionItem)
  - `at` (datetime, required)
  - `id` (string, required)
  - `questions` (list of LineQuestion, required)
  - `answer` (string, optional, nullable)
  - `answered` (boolean, optional, default: false)
  - `answers` (map from string to QuestionItemAnswers, optional)
  - `other` (map from string to string, optional, nullable)
  - `raw_text` (string, optional, nullable)
  - `stage_name` (string, optional, nullable)
- `kind`: `stage` (StageItem)
  - `attempt` (integer, required)
  - `id` (string, required)
  - `stage_name` (string, required)
  - `status` (string, required)
  - `completed_at` (datetime, optional, nullable)
  - `started_at` (datetime, optional, nullable)
  - `steps` (list of StageItemStepsItems, optional)
- `kind`: `trigger` (TriggerItem)
  - `at` (datetime, required)
  - `id` (string, required)
  - `trigger` (TriggerInfo, required)
- `kind`: `user_message` (UserMessageItem)
  - `at` (datetime, required)
  - `channel` (enum, required)
    - Allowed values: `web`, `slack`, `api`
  - `id` (string, required)
  - `text` (string, required)
  - `recipient` (UserMessageItemRecipient, optional, nullable)
  - `reply_to_item_id` (string, optional, nullable)

### SurfaceOpened

- `label` (string, required)
- `sandbox` (CanvasSandboxRef, required)
- `stage_name` (string, required)
- `target` (SurfaceOpenedTarget, required)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### LineRunConversationItemsItemsDiscriminatorMappingControlActor

- `kind`: `manager` (ManagerActor)
  - `workflow_run_id` (string, required)
- `kind`: `user` (UserActor)
  - `display_name` (string, optional, nullable)
  - `user_id` (string, optional, nullable)

### DecisionOption

- `name` (string, required)
- `to` (string, required)
- `label` (string, optional, nullable)

### SessionRef

A compute-plane agent session, addressed the way the compute API reads one.

- `sandbox_name` (string, required)
- `agent_session_id` (string, optional, nullable)
- `agent_session_name` (string, optional, nullable)
- `region` (string, optional, nullable)

### AgentTurnRef

Public conversation pointer; archive locations stay in the control plane.

- `turn_id` (string, required)
- `archive_state` (string, optional, default: pending)
- `turn_ended_at` (datetime, optional, nullable)
- `turn_started_at` (datetime, optional, nullable)

### AgentTranscriptSummary

- `duration_ms` (integer, optional, nullable)
- `effort` (string, optional, nullable)
- `event_count` (integer, optional, nullable)
- `input_tokens` (integer, optional, nullable)
- `model` (string, optional, nullable)
- `output_tokens` (integer, optional, nullable)
- `scope` ("turn", optional, default: turn)
- `tool_call_count` (integer, optional, nullable)

### LineQuestion

- `id` (string, required)
- `kind` (enum, required)
  - Allowed values: `text`, `single_choice`, `multi_choice`
- `prompt` (string, required)
- `options` (list of QuestionOption, optional)
- `required` (boolean, optional, default: true)

### QuestionItemAnswers

- string
- list of string

### StageItemStepsItems

- `kind`: `agent` (AgentStep)
  - `id` (string, required)
  - `name` (string, required)
  - `status` (string, required)
  - `outputs` (map from string to any, optional, nullable)
  - `session` (SessionRef, optional, nullable) — A compute-plane agent session, addressed the way the compute API reads one.
  - `transcript` (AgentTurnRef, optional, nullable) — Public conversation pointer; archive locations stay in the control plane.
  - `transcript_summary` (AgentTranscriptSummary, optional, nullable)
- `kind`: `decision` (DecisionStep)
  - `id` (string, required)
  - `name` (string, required)
  - `status` (string, required)
  - `answers` (map from string to any, optional)
  - `compute_command_id` (string, optional, nullable)
  - `outputs` (map from string to StageItemStepsItemsDiscriminatorMappingDecisionOutputs, optional, nullable)
  - `questions` (map from string to map from string to any, optional)
- `kind`: `exec` (ExecStep)
  - `id` (string, required)
  - `name` (string, required)
  - `status` (string, required)
  - `compute_command_id` (string, optional, nullable)
  - `exit_code` (integer, optional, nullable)

### TriggerInfo

- `source` (string, required)
- `actor` (string, optional, nullable)
- `provider` (string, optional, nullable)

### UserMessageItemRecipient

- `kind`: `manager` (ManagerRecipient)
  - `stage_ref` (StageRef, optional, nullable)

### CanvasSandboxRef

- `name` (string, required)
- `region` (string, required)

### SurfaceOpenedTarget

- `kind`: `terminal` (TerminalSurfaceTarget)
  - `session` (string, required)
- `kind`: `web` (WebSurfaceTarget)
  - `port` (integer, required)
  - `share_id` (string, required)
  - `url` (string, required)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

### QuestionOption

- `id` (string, required)
- `label` (string, required)

### StageItemStepsItemsDiscriminatorMappingDecisionOutputs

- string
- double

### StageRef

- `stage_name` (string, required)
- `job_run_id` (string, optional, nullable)

## Examples

**Response**

```json
{
  "composer": {
    "state": "working"
  },
  "items": [
    {
      "kind": "trigger",
      "at": "2024-01-15T09:30:00Z",
      "id": "string",
      "trigger": {
        "source": "string",
        "actor": "string",
        "provider": "string"
      }
    }
  ],
  "version": 1,
  "manager_running": false,
  "surfaces": [
    {
      "label": "string",
      "sandbox": {
        "name": "string",
        "region": "string"
      },
      "stage_name": "string",
      "target": {
        "kind": "web",
        "port": 1,
        "share_id": "string",
        "url": "string"
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.islo.dev/factory/line-runs/run_id/conversation"

headers = {
    "X-Islo-Api-Version": "X-Islo-Api-Version",
    "Authorization": "Bearer <api_key>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.islo.dev/factory/line-runs/run_id/conversation';
const options = {
  method: 'GET',
  headers: {'X-Islo-Api-Version': 'X-Islo-Api-Version', Authorization: 'Bearer <api_key>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.islo.dev/factory/line-runs/run_id/conversation"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Islo-Api-Version", "X-Islo-Api-Version")
	req.Header.Add("Authorization", "Bearer <api_key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.islo.dev/factory/line-runs/run_id/conversation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Islo-Api-Version"] = 'X-Islo-Api-Version'
request["Authorization"] = 'Bearer <api_key>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.islo.dev/factory/line-runs/run_id/conversation")
  .header("X-Islo-Api-Version", "X-Islo-Api-Version")
  .header("Authorization", "Bearer <api_key>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.islo.dev/factory/line-runs/run_id/conversation', [
  'headers' => [
    'Authorization' => 'Bearer <api_key>',
    'X-Islo-Api-Version' => 'X-Islo-Api-Version',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.islo.dev/factory/line-runs/run_id/conversation");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Islo-Api-Version", "X-Islo-Api-Version");
request.AddHeader("Authorization", "Bearer <api_key>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Islo-Api-Version": "X-Islo-Api-Version",
  "Authorization": "Bearer <api_key>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.islo.dev/factory/line-runs/run_id/conversation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```