Skip to content

Loops

CompozyOS Loops HTTP endpoints.

For people running agent work34 pages in this section
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

application/json

application/json

application/json

application/json

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"      }    }  ],  "next_cursor": "string"}
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

application/json

application/json

application/json

application/json

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",      "prompt": "string",      "proposed_preview": null,      "resolved_at": "2019-08-24T14:15:22Z",      "respond_schema": null,      "state": "string"    }  ],  "next_cursor": "string"}
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

application/json

application/json

application/json

application/json

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",      "resolved_network_participation": {        "mode": "local",        "source": "explicit_request",        "version": "network-participation/v1"      },      "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}

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

application/json

application/json

application/json

application/json

application/json

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    },    "network_participation": {      "mode": "local"    },    "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,              "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",      "prompt": "string",      "proposed_preview": null,      "resolved_at": "2019-08-24T14:15:22Z",      "respond_schema": null,      "state": "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",    "resolved_network_participation": {      "mode": "local",      "source": "explicit_request",      "version": "network-participation/v1"    },    "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"      }    ]  }}
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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

application/json

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"  }}
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

text/event-stream

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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",    "resolved_network_participation": {      "mode": "local",      "source": "explicit_request",      "version": "network-participation/v1"    },    "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

application/json

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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"}
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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

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",  "prompt": "string",  "proposed_preview": null,  "resolved_at": "2019-08-24T14:15:22Z",  "respond_schema": null,  "state": "string"}
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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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"}
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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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"}
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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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"}
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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

application/json

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    }  ],  "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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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      },      "network_participation": {        "mode": "local"      },      "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

application/json

application/json

application/json

application/json

application/json

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      },      "network_participation": {        "mode": "local"      },      "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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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      },      "network_participation": {        "mode": "local"      },      "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

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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    },    "resolved_network_participation": {      "mode": "local",      "source": "explicit_request",      "version": "network-participation/v1"    }  },  "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",    "resolved_network_participation": {      "mode": "local",      "source": "explicit_request",      "version": "network-participation/v1"    },    "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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/sessions/string/goal"
{  "goal": {    "bound_session_id": "string",    "cause": "goal_not_active",    "context": {      "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",    "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

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

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": {      "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",    "run_id": "string",    "run_status": "queued",    "status": "active",    "turn_limit": 0,    "turns_used": 0  }}