Skip to content
Hexel StudioDocs

Create a task

POST/harness/tasks

Billing and limits are checked first (refusals keep billing's codes, for example 402 insufficient_balance, 429 too_many_running_tasks). A task can start after other tasks and take inputs_from their outputs.

Headers

Bearer <token>. A Hexel Studio access token for your organization.

The workspace the request acts in (ws_...). It never grants access by itself.

The environment the request acts in (env_...). It never grants access by itself.

Body parameters

goalstring
agentstring

name, name@channel or name@v<n>.

inputsoptional object

At most 256 KiB.

budgetoptional Budget

What a task may spend; it narrows the agent's own budgets. max_estimate_usd is accepted on create only.

sandbox_templateoptional string
afteroptional array of string

1 to 20 tasks this one starts after.

inputs_fromoptional map[string]

{"<name>": "<task_id>.outputs.<key>..."}.

checkinoptional object

A task.digest every every_s seconds (3600 to 2592000).

Returns

200A trigger fire's task that already exists (a replayed fire).Task

agentstring
agent_idstring

Any JSON value.

cost_usdnumberdouble
created_atstringdate-time
end_reasonoptional string
erased_atoptional stringdate-time
goalstring
goal_digestoptional string
held_atoptional stringdate-time
idstring

Any JSON value.

inputs_digestoptional string
last_seqintegerint64
org_idstring
outputsoptional object
run_idstring
sandbox_templateoptional string
statestring

One of: "queued", "running", "waiting", "paused", "succeeded", "failed", "budget_exhausted", "cancelled"

swarm_idoptional string
tokens_inintegerint64
tokens_outintegerint64
updated_atstringdate-time
versionintegerint32
waiting_reasonoptional string

Errors

  • default