Skip to content

Loops

CompozyOS Loops HTTP endpoints.

For people running agent work32 pages in this section

List Loop human requests

GET
/api/loop-requests

Query Parameters

all_workspaces?boolean

Read all registered projects and User rows

workspace_ids?array<string>

Repeatable project IDs or @user; requires all_workspaces=true

run_id?string

Filter by Loop run id

state?string

Filter by pending or resolved state

cursor?string

Opaque continuation cursor

limit?integer

Maximum number of records to return

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
aggregates*
items*array<>
next_cursor*string
curl -X GET "https://example.com/api/loop-requests"
{  "aggregates": {    "pending": 0  },  "items": [    {      "actor_id": "string",      "actor_kind": "string",      "agents": "string",      "answered_at": "2019-08-24T14:15:22Z",      "answered_decision": "string",      "context": null,      "decisions": [        "string"      ],      "edit_schema": null,      "expect": null,      "expires_at": "2019-08-24T14:15:22Z",      "generation": 0,      "item_index": 0,      "kind": "string",      "loop_name": "string",      "loop_run_id": "string",      "node_id": "string",      "opened_at": "2019-08-24T14:15:22Z",      "profile_id": "string",      "prompt": "string",      "proposed_preview": null,      "resolved_at": "2019-08-24T14:15:22Z",      "respond_schema": null,      "state": "string",      "workspace_id": "string"    }  ],  "next_cursor": "string"}

List Loop runs

GET
/api/loop-runs

Query Parameters

all_workspaces?boolean

Read all registered projects and User rows

workspace_ids?array<string>

Repeatable project IDs or @user; requires all_workspaces=true

loop?string

Filter by Loop name

status?string

Filter by Loop status

origin?string

Filter by catalog or session origin

origin_session?string

Filter by origin session id

live?boolean

Filter by live or terminal status

cursor?string

Opaque server-order cursor

limit?integer

Maximum number of records to return

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

order?"recency"

Aggregate runs support recency order only

Value in"recency"

Response Body

OK

application/json
  1. response
aggregates*
next_cursor?string
runs*array<>
curl -X GET "https://example.com/api/loop-runs"
{  "aggregates": {    "failed": 0,    "historical": 0,    "live": 0,    "succeeded": 0,    "terminal": 0,    "total": 0  },  "next_cursor": "string",  "runs": [    {      "active_gate_id": "string",      "attention": {        "count": 0,        "kind": "string",        "since": "2019-08-24T14:15:22Z"      },      "best_generation": 0,      "best_score": 0,      "budget_approval_seq": 0,      "budget_on_exceeded": "halt",      "budget_tokens": 0,      "budget_wall_sec": 0,      "completed_at": "2019-08-24T14:15:22Z",      "completion_state": "complete",      "created_at": "2019-08-24T14:15:22Z",      "definition_digest": "string",      "definition_version": 0,      "forked_from": {        "generation": 0,        "run_id": "string"      },      "forks": [        {          "generation": 0,          "run_id": "string"        }      ],      "generation": 0,      "historical": true,      "id": "string",      "inputs": {        "property1": null,        "property2": null      },      "iteration_cap": 0,      "last_progress_at": "2019-08-24T14:15:22Z",      "loop_name": "string",      "parent_loop_run_id": "string",      "pause_requested": true,      "profile_color": "string",      "profile_icon": "string",      "profile_id": "string",      "profile_name": "string",      "progress": {        "round": 0,        "steps_done": 0,        "steps_total": 0      },      "reattempt_strategy": "failed_only",      "start_metadata": {        "property1": null,        "property2": null      },      "started_at": "2019-08-24T14:15:22Z",      "started_by_kind": "string",      "started_by_ref": "string",      "started_origin_kind": "string",      "started_origin_ref": "string",      "status": "queued",      "tokens_used": 0,      "workspace_id": "string"    }  ]}
GET
/api/loops

Query Parameters

all_workspaces?boolean

Read all registered projects and User rows

workspace_ids?array<string>

Repeatable project IDs or @user; requires all_workspaces=true

q?string

Search Loop name or contract goal

kind?string

Filter by effective Loop kind

Value in"read_only""workspace"
category?string

Filter by exact catalog category

status?string

Filter by exact latest-run status

Value in"queued""running""watching""needs-approval""paused""done""no-op""blocked""failed""exhausted""stalled""canceled"
sort?"name"

Stable read-only-first name order

Value in"name"
cursor?string

Continue after this workspace- and query-bound Loop cursor

limit?integer

Maximum number of Loops to return; defaults to 50 and is capped at 200

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
entries*array<>
errors*array<>
truncated*boolean
curl -X GET "https://example.com/api/loops"
{  "entries": [    {      "aggregate_30d": {        "failed": 0,        "runs": 0,        "succeeded": 0      },      "catalog": {        "category": "string",        "keywords": [          "string"        ],        "use_when": "string"      },      "contract": {        "boundaries": [          "string"        ],        "budget": {          "on_exceeded": "halt",          "tokens": 0,          "wall_clock_sec": 0        },        "constraints": [          "string"        ],        "definition_of_done": "string",        "goal": "string",        "iteration_cap": 0,        "no_progress": {          "window": 0        },        "on_blocked": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_canceled": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_done": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_exhausted": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_failed": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_noop": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_stalled": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "runtime_defaults": {          "judge": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          },          "worker": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        },        "runtime_rules": [          {            "match": {              "complexity": "string",              "id": "string",              "type": "string"            },            "runtime": {              "acp_options": [                {                  "bool_value": true,                  "id": "string",                  "value_id": "string"                }              ],              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "normal"            }          }        ],        "stop_when": "string",        "terminal_states": [          "string"        ],        "verification": [          {            "agent": "string",            "check": "string",            "contains": "string",            "expect": "string",            "id": "string",            "inputs": {              "property1": null,              "property2": null            },            "metric": {              "direction": "maximize",              "min_delta": 0            },            "prompt": "string",            "rubric": "string",            "runtime": {              "acp_options": [                {                  "bool_value": true,                  "id": "string",                  "value_id": "string"                }              ],              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "normal"            },            "tool": "string",            "type": "string"          }        ]      },      "description": "string",      "inputs": {        "property1": {          "default": null,          "description": "string",          "enum": [            "string"          ],          "ref": {            "kind": "skill"          },          "required": true,          "type": "string"        },        "property2": {          "default": null,          "description": "string",          "enum": [            "string"          ],          "ref": {            "kind": "skill"          },          "required": true,          "type": "string"        }      },      "last_run": {        "best_generation": 0,        "best_score": 0,        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "status": "queued"      },      "name": "string",      "source": {        "kind": "marketplace",        "layer": "string"      },      "start": [        {          "input_mapping": {            "property1": "string",            "property2": "string"          },          "inputs": {            "property1": null,            "property2": null          },          "kind": "string"        }      ],      "success_rate_30d": 0.1,      "version": 0,      "workspace_id": "string"    }  ],  "errors": [    {      "code": "string",      "message": "string",      "workspace_id": "string"    }  ],  "truncated": true}
GET
/api/workspaces/{workspace_id}/loop-nodes

Path Parameters

workspace_id*string

Workspace id

Query Parameters

state*string

Node inventory state

loop?string

Filter by Loop name

run_id?string

Filter by Loop run id

cursor?string

Opaque continuation cursor

limit?integer

