Answer a request the task is waiting on [write]
Changed onSends the caller's answer to the session that asked, as its next turn, in the same form a click in the app produces. Pass option_id for one of the request's options, or text where the request accepts free text. A spend request is applied before anything is sent: confirming remembers the price and, when the task itself was waiting to start, holds the fee and starts it with what it was given (402 insufficient_credits when the caller's credit does not cover the fee; the request stays open). Declining such a start closes the request and the task never runs. A spend request that asks to raise a member's monthly limit in a workspace is answered by an owner or admin of that workspace with option_id raise or decline (403 request_not_yours for anyone else, the member included): raising sets the limit the request offered and sends on what the member's waiting tasks were given. An optional note is sent to the agent after the answer, in the same turn, and is not part of the answer: a surface other than the app uses it to say where the answer came from and how to reply there. 404 when the task has no open request with that id, 403 request_not_yours when it is addressed to someone else, 400 when the answer is not one the request accepts, 409 session_busy while the turn that asked is still running (retry once the session is idle).
Request
- Base URLhttps://api.agentsky.dev/v1
- URLhttps://api.agentsky.dev/v1/tasks/{id}/requests/{request_id}/answer
- AuthHTTP bearer
Path parameters
The task id: the id of its root session (sess_…)
The request's id from the task's requests
Request body
Response
OK
Changes
- info
endpoint added
- info