API reference
Gears
Durable workflows: register workflows, start runs, signal them and read their history.
- Operations
- 36
- Base path
https://os.one.ml/api/v1/gears- Scopes
gears.operations.readgears.runs.readgears.runs.writegears.signals.writegears.workflows.readgears.workflows.write- API keys
- 21 tested with an API key
- SDK
genesis.call('gears_listFlowRuns', …)· helpers undergenesis.gears- MCP
- 36 tools
Operations
Flow runs
List your engine runs, oldest first
GET/v1/gears/flow-runs
Parameters
limitquery · integerafterquery · string
Responses
- 200A page of your runs
Response fields
runsobject[]runs[].[].run_idstringruns[].[].workflowstringruns[].[].versionstringruns[].[].status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"runs[].[].ownerstringruns[].[].stepsobject[]runs[].[].outputobjectruns[].[].errorobjectnext_afterstring | null
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/flow-runs" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_listFlowRuns'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_listFlowRuns",
"arguments": {}
}
}Start a run of one of your definitions
POST/v1/gears/flow-runs
Parameters
Idempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Request body application/json
workflowstringrequiredversionstringrequiredinputobjectThe run input (at most 256 KiB; pass refs for content)
Responses
- 200Replayed for the same Idempotency-Key and body
Response fields
runobjectrun.run_idstringrun.workflowstringrun.versionstringrun.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"run.ownerstringrun.stepsobject[]run.outputobjectrun.errorobjectcreatedboolean
- 201Started
Response fields
runobjectrun.run_idstringrun.workflowstringrun.versionstringrun.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"run.ownerstringrun.stepsobject[]run.outputobjectrun.errorobjectcreatedboolean
- 404workflow_not_found
- 409idempotency_key_reused
- 429owner_runs_limit
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/flow-runs" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflow": "string",
"version": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_startFlowRun', {
body: {
workflow: 'string',
version: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_startFlowRun",
"arguments": {
"body": {
"workflow": "string",
"version": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Get one of your engine runs (status, steps, output)
GET/v1/gears/flow-runs/{id}
Parameters
idpath · stringrequired
Responses
- 200The run
Response fields
runobjectrun.run_idstringrun.workflowstringrun.versionstringrun.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"run.ownerstringrun.stepsobject[]run.outputobjectrun.errorobjectcreatedboolean
- 404run_not_found (also for another principal's run)
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/flow-runs/$ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_getFlowRun', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_getFlowRun",
"arguments": {
"id": "<id>"
}
}
}Cancel
Cancel a run (leased work is asked to stop; the run ends when every step closed)
POST/v1/gears/flow-runs/{id}/cancel
Parameters
idpath · stringrequired
Request body application/json
reasonstringmax length 512
Responses
- 200The run (cancelling or cancelled)
Response fields
runobjectrun.run_idstringrun.workflowstringrun.versionstringrun.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"run.ownerstringrun.stepsobject[]run.outputobjectrun.errorobjectcreatedboolean
- 409run_closed
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/flow-runs/$ID/cancel" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_cancelFlowRun', {
id: '<id>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_cancelFlowRun",
"arguments": {
"id": "<id>",
"body": {}
}
}
}Cancel a running workflow run
POST/v1/gears/runs/{id}/cancel
Takes no body. The run must still be Running; with an Idempotency-Key a retry returns the cancelled run. A run with no Flowers execution is cancelled in Gears alone. Running children are then handled by their closePolicy.
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Responses
- 200Run cancelled
Response fields
idstringrequiredscopeobjectscope.platformIdstringscope.organizationIdstringscope.workspaceIdstringscope.projectIdstringscope.environmentIdstringworkflowIdstringrequiredworkflowVersionstringrequiredstatus"Running" | "Succeeded" | "Failed" | "Cancelled"requiredactorIdstringrequiredinputRefstringrequiredcontextFrameIdstring | nullstationSessionIdstring | nullcreatedAtstring | null (date-time)When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).
updatedAtstring | null (date-time)Last change to the run, RFC 3339 UTC. null when not recorded.
finishedAtstring | null (date-time)When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.
- 403gears.runs.write required
- 404Not found in your scope
- 409Run is already terminal
- 502The Flowers runtime could not cancel the execution
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/cancel" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_cancelRun', {
id: '<id>',
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_cancelRun",
"arguments": {
"id": "<id>",
"idempotency_key": "<a stable key per change>"
}
}
}History
The run's hash-chained event history
GET/v1/gears/flow-runs/{id}/history
Parameters
idpath · stringrequired
Responses
- 200History
Response fields
run_idstringchain_verifiedbooleaneventsobject[]
- 404run_not_found
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/flow-runs/$ID/history" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_getFlowRunHistory', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_getFlowRunHistory",
"arguments": {
"id": "<id>"
}
}
}Read a run's journal history
GET/v1/gears/runs/{id}/history
Parameters
idpath · stringrequired
Responses
- 200Journal entries in sequence order
Response fields
sequenceintegerrequiredrunIdstringrequiredkindstringrequiredactorIdstringdetailRefstring | null
- 404Not found in your scope
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/runs/$ID/history" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_getRunHistory', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_getRunHistory",
"arguments": {
"id": "<id>"
}
}
}Steps
Append steps to a gears.dynamic/v1 run (seal = no more come)
POST/v1/gears/flow-runs/{id}/steps
Parameters
idpath · stringrequired
Request body application/json
stepsobject[]sealboolean
Responses
- 200The run
Response fields
runobjectrun.run_idstringrun.workflowstringrun.versionstringrun.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"run.ownerstringrun.stepsobject[]run.outputobjectrun.errorobjectcreatedboolean
- 409not_dynamic, run_sealed or run_closed
- 422invalid_definition
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/flow-runs/$ID/steps" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_appendFlowRunSteps', {
id: '<id>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_appendFlowRunSteps",
"arguments": {
"id": "<id>",
"body": {}
}
}
}Flows
List your workflow engine definitions (gears.flow/v1, gears.dynamic/v1)
GET/v1/gears/flows
Responses
- 200Your definitions in this scope
Response fields
flowsobject[]flows[].[].workflowstringflows[].[].versionstringflows[].[].formatstringflows[].[].digeststringflows[].[].ownerstringflows[].[].deprecatedbooleanflows[].[].stepsintegerflows[].[].documentobject
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/flows" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_listFlows'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_listFlows",
"arguments": {}
}
}Register a workflow engine definition (immutable per version)
POST/v1/gears/flows
Request body application/json
format"gears.flow/v1" | "gears.dynamic/v1"requiredworkflowstringrequiredversionstringrequiredstepsobject[]
Responses
- 200The same document was already registered
Response fields
flowobjectflow.workflowstringflow.versionstringflow.formatstringflow.digeststringflow.ownerstringflow.deprecatedbooleanflow.stepsintegerflow.documentobjectcreatedboolean
- 201Registered
Response fields
flowobjectflow.workflowstringflow.versionstringflow.formatstringflow.digeststringflow.ownerstringflow.deprecatedbooleanflow.stepsintegerflow.documentobjectcreatedboolean
- 409version_exists (same version, different document)
- 422invalid_definition; every problem is listed
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/flows" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"format": "gears.flow/v1",
"workflow": "string",
"version": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_registerFlow', {
body: {
format: 'gears.flow/v1',
workflow: 'string',
version: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_registerFlow",
"arguments": {
"body": {
"format": "gears.flow/v1",
"workflow": "string",
"version": "string"
}
}
}
}Get one of your definitions
GET/v1/gears/flows/{workflow}/{version}
Parameters
versionpath · stringrequiredworkflowpath · stringrequired
Responses
- 200The definition
Response fields
flowobjectflow.workflowstringflow.versionstringflow.formatstringflow.digeststringflow.ownerstringflow.deprecatedbooleanflow.stepsintegerflow.documentobject
- 404workflow_not_found
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/flows/$WORKFLOW/$VERSION" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_getFlow', {
workflow: '<workflow>',
version: '<version>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_getFlow",
"arguments": {
"workflow": "<workflow>",
"version": "<version>"
}
}
}Check a definition without registering it
POST/v1/gears/flows/validate
Request body application/json
format"gears.flow/v1" | "gears.dynamic/v1"requiredworkflowstringrequiredversionstringrequiredstepsobject[]
Responses
- 200Validation result
Response fields
validbooleandigeststringstepsintegerproblemsobject[]problems[].[].pathstringproblems[].[].codestringproblems[].[].messagestring
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/flows/validate" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"format": "gears.flow/v1",
"workflow": "string",
"version": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_validateFlow', {
body: {
format: 'gears.flow/v1',
workflow: 'string',
version: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_validateFlow",
"arguments": {
"body": {
"format": "gears.flow/v1",
"workflow": "string",
"version": "string"
}
}
}
}Operations
Read meter, audit, evidence, replay and probe records
GET/v1/gears/operations/records
Responses
- 200Operational records for your scope
Response fields
meterRecordsobject[]meterRecords[].[].productstringmeterRecords[].[].gardenMeterstringmeterRecords[].[].quantitynumbermeterRecords[].[].scopeKeystringauditRecordsobject[]auditRecords[].[].productstringauditRecords[].[].auditActionstringauditRecords[].[].actorIdstringauditRecords[].[].targetRefstringevidenceRecordsobject[]evidenceRecords[].[].productstringevidenceRecords[].[].evidenceRefstringevidenceRecords[].[].evidenceKindstringreplayEvidenceobject[]replayEvidence[].[].productstringreplayEvidence[].[].replayEnginestringreplayEvidence[].[].runIdstringreplayEvidence[].[].journalSequenceintegerreplayEvidence[].[].evidenceRefstringprobeEventsobject[]probeEvents[].[].productstringprobeEvents[].[].eventTypestringprobeEvents[].[].actorIdstringprobeEvents[].[].targetRefstring
- 403gears.operations.read or gears.audit.read required
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/operations/records" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_listOperationalRecords'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_listOperationalRecords",
"arguments": {}
}
}Runs
List workflow runs
GET/v1/gears/runs
Responses
- 200Runs in your scope
Response fields
idstringrequiredscopeobjectscope.platformIdstringscope.organizationIdstringscope.workspaceIdstringscope.projectIdstringscope.environmentIdstringworkflowIdstringrequiredworkflowVersionstringrequiredstatus"Running" | "Succeeded" | "Failed" | "Cancelled"requiredactorIdstringrequiredinputRefstringrequiredcontextFrameIdstring | nullstationSessionIdstring | nullcreatedAtstring | null (date-time)When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).
updatedAtstring | null (date-time)Last change to the run, RFC 3339 UTC. null when not recorded.
finishedAtstring | null (date-time)When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.
- 403gears.runs.read required
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/runs" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_listRuns'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_listRuns",
"arguments": {}
}
}Start a workflow run
POST/v1/gears/runs
Parameters
Idempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Request body application/json
workflowIdstringrequiredworkflowVersionstringrequiredactorIdstringrequiredinputRefstringrequiredReference to the run input
contextFrameIdstringstationSessionIdstring
Responses
- 201Run started
Response fields
idstringrequiredscopeobjectscope.platformIdstringscope.organizationIdstringscope.workspaceIdstringscope.projectIdstringscope.environmentIdstringworkflowIdstringrequiredworkflowVersionstringrequiredstatus"Running" | "Succeeded" | "Failed" | "Cancelled"requiredactorIdstringrequiredinputRefstringrequiredcontextFrameIdstring | nullstationSessionIdstring | nullcreatedAtstring | null (date-time)When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).
updatedAtstring | null (date-time)Last change to the run, RFC 3339 UTC. null when not recorded.
finishedAtstring | null (date-time)When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.
- 400Invalid body
- 403gears.runs.write required
- 404Workflow not found in your scope
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflowId": "string",
"workflowVersion": "string",
"actorId": "string",
"inputRef": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_startRun', {
body: {
workflowId: 'string',
workflowVersion: 'string',
actorId: 'string',
inputRef: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_startRun",
"arguments": {
"body": {
"workflowId": "string",
"workflowVersion": "string",
"actorId": "string",
"inputRef": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Get a workflow run
GET/v1/gears/runs/{id}
Parameters
idpath · stringrequired
Responses
- 200Run
Response fields
idstringrequiredscopeobjectscope.platformIdstringscope.organizationIdstringscope.workspaceIdstringscope.projectIdstringscope.environmentIdstringworkflowIdstringrequiredworkflowVersionstringrequiredstatus"Running" | "Succeeded" | "Failed" | "Cancelled"requiredactorIdstringrequiredinputRefstringrequiredcontextFrameIdstring | nullstationSessionIdstring | nullcreatedAtstring | null (date-time)When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).
updatedAtstring | null (date-time)Last change to the run, RFC 3339 UTC. null when not recorded.
finishedAtstring | null (date-time)When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.
- 404Not found in your scope
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/runs/$ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_getRun', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_getRun",
"arguments": {
"id": "<id>"
}
}
}Children
Start a child workflow run under a parent run
POST/v1/gears/runs/{id}/children
Does not read an Idempotency-Key.
Parameters
idpath · stringrequired
Request body application/json
workflowIdstringrequiredworkflowVersionstringrequiredactorIdstringrequiredinputRefstringrequiredReference to the child run input
contextFrameIdstringstationSessionIdstringclosePolicy"terminate_on_parent_complete" | "abandon_on_parent_complete" | "wait_for_completion"requiredWhat happens to the child when the parent run ends. terminate_on_parent_complete cancels the child if it is still running when the parent completes, fails or is cancelled. abandon_on_parent_complete lets the child keep running. wait_for_completion refuses to complete the parent (409) while the child is running, and cancels the child if the parent fails or is cancelled. Any other value is rejected with 422 before a child run is recorded.
Responses
- 201Child run started
Response fields
parentRunIdstringrequiredchildRunIdstringrequiredworkflowIdstringrequiredworkflowVersionstringrequiredactorIdstringrequiredinputRefstringrequiredclosePolicy"terminate_on_parent_complete" | "abandon_on_parent_complete" | "wait_for_completion"requiredWhat happens to the child when the parent run ends. terminate_on_parent_complete cancels the child if it is still running when the parent completes, fails or is cancelled. abandon_on_parent_complete lets the child keep running. wait_for_completion refuses to complete the parent (409) while the child is running, and cancels the child if the parent fails or is cancelled. Any other value is rejected with 422 before a child run is recorded.
childRunRefstringrequiredchildExecutionRefstringrequiredstatusstringrequired
- 400Invalid body
- 403gears.runs.write required
- 404Parent run or workflow not found in your scope
- 409Parent run is already terminal
- 422closePolicy is not one of the ChildClosePolicy values; the error lists the allowed values
- 502The Flowers runtime could not spawn the child; the child run is recorded as Failed, never left Running
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/children" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflowId": "string",
"workflowVersion": "string",
"actorId": "string",
"inputRef": "string",
"closePolicy": "terminate_on_parent_complete"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_startChildRun', {
id: '<id>',
body: {
workflowId: 'string',
workflowVersion: 'string',
actorId: 'string',
inputRef: 'string',
closePolicy: 'terminate_on_parent_complete',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_startChildRun",
"arguments": {
"id": "<id>",
"body": {
"workflowId": "string",
"workflowVersion": "string",
"actorId": "string",
"inputRef": "string",
"closePolicy": "terminate_on_parent_complete"
}
}
}
}Compensations
Register a compensation (saga undo step) on a run
POST/v1/gears/runs/{id}/compensations
Does not read an Idempotency-Key.
Parameters
idpath · stringrequired
Request body application/json
namestringrequiredactionRefstringrequiredReference to the undo action
payloadRefstringrequiredactorIdstringrequired
Responses
- 201Compensation registered
Response fields
runIdstringrequirednamestringrequiredactionRefstringrequiredpayloadRefstringrequiredactorIdstringrequiredstackIndexintegerrequiredcompensationRefstringrequiredstatusstringrequired
- 400Invalid body
- 403gears.runs.write required
- 404Not found in your scope
- 502The Flowers runtime could not register the compensation
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/compensations" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"actionRef": "string",
"payloadRef": "string",
"actorId": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_registerCompensation', {
id: '<id>',
body: {
name: 'string',
actionRef: 'string',
payloadRef: 'string',
actorId: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_registerCompensation",
"arguments": {
"id": "<id>",
"body": {
"name": "string",
"actionRef": "string",
"payloadRef": "string",
"actorId": "string"
}
}
}
}Run a run's registered compensations in reverse order
POST/v1/gears/runs/{id}/compensations/rollback
Does not read an Idempotency-Key.
Parameters
idpath · stringrequired
Request body application/json
actorIdstringrequired
Responses
- 200Rollback results
Response fields
runIdstringrequiredactorIdstringrequiredresultsobject[]requiredresults[].[].namestringrequiredresults[].[].stackIndexintegerrequiredresults[].[].successbooleanrequiredresults[].[].attemptsintegerrequiredresults[].[].compensationRefstringrequiredresults[].[].errorstring | null
- 400Invalid body
- 403gears.runs.write required
- 404Not found in your scope
- 502The Flowers runtime could not roll back
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/compensations/rollback" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"actorId": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_rollbackCompensations', {
id: '<id>',
body: {
actorId: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_rollbackCompensations",
"arguments": {
"id": "<id>",
"body": {
"actorId": "string"
}
}
}
}Complete
Complete a running workflow run with its output
POST/v1/gears/runs/{id}/complete
Running children are then handled by their closePolicy.
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Request body application/json
actorIdstringrequiredoutputRefstringrequiredReference to the run output
Responses
- 200Run succeeded
Response fields
idstringrequiredscopeobjectscope.platformIdstringscope.organizationIdstringscope.workspaceIdstringscope.projectIdstringscope.environmentIdstringworkflowIdstringrequiredworkflowVersionstringrequiredstatus"Running" | "Succeeded" | "Failed" | "Cancelled"requiredactorIdstringrequiredinputRefstringrequiredcontextFrameIdstring | nullstationSessionIdstring | nullcreatedAtstring | null (date-time)When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).
updatedAtstring | null (date-time)Last change to the run, RFC 3339 UTC. null when not recorded.
finishedAtstring | null (date-time)When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.
- 400Invalid body
- 403gears.runs.write required
- 404Not found in your scope
- 409Run is already terminal, or a wait_for_completion child is still running
- 502The Flowers runtime could not complete the execution
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/complete" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"actorId": "string",
"outputRef": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_completeRun', {
id: '<id>',
body: {
actorId: 'string',
outputRef: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_completeRun",
"arguments": {
"id": "<id>",
"body": {
"actorId": "string",
"outputRef": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Report that the attempt you hold succeeded
POST/v1/gears/tasks/{id}/complete
Parameters
idpath · stringrequired
Request body application/json
lease_nointegerrequiredoutputobject
Responses
- 200The run
Response fields
runobjectrun.run_idstringrun.workflowstringrun.versionstringrun.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"run.ownerstringrun.stepsobject[]run.outputobjectrun.errorobjectcreatedboolean
- 409lease_lost
- 413output_too_large (16 KiB; return refs)
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/tasks/$ID/complete" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lease_no": 1
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_completeTask', {
id: '<id>',
body: {
lease_no: 1,
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_completeTask",
"arguments": {
"id": "<id>",
"body": {
"lease_no": 1
}
}
}
}Fail
Fail a running workflow run with its error
POST/v1/gears/runs/{id}/fail
A run with no Flowers execution is failed in Gears alone. Running children are then handled by their closePolicy.
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Request body application/json
actorIdstringrequirederrorRefstringrequiredReference to the run error
Responses
- 200Run failed
Response fields
idstringrequiredscopeobjectscope.platformIdstringscope.organizationIdstringscope.workspaceIdstringscope.projectIdstringscope.environmentIdstringworkflowIdstringrequiredworkflowVersionstringrequiredstatus"Running" | "Succeeded" | "Failed" | "Cancelled"requiredactorIdstringrequiredinputRefstringrequiredcontextFrameIdstring | nullstationSessionIdstring | nullcreatedAtstring | null (date-time)When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).
updatedAtstring | null (date-time)Last change to the run, RFC 3339 UTC. null when not recorded.
finishedAtstring | null (date-time)When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.
- 400Invalid body
- 403gears.runs.write required
- 404Not found in your scope
- 409Run is already terminal
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/fail" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"actorId": "string",
"errorRef": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_failRun', {
id: '<id>',
body: {
actorId: 'string',
errorRef: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_failRun",
"arguments": {
"id": "<id>",
"body": {
"actorId": "string",
"errorRef": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Report that the attempt you hold failed (code `cancelled` after a cancel request)
POST/v1/gears/tasks/{id}/fail
Parameters
idpath · stringrequired
Request body application/json
lease_nointegerrequirederrorobjectrequirederror.codestringrequiredmax length 64
error.messagestringrequiredmax length 1024
error.retryableboolean
Responses
- 200The run
Response fields
runobjectrun.run_idstringrun.workflowstringrun.versionstringrun.status"running" | "waiting" | "cancelling" | "compensating" | "succeeded" | "failed" | "cancelled" | "timed_out" | "continued"run.ownerstringrun.stepsobject[]run.outputobjectrun.errorobjectcreatedboolean
- 409lease_lost
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/tasks/$ID/fail" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lease_no": 1,
"error": {
"code": "string",
"message": "string"
}
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_failTask', {
id: '<id>',
body: {
lease_no: 1,
error: {
code: 'string',
message: 'string',
},
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_failTask",
"arguments": {
"id": "<id>",
"body": {
"lease_no": 1,
"error": {
"code": "string",
"message": "string"
}
}
}
}
}Resume
Resume a run by replaying its Flowers execution
POST/v1/gears/runs/{id}/resume
Takes no body and does not read an Idempotency-Key.
Parameters
idpath · stringrequired
Responses
- 200Run resumed
Response fields
idstringrequiredscopeobjectscope.platformIdstringscope.organizationIdstringscope.workspaceIdstringscope.projectIdstringscope.environmentIdstringworkflowIdstringrequiredworkflowVersionstringrequiredstatus"Running" | "Succeeded" | "Failed" | "Cancelled"requiredactorIdstringrequiredinputRefstringrequiredcontextFrameIdstring | nullstationSessionIdstring | nullcreatedAtstring | null (date-time)When the run was submitted (runs start Running on submission), RFC 3339 UTC. null when not recorded (runs from before 23 Nov 2026 that came through the 4 Nov store import).
updatedAtstring | null (date-time)Last change to the run, RFC 3339 UTC. null when not recorded.
finishedAtstring | null (date-time)When the run reached its terminal status, RFC 3339 UTC. null while Running or when not recorded.
- 403gears.runs.write required
- 404Not found in your scope
- 409Run is already terminal (a finished run has nothing to resume)
- 502The Flowers runtime could not replay the execution
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/resume" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_resumeRun', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_resumeRun",
"arguments": {
"id": "<id>"
}
}
}Retries
Schedule a retry of a run step
POST/v1/gears/runs/{id}/retries
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Request body application/json
stepIdstringrequiredattemptintegerrequiredmin 0 · max 4294967295
maxAttemptsintegerrequiredmin 0 · max 4294967295
backoffMsintegerrequiredmin 0
reasonRefstringrequiredactorIdstringrequired
Responses
- 202Retry scheduled
Response fields
runIdstringrequiredstepIdstringrequiredattemptintegerrequiredmaxAttemptsintegerrequiredbackoffMsintegerrequiredreasonRefstringrequiredactorIdstringrequiredretryRefstringrequiredstatusstringrequiredjournalSequenceintegerrequired
- 400Invalid body
- 403gears.runs.write required
- 404Not found in your scope
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/retries" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"stepId": "string",
"attempt": 0,
"maxAttempts": 0,
"backoffMs": 0,
"reasonRef": "string",
"actorId": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_scheduleRetry', {
id: '<id>',
body: {
stepId: 'string',
attempt: 0,
maxAttempts: 0,
backoffMs: 0,
reasonRef: 'string',
actorId: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_scheduleRetry",
"arguments": {
"id": "<id>",
"body": {
"stepId": "string",
"attempt": 0,
"maxAttempts": 0,
"backoffMs": 0,
"reasonRef": "string",
"actorId": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Execute a scheduled retry attempt and record its outcome
POST/v1/gears/runs/{id}/retries/{stepId}/{attempt}/execute
Send exactly one of outputRef or errorRef.
Parameters
attemptpath · stringrequiredstepIdpath · stringrequiredidpath · stringrequiredIdempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Request body application/json
actorIdstringrequiredoutputRefstringOutput of a successful attempt (exactly one of outputRef and errorRef)
errorRefstringError of a failed attempt (exactly one of outputRef and errorRef)
Responses
- 200Retry attempt recorded, with its outputRef or errorRef
Response fields
runIdstringstepIdstringattemptintegerstatus"completed" | "failed"outputRefstring | nullSet when the attempt worked
errorRefstring | nullSet when the attempt failed
journalobjectThe journal entry the attempt was recorded as
- 400Invalid body, attempt, or not exactly one of outputRef and errorRef
- 403gears.runs.write required
- 404Not found in your scope
- 502The Flowers runtime could not execute the retry
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/retries/$STEP_ID/$ATTEMPT/execute" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"actorId": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_executeRetry', {
id: '<id>',
stepId: '<stepId>',
attempt: '<attempt>',
body: {
actorId: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_executeRetry",
"arguments": {
"id": "<id>",
"stepId": "<stepId>",
"attempt": "<attempt>",
"body": {
"actorId": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Signals
Send a signal to a running workflow
POST/v1/gears/runs/{id}/signals
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Request body application/json
namestringrequiredpayloadRefstringrequiredactorIdstringrequired
Responses
- 202Signal accepted
Response fields
A JSON object.
- 403gears.signals.write required
- 404Not found in your scope
- 409Run is already terminal
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/signals" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"payloadRef": "string",
"actorId": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_signalRun', {
id: '<id>',
body: {
name: 'string',
payloadRef: 'string',
actorId: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_signalRun",
"arguments": {
"id": "<id>",
"body": {
"name": "string",
"payloadRef": "string",
"actorId": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Step refs
Record the Lanes and Stations references a run step composed
POST/v1/gears/runs/{id}/step-refs
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Request body application/json
stepIdstringrequiredactorIdstringrequiredlanesContextFrameRefstringstationsMachineStepRefstring
Responses
- 202Step references recorded
Response fields
A JSON object.
- 400Invalid body
- 403gears.runs.write required
- 404Not found in your scope
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/step-refs" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"stepId": "string",
"actorId": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_recordStepRefs', {
id: '<id>',
body: {
stepId: 'string',
actorId: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_recordStepRefs",
"arguments": {
"id": "<id>",
"body": {
"stepId": "string",
"actorId": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Timers
Start a durable timer on a run
POST/v1/gears/runs/{id}/timers
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Request body application/json
durationMsintegerrequiredmin 0
actorIdstringrequired
Responses
- 201Timer started
Response fields
timerIdstringrequiredrunIdstringrequiredactorIdstringrequireddurationMsintegerrequiredtimerRefstringrequiredstatusstringrequired
- 400Invalid body
- 403gears.runs.write required
- 404Not found in your scope
- 502The Flowers runtime could not start the timer
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/runs/$ID/timers" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"durationMs": 0,
"actorId": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_startTimer', {
id: '<id>',
body: {
durationMs: 0,
actorId: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_startTimer",
"arguments": {
"id": "<id>",
"body": {
"durationMs": 0,
"actorId": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Runtime
Describe the Flowers durable runtime behind Gears
GET/v1/gears/runtime/flowers
Responses
- 200Flowers runtime contract
Response fields
engineIdstringruntimeTypestringconfigTypestringexecutionContextTypestringworkflowHandlerTraitstringdefaultDispatchModestringdurablePrimitivesstring[]
- 400Tenant scope is incomplete
- 403gears.runs.read required
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/runtime/flowers" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_getRuntime'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_getRuntime",
"arguments": {}
}
}Heartbeat
Extend a lease you hold; answers whether the run asked you to stop
POST/v1/gears/tasks/{id}/heartbeat
Parameters
idpath · stringrequired
Request body application/json
lease_nointegerrequiredprogressobject
Responses
- 200The new lease end
Response fields
lease_until_msintegercancel_requestedboolean
- 409lease_lost
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/tasks/$ID/heartbeat" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lease_no": 1
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_heartbeatTask', {
id: '<id>',
body: {
lease_no: 1,
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_heartbeatTask",
"arguments": {
"id": "<id>",
"body": {
"lease_no": 1
}
}
}
}Tasks
Take tasks from one of your queues (long poll up to 20 s)
POST/v1/gears/tasks/poll
Request body application/json
queuestringrequired1-4 /-separated segments; your own queue
holderstringrequiredThis worker instance (1-128 bytes)
maxintegermin 1 · max 32
wait_msintegermin 0 · max 20000
Responses
- 200Leased tasks (possibly none)
Response fields
tasksobject[]tasks[].[].task_idstringtasks[].[].lease_nointegertasks[].[].lease_until_msintegertasks[].[].run_idstringtasks[].[].stepstringtasks[].[].attemptintegertasks[].[].kindstringtasks[].[].queuestringtasks[].[].inputobjecttasks[].[].contextobject
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/tasks/poll" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"queue": "string",
"holder": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_pollTasks', {
body: {
queue: 'string',
holder: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_pollTasks",
"arguments": {
"body": {
"queue": "string",
"holder": "string"
}
}
}
}Workflows
List registered workflow definitions
GET/v1/gears/workflows
Responses
- 200Workflow definitions in your scope
Response fields
scopeobjectscope.platformIdstringscope.organizationIdstringscope.workspaceIdstringscope.projectIdstringscope.environmentIdstringworkflowIdstringrequiredworkflowVersionstringrequirednamestringrequireddefinitionRefstringrequiredregisteredBystringrequired
- 403gears.workflows.read required
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/workflows" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_listWorkflows'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_listWorkflows",
"arguments": {}
}
}Register a workflow definition
POST/v1/gears/workflows
Parameters
Idempotency-Keyheader · stringOptional; when present, retries with the same key return the original result instead of acting twice
Request body application/json
workflowIdstringrequiredworkflowVersionstringrequirednamestringrequireddefinitionRefstringrequiredReference to the stored workflow definition
registeredBystringrequiredActor registering the definition
Responses
- 201Workflow registered
Response fields
scopeobjectscope.platformIdstringscope.organizationIdstringscope.workspaceIdstringscope.projectIdstringscope.environmentIdstringworkflowIdstringrequiredworkflowVersionstringrequirednamestringrequireddefinitionRefstringrequiredregisteredBystringrequired
- 400Invalid body
- 403gears.workflows.write required
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/gears/workflows" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflowId": "string",
"workflowVersion": "string",
"name": "string",
"definitionRef": "string",
"registeredBy": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('gears_registerWorkflow', {
body: {
workflowId: 'string',
workflowVersion: 'string',
name: 'string',
definitionRef: 'string',
registeredBy: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_registerWorkflow",
"arguments": {
"body": {
"workflowId": "string",
"workflowVersion": "string",
"name": "string",
"definitionRef": "string",
"registeredBy": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Get a workflow definition
GET/v1/gears/workflows/{id}
Parameters
idpath · stringrequired
Responses
- 200Workflow definition
Response fields
scopeobjectscope.platformIdstringscope.organizationIdstringscope.workspaceIdstringscope.projectIdstringscope.environmentIdstringworkflowIdstringrequiredworkflowVersionstringrequirednamestringrequireddefinitionRefstringrequiredregisteredBystringrequired
- 404Not found in your scope
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/gears/workflows/$ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_getWorkflow', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_getWorkflow",
"arguments": {
"id": "<id>"
}
}
}Delete (archive) a workflow
DELETE/v1/gears/workflows/{id}
Needs gears.workflows.write (as registering does). Archives every version of this workflow id in your selected scope (org, project, workspace, environment): it leaves listWorkflows and getWorkflow, and starting a run of an archived version answers 409 workflow_archived until that version is registered again. Runs are kept. A repeat by the owner answers the same 200. Another scope's workflow and an unknown id are 404. No request body (an empty body, {} or null is accepted).
Parameters
idpath · stringrequired
Responses
- 200Archived (or already archived by this scope)
Response fields
idstringrequireddeletedtruerequiredarchivedbooleantrue when the resource is kept as history (archived) rather than erased
- 400A request body was sent
- 403gears.workflows.write required
- 404Not found in your scope
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/gears/workflows/$ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('gears_deleteWorkflow', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gears_deleteWorkflow",
"arguments": {
"id": "<id>"
}
}
}L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support