GET /api/task/sample
Returns a fully-populated sampleTaskContract that you can use as a template for your own submissions. The task_id query parameter controls the identifier embedded in the returned contract.
The task identifier to embed in the sample contract. Use any string; UUIDs are recommended (e.g.
task-$(uuidgen)).POST /api/task/submit
Submits aTaskContract to the local node store. The task is registered and made available for execution by any eligible executor. This endpoint accepts either an inline contract object or a path to a contract file on the kernel host.
Absolute path on the kernel host to a JSON file containing a
TaskContract. Used for scripted deployments where the contract is too large for an inline request body.POST /api/task/run-real
Runs a complete task lifecycle end-to-end — submit (or load from disk), claim, execute via the named executor, verify, vote, commit, and finalize — in a single synchronous call. This is the fastest way to run a task locally for development or testing. The call blocks until the task reaches a terminal state.Name of a registered executor (see Executors API) that will process the task.
ID of a task already present in the node store. Provide either
task_id or file_path, not both.Absolute path on the kernel host to a
TaskContract JSON file. The contract is loaded, submitted, and immediately executed.GET /api/task/watch/:task_id
Polls the current state of a submitted task. Returns the task’s terminal state, the committed and finalized candidate IDs (if available), and the current epoch.Terminal state of the task. Common values:
"Created", "Claimed", "Committed", "Finalized", "Expired".GET /api/task/decision/:task_id
Returns the finalized decision for a completed task, including the committed and finalized candidate IDs. This is a lightweight alternative to/api/task/watch when you only need the outcome identifiers and not the full state machine detail.
POST /api/task/announce
Announces a task to the network on a specified topic feed so that remote executors can discover and claim it. The kernel subscribes to the feed’s event gossip channel automatically after announcing.Scope hint that narrows which peers receive the announcement (e.g.
"network:mainnet", "local").A JSON summary of the task included in the announcement payload. Keep this small; detailed data should be referenced via
detail_ref.Optional artifact reference pointing to full task details stored in the kernel artifact store.
POST /api/task/claim
Claims a task for local execution. The kernel records the claim with a lease, subscribes to the task lifecycle feed, and returns anexecution_id that must be used when proposing a candidate result.
Lease duration in milliseconds. Defaults to the value specified in the task contract’s
assignment.claim.lease_ms.