Developers / SDKs

Tasks and results

Choose a task method and handle the outcome in your application, including approvals and the receipts that record each action.

Choose a method

Python exposes Deixic(...).tasks; TypeScript exposes createDeixicClient(...).tasks. TypeScript's setup, preparation, submission, replay, and result observation methods are asynchronous; tasks.resume returns a handle directly.

GoalPythonTypeScriptBehavior
Check workspace setuptasks.check_setuptasks.checkSetupRead channel access, prerequisites, and model availability.
Submit a requesttasks.starttasks.startPrepare and submit once; return a task handle.
Save before submissiontasks.preparetasks.prepareCall your checkpoint storage callback before sending.
Submit a prepared requesttask.submittask.submitSubmit the original prepared body and key.
Recover a saved tasktasks.resumetasks.resumeRestore observation without submitting.
Recover a lost responsetask.replaytask.replayExplicitly replay an unacknowledged request.
Wait for the final answertask.waittask.waitFollow the accepted turn within an observation budget.
Read current task statetask.resulttask.resultRead the current result once.

For method arguments, start with the quickstart and checkpoint guide. Every new request needs its own caller-owned idempotency key.

Handle each outcome

StatusWhat to do
completedRead the final answer and inspect referenced receipts.
respondedA preliminary response exists. Continue observation; it is not completion.
waitingReview the waiting reason and request event. Make an explicit decision.
failedInspect the turn's failure details before deciding what to do next.
interruptedThe turn stopped. Do not treat partial output as a completed answer.
unfinishedObservation ended. Retain the checkpoint and resume observation.
preparedThe request is saved but has not been submitted.
unacknowledgedThe submission response was lost. Recover using explicit replay.

wait continues past responded until completion, failure, interruption, or work that needs attention. Setup and request failures are reported as SDK errors with a request ID. Troubleshoot access and execution.

Handle approvals explicitly

A waiting result includes its turn's waiting reason and the request event when retained. Use that event's request identity with controls.respond after an explicit application or user decision. The SDK examples send no automatic approvals.

If request history is unavailable, the task stays waiting with reason request_not_visible. No approval is invented. The assigned owner can review and decide the requested action in Deixic.

Read the answer and receipts

A completed result contains body, the matching message and turn, and receipts. Python's result.parse(your_parser) and TypeScript's parseTaskResult(result, yourParser) validate or convert the completed answer using your application's schema. Parser failures propagate.

The account-brief applicationincludes concrete parsers: Python's deixic.examples.account_brief_result.parse_account_briefand TypeScript's parseAccountBrief from@evalops/deixic-sdk/examples/account-brief-result.

A completed answer does not establish that every external action succeeded. Inspect the referenced receipts' action results and evidence before confirming a connected-system update to the customer.