Maximum number of records to return

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
items*array<>
next_cursor?string
curl -X GET "https://example.com/api/workspaces/string/loop-nodes?state=string"
{  "items": [    {      "control": {        "attention_flag": "string",        "attention_producer_node_id": "string",        "attention_reason": "string",        "cancel_provenance": {          "actor_id": "string",          "actor_kind": "string",          "reason": "string",          "requested_at": "2019-08-24T14:15:22Z",          "rule_id": "string"        },        "cancel_state": "string",        "death_resume_streak": 0,        "last_evidence_at": "2019-08-24T14:15:22Z",        "loop_run_id": "string",        "node_id": "string",        "pause_provenance": {          "actor_id": "string",          "actor_kind": "string",          "reason": "string",          "requested_at": "2019-08-24T14:15:22Z",          "rule_id": "string"        },        "paused": true,        "quarantine_entry": null,        "quarantined": true,        "quarantined_at": "2019-08-24T14:15:22Z",        "revision": 0,        "updated_at": "2019-08-24T14:15:22Z"      },      "generation": 0,      "item_index": 0,      "loop_name": "string",      "loop_run_id": "string",      "node_id": "string",      "output": {        "attempt": 0,        "child_loop_run_id": "string",        "disposition": "string",        "failure_class": "string",        "generation": 0,        "item_index": 0,        "next_attempt_at": "2019-08-24T14:15:22Z",        "node_id": "string",        "output_ref": "string",        "resolved_runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "source": {            "acp_options": {              "property1": "string",              "property2": "string"            },            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "string"          },          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "session_id": "string",        "status": "string",        "task_run_id": "string"      },      "state": "waiting",      "state_at": "2019-08-24T14:15:22Z",      "wait": {        "admission_failures": 0,        "age_seconds": 0,        "claim_state": "string",        "claimed_at": "2019-08-24T14:15:22Z",        "claimed_by_id": "string",        "claimed_by_kind": "string",        "created_at": "2019-08-24T14:15:22Z",        "escalation_cursor": 0,        "expect": null,        "generation": 0,        "issued_epoch": 0,        "item_index": 0,        "kind": "string",        "loop_run_id": "string",        "next_escalation_at": "2019-08-24T14:15:22Z",        "node_id": "string",        "resume_at": "2019-08-24T14:15:22Z"      },      "workspace_id": "string"    }  ],  "next_cursor": "string"}

List Loop human requests

GET
/api/workspaces/{workspace_id}/loop-requests

Path Parameters

workspace_id*string

Workspace id

Query Parameters

run_id?string

Filter by Loop run id

state?string

Filter by pending or resolved state

cursor?string

Opaque continuation cursor

limit?integer

Maximum number of records to return

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
aggregates*
items*array<>
next_cursor*string
curl -X GET "https://example.com/api/workspaces/string/loop-requests"
{  "aggregates": {    "pending": 0  },  "items": [    {      "actor_id": "string",      "actor_kind": "string",      "agents": "string",      "answered_at": "2019-08-24T14:15:22Z",      "answered_decision": "string",      "context": null,      "decisions": [        "string"      ],      "edit_schema": null,      "expect": null,      "expires_at": "2019-08-24T14:15:22Z",      "generation": 0,      "item_index": 0,      "kind": "string",      "loop_name": "string",      "loop_run_id": "string",      "node_id": "string",      "opened_at": "2019-08-24T14:15:22Z",      "profile_id": "string",      "prompt": "string",      "proposed_preview": null,      "resolved_at": "2019-08-24T14:15:22Z",      "respond_schema": null,      "state": "string",      "workspace_id": "string"    }  ],  "next_cursor": "string"}

List Loop runs

GET
/api/workspaces/{workspace_id}/loop-runs

Path Parameters

workspace_id*string

Workspace id

Query Parameters

loop?string

Filter by Loop name

status?string

Filter by Loop status

origin?string

Filter by catalog or session origin

origin_session?string

Filter by origin session id

live?boolean

Filter by live or terminal status

cursor?string

Opaque server-order cursor

limit?integer

Maximum number of records to return

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
aggregates*
next_cursor?string
runs*array<>
curl -X GET "https://example.com/api/workspaces/string/loop-runs"
{  "aggregates": {    "failed": 0,    "historical": 0,    "live": 0,    "succeeded": 0,    "terminal": 0,    "total": 0  },  "next_cursor": "string",  "runs": [    {      "active_gate_id": "string",      "attention": {        "count": 0,        "kind": "string",        "since": "2019-08-24T14:15:22Z"      },      "best_generation": 0,      "best_score": 0,      "budget_approval_seq": 0,      "budget_on_exceeded": "halt",      "budget_tokens": 0,      "budget_wall_sec": 0,      "completed_at": "2019-08-24T14:15:22Z",      "completion_state": "complete",      "created_at": "2019-08-24T14:15:22Z",      "definition_digest": "string",      "definition_version": 0,      "forked_from": {        "generation": 0,        "run_id": "string"      },      "forks": [        {          "generation": 0,          "run_id": "string"        }      ],      "generation": 0,      "historical": true,      "id": "string",      "inputs": {        "property1": null,        "property2": null      },      "iteration_cap": 0,      "last_progress_at": "2019-08-24T14:15:22Z",      "loop_name": "string",      "parent_loop_run_id": "string",      "pause_requested": true,      "profile_color": "string",      "profile_icon": "string",      "profile_id": "string",      "profile_name": "string",      "progress": {        "round": 0,        "steps_done": 0,        "steps_total": 0      },      "reattempt_strategy": "failed_only",      "start_metadata": {        "property1": null,        "property2": null      },      "started_at": "2019-08-24T14:15:22Z",      "started_by_kind": "string",      "started_by_ref": "string",      "started_origin_kind": "string",      "started_origin_ref": "string",      "status": "queued",      "tokens_used": 0,      "workspace_id": "string"    }  ]}

Get one Loop run

GET
/api/workspaces/{workspace_id}/loop-runs/{run_id}

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
amendments*array<>
effective_config*
executed_definition?|
generations?array<>
materialized_contract*
node_controls*array<>
requests*array<>
run*
waits*array<>
watch_events?|
curl -X GET "https://example.com/api/workspaces/string/loop-runs/string"
{  "amendments": [    {      "actor_id": "string",      "actor_kind": "string",      "amended": null,      "amended_summary": {        "byte_size": 0,        "content_hash": "string"      },      "amendment_seq": 0,      "created_at": "2019-08-24T14:15:22Z",      "generation": 0,      "item_index": 0,      "loop_run_id": "string",      "node_id": "string",      "original": null,      "original_summary": {        "byte_size": 0,        "content_hash": "string"      },      "reason": "string"    }  ],  "effective_config": {    "budget_on_exceeded": "halt",    "budget_tokens": 0,    "budget_wall_sec": 0,    "enabled_checks_json": null,    "environment": {      "directory": "string",      "mode": "root",      "worktree_ref": "string"    },    "fan_out_width": 0,    "gate_max_revisions": 0,    "human_gate_enabled": true,    "iteration_cap": 0,    "no_progress_window": 0,    "reattempt_strategy": "failed_only",    "request_expire_after": "string",    "run_runtime_rules": [      {        "match": {          "complexity": "string",          "id": "string",          "type": "string"        },        "runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      }    ],    "runtime_defaults": {      "judge": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      },      "worker": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      }    },    "runtime_rules": [      {        "match": {          "complexity": "string",          "id": "string",          "type": "string"        },        "runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      }    ],    "sources": {      "property1": "string",      "property2": "string"    }  },  "executed_definition": {    "apiVersion": "string",    "concurrency": "string",    "contract": {      "boundaries": [        "string"      ],      "budget": {        "on_exceeded": "halt",        "tokens": 0,        "wall_clock_sec": 0      },      "constraints": [        "string"      ],      "definition_of_done": "string",      "goal": "string",      "iteration_cap": 0,      "no_progress": {        "window": 0      },      "on_blocked": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_canceled": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_done": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_exhausted": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_failed": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_noop": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_stalled": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "runtime_defaults": {        "judge": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        },        "worker": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      },      "runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "stop_when": "string",      "terminal_states": [        "string"      ],      "verification": [        {          "agent": "string",          "check": "string",          "contains": "string",          "expect": "string",          "id": "string",          "inputs": {            "property1": null,            "property2": null          },          "metric": {            "direction": "maximize",            "min_delta": 0          },          "prompt": "string",          "rubric": "string",          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          },          "tool": "string",          "type": "string"        }      ]    },    "graph": {      "edges": [        {          "from": "string",          "to": "string",          "property1": null,          "property2": null        }      ],      "nodes": [        {          "batch_size": 0,          "bind_as": "string",          "body": {            "property1": null,            "property2": null          },          "class": "action",          "collection": "string",          "condition": "string",          "contract": {            "property1": null,            "property2": null          },          "criteria": [            {              "agent": "string",              "check": "string",              "contains": "string",              "expect": "string",              "id": "string",              "inputs": {                "property1": null,                "property2": null              },              "metric": {                "direction": "maximize",                "min_delta": 0              },              "prompt": "string",              "rubric": "string",              "tool": "string",              "type": "string",              "property1": null,              "property2": null            }          ],          "deadline": "string",          "default": "string",          "events": [            {              "filter": "string",              "kind": "task.status_changed"            }          ],          "expires": {            "after": "string",            "escalate": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "route": "string"          },          "filter": "string",          "harvest": {            "property1": null,            "property2": null          },          "id": "string",          "index_as": "string",          "input_ref": "string",          "kind": "string",          "max_fan_out": 0,          "max_parallel": 0,          "max_revisions": 0,          "on_cancel": [            {              "emit": {                "kind": "string",                "payload": {                  "property1": null,                  "property2": null                }              }            }          ],          "on_error": {            "allow_fail": true,            "effects": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "route": "string"          },          "on_eval_error": "fail",          "on_parent_close": "terminate",          "on_pause": [            {              "emit": {                "kind": "string",                "payload": {                  "property1": null,                  "property2": null                }              }            }          ],          "on_quarantine": [            {              "emit": {                "kind": "string",                "payload": {                  "property1": null,                  "property2": null                }              }            }          ],          "on_result": {            "property1": null,            "property2": null          },          "on_retry": [            {              "emit": {                "kind": "string",                "payload": {                  "property1": null,                  "property2": null                }              }            }          ],          "on_success": [            {              "emit": {                "kind": "string",                "payload": {                  "property1": null,                  "property2": null                }              }            }          ],          "on_timeout": [            {              "emit": {                "kind": "string",                "payload": {                  "property1": null,                  "property2": null                }              }            }          ],          "params": {            "environment": {              "directory": "string",              "mode": "root",              "worktree_ref": "string"            },            "property1": null,            "property2": null          },          "parse": "string",          "pattern": "string",          "produces": {            "property1": null,            "property2": null          },          "result_contract": {            "failure_field": "string",            "message_field": "string"          },          "retry": {            "backoff": {              "base": "string",              "max": "string"            },            "max_attempts": 0,            "non_retryable": [              "string"            ],            "on_failure": "string"          },          "review": {            "decisions": [              "approve"            ],            "expires": {              "after": "string",              "escalate": [                {                  "emit": {                    "kind": "string",                    "payload": {                      "property1": null,                      "property2": null                    }                  }                }              ],              "route": "string"            },            "on_reject": {              "route": "string",              "property1": null,              "property2": null            },            "prompt": "string",            "responders": {              "agents": "deny"            },            "when": "string",            "property1": null,            "property2": null          },          "routes": [            {              "to": "string",              "when": "string"            }          ],          "session": {            "property1": null,            "property2": null          },          "strategy": "wait_all",          "timeout": "string",          "verdict_policy": "string",          "watch": {            "property1": null,            "property2": null          },          "property1": null,          "property2": null        }      ],      "property1": null,      "property2": null    },    "inputs": {      "property1": {        "default": null,        "description": "string",        "enum": [          "string"        ],        "ref": {          "kind": "skill"        },        "required": true,        "type": "string"      },      "property2": {        "default": null,        "description": "string",        "enum": [          "string"        ],        "ref": {          "kind": "skill"        },        "required": true,        "type": "string"      }    },    "kind": "string",    "meta": {      "catalog": {        "category": "string",        "keywords": [          "string"        ],        "use_when": "string"      },      "description": "string",      "name": "string",      "version": 0    },    "start": [      {        "input_mapping": {          "property1": "string",          "property2": "string"        },        "inputs": {          "property1": null,          "property2": null        },        "kind": "string"      }    ]  },  "generations": [    {      "generation": 0,      "origin": "initial",      "outputs": [        {          "attempt": 0,          "child_loop_run_id": "string",          "disposition": "string",          "failure_class": "string",          "generation": 0,          "item_index": 0,          "next_attempt_at": "2019-08-24T14:15:22Z",          "node_id": "string",          "output_ref": "string",          "resolved_runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "source": {              "acp_options": {                "property1": "string",                "property2": "string"              },              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "string"            },            "speed": "normal",            "speed_resolution": {              "reason": "capability_absent",              "requested": "normal",              "status": "applied"            }          },          "session_id": "string",          "status": "string",          "task_run_id": "string"        }      ],      "parent_generation": 0,      "route_causes": [        {          "at": "2019-08-24T14:15:22Z",          "cause": "string",          "default": true,          "item_index": 0,          "matched_when": "string",          "node_id": "string",          "route": "string"        }      ],      "verdicts": [        {          "blocking_issues": [            {              "id": "string",              "note": "string"            }          ],          "criteria": [            {              "blocking_issues": [                {                  "id": "string",                  "note": "string"                }              ],              "broken": true,              "evidence": null,              "exit_code": 0,              "id": "string",              "outcome": "approved",              "passed": true,              "payload": null,              "prompt": "string",              "score": 0,              "stderr": "string",              "stdout": "string",              "type": "string",              "warnings": [                {                  "code": "string",                  "message": "string"                }              ]            }          ],          "gate_id": "string",          "item_index": 0,          "outcome": "approved",          "route_cause_rank": 0,          "score": 0        }      ]    }  ],  "materialized_contract": {    "boundaries": [      "string"    ],    "budget": {      "on_exceeded": "halt",      "tokens": 0,      "wall_clock_sec": 0    },    "constraints": [      "string"    ],    "definition_of_done": "string",    "goal": "string",    "iteration_cap": 0,    "no_progress": {      "window": 0    },    "on_blocked": [      {        "emit": {          "kind": "string",          "payload": {            "property1": null,            "property2": null          }        }      }    ],    "on_canceled": [      {        "emit": {          "kind": "string",          "payload": {            "property1": null,            "property2": null          }        }      }    ],    "on_done": [      {        "emit": {          "kind": "string",          "payload": {            "property1": null,            "property2": null          }        }      }    ],    "on_exhausted": [      {        "emit": {          "kind": "string",          "payload": {            "property1": null,            "property2": null          }        }      }    ],    "on_failed": [      {        "emit": {          "kind": "string",          "payload": {            "property1": null,            "property2": null          }        }      }    ],    "on_noop": [      {        "emit": {          "kind": "string",          "payload": {            "property1": null,            "property2": null          }        }      }    ],    "on_stalled": [      {        "emit": {          "kind": "string",          "payload": {            "property1": null,            "property2": null          }        }      }    ],    "runtime_defaults": {      "judge": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      },      "worker": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      }    },    "runtime_rules": [      {        "match": {          "complexity": "string",          "id": "string",          "type": "string"        },        "runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      }    ],    "stop_when": "string",    "terminal_states": [      "string"    ],    "verification": [      {        "agent": "string",        "check": "string",        "contains": "string",        "expect": "string",        "id": "string",        "inputs": {          "property1": null,          "property2": null        },        "metric": {          "direction": "maximize",          "min_delta": 0        },        "prompt": "string",        "rubric": "string",        "runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        },        "tool": "string",        "type": "string"      }    ]  },  "node_controls": [    {      "attention_flag": "string",      "attention_producer_node_id": "string",      "attention_reason": "string",      "cancel_provenance": {        "actor_id": "string",        "actor_kind": "string",        "reason": "string",        "requested_at": "2019-08-24T14:15:22Z",        "rule_id": "string"      },      "cancel_state": "string",      "death_resume_streak": 0,      "last_evidence_at": "2019-08-24T14:15:22Z",      "loop_run_id": "string",      "node_id": "string",      "pause_provenance": {        "actor_id": "string",        "actor_kind": "string",        "reason": "string",        "requested_at": "2019-08-24T14:15:22Z",        "rule_id": "string"      },      "paused": true,      "quarantine_entry": null,      "quarantined": true,      "quarantined_at": "2019-08-24T14:15:22Z",      "revision": 0,      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "requests": [    {      "actor_id": "string",      "actor_kind": "string",      "agents": "string",      "answered_at": "2019-08-24T14:15:22Z",      "answered_decision": "string",      "context": null,      "decisions": [        "string"      ],      "edit_schema": null,      "expect": null,      "expires_at": "2019-08-24T14:15:22Z",      "generation": 0,      "item_index": 0,      "kind": "string",      "loop_name": "string",      "loop_run_id": "string",      "node_id": "string",      "opened_at": "2019-08-24T14:15:22Z",      "profile_id": "string",      "prompt": "string",      "proposed_preview": null,      "resolved_at": "2019-08-24T14:15:22Z",      "respond_schema": null,      "state": "string",      "workspace_id": "string"    }  ],  "run": {    "active_gate_id": "string",    "attention": {      "count": 0,      "kind": "string",      "since": "2019-08-24T14:15:22Z"    },    "best_generation": 0,    "best_score": 0,    "budget_approval_seq": 0,    "budget_on_exceeded": "halt",    "budget_tokens": 0,    "budget_wall_sec": 0,    "completed_at": "2019-08-24T14:15:22Z",    "completion_state": "complete",    "created_at": "2019-08-24T14:15:22Z",    "definition_digest": "string",    "definition_version": 0,    "forked_from": {      "generation": 0,      "run_id": "string"    },    "forks": [      {        "generation": 0,        "run_id": "string"      }    ],    "generation": 0,    "historical": true,    "id": "string",    "inputs": {      "property1": null,      "property2": null    },    "iteration_cap": 0,    "last_progress_at": "2019-08-24T14:15:22Z",    "loop_name": "string",    "parent_loop_run_id": "string",    "pause_requested": true,    "profile_color": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "progress": {      "round": 0,      "steps_done": 0,      "steps_total": 0    },    "reattempt_strategy": "failed_only",    "start_metadata": {      "property1": null,      "property2": null    },    "started_at": "2019-08-24T14:15:22Z",    "started_by_kind": "string",    "started_by_ref": "string",    "started_origin_kind": "string",    "started_origin_ref": "string",    "status": "queued",    "tokens_used": 0,    "workspace_id": "string"  },  "waits": [    {      "admission_failures": 0,      "age_seconds": 0,      "claim_state": "string",      "claimed_at": "2019-08-24T14:15:22Z",      "claimed_by_id": "string",      "claimed_by_kind": "string",      "created_at": "2019-08-24T14:15:22Z",      "escalation_cursor": 0,      "expect": null,      "generation": 0,      "issued_epoch": 0,      "item_index": 0,      "kind": "string",      "loop_run_id": "string",      "next_escalation_at": "2019-08-24T14:15:22Z",      "node_id": "string",      "resume_at": "2019-08-24T14:15:22Z"    }  ],  "watch_events": {    "cursors": {      "property1": 0,      "property2": 0    },    "last_wake_at": "2019-08-24T14:15:22Z",    "subscriptions": [      {        "filter": "string",        "kind": "task.status_changed"      }    ]  }}

Approve one Loop gate

POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/approve

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
decision*string
Value in"approve""request_changes""reject"
gate_id*string

Response Body

OK

application/json
  1. response
[key: string]?boolean
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/approve" \  -H "Content-Type: application/json" \  -d '{    "decision": "approve",    "gate_id": "string"  }'
{  "property1": true,  "property2": true}
GET
/api/workspaces/{workspace_id}/loop-runs/{run_id}/briefing

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
artifacts*array<>
blockers*array<>
detail?string
headline*string
outcome?|
progress*
run_id*string
status*string
tone*string
usage*
curl -X GET "https://example.com/api/workspaces/string/loop-runs/string/briefing"
{  "artifacts": [    {      "availability": "string",      "name": "string",      "output": "string",      "ref": "string"    }  ],  "blockers": [    {      "expired": true,      "expires_at": "2019-08-24T14:15:22Z",      "gate_id": "string",      "item_index": 0,      "kind": "string",      "node_id": "string",      "unblocker": "string",      "waiting_since": "2019-08-24T14:15:22Z"    }  ],  "detail": "string",  "headline": "string",  "outcome": {    "actor_kind": "string",    "actor_ref": "string",    "at": "2019-08-24T14:15:22Z",    "cause": "string",    "status": "string"  },  "progress": {    "round": 0,    "steps_done": 0,    "steps_total": 0  },  "run_id": "string",  "status": "string",  "tone": "string",  "usage": {    "budget_used_pct": 0.1,    "cost_usd": 0.1,    "duration": "string",    "tokens": 0  }}

Cancel one Loop run

POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/cancel

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
[key: string]?unknown

Response Body

OK

application/json
  1. response
control?|
item_index?integer|null
node_id?string
ok*boolean
provenance?|
run_id*string
status?string
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/cancel" \  -H "Content-Type: application/json" \  -d '{    "property1": null,    "property2": null  }'
{  "control": {    "attention_flag": "string",    "attention_producer_node_id": "string",    "attention_reason": "string",    "cancel_provenance": {      "actor_id": "string",      "actor_kind": "string",      "reason": "string",      "requested_at": "2019-08-24T14:15:22Z",      "rule_id": "string"    },    "cancel_state": "string",    "death_resume_streak": 0,    "last_evidence_at": "2019-08-24T14:15:22Z",    "loop_run_id": "string",    "node_id": "string",    "pause_provenance": {      "actor_id": "string",      "actor_kind": "string",      "reason": "string",      "requested_at": "2019-08-24T14:15:22Z",      "rule_id": "string"    },    "paused": true,    "quarantine_entry": null,    "quarantined": true,    "quarantined_at": "2019-08-24T14:15:22Z",    "revision": 0,    "updated_at": "2019-08-24T14:15:22Z"  },  "item_index": 0,  "node_id": "string",  "ok": true,  "provenance": {    "actor_id": "string",    "actor_kind": "string",    "reason": "string",    "requested_at": "2019-08-24T14:15:22Z",    "rule_id": "string"  },  "run_id": "string",  "status": "string"}
GET
/api/workspaces/{workspace_id}/loop-runs/{run_id}/diff

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

generation?integer

Base generation

Formatint32
against_generation?integer

Generation to compare

Formatint32
against_run?string

Run to compare

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
against*
base*
definition_divergence?boolean
inputs*array<>
kind*string
nodes*array<>
terminal?|
curl -X GET "https://example.com/api/workspaces/string/loop-runs/string/diff"
{  "against": {    "as_of": true,    "generation": 0,    "run_id": "string",    "status": "queued"  },  "base": {    "as_of": true,    "generation": 0,    "run_id": "string",    "status": "queued"  },  "definition_divergence": true,  "inputs": [    {      "against": {        "hash": "string",        "inline": null,        "size": 0      },      "base": {        "hash": "string",        "inline": null,        "size": 0      },      "key": "string"    }  ],  "kind": "string",  "nodes": [    {      "against": {        "hash": "string",        "inline": null,        "size": 0      },      "base": {        "hash": "string",        "inline": null,        "size": 0      },      "cause": "string",      "change": "string",      "item_index": 0,      "node_id": "string"    }  ],  "terminal": {    "against": "queued",    "base": "queued"  }}

Stream Loop run events

GET
/api/workspaces/{workspace_id}/loop-runs/{run_id}/events

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

after_sequence?string

Resume after this sequence

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Header Parameters

Last-Event-ID?string

Last received event sequence

Response Body

SSE stream

text/event-stream
  1. response
at*string
Formatdate-time
id*string
kind*"generation_started"
Value in"generation_started"
loop_run_id*string
payload*
seq*integer
Formatint64
workspace_id*string
curl -X GET "https://example.com/api/workspaces/string/loop-runs/string/events"
{  "at": "2019-08-24T14:15:22Z",  "id": "string",  "kind": "generation_started",  "loop_run_id": "string",  "payload": {    "generation": 0,    "loop_name": "string",    "origin": "initial",    "parent_generation": 0,    "reattempt_strategy": "failed_only"  },  "seq": 0,  "workspace_id": "string"}
POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/fork

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
generation*integer
Formatint64
inputs?
reason?string
request_id?string

Response Body

Created

application/json
  1. response
replayed?boolean
run*
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/fork" \  -H "Content-Type: application/json" \  -d '{    "generation": 0  }'
{  "replayed": true,  "run": {    "active_gate_id": "string",    "attention": {      "count": 0,      "kind": "string",      "since": "2019-08-24T14:15:22Z"    },    "best_generation": 0,    "best_score": 0,    "budget_approval_seq": 0,    "budget_on_exceeded": "halt",    "budget_tokens": 0,    "budget_wall_sec": 0,    "completed_at": "2019-08-24T14:15:22Z",    "completion_state": "complete",    "created_at": "2019-08-24T14:15:22Z",    "definition_digest": "string",    "definition_version": 0,    "forked_from": {      "generation": 0,      "run_id": "string"    },    "forks": [      {        "generation": 0,        "run_id": "string"      }    ],    "generation": 0,    "historical": true,    "id": "string",    "inputs": {      "property1": null,      "property2": null    },    "iteration_cap": 0,    "last_progress_at": "2019-08-24T14:15:22Z",    "loop_name": "string",    "parent_loop_run_id": "string",    "pause_requested": true,    "profile_color": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "progress": {      "round": 0,      "steps_done": 0,      "steps_total": 0    },    "reattempt_strategy": "failed_only",    "start_metadata": {      "property1": null,      "property2": null    },    "started_at": "2019-08-24T14:15:22Z",    "started_by_kind": "string",    "started_by_ref": "string",    "started_origin_kind": "string",    "started_origin_ref": "string",    "status": "queued",    "tokens_used": 0,    "workspace_id": "string"  }}
GET
/api/workspaces/{workspace_id}/loop-runs/{run_id}/nodes

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

state?string

Filter by roster state

Value in"all""running""queued""waiting""retrying""paused""quarantined""succeeded""failed""canceled""not_taken"
generation?integer

Filter by generation

Formatint32
cursor?string

Opaque roster cursor

limit?integer

Maximum rows to return

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
fanout_rollups*array<>
loop_name*string
next_cursor?string
nodes*array<>
run_id*string
run_status*string
curl -X GET "https://example.com/api/workspaces/string/loop-runs/string/nodes"
{  "fanout_rollups": [    {      "done": 0,      "failed": 0,      "generation": 0,      "node_id": "string",      "total": 0    }  ],  "loop_name": "string",  "next_cursor": "string",  "nodes": [    {      "attempt": 0,      "attempts": [        {          "attempt": 0,          "disposition": "string",          "ended_at": "2019-08-24T14:15:22Z",          "failure_class": "string",          "started_at": "2019-08-24T14:15:22Z",          "state": "string"        }      ],      "cancellation": {        "actor_kind": "string",        "actor_ref": "string",        "cause": "string",        "disposition": "string"      },      "cell_task_id": "string",      "child_loop_run_id": "string",      "ended_at": "2019-08-24T14:15:22Z",      "generation": 0,      "item_index": 0,      "next_retry_at": "2019-08-24T14:15:22Z",      "node_id": "string",      "session_id": "string",      "started_at": "2019-08-24T14:15:22Z",      "state": "string",      "usage": {        "tokens": 0      }    }  ],  "run_id": "string",  "run_status": "string"}
POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/nodes/{node_id}/amend

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

node_id*string

Loop node id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
generation?integer
item_index?integer
payload*unknown
reason?string

Response Body

OK

application/json
  1. response
amendment*
ok*boolean
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/nodes/string/amend" \  -H "Content-Type: application/json" \  -d '{    "payload": null  }'
{  "amendment": {    "actor_id": "string",    "actor_kind": "string",    "amended": null,    "amended_summary": {      "byte_size": 0,      "content_hash": "string"    },    "amendment_seq": 0,    "created_at": "2019-08-24T14:15:22Z",    "generation": 0,    "item_index": 0,    "loop_run_id": "string",    "node_id": "string",    "original": null,    "original_summary": {      "byte_size": 0,      "content_hash": "string"    },    "reason": "string"  },  "ok": true}

Cancel one Loop node

POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/nodes/{node_id}/cancel

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

node_id*string

Loop node id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
item_index?integer|null
reason?string

Response Body

OK

application/json
  1. response
control?|
item_index?integer|null
node_id?string
ok*boolean
provenance?|
run_id*string
status?string
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/nodes/string/cancel" \  -H "Content-Type: application/json" \  -d '{}'
{  "control": {    "attention_flag": "string",    "attention_producer_node_id": "string",    "attention_reason": "string",    "cancel_provenance": {      "actor_id": "string",      "actor_kind": "string",      "reason": "string",      "requested_at": "2019-08-24T14:15:22Z",      "rule_id": "string"    },    "cancel_state": "string",    "death_resume_streak": 0,    "last_evidence_at": "2019-08-24T14:15:22Z",    "loop_run_id": "string",    "node_id": "string",    "pause_provenance": {      "actor_id": "string",      "actor_kind": "string",      "reason": "string",      "requested_at": "2019-08-24T14:15:22Z",      "rule_id": "string"    },    "paused": true,    "quarantine_entry": null,    "quarantined": true,    "quarantined_at": "2019-08-24T14:15:22Z",    "revision": 0,    "updated_at": "2019-08-24T14:15:22Z"  },  "item_index": 0,  "node_id": "string",  "ok": true,  "provenance": {    "actor_id": "string",    "actor_kind": "string",    "reason": "string",    "requested_at": "2019-08-24T14:15:22Z",    "rule_id": "string"  },  "run_id": "string",  "status": "string"}

Pause one Loop node

POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/nodes/{node_id}/pause

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

node_id*string

Loop node id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
item_index?integer|null
mode*string
reason?string

Response Body

OK

application/json
  1. response
control?|
item_index?integer|null
node_id?string
ok*boolean
provenance?|
run_id*string
status?string
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/nodes/string/pause" \  -H "Content-Type: application/json" \  -d '{    "mode": "string"  }'
{  "control": {    "attention_flag": "string",    "attention_producer_node_id": "string",    "attention_reason": "string",    "cancel_provenance": {      "actor_id": "string",      "actor_kind": "string",      "reason": "string",      "requested_at": "2019-08-24T14:15:22Z",      "rule_id": "string"    },    "cancel_state": "string",    "death_resume_streak": 0,    "last_evidence_at": "2019-08-24T14:15:22Z",    "loop_run_id": "string",    "node_id": "string",    "pause_provenance": {      "actor_id": "string",      "actor_kind": "string",      "reason": "string",      "requested_at": "2019-08-24T14:15:22Z",      "rule_id": "string"    },    "paused": true,    "quarantine_entry": null,    "quarantined": true,    "quarantined_at": "2019-08-24T14:15:22Z",    "revision": 0,    "updated_at": "2019-08-24T14:15:22Z"  },  "item_index": 0,  "node_id": "string",  "ok": true,  "provenance": {    "actor_id": "string",    "actor_kind": "string",    "reason": "string",    "requested_at": "2019-08-24T14:15:22Z",    "rule_id": "string"  },  "run_id": "string",  "status": "string"}
GET
/api/workspaces/{workspace_id}/loop-runs/{run_id}/nodes/{node_id}/request

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

node_id*string

Loop node id

Query Parameters

generation*integer

Loop generation

Formatint32
item_index?integer

Fan-out lane index

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
actor_id?string
actor_kind?string
agents*string
answered_at?|
Formatdate-time
answered_decision?string
context*unknown
decisions*array<string>
edit_schema?unknown
expect?unknown
expires_at?|
Formatdate-time
generation*integer
item_index*integer
kind*string
loop_name?string
loop_run_id*string
node_id*string
opened_at*string
Formatdate-time
profile_id*string
prompt*string
proposed_preview?unknown
resolved_at?|
Formatdate-time
respond_schema?unknown
state*string
workspace_id?string
curl -X GET "https://example.com/api/workspaces/string/loop-runs/string/nodes/string/request?generation=0"
{  "actor_id": "string",  "actor_kind": "string",  "agents": "string",  "answered_at": "2019-08-24T14:15:22Z",  "answered_decision": "string",  "context": null,  "decisions": [    "string"  ],  "edit_schema": null,  "expect": null,  "expires_at": "2019-08-24T14:15:22Z",  "generation": 0,  "item_index": 0,  "kind": "string",  "loop_name": "string",  "loop_run_id": "string",  "node_id": "string",  "opened_at": "2019-08-24T14:15:22Z",  "profile_id": "string",  "prompt": "string",  "proposed_preview": null,  "resolved_at": "2019-08-24T14:15:22Z",  "respond_schema": null,  "state": "string",  "workspace_id": "string"}

Requeue one Loop node

POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/nodes/{node_id}/requeue

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

node_id*string

Loop node id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
item_index?integer|null
reason?string

Response Body

OK

application/json
  1. response
control?|
item_index?integer|null
node_id?string
ok*boolean
provenance?|
run_id*string
status?string
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/nodes/string/requeue" \  -H "Content-Type: application/json" \  -d '{}'
{  "control": {    "attention_flag": "string",    "attention_producer_node_id": "string",    "attention_reason": "string",    "cancel_provenance": {      "actor_id": "string",      "actor_kind": "string",      "reason": "string",      "requested_at": "2019-08-24T14:15:22Z",      "rule_id": "string"    },    "cancel_state": "string",    "death_resume_streak": 0,    "last_evidence_at": "2019-08-24T14:15:22Z",    "loop_run_id": "string",    "node_id": "string",    "pause_provenance": {      "actor_id": "string",      "actor_kind": "string",      "reason": "string",      "requested_at": "2019-08-24T14:15:22Z",      "rule_id": "string"    },    "paused": true,    "quarantine_entry": null,    "quarantined": true,    "quarantined_at": "2019-08-24T14:15:22Z",    "revision": 0,    "updated_at": "2019-08-24T14:15:22Z"  },  "item_index": 0,  "node_id": "string",  "ok": true,  "provenance": {    "actor_id": "string",    "actor_kind": "string",    "reason": "string",    "requested_at": "2019-08-24T14:15:22Z",    "rule_id": "string"  },  "run_id": "string",  "status": "string"}
POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/nodes/{node_id}/respond

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

node_id*string

Loop node id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
decision?string
generation*integer
item_index?integer
note?string
payload*unknown

Response Body

OK

application/json
  1. response
decision*string
node_id*string
ok*boolean
provenance*
run_id*string
state*string
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/nodes/string/respond" \  -H "Content-Type: application/json" \  -d '{    "generation": 0,    "payload": null  }'
{  "decision": "string",  "node_id": "string",  "ok": true,  "provenance": {    "actor_id": "string",    "actor_kind": "string",    "answered_at": "2019-08-24T14:15:22Z"  },  "run_id": "string",  "state": "string"}

Resume one Loop node

POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/nodes/{node_id}/resume

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

node_id*string

Loop node id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
item_index?integer|null
mode*string
payload?unknown

Response Body

OK

application/json
  1. response
control?|
item_index?integer|null
node_id?string
ok*boolean
provenance?|
run_id*string
status?string
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/nodes/string/resume" \  -H "Content-Type: application/json" \  -d '{    "mode": "string"  }'
{  "control": {    "attention_flag": "string",    "attention_producer_node_id": "string",    "attention_reason": "string",    "cancel_provenance": {      "actor_id": "string",      "actor_kind": "string",      "reason": "string",      "requested_at": "2019-08-24T14:15:22Z",      "rule_id": "string"    },    "cancel_state": "string",    "death_resume_streak": 0,    "last_evidence_at": "2019-08-24T14:15:22Z",    "loop_run_id": "string",    "node_id": "string",    "pause_provenance": {      "actor_id": "string",      "actor_kind": "string",      "reason": "string",      "requested_at": "2019-08-24T14:15:22Z",      "rule_id": "string"    },    "paused": true,    "quarantine_entry": null,    "quarantined": true,    "quarantined_at": "2019-08-24T14:15:22Z",    "revision": 0,    "updated_at": "2019-08-24T14:15:22Z"  },  "item_index": 0,  "node_id": "string",  "ok": true,  "provenance": {    "actor_id": "string",    "actor_kind": "string",    "reason": "string",    "requested_at": "2019-08-24T14:15:22Z",    "rule_id": "string"  },  "run_id": "string",  "status": "string"}

Pause one Loop run

POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/pause

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
[key: string]?unknown

Response Body

OK

application/json
  1. response
[key: string]?boolean
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/pause" \  -H "Content-Type: application/json" \  -d '{    "property1": null,    "property2": null  }'
{  "property1": true,  "property2": true}
POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/rerun

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
from_node*string
item_index?integer|null
reason?string
request_id?string

Response Body

OK

application/json
  1. response
carried*integer
generation*integer
Formatint64
parent_generation*integer
Formatint64
replayed?boolean
rerun_nodes*array<string>
run_id*string
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/rerun" \  -H "Content-Type: application/json" \  -d '{    "from_node": "string"  }'
{  "carried": 0,  "generation": 0,  "parent_generation": 0,  "replayed": true,  "rerun_nodes": [    "string"  ],  "run_id": "string"}

Resume one Loop run

POST
/api/workspaces/{workspace_id}/loop-runs/{run_id}/resume

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
[key: string]?unknown

Response Body

OK

application/json
  1. response
[key: string]?boolean
curl -X POST "https://example.com/api/workspaces/string/loop-runs/string/resume" \  -H "Content-Type: application/json" \  -d '{    "property1": null,    "property2": null  }'
{  "property1": true,  "property2": true}
GET
/api/workspaces/{workspace_id}/loop-runs/{run_id}/timeline

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

view?string

Timeline view: notable or all

Value in"notable""all"
cursor?string

Opaque snapshot-fenced cursor

limit?integer

Maximum entries to return

Formatint32
after_sequence?integer

Return entries after this per-run sequence

Formatint64
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
entries*array<>
head_seq*integer
Formatint64
next_cursor?string
run_id*string
curl -X GET "https://example.com/api/workspaces/string/loop-runs/string/timeline"
{  "entries": [    {      "at": "2019-08-24T14:15:22Z",      "attempt": 0,      "first_seq": 0,      "generation": 0,      "kind": "node_running",      "node_id": "string",      "seq": 0,      "title": "string"    }  ],  "head_seq": 0,  "next_cursor": "string",  "run_id": "string"}
GET
/api/workspaces/{workspace_id}/loop-runs/{run_id}/turns

Path Parameters

workspace_id*string

Workspace id

run_id*string

Loop run id

Query Parameters

node?string

Filter by Goal node id

item?integer

Filter by nonnegative item index

Formatint32
after_seq?integer

Resume after this run-wide Goal sequence

Formatint32
limit?integer

Page size from 1 to 200; defaults to 50

Formatint32

Response Body

OK

application/json
  1. response
next_after_seq*|
Formatint64
turns*array<>
curl -X GET "https://example.com/api/workspaces/string/loop-runs/string/turns"
{  "next_after_seq": 0,  "turns": [    {      "actor_id": "string",      "actor_kind": "string",      "binding_epoch": 0,      "binding_handle": "string",      "blocking_issues": [        {          "id": "string",          "note": "string"        }      ],      "criteria": [        {          "blocking_issues": [            {              "id": "string",              "note": "string"            }          ],          "broken": true,          "evidence": null,          "exit_code": 0,          "id": "string",          "outcome": "approved",          "passed": true,          "payload": null,          "score": 0,          "stderr": "string",          "stdout": "string",          "type": "string",          "warnings": [            {              "code": "string",              "message": "string"            }          ]        }      ],      "ended_at": "2019-08-24T14:15:22Z",      "evidence_ref": "string",      "generation": 0,      "item_index": 0,      "node_id": "string",      "prompt_attempt": 0,      "prompt_id": "string",      "prompt_ref": "string",      "reason_code": "goal_not_active",      "result_status": "completed",      "seq": 0,      "session_id": "string",      "started_at": "2019-08-24T14:15:22Z",      "stop_reason": "end_turn",      "tokens_used": 0,      "turn": 0,      "verdict_outcome": "approved",      "warnings": [        {          "code": "string",          "message": "string"        }      ]    }  ]}
GET
/api/workspaces/{workspace_id}/loops

Path Parameters

workspace_id*string

Workspace id

Query Parameters

q?string

Search Loop name or contract goal

kind?string

Filter by effective Loop kind

Value in"read_only""workspace"
category?string

Filter by exact catalog category

status?string

Filter by exact latest-run status

Value in"queued""running""watching""needs-approval""paused""done""no-op""blocked""failed""exhausted""stalled""canceled"
sort?"name"

Stable read-only-first name order

Value in"name"
cursor?string

Continue after this workspace- and query-bound Loop cursor

limit?integer

Maximum number of Loops to return; defaults to 50 and is capped at 200

Formatint32
profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
facets*
loops*array<>
page*
curl -X GET "https://example.com/api/workspaces/string/loops"
{  "facets": {    "categories": {      "property1": 0,      "property2": 0    },    "kinds": {      "property1": 0,      "property2": 0    },    "statuses": {      "property1": 0,      "property2": 0    }  },  "loops": [    {      "aggregate_30d": {        "failed": 0,        "runs": 0,        "succeeded": 0      },      "catalog": {        "category": "string",        "keywords": [          "string"        ],        "use_when": "string"      },      "contract": {        "boundaries": [          "string"        ],        "budget": {          "on_exceeded": "halt",          "tokens": 0,          "wall_clock_sec": 0        },        "constraints": [          "string"        ],        "definition_of_done": "string",        "goal": "string",        "iteration_cap": 0,        "no_progress": {          "window": 0        },        "on_blocked": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_canceled": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_done": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_exhausted": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_failed": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_noop": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_stalled": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "runtime_defaults": {          "judge": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          },          "worker": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        },        "runtime_rules": [          {            "match": {              "complexity": "string",              "id": "string",              "type": "string"            },            "runtime": {              "acp_options": [                {                  "bool_value": true,                  "id": "string",                  "value_id": "string"                }              ],              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "normal"            }          }        ],        "stop_when": "string",        "terminal_states": [          "string"        ],        "verification": [          {            "agent": "string",            "check": "string",            "contains": "string",            "expect": "string",            "id": "string",            "inputs": {              "property1": null,              "property2": null            },            "metric": {              "direction": "maximize",              "min_delta": 0            },            "prompt": "string",            "rubric": "string",            "runtime": {              "acp_options": [                {                  "bool_value": true,                  "id": "string",                  "value_id": "string"                }              ],              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "normal"            },            "tool": "string",            "type": "string"          }        ]      },      "description": "string",      "inputs": {        "property1": {          "default": null,          "description": "string",          "enum": [            "string"          ],          "ref": {            "kind": "skill"          },          "required": true,          "type": "string"        },        "property2": {          "default": null,          "description": "string",          "enum": [            "string"          ],          "ref": {            "kind": "skill"          },          "required": true,          "type": "string"        }      },      "last_run": {        "best_generation": 0,        "best_score": 0,        "created_at": "2019-08-24T14:15:22Z",        "id": "string",        "status": "queued"      },      "name": "string",      "source": "marketplace",      "start": [        {          "input_mapping": {            "property1": "string",            "property2": "string"          },          "inputs": {            "property1": null,            "property2": null          },          "kind": "string"        }      ],      "success_rate_30d": 0.1,      "version": 0,      "workspace_id": "string"    }  ],  "page": {    "has_more": true,    "limit": 0,    "next_cursor": "string",    "total": 0  }}
POST
/api/workspaces/{workspace_id}/loops

