> 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.

# List Factory Lines

GET https://api.islo.dev/factories/{factory_id}/lines

Reference: https://docs.islo.dev/api-reference/factories/list-factory-resource-lines

## Authentication

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

## Request

### Path parameters

- `factory_id` (string, required)

### Query parameters

- `limit` (integer, optional, default: 50)
- `cursor` (string, optional, nullable)

## Response

### 200

Successful Response

- `items` (list of LineResponse, required)
- `next_cursor` (string, required, nullable)
- `total` (integer, optional, nullable)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### LineResponse

- `created_at` (datetime, required)
- `description` (string, required, nullable)
- `id` (string, required)
- `latest_version` (LineVersionResponse, required, nullable)
- `latest_version_number` (integer, required, nullable)
- `name` (string, required)
- `status` (string, required)
- `category` (string, optional, nullable)
- `resolved_stages` (list of ResolvedStage, optional)
- `stage_count` (integer, optional, default: 0)
- `trigger_type` (string, optional, nullable)

### ValidationError

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

### LineVersionResponse

- `content_hash` (string, required)
- `deployed_at` (datetime, required)
- `id` (string, required)
- `manifest` (LineManifest-Output, required) — Full line.toml manifest (TOML or JSON authoring; stored as JSON).
- `version_number` (integer, required)
- `input_params` (list of JobParamDefinition, optional)

### ResolvedStage

Stage metadata with job-derived kind and agent info.

- `id` (string, required)
- `agent` (string, optional, nullable)
- `agent_model` (string, optional, nullable)
- `agent_role` (string, optional, nullable)
- `description` (string, optional, nullable)
- `harness` (enum, optional, nullable)
  - Allowed values: `codex`, `cursor`, `claude`, `opencode`, `custom`
- `job` (string, optional, nullable)
- `kind` (enum, optional, default: deterministic)
  - Allowed values: `agent`, `deterministic`
- `params` (list of JobParamDefinition, optional)
- `runtime` (string, optional, nullable)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

### LineManifest-Output

Full line.toml manifest (TOML or JSON authoring; stored as JSON).

- `line` (LineSection, required)
- `stages` (list of LineStage, required)
- `trigger` (LineManifestOutputTrigger, required)
- `agent` (LineAgentConfig, optional, nullable)
- `limits` (LineLimits-Output, optional)
- `manager` (LineManagerConfig, optional, nullable) — Optional reusable prompt Agent for the Line Manager.
- `transitions` (list of LineManifestOutputTransitionsItems, optional)

### JobParamDefinition

- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `string`, `integer`, `number`, `boolean`, `array`
- `description` (string, optional, nullable)
- `enum` (list of any, optional, nullable)
- `items` (enum, optional, nullable)
  - Allowed values: `string`, `integer`, `number`, `boolean`
- `pattern` (string, optional, nullable)
- `prefix` (string, optional, nullable)
- `required` (boolean, optional, default: false)

### LineSection

- `name` (string, required)
- `category` (string, optional, nullable)
- `description` (string, optional, nullable)
- `run_name` (string, optional, nullable)

### LineStage

A node in the line graph that runs one Agent or one Job per visit.

- `id` (string, required)
- `agent` (string, optional, nullable)
- `description` (string, optional, nullable)
- `effort` (enum, optional, nullable)
  - Allowed values: `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`
- `job` (string, optional, nullable)
- `job_version_id` (string, optional, nullable)
- `max_attempts` (integer, optional, nullable)
- `model` (string, optional, nullable)
- `outputs` (map from string to JobOutputSpec, optional, nullable)
- `params` (map from string to JobParamSpec, optional, nullable)
- `prompt` (string, optional, nullable)
- `sandbox_name` (string, optional, nullable) — Agent stages only. Shared sandbox name containing \{\{line\_run\_id}}; defaults to \<agent-name>-\{\{line\_run\_id}}.

### LineManifestOutputTrigger

- `type`: `integration_trigger` (IntegrationTriggerSection)
  - `name` (string, required)
  - `provider` (string, required)
  - `selector` (LineManifestOutputTriggerDiscriminatorMappingIntegrationTriggerSelector, required)
  - `filters` (list of LineCondition-Output, optional)
  - `outputs` (map from string to TriggerPathBinding, optional)
- `type`: `manual` (ManualTriggerSection)
  - `origin_param` (string, optional, nullable)
- `type`: `schedule` (ScheduleTriggerSection)
  - `cron` (string, required)
  - `inputs` (map from string to any, optional)
  - `timezone` (string, optional, default: UTC)
- `type`: `webhook` (WebhookTriggerSection)
  - `path` (string, required)

### LineAgentConfig

- `instructions` (LineAgentConfigInstructions, optional, nullable)

### LineLimits-Output

- `budget_usd` (string, optional, nullable) — USD spend cap for one unattended usage window, checked before a stage.
- `max_iterations` (integer, optional, nullable)
- `timeout` (LineLimitsOutputTimeout, optional, nullable) — Active stage and manager time cap for one unattended usage window; parked time is excluded.

