curl -X POST https://win.oneshotagent.com/v1/compute/3f2b9c1e-8d4a-4f6b-9e2a-7c1d5b8a0f42/respond \
-H "Content-Type: application/json" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-H "x-agent-proof: <base64 EIP-712 proof, scope write>" \
-d '{
"task_id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
"approved": true,
"response": "Looks good, proceed with sending"
}'
{
"success": true,
"data": {
"task_id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
"goal_id": "3f2b9c1e-8d4a-4f6b-9e2a-7c1d5b8a0f42",
"task_status": "completed",
"orchestrator_action": "spawn_task"
}
}
Working with a goal
Respond to a Goal
Answer a human-in-the-loop approval task, or confirm that a goal is done
POST
/
v1
/
compute
/
{goalId}
/
respond
curl -X POST https://win.oneshotagent.com/v1/compute/3f2b9c1e-8d4a-4f6b-9e2a-7c1d5b8a0f42/respond \
-H "Content-Type: application/json" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-H "x-agent-proof: <base64 EIP-712 proof, scope write>" \
-d '{
"task_id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
"approved": true,
"response": "Looks good, proceed with sending"
}'
{
"success": true,
"data": {
"task_id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
"goal_id": "3f2b9c1e-8d4a-4f6b-9e2a-7c1d5b8a0f42",
"task_status": "completed",
"orchestrator_action": "spawn_task"
}
}
Overview
Approves or denies a waitinghuman_approval task, with optional instructions. A task is created when the goal needs human input (notify_human), or when a tool call needs your approval under the goal’s approvals. The goal waits for your answer.
Your answer completes the task; the goal decides its next step before this call returns.
To confirm a goal is done, see below.
Authentication
A signed write proof or an access token: see Authentication schemes. Only the wallet that created the goal can respond to its approval tasks; other callers get a403.
Path Parameters
string
required
Goal ID that owns the approval task
Request Body
string
required
ID of the
human_approval task (from the tasks endpoint)boolean
false denies. Any other value, or leaving it out, approves.string
Text response or guidance for the orchestrator.
Response
string
The approval task ID
string
The parent goal ID
string
completed (approved) or failed (denied)string
The next action after your answer:
spawn_task, complete_goal, fail_goal, wait, schedule_wake, or notify_human. error if deciding failed. not_woken if the goal is no longer active or the wake could not start.curl -X POST https://win.oneshotagent.com/v1/compute/3f2b9c1e-8d4a-4f6b-9e2a-7c1d5b8a0f42/respond \
-H "Content-Type: application/json" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-H "x-agent-proof: <base64 EIP-712 proof, scope write>" \
-d '{
"task_id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
"approved": true,
"response": "Looks good, proceed with sending"
}'
{
"success": true,
"data": {
"task_id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
"goal_id": "3f2b9c1e-8d4a-4f6b-9e2a-7c1d5b8a0f42",
"task_status": "completed",
"orchestrator_action": "spawn_task"
}
}
Confirm a goal is done
A goal with nodone_check does not complete because the agent running it says so. It moves to awaiting_confirmation and waits for its owner: you, or the agent whose own goal this one serves. Nothing more runs and nothing is settled until you answer.
boolean
required
true completes the goal (end_reason: owner_confirmed). false sends it back to the agent with what is missing, to keep working within the budget. Send it without task_id.string
With
confirm_done: false: what is missing. The agent reads it.cURL
curl -X POST https://win.oneshotagent.com/v1/compute/3f2b9c1e-8d4a-4f6b-9e2a-7c1d5b8a0f42/respond \
-H "Content-Type: application/json" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-H "x-agent-proof: <base64 EIP-712 proof, scope write>" \
-d '{ "confirm_done": false, "response": "Only 3 of the 5 venues were contacted." }'
SDK
const goal = await agent.getComputeGoal(goalId);
if (goal.status === 'awaiting_confirmation') {
await agent.confirmComputeGoal(goalId, { approved: true });
}
200
{
"success": true,
"data": { "goal_id": "3f2b9c1e-…", "status": "completed", "end_reason": "owner_confirmed", "orchestrator_action": "none" }
}
Errors
| Status | Error | When |
|---|---|---|
| 400 | missing_fields | No task_id |
| 400 | invalid_task | The task isn’t a human_approval task in waiting status |
| 403 | forbidden | The goal belongs to another agent |
| 404 | task_not_found | No such task on this goal |
| 409 | already_decided | The task was already answered (for example, by an approver link) |
| 400 | invalid_request | confirm_done is not a boolean, or was sent together with task_id |
| 409 | not_awaiting_confirmation | confirm_done on a goal that is not in awaiting_confirmation |
Dispute an impossible ending
For animpossible_unverified goal, send { "dispute": true, "response": "…" }: recorded on the goal and receipt, nothing refunded. Otherwise: 409 not_disputable.
Start anyway
For anawaiting_connection goal, send { "start_anyway": true } without task_id or confirm_done. Otherwise: 409 not_awaiting_connection. See connection holds.