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.
string
required
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.
object
A complete
TaskContract JSON object. Either contract or file_path is required.string
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.string
required
Name of a registered executor (see Executors API) that will process the task.
string
Executor profile to activate. Defaults to
"default".string
ID of a task already present in the node store. Provide either
task_id or file_path, not both.string
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.string
required
The task identifier returned by
/api/task/submit.string
The task identifier.
string
Terminal state of the task. Common values:
"Created", "Claimed", "Committed", "Finalized", "Expired".string | null
ID of the candidate selected by the commit phase, or
null if not yet committed.string | null
ID of the candidate accepted through finalization, or
null if not yet finalized.integer
The contract epoch — incremented when a task contract is updated.
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.
string
required
The task identifier.
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.string
required
ID of a task already in the node store.
string
required
The topic feed key to publish the announcement on (e.g.
"task.open.generic.qa.v1").string
required
Scope hint that narrows which peers receive the announcement (e.g.
"network:mainnet", "local").object
required
A JSON summary of the task included in the announcement payload. Keep this small; detailed data should be referenced via
detail_ref.string
Optional stable ID for this announcement. Auto-generated as
ann-<uuid> if omitted.object
Optional artifact reference pointing to full task details stored in the kernel artifact store.
object
Optional agent-to-agent envelope for routing-aware announcement delivery.
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.
string
required
ID of the task to claim.
string
Claim role:
"propose" (default) or "verify".string
Stable execution identifier. Auto-generated as
exec-p-<uuid> if omitted.integer
Lease duration in milliseconds. Defaults to the value specified in the task contract’s
assignment.claim.lease_ms.object
Optional agent routing envelope to attach to the claim event.