### LineManagerConfig

Optional reusable prompt Agent for the Line Manager.

- `agent` (string, required)
- `prompt` (string, optional, nullable)

### LineManifestOutputTransitionsItems

- `type`: `agentic` (AgenticTransition)
  - `from` (string, required)
  - `id` (string, required)
  - `instructions` (LineManifestOutputTransitionsItemsDiscriminatorMappingAgenticInstructions, required)
  - `label` (string, optional, nullable)
  - `options` (list of AgenticTransitionOption, optional)
- `type`: `conditional` (ConditionalTransition)
  - `from` (string, required)
  - `id` (string, required)
  - `to` (string, required)
  - `when` (LineCondition-Output, required)
  - `label` (string, optional, nullable)
  - `max_iterations` (integer, optional, nullable)
  - `params` (map from string to LineManifestOutputTransitionsItemsDiscriminatorMappingConditionalParams, optional)

### JobOutputSpec

Public job output contract. Writers emit the producer type; lines bind the published type after reduce. Session agents and $ISLO_OUTPUT use producer types (collect/gather still send the producer type, not the published array).

- `type` (enum, required)
  - Allowed values: `string`, `integer`, `number`, `boolean`, `array`
- `description` (string, optional, nullable)
- `enum` (list of any, optional, nullable)
- `items` (enum, optional, nullable) — Item type for array outputs. Required at deploy when type = array. Do not use reduce = collect with type = array; use gather to concatenate arrays.
  - Allowed values: `string`, `integer`, `number`, `boolean`
- `reduce` (enum, optional, default: one) — one: exactly one claiming step. last: last successful write in manifest task order. collect: published array of producer values (dense nulls for missing tasks); required collect must be claimed by every task. gather: concatenate arrays or collect scalars, skipping omissions.
  - Allowed values: `one`, `last`, `collect`, `gather`
- `required` (boolean, optional, default: true)

### JobParamSpec

- `type` (JobParamSpecType, required)
- `description` (string, optional, nullable)
- `enum` (list of any, optional, nullable)
- `items` (enum, optional, nullable) — Item type when type = array.
  - Allowed values: `string`, `integer`, `number`, `boolean`
- `pattern` (string, optional, nullable)
- `prefix` (string, optional, nullable)
- `required` (boolean, optional, default: false) — Cannot combine required=true with a default.

### LineManifestOutputTriggerDiscriminatorMappingIntegrationTriggerSelector

- `provider`: `github` (GitHubRepositorySelector)
  - `kind` ("repository", optional, default: repository)
  - `repositories` (list of string, optional)
  - `scope` (enum, optional)
    - Allowed values: `all`, `selected`
- `provider`: `linear` (LinearIssueSelector)
  - `kind` ("issue", optional, default: issue)
  - `labels` (list of string, optional)
  - `project_ids` (list of string, optional)
  - `scope` (enum, optional)
    - Allowed values: `all`, `selected`
  - `states` (list of string, optional)
  - `team_ids` (list of string, optional)
- `provider`: `slack` (SlackChannelSelector)
  - `channels` (list of string, optional)
  - `kind` ("channel", optional, default: channel)
  - `scope` (enum, optional)
    - Allowed values: `all`, `selected`

### LineCondition-Output

- `op`: `all` (CompoundCondition)
  - `conditions` (list of LineCondition-Output, required)
- `op`: `always` (AlwaysCondition)
- `op`: `any` (CompoundCondition)
  - `conditions` (list of LineCondition-Output, required)
- `op`: `contains` (BinaryCondition)
  - `left` (ConditionOperand, required)
  - `right` (ConditionOperand, required)
- `op`: `eq` (BinaryCondition)
  - `left` (ConditionOperand, required)
  - `right` (ConditionOperand, required)
- `op`: `exists` (UnaryCondition)
  - `operand` (ConditionOperand, required)
- `op`: `falsy` (UnaryCondition)
  - `operand` (ConditionOperand, required)
- `op`: `gt` (BinaryCondition)
  - `left` (ConditionOperand, required)
  - `right` (ConditionOperand, required)
- `op`: `gte` (BinaryCondition)
  - `left` (ConditionOperand, required)
  - `right` (ConditionOperand, required)
- `op`: `lt` (BinaryCondition)
  - `left` (ConditionOperand, required)
  - `right` (ConditionOperand, required)
- `op`: `lte` (BinaryCondition)
  - `left` (ConditionOperand, required)
  - `right` (ConditionOperand, required)
- `op`: `missing` (UnaryCondition)
  - `operand` (ConditionOperand, required)
- `op`: `ne` (BinaryCondition)
  - `left` (ConditionOperand, required)
  - `right` (ConditionOperand, required)
- `op`: `not` (NotCondition)
  - `condition` (LineCondition-Output, required)
- `op`: `not_contains` (BinaryCondition)
  - `left` (ConditionOperand, required)
  - `right` (ConditionOperand, required)