Path Parameters

workspace_id*string

Workspace id

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
definition?|
fork_from_name?string

Response Body

Created

application/json
  1. response
loop*
curl -X POST "https://example.com/api/workspaces/string/loops" \  -H "Content-Type: application/json" \  -d '{}'
{  "loop": {    "catalog": {      "category": "string",      "keywords": [        "string"      ],      "use_when": "string"    },    "definition": {      "apiVersion": "string",      "concurrency": "string",      "contract": {        "boundaries": [          "string"        ],        "budget": {          "on_exceeded": "halt",          "tokens": 0,          "wall_clock_sec": 0        },        "constraints": [          "string"        ],        "definition_of_done": "string",        "goal": "string",        "iteration_cap": 0,        "no_progress": {          "window": 0        },        "on_blocked": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_canceled": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_done": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_exhausted": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_failed": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_noop": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_stalled": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "runtime_defaults": {          "judge": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          },          "worker": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        },        "runtime_rules": [          {            "match": {              "complexity": "string",              "id": "string",              "type": "string"            },            "runtime": {              "acp_options": [                {                  "bool_value": true,                  "id": "string",                  "value_id": "string"                }              ],              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "normal"            }          }        ],        "stop_when": "string",        "terminal_states": [          "string"        ],        "verification": [          {            "agent": "string",            "check": "string",            "contains": "string",            "expect": "string",            "id": "string",            "inputs": {              "property1": null,              "property2": null            },            "metric": {              "direction": "maximize",              "min_delta": 0            },            "prompt": "string",            "rubric": "string",            "runtime": {              "acp_options": [                {                  "bool_value": true,                  "id": "string",                  "value_id": "string"                }              ],              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "normal"            },            "tool": "string",            "type": "string"          }        ]      },      "graph": {        "edges": [          {            "from": "string",            "to": "string",            "property1": null,            "property2": null          }        ],        "nodes": [          {            "batch_size": 0,            "bind_as": "string",            "body": {              "property1": null,              "property2": null            },            "class": "action",            "collection": "string",            "condition": "string",            "contract": {              "property1": null,              "property2": null            },            "criteria": [              {                "agent": "string",                "check": "string",                "contains": "string",                "expect": "string",                "id": "string",                "inputs": {                  "property1": null,                  "property2": null                },                "metric": {                  "direction": "maximize",                  "min_delta": 0                },                "prompt": "string",                "rubric": "string",                "tool": "string",                "type": "string",                "property1": null,                "property2": null              }            ],            "deadline": "string",            "default": "string",            "events": [              {                "filter": "string",                "kind": "task.status_changed"              }            ],            "expires": {              "after": "string",              "escalate": [                {                  "emit": {                    "kind": "string",                    "payload": {                      "property1": null,                      "property2": null                    }                  }                }              ],              "route": "string"            },            "filter": "string",            "harvest": {              "property1": null,              "property2": null            },            "id": "string",            "index_as": "string",            "input_ref": "string",            "kind": "string",            "max_fan_out": 0,            "max_parallel": 0,            "max_revisions": 0,            "on_cancel": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_error": {              "allow_fail": true,              "effects": [                {                  "emit": {                    "kind": "string",                    "payload": {                      "property1": null,                      "property2": null                    }                  }                }              ],              "route": "string"            },            "on_eval_error": "fail",            "on_parent_close": "terminate",            "on_pause": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_quarantine": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_result": {              "property1": null,              "property2": null            },            "on_retry": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_success": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_timeout": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "params": {              "environment": {                "directory": "string",                "mode": "root",                "worktree_ref": "string"              },              "property1": null,              "property2": null            },            "parse": "string",            "pattern": "string",            "produces": {              "property1": null,              "property2": null            },            "result_contract": {              "failure_field": "string",              "message_field": "string"            },            "retry": {              "backoff": {                "base": "string",                "max": "string"              },              "max_attempts": 0,              "non_retryable": [                "string"              ],              "on_failure": "string"            },            "review": {              "decisions": [                "approve"              ],              "expires": {                "after": "string",                "escalate": [                  {                    "emit": {                      "kind": "string",                      "payload": {                        "property1": null,                        "property2": null                      }                    }                  }                ],                "route": "string"              },              "on_reject": {                "route": "string",                "property1": null,                "property2": null              },              "prompt": "string",              "responders": {                "agents": "deny"              },              "when": "string",              "property1": null,              "property2": null            },            "routes": [              {                "to": "string",                "when": "string"              }            ],            "session": {              "property1": null,              "property2": null            },            "strategy": "wait_all",            "timeout": "string",            "verdict_policy": "string",            "watch": {              "property1": null,              "property2": null            },            "property1": null,            "property2": null          }        ],        "property1": null,        "property2": null      },      "inputs": {        "property1": {          "default": null,          "description": "string",          "enum": [            "string"          ],          "ref": {            "kind": "skill"          },          "required": true,          "type": "string"        },        "property2": {          "default": null,          "description": "string",          "enum": [            "string"          ],          "ref": {            "kind": "skill"          },          "required": true,          "type": "string"        }      },      "kind": "string",      "meta": {        "catalog": {          "category": "string",          "keywords": [            "string"          ],          "use_when": "string"        },        "description": "string",        "name": "string",        "version": 0      },      "start": [        {          "input_mapping": {            "property1": "string",            "property2": "string"          },          "inputs": {            "property1": null,            "property2": null          },          "kind": "string"        }      ]    },    "description": "string",    "effective_config": {      "budget_on_exceeded": "halt",      "budget_tokens": 0,      "budget_wall_sec": 0,      "enabled_checks_json": null,      "environment": {        "directory": "string",        "mode": "root",        "worktree_ref": "string"      },      "fan_out_width": 0,      "gate_max_revisions": 0,      "human_gate_enabled": true,      "iteration_cap": 0,      "no_progress_window": 0,      "reattempt_strategy": "failed_only",      "request_expire_after": "string",      "run_runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "runtime_defaults": {        "judge": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        },        "worker": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      },      "runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "sources": {        "property1": "string",        "property2": "string"      }    },    "effective_lifecycle": {      "admission_horizon": "string",      "liveness_silence_window": "string",      "predicate_cost_limit": 0,      "resume_death_streak_limit": 0,      "retry_backoff_base": "string",      "retry_backoff_max": "string",      "retry_max_attempts": 0,      "retry_non_retryable": [        "string"      ],      "sources": {        "property1": "string",        "property2": "string"      },      "wait_admission_attempts": 0,      "wait_admission_interval": "string"    },    "name": "string",    "source": "marketplace",    "version": 0  }}
GET
/api/workspaces/{workspace_id}/loops/{name}

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Query Parameters

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
loop*
curl -X GET "https://example.com/api/workspaces/string/loops/string"
{  "loop": {    "catalog": {      "category": "string",      "keywords": [        "string"      ],      "use_when": "string"    },    "definition": {      "apiVersion": "string",      "concurrency": "string",      "contract": {        "boundaries": [          "string"        ],        "budget": {          "on_exceeded": "halt",          "tokens": 0,          "wall_clock_sec": 0        },        "constraints": [          "string"        ],        "definition_of_done": "string",        "goal": "string",        "iteration_cap": 0,        "no_progress": {          "window": 0        },        "on_blocked": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_canceled": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_done": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_exhausted": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_failed": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_noop": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_stalled": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "runtime_defaults": {          "judge": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          },          "worker": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        },        "runtime_rules": [          {            "match": {              "complexity": "string",              "id": "string",              "type": "string"            },            "runtime": {              "acp_options": [                {                  "bool_value": true,                  "id": "string",                  "value_id": "string"                }              ],              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "normal"            }          }        ],        "stop_when": "string",        "terminal_states": [          "string"        ],        "verification": [          {            "agent": "string",            "check": "string",            "contains": "string",            "expect": "string",            "id": "string",            "inputs": {              "property1": null,              "property2": null            },            "metric": {              "direction": "maximize",              "min_delta": 0            },            "prompt": "string",            "rubric": "string",            "runtime": {              "acp_options": [                {                  "bool_value": true,                  "id": "string",                  "value_id": "string"                }              ],              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "normal"            },            "tool": "string",            "type": "string"          }        ]      },      "graph": {        "edges": [          {            "from": "string",            "to": "string",            "property1": null,            "property2": null          }        ],        "nodes": [          {            "batch_size": 0,            "bind_as": "string",            "body": {              "property1": null,              "property2": null            },            "class": "action",            "collection": "string",            "condition": "string",            "contract": {              "property1": null,              "property2": null            },            "criteria": [              {                "agent": "string",                "check": "string",                "contains": "string",                "expect": "string",                "id": "string",                "inputs": {                  "property1": null,                  "property2": null                },                "metric": {                  "direction": "maximize",                  "min_delta": 0                },                "prompt": "string",                "rubric": "string",                "tool": "string",                "type": "string",                "property1": null,                "property2": null              }            ],            "deadline": "string",            "default": "string",            "events": [              {                "filter": "string",                "kind": "task.status_changed"              }            ],            "expires": {              "after": "string",              "escalate": [                {                  "emit": {                    "kind": "string",                    "payload": {                      "property1": null,                      "property2": null                    }                  }                }              ],              "route": "string"            },            "filter": "string",            "harvest": {              "property1": null,              "property2": null            },            "id": "string",            "index_as": "string",            "input_ref": "string",            "kind": "string",            "max_fan_out": 0,            "max_parallel": 0,            "max_revisions": 0,            "on_cancel": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_error": {              "allow_fail": true,              "effects": [                {                  "emit": {                    "kind": "string",                    "payload": {                      "property1": null,                      "property2": null                    }                  }                }              ],              "route": "string"            },            "on_eval_error": "fail",            "on_parent_close": "terminate",            "on_pause": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_quarantine": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_result": {              "property1": null,              "property2": null            },            "on_retry": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_success": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_timeout": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "params": {              "environment": {                "directory": "string",                "mode": "root",                "worktree_ref": "string"              },              "property1": null,              "property2": null            },            "parse": "string",            "pattern": "string",            "produces": {              "property1": null,              "property2": null            },            "result_contract": {              "failure_field": "string",              "message_field": "string"            },            "retry": {              "backoff": {                "base": "string",                "max": "string"              },              "max_attempts": 0,              "non_retryable": [                "string"              ],              "on_failure": "string"            },            "review": {              "decisions": [                "approve"              ],              "expires": {                "after": "string",                "escalate": [                  {                    "emit": {                      "kind": "string",                      "payload": {                        "property1": null,                        "property2": null                      }                    }                  }                ],                "route": "string"              },              "on_reject": {                "route": "string",                "property1": null,                "property2": null              },              "prompt": "string",              "responders": {                "agents": "deny"              },              "when": "string",              "property1": null,              "property2": null            },            "routes": [              {                "to": "string",                "when": "string"              }            ],            "session": {              "property1": null,              "property2": null            },            "strategy": "wait_all",            "timeout": "string",            "verdict_policy": "string",            "watch": {              "property1": null,              "property2": null            },            "property1": null,            "property2": null          }        ],        "property1": null,        "property2": null      },      "inputs": {        "property1": {          "default": null,          "description": "string",          "enum": [            "string"          ],          "ref": {            "kind": "skill"          },          "required": true,          "type": "string"        },        "property2": {          "default": null,          "description": "string",          "enum": [            "string"          ],          "ref": {            "kind": "skill"          },          "required": true,          "type": "string"        }      },      "kind": "string",      "meta": {        "catalog": {          "category": "string",          "keywords": [            "string"          ],          "use_when": "string"        },        "description": "string",        "name": "string",        "version": 0      },      "start": [        {          "input_mapping": {            "property1": "string",            "property2": "string"          },          "inputs": {            "property1": null,            "property2": null          },          "kind": "string"        }      ]    },    "description": "string",    "effective_config": {      "budget_on_exceeded": "halt",      "budget_tokens": 0,      "budget_wall_sec": 0,      "enabled_checks_json": null,      "environment": {        "directory": "string",        "mode": "root",        "worktree_ref": "string"      },      "fan_out_width": 0,      "gate_max_revisions": 0,      "human_gate_enabled": true,      "iteration_cap": 0,      "no_progress_window": 0,      "reattempt_strategy": "failed_only",      "request_expire_after": "string",      "run_runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "runtime_defaults": {        "judge": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        },        "worker": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      },      "runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "sources": {        "property1": "string",        "property2": "string"      }    },    "effective_lifecycle": {      "admission_horizon": "string",      "liveness_silence_window": "string",      "predicate_cost_limit": 0,      "resume_death_streak_limit": 0,      "retry_backoff_base": "string",      "retry_backoff_max": "string",      "retry_max_attempts": 0,      "retry_non_retryable": [        "string"      ],      "sources": {        "property1": "string",        "property2": "string"      },      "wait_admission_attempts": 0,      "wait_admission_interval": "string"    },    "name": "string",    "source": "marketplace",    "version": 0  }}
PATCH
/api/workspaces/{workspace_id}/loops/{name}

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
definition*
expected_version?integer|null

Response Body

OK

application/json
  1. response
loop*
curl -X PATCH "https://example.com/api/workspaces/string/loops/string" \  -H "Content-Type: application/json" \  -d '{    "definition": {      "apiVersion": "string",      "contract": {        "budget": {          "tokens": 0,          "wall_clock_sec": 0        },        "definition_of_done": "string",        "goal": "string",        "iteration_cap": 0,        "no_progress": {          "window": 0        }      },      "graph": {        "edges": [          {            "from": "string",            "to": "string",            "property1": null,            "property2": null          }        ],        "nodes": [          {            "class": "action",            "id": "string",            "kind": "string",            "property1": null,            "property2": null          }        ],        "property1": null,        "property2": null      },      "kind": "string",      "meta": {        "catalog": {},        "name": "string"      }    }  }'
{  "loop": {    "catalog": {      "category": "string",      "keywords": [        "string"      ],      "use_when": "string"    },    "definition": {      "apiVersion": "string",      "concurrency": "string",      "contract": {        "boundaries": [          "string"        ],        "budget": {          "on_exceeded": "halt",          "tokens": 0,          "wall_clock_sec": 0        },        "constraints": [          "string"        ],        "definition_of_done": "string",        "goal": "string",        "iteration_cap": 0,        "no_progress": {          "window": 0        },        "on_blocked": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_canceled": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_done": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_exhausted": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_failed": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_noop": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "on_stalled": [          {            "emit": {              "kind": "string",              "payload": {                "property1": null,                "property2": null              }            }          }        ],        "runtime_defaults": {          "judge": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          },          "worker": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        },        "runtime_rules": [          {            "match": {              "complexity": "string",              "id": "string",              "type": "string"            },            "runtime": {              "acp_options": [                {                  "bool_value": true,                  "id": "string",                  "value_id": "string"                }              ],              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "normal"            }          }        ],        "stop_when": "string",        "terminal_states": [          "string"        ],        "verification": [          {            "agent": "string",            "check": "string",            "contains": "string",            "expect": "string",            "id": "string",            "inputs": {              "property1": null,              "property2": null            },            "metric": {              "direction": "maximize",              "min_delta": 0            },            "prompt": "string",            "rubric": "string",            "runtime": {              "acp_options": [                {                  "bool_value": true,                  "id": "string",                  "value_id": "string"                }              ],              "model": "string",              "provider": "string",              "reasoning": "string",              "speed": "normal"            },            "tool": "string",            "type": "string"          }        ]      },      "graph": {        "edges": [          {            "from": "string",            "to": "string",            "property1": null,            "property2": null          }        ],        "nodes": [          {            "batch_size": 0,            "bind_as": "string",            "body": {              "property1": null,              "property2": null            },            "class": "action",            "collection": "string",            "condition": "string",            "contract": {              "property1": null,              "property2": null            },            "criteria": [              {                "agent": "string",                "check": "string",                "contains": "string",                "expect": "string",                "id": "string",                "inputs": {                  "property1": null,                  "property2": null                },                "metric": {                  "direction": "maximize",                  "min_delta": 0                },                "prompt": "string",                "rubric": "string",                "tool": "string",                "type": "string",                "property1": null,                "property2": null              }            ],            "deadline": "string",            "default": "string",            "events": [              {                "filter": "string",                "kind": "task.status_changed"              }            ],            "expires": {              "after": "string",              "escalate": [                {                  "emit": {                    "kind": "string",                    "payload": {                      "property1": null,                      "property2": null                    }                  }                }              ],              "route": "string"            },            "filter": "string",            "harvest": {              "property1": null,              "property2": null            },            "id": "string",            "index_as": "string",            "input_ref": "string",            "kind": "string",            "max_fan_out": 0,            "max_parallel": 0,            "max_revisions": 0,            "on_cancel": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_error": {              "allow_fail": true,              "effects": [                {                  "emit": {                    "kind": "string",                    "payload": {                      "property1": null,                      "property2": null                    }                  }                }              ],              "route": "string"            },            "on_eval_error": "fail",            "on_parent_close": "terminate",            "on_pause": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_quarantine": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_result": {              "property1": null,              "property2": null            },            "on_retry": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_success": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "on_timeout": [              {                "emit": {                  "kind": "string",                  "payload": {                    "property1": null,                    "property2": null                  }                }              }            ],            "params": {              "environment": {                "directory": "string",                "mode": "root",                "worktree_ref": "string"              },              "property1": null,              "property2": null            },            "parse": "string",            "pattern": "string",            "produces": {              "property1": null,              "property2": null            },            "result_contract": {              "failure_field": "string",              "message_field": "string"            },            "retry": {              "backoff": {                "base": "string",                "max": "string"              },              "max_attempts": 0,              "non_retryable": [                "string"              ],              "on_failure": "string"            },            "review": {              "decisions": [                "approve"              ],              "expires": {                "after": "string",                "escalate": [                  {                    "emit": {                      "kind": "string",                      "payload": {                        "property1": null,                        "property2": null                      }                    }                  }                ],                "route": "string"              },              "on_reject": {                "route": "string",                "property1": null,                "property2": null              },              "prompt": "string",              "responders": {                "agents": "deny"              },              "when": "string",              "property1": null,              "property2": null            },            "routes": [              {                "to": "string",                "when": "string"              }            ],            "session": {              "property1": null,              "property2": null            },            "strategy": "wait_all",            "timeout": "string",            "verdict_policy": "string",            "watch": {              "property1": null,              "property2": null            },            "property1": null,            "property2": null          }        ],        "property1": null,        "property2": null      },      "inputs": {        "property1": {          "default": null,          "description": "string",          "enum": [            "string"          ],          "ref": {            "kind": "skill"          },          "required": true,          "type": "string"        },        "property2": {          "default": null,          "description": "string",          "enum": [            "string"          ],          "ref": {            "kind": "skill"          },          "required": true,          "type": "string"        }      },      "kind": "string",      "meta": {        "catalog": {          "category": "string",          "keywords": [            "string"          ],          "use_when": "string"        },        "description": "string",        "name": "string",        "version": 0      },      "start": [        {          "input_mapping": {            "property1": "string",            "property2": "string"          },          "inputs": {            "property1": null,            "property2": null          },          "kind": "string"        }      ]    },    "description": "string",    "effective_config": {      "budget_on_exceeded": "halt",      "budget_tokens": 0,      "budget_wall_sec": 0,      "enabled_checks_json": null,      "environment": {        "directory": "string",        "mode": "root",        "worktree_ref": "string"      },      "fan_out_width": 0,      "gate_max_revisions": 0,      "human_gate_enabled": true,      "iteration_cap": 0,      "no_progress_window": 0,      "reattempt_strategy": "failed_only",      "request_expire_after": "string",      "run_runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "runtime_defaults": {        "judge": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        },        "worker": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      },      "runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "sources": {        "property1": "string",        "property2": "string"      }    },    "effective_lifecycle": {      "admission_horizon": "string",      "liveness_silence_window": "string",      "predicate_cost_limit": 0,      "resume_death_streak_limit": 0,      "retry_backoff_base": "string",      "retry_backoff_max": "string",      "retry_max_attempts": 0,      "retry_non_retryable": [        "string"      ],      "sources": {        "property1": "string",        "property2": "string"      },      "wait_admission_attempts": 0,      "wait_admission_interval": "string"    },    "name": "string",    "source": "marketplace",    "version": 0  }}
DELETE
/api/workspaces/{workspace_id}/loops/{name}

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Query Parameters

profile?string

Act as this profile by name

Response Body

No Content

curl -X DELETE "https://example.com/api/workspaces/string/loops/string"
Empty
GET
/api/workspaces/{workspace_id}/loops/{name}/annotations

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Query Parameters

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
annotations*array<>
curl -X GET "https://example.com/api/workspaces/string/loops/string/annotations"
{  "annotations": [    {      "node_id": "string",      "x": 0.1,      "y": 0.1    }  ]}
PUT
/api/workspaces/{workspace_id}/loops/{name}/annotations

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
annotations*array<>

Response Body

OK

application/json
  1. response
annotations*array<>
curl -X PUT "https://example.com/api/workspaces/string/loops/string/annotations" \  -H "Content-Type: application/json" \  -d '{    "annotations": [      {        "node_id": "string",        "x": 0.1,        "y": 0.1      }    ]  }'
{  "annotations": [    {      "node_id": "string",      "x": 0.1,      "y": 0.1    }  ]}

Get Loop config override

GET
/api/workspaces/{workspace_id}/loops/{name}/config

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Query Parameters

profile?string

Read one profile's rows by name

all_profiles?boolean

Read the owner-labeled all-profiles aggregate

Response Body

OK

application/json
  1. response
config*|
effective_config*
curl -X GET "https://example.com/api/workspaces/string/loops/string/config"
{  "config": {    "budget_on_exceeded": "halt",    "budget_tokens": 0,    "budget_wall_sec": 0,    "enabled_checks_json": null,    "environment": {      "directory": "string",      "mode": "root",      "worktree_ref": "string"    },    "fan_out_width": 0,    "gate_max_revisions": 0,    "human_gate_enabled": true,    "iteration_cap": 0,    "no_progress_window": 0,    "reattempt_strategy": "failed_only",    "runtime_defaults": {      "judge": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      },      "worker": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      }    },    "runtime_rules": [      {        "match": {          "complexity": "string",          "id": "string",          "type": "string"        },        "runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      }    ]  },  "effective_config": {    "budget_on_exceeded": "halt",    "budget_tokens": 0,    "budget_wall_sec": 0,    "enabled_checks_json": null,    "environment": {      "directory": "string",      "mode": "root",      "worktree_ref": "string"    },    "fan_out_width": 0,    "gate_max_revisions": 0,    "human_gate_enabled": true,    "iteration_cap": 0,    "no_progress_window": 0,    "reattempt_strategy": "failed_only",    "request_expire_after": "string",    "run_runtime_rules": [      {        "match": {          "complexity": "string",          "id": "string",          "type": "string"        },        "runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      }    ],    "runtime_defaults": {      "judge": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      },      "worker": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      }    },    "runtime_rules": [      {        "match": {          "complexity": "string",          "id": "string",          "type": "string"        },        "runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      }    ],    "sources": {      "property1": "string",      "property2": "string"    }  }}
PUT
/api/workspaces/{workspace_id}/loops/{name}/config

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
config*

Response Body

OK

application/json
  1. response
config*|
effective_config*
curl -X PUT "https://example.com/api/workspaces/string/loops/string/config" \  -H "Content-Type: application/json" \  -d '{    "config": {}  }'
{  "config": {    "budget_on_exceeded": "halt",    "budget_tokens": 0,    "budget_wall_sec": 0,    "enabled_checks_json": null,    "environment": {      "directory": "string",      "mode": "root",      "worktree_ref": "string"    },    "fan_out_width": 0,    "gate_max_revisions": 0,    "human_gate_enabled": true,    "iteration_cap": 0,    "no_progress_window": 0,    "reattempt_strategy": "failed_only",    "runtime_defaults": {      "judge": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      },      "worker": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      }    },    "runtime_rules": [      {        "match": {          "complexity": "string",          "id": "string",          "type": "string"        },        "runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      }    ]  },  "effective_config": {    "budget_on_exceeded": "halt",    "budget_tokens": 0,    "budget_wall_sec": 0,    "enabled_checks_json": null,    "environment": {      "directory": "string",      "mode": "root",      "worktree_ref": "string"    },    "fan_out_width": 0,    "gate_max_revisions": 0,    "human_gate_enabled": true,    "iteration_cap": 0,    "no_progress_window": 0,    "reattempt_strategy": "failed_only",    "request_expire_after": "string",    "run_runtime_rules": [      {        "match": {          "complexity": "string",          "id": "string",          "type": "string"        },        "runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      }    ],    "runtime_defaults": {      "judge": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      },      "worker": {        "acp_options": [          {            "bool_value": true,            "id": "string",            "value_id": "string"          }        ],        "model": "string",        "provider": "string",        "reasoning": "string",        "speed": "normal"      }    },    "runtime_rules": [      {        "match": {          "complexity": "string",          "id": "string",          "type": "string"        },        "runtime": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      }    ],    "sources": {      "property1": "string",      "property2": "string"    }  }}
GET
/api/workspaces/{workspace_id}/loops/{name}/input-defaults

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Query Parameters

scope*string

Config scope: user or workspace

Value in"user""workspace"

Response Body

OK

application/json
  1. response
loop_name*string
scope*string
values*
curl -X GET "https://example.com/api/workspaces/string/loops/string/input-defaults?scope=user"
{  "loop_name": "string",  "scope": "string",  "values": {    "property1": null,    "property2": null  }}
PUT
/api/workspaces/{workspace_id}/loops/{name}/input-defaults

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Request Body

JSON request body

application/json
  1. body
scope*string
values*

Response Body

OK

application/json
  1. response
loop_name*string
scope*string
values*
curl -X PUT "https://example.com/api/workspaces/string/loops/string/input-defaults" \  -H "Content-Type: application/json" \  -d '{    "scope": "string",    "values": {      "property1": null,      "property2": null    }  }'
{  "loop_name": "string",  "scope": "string",  "values": {    "property1": null,    "property2": null  }}
GET
/api/workspaces/{workspace_id}/loops/{name}/input-defaults/{key}

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

key*string

Declared Loop input name

Query Parameters

scope*string

Config scope: user or workspace

Value in"user""workspace"

Response Body

OK

application/json
  1. response
key*string
loop_name*string
present*boolean
scope*string
value?unknown
curl -X GET "https://example.com/api/workspaces/string/loops/string/input-defaults/string?scope=user"
{  "key": "string",  "loop_name": "string",  "present": true,  "scope": "string",  "value": null}
DELETE
/api/workspaces/{workspace_id}/loops/{name}/input-defaults/{key}

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

key*string

Declared Loop input name

Query Parameters

scope*string

Config scope: user or workspace

Value in"user""workspace"

Response Body

OK

application/json
  1. response
deleted*boolean
key*string
loop_name*string
scope*string
curl -X DELETE "https://example.com/api/workspaces/string/loops/string/input-defaults/string?scope=user"
{  "deleted": true,  "key": "string",  "loop_name": "string",  "scope": "string"}
PUT
/api/workspaces/{workspace_id}/loops/{name}/input-defaults/{key}

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

key*string

Declared Loop input name

Request Body

JSON request body

application/json
  1. body
scope*string
value*unknown

Response Body

OK

application/json
  1. response
key*string
loop_name*string
present*boolean
scope*string
value?unknown
curl -X PUT "https://example.com/api/workspaces/string/loops/string/input-defaults/string" \  -H "Content-Type: application/json" \  -d '{    "scope": "string",    "value": null  }'
{  "key": "string",  "loop_name": "string",  "present": true,  "scope": "string",  "value": null}
POST
/api/workspaces/{workspace_id}/loops/{name}/run

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Query Parameters

dry?boolean

Preview the run without creating durable state

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
config_overrides?|
inputs?
parent_loop_run_id?string

Response Body

OK

application/json
  1. response
dry_run?|
run?|
web_url?string
curl -X POST "https://example.com/api/workspaces/string/loops/string/run" \  -H "Content-Type: application/json" \  -d '{}'
{  "dry_run": {    "contract": {      "boundaries": [        "string"      ],      "budget": {        "on_exceeded": "halt",        "tokens": 0,        "wall_clock_sec": 0      },      "constraints": [        "string"      ],      "definition_of_done": "string",      "goal": "string",      "iteration_cap": 0,      "no_progress": {        "window": 0      },      "on_blocked": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_canceled": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_done": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_exhausted": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_failed": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_noop": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_stalled": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "runtime_defaults": {        "judge": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        },        "worker": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      },      "runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "stop_when": "string",      "terminal_states": [        "string"      ],      "verification": [        {          "agent": "string",          "check": "string",          "contains": "string",          "expect": "string",          "id": "string",          "inputs": {            "property1": null,            "property2": null          },          "metric": {            "direction": "maximize",            "min_delta": 0          },          "prompt": "string",          "rubric": "string",          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          },          "tool": "string",          "type": "string"        }      ]    },    "effective_config": {      "budget_on_exceeded": "halt",      "budget_tokens": 0,      "budget_wall_sec": 0,      "enabled_checks_json": null,      "environment": {        "directory": "string",        "mode": "root",        "worktree_ref": "string"      },      "fan_out_width": 0,      "gate_max_revisions": 0,      "human_gate_enabled": true,      "iteration_cap": 0,      "no_progress_window": 0,      "reattempt_strategy": "failed_only",      "request_expire_after": "string",      "run_runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "runtime_defaults": {        "judge": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        },        "worker": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      },      "runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "sources": {        "property1": "string",        "property2": "string"      }    },    "generation": 0,    "input_origins": {      "property1": "string",      "property2": "string"    },    "loop_name": "string",    "materialized_contract": {      "boundaries": [        "string"      ],      "budget": {        "on_exceeded": "halt",        "tokens": 0,        "wall_clock_sec": 0      },      "constraints": [        "string"      ],      "definition_of_done": "string",      "goal": "string",      "iteration_cap": 0,      "no_progress": {        "window": 0      },      "on_blocked": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_canceled": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_done": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_exhausted": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_failed": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_noop": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "on_stalled": [        {          "emit": {            "kind": "string",            "payload": {              "property1": null,              "property2": null            }          }        }      ],      "runtime_defaults": {        "judge": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        },        "worker": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning": "string",          "speed": "normal"        }      },      "runtime_rules": [        {          "match": {            "complexity": "string",            "id": "string",            "type": "string"          },          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          }        }      ],      "stop_when": "string",      "terminal_states": [        "string"      ],      "verification": [        {          "agent": "string",          "check": "string",          "contains": "string",          "expect": "string",          "id": "string",          "inputs": {            "property1": null,            "property2": null          },          "metric": {            "direction": "maximize",            "min_delta": 0          },          "prompt": "string",          "rubric": "string",          "runtime": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "model": "string",            "provider": "string",            "reasoning": "string",            "speed": "normal"          },          "tool": "string",          "type": "string"        }      ]    },    "nodes": [      {        "class": "action",        "depends_on": [          "string"        ],        "id": "string",        "kind": "string"      }    ],    "resolved_inputs": {      "property1": null,      "property2": null    }  },  "run": {    "active_gate_id": "string",    "attention": {      "count": 0,      "kind": "string",      "since": "2019-08-24T14:15:22Z"    },    "best_generation": 0,    "best_score": 0,    "budget_approval_seq": 0,    "budget_on_exceeded": "halt",    "budget_tokens": 0,    "budget_wall_sec": 0,    "completed_at": "2019-08-24T14:15:22Z",    "completion_state": "complete",    "created_at": "2019-08-24T14:15:22Z",    "definition_digest": "string",    "definition_version": 0,    "forked_from": {      "generation": 0,      "run_id": "string"    },    "forks": [      {        "generation": 0,        "run_id": "string"      }    ],    "generation": 0,    "historical": true,    "id": "string",    "inputs": {      "property1": null,      "property2": null    },    "iteration_cap": 0,    "last_progress_at": "2019-08-24T14:15:22Z",    "loop_name": "string",    "parent_loop_run_id": "string",    "pause_requested": true,    "profile_color": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "progress": {      "round": 0,      "steps_done": 0,      "steps_total": 0    },    "reattempt_strategy": "failed_only",    "start_metadata": {      "property1": null,      "property2": null    },    "started_at": "2019-08-24T14:15:22Z",    "started_by_kind": "string",    "started_by_ref": "string",    "started_origin_kind": "string",    "started_origin_ref": "string",    "status": "queued",    "tokens_used": 0,    "workspace_id": "string"  },  "web_url": "string"}
POST
/api/workspaces/{workspace_id}/loops/{name}/validate

Path Parameters

workspace_id*string

Workspace id

name*string

Loop name

Query Parameters

profile?string

Act as this profile by name

Request Body

JSON request body

application/json
  1. body
definition*

Response Body

OK

application/json
  1. response
errors?array<>
input_validation?|
runtime_validation?array<>
valid*boolean
curl -X POST "https://example.com/api/workspaces/string/loops/string/validate" \  -H "Content-Type: application/json" \  -d '{    "definition": {      "apiVersion": "string",      "contract": {        "budget": {          "tokens": 0,          "wall_clock_sec": 0        },        "definition_of_done": "string",        "goal": "string",        "iteration_cap": 0,        "no_progress": {          "window": 0        }      },      "graph": {        "edges": [          {            "from": "string",            "to": "string",            "property1": null,            "property2": null          }        ],        "nodes": [          {            "class": "action",            "id": "string",            "kind": "string",            "property1": null,            "property2": null          }        ],        "property1": null,        "property2": null      },      "kind": "string",      "meta": {        "catalog": {},        "name": "string"      }    }  }'
{  "errors": [    {      "code": "string",      "message": "string",      "node_id": "string",      "path": "string",      "severity": "error"    }  ],  "input_validation": {    "field": "string",    "kind": "string",    "loop": "string",    "origin": "string",    "reason": "string",    "value": "string"  },  "runtime_validation": [    {      "field": "string",      "reason": "string",      "task_id": "string",      "value": "string"    }  ],  "valid": true}
GET
/api/workspaces/{workspace_id}/sessions/{session_id}/goal

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Response Body

OK

application/json
  1. response
goal*|
curl -X GET "https://example.com/api/workspaces/string/sessions/string/goal"
{  "goal": {    "bound_session_id": "string",    "cause": "goal_not_active",    "context": {      "diagnostic": "string",      "nudge_ratio": 0.1,      "ratio": 0,      "reported_at": "2019-08-24T14:15:22Z",      "size": 0,      "state": "known",      "used": 0    },    "contract_summary": "string",    "last_verdict": {      "blocking_issues": [        {          "id": "string",          "note": "string"        }      ],      "evaluated_at": "2019-08-24T14:15:22Z",      "evidence_ref": "string",      "outcome": "approved"    },    "live": true,    "node_id": "string",    "objective": "string",    "origin_session_id": "string",    "pause_requested": true,    "run_id": "string",    "run_status": "queued",    "status": "active",    "turn_limit": 0,    "turns_used": 0  }}
POST
/api/workspaces/{workspace_id}/sessions/{session_id}/goal

Path Parameters

workspace_id*string

Workspace id

session_id*string

Session id

Request Body

JSON request body

application/json
  1. body
expected_run_id?string
objective?string
operation*string
Value in"set""replace""status""pause""resume""stop""clear"
runtime?|

Response Body

Goal operation completed

application/json
  1. response
outcome*string
Value in"started""replaced""status""paused""resumed""cleared""stopped""error"
reason_code*|
Value in"goal_not_active""goal_replace_required""goal_replace_stale""goal_objective_required""goal_objective_too_large""goal_contract_clause_empty""goal_command_invalid""goal_draft_requires_idle""goal_evidence_too_large""goal_report_conflict""goal_session_busy_queue_full""goal_turn_filter_invalid""goal_judge_unavailable""goal_judge_broken""goal_judge_outcome_invalid""goal_action_control_invalid""goal_stop_reason_invalid""goal_prompt_request_failed""goal_agent_refused""goal_compaction_cancelled""goal_recovery_ambiguous""goal_control_revoked_in_flight""goal_reseed_confirmation_required""goal_presubmit_retries_exhausted""goal_budget_fenced""goal_origin_invalid""goal_origin_workspace_mismatch""goal_origin_profile_unavailable""goal_control_stale""goal_prompt_fenced""session_creation_identity_mismatch""continuous_binding_mismatch""goal_runtime_invalid""goal_caller_unauthorized"
replaced_run_id*string|null
snapshot*|
curl -X POST "https://example.com/api/workspaces/string/sessions/string/goal" \  -H "Content-Type: application/json" \  -d '{    "operation": "set"  }'
{  "outcome": "started",  "reason_code": "goal_not_active",  "replaced_run_id": "string",  "snapshot": {    "bound_session_id": "string",    "cause": "goal_not_active",    "context": {      "diagnostic": "string",      "nudge_ratio": 0.1,      "ratio": 0,      "reported_at": "2019-08-24T14:15:22Z",      "size": 0,      "state": "known",      "used": 0    },    "contract_summary": "string",    "last_verdict": {      "blocking_issues": [        {          "id": "string",          "note": "string"        }      ],      "evaluated_at": "2019-08-24T14:15:22Z",      "evidence_ref": "string",      "outcome": "approved"    },    "live": true,    "node_id": "string",    "objective": "string",    "origin_session_id": "string",    "pause_requested": true,    "run_id": "string",    "run_status": "queued",    "status": "active",    "turn_limit": 0,    "turns_used": 0  }}