- `op`: `truthy` (UnaryCondition)
  - `operand` (ConditionOperand, required)

### TriggerPathBinding

- `path` (string, required)
- `type` ("trigger_path", required)

### LineAgentConfigInstructions

- `type`: `knowledge` (KnowledgeBinding)
  - `slug` (string, required)
  - `version` (string, optional, nullable) — Immutable knowledge version UUID. Omit to resolve the latest active version when the binding is consumed.
- `type`: `literal` (LiteralBinding)
  - `value` (any, required)

### LineLimitsOutputTimeout

Active stage and manager time cap for one unattended usage window; parked time is excluded.

- integer
- string

### LineManifestOutputTransitionsItemsDiscriminatorMappingAgenticInstructions

- `type`: `knowledge` (KnowledgeBinding)
  - `slug` (string, required)
  - `version` (string, optional, nullable) — Immutable knowledge version UUID. Omit to resolve the latest active version when the binding is consumed.
- `type`: `literal` (LiteralBinding)
  - `value` (any, required)

### AgenticTransitionOption

- `name` (string, required)
- `to` (string, required)
- `label` (string, optional, nullable)
- `params` (map from string to AgenticTransitionOptionParams, optional)

### LineManifestOutputTransitionsItemsDiscriminatorMappingConditionalParams

- `type`: `input` (InputBinding)
  - `name` (string, required)
- `type`: `literal` (LiteralBinding)
  - `value` (any, required)
- `type`: `output` (OutputBinding)
  - `name` (string, required)
  - `stage` (string, required)

### JobParamSpecType

- enum
  - Allowed values: `string`, `integer`, `number`, `boolean`
- "array"

### ConditionOperand

- `type`: `literal` (LiteralBinding)
  - `value` (any, required)
- `type`: `stage` (StageOperand)
  - `path` (string, required)
  - `stage` (string, optional, nullable)
- `type`: `transition` (TransitionOperand)
  - `id` (string, required)
  - `path` (string, required)
- `type`: `trigger` (TriggerOperand)
  - `path` (string, required)

### AgenticTransitionOptionParams

- `type`: `input` (InputBinding)
  - `name` (string, required)
- `type`: `literal` (LiteralBinding)
  - `value` (any, required)
- `type`: `output` (OutputBinding)
  - `name` (string, required)
  - `stage` (string, required)

## Examples

**Response**

```json
{
  "items": [
    {
      "created_at": "2024-01-15T09:30:00Z",
      "description": "string",
      "id": "string",
      "latest_version": {
        "content_hash": "string",
        "deployed_at": "2024-01-15T09:30:00Z",
        "id": "string",
        "manifest": {
          "line": {
            "name": "string",
            "category": "string",
            "description": "string",
            "run_name": "string"
          },
          "stages": [
            {
              "id": "string",
              "agent": "string",
              "description": "string",
              "effort": "none",
              "job": "string",
              "job_version_id": "string",
              "max_attempts": 1,
              "model": "string",
              "outputs": {},
              "params": {},
              "prompt": "string",
              "sandbox_name": "string"
            }
          ],
          "trigger": {
            "type": "manual",
            "origin_param": "string"
          },
          "agent": {
            "instructions": {
              "type": "string",
              "value": null
            }
          },
          "limits": {
            "budget_usd": "string",
            "max_iterations": 1,
            "timeout": 1
          },
          "manager": {
            "agent": "string",
            "prompt": "string"
          },
          "transitions": [
            {
              "from": "string",
              "id": "string",
              "label": "string",
              "max_iterations": 1,
              "params": {},
              "to": "string",
              "type": "string",
              "when": {
                "op": "string"
              }
            }
          ]
        },
        "version_number": 1,
        "input_params": [
          {
            "name": "string",
            "type": "string",
            "description": "string",
            "enum": [
              null
            ],
            "items": "string",
            "pattern": "string",
            "prefix": "string",
            "required": false
          }
        ]
      },
      "latest_version_number": 1,
      "name": "string",
      "status": "string",
      "category": "string",
      "resolved_stages": [
        {
          "id": "string",
          "agent": "string",
          "agent_model": "string",
          "agent_role": "string",
          "description": "string",
          "harness": "codex",
          "job": "string",
          "kind": "deterministic",
          "params": [
            {
              "name": "string",
              "type": "string",
              "description": "string",
              "enum": [
                null
              ],
              "items": "string",
              "pattern": "string",
              "prefix": "string",
              "required": false
            }
          ],
          "runtime": "string"
        }
      ],
      "stage_count": 0,
      "trigger_type": "string"
    }
  ],
  "next_cursor": "string",
  "total": 1
}
```

**SDK Code**

```python
import requests

url = "https://api.islo.dev/factories/factory_id/lines"

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/factories/factory_id/lines';
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/factories/factory_id/lines"

	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/factories/factory_id/lines")

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/factories/factory_id/lines")
  .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/factories/factory_id/lines', [
  '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/factories/factory_id/lines");
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/factories/factory_id/lines")! 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()
```