AGNTDocs

Work

Tasks

Durable units of work. A task can run for days, wait on other people and resume when they reply.

GET/tasks

List tasks

Returns the user's tasks, newest first.

Query parameters

pageinteger
perPageinteger
statusstringComma-separated statuses
qstringSearch titles, descriptions and recent messages.
typestringtask (the default for created tasks) or reminder
assistantstringOnly tasks for this assistant id
approvalGatestringFor example pending_user_approval for tasks the assistant proposed
ownerEmailstringWith an account key and no X-User-Email: only tasks whose owner email contains this text. Acting as a user: tasks of someone who has delegated to that user (403 without an active delegation).

Responses

200Tasks
okboolean
tasksobject[]
idstringTask id
typestringtask for work, reminder for a reminder
titlestring
descriptionstring | null
statusenumpending: waiting for a run; POST /tasks/{taskId}/process starts one. scheduled: waits for scheduledFor. executing: a run is in progress. awaiting_user_input / awaiting_non_user_response: waiting on the user or on someone else, with a follow-up time set. alarm_set: will wake itself at a set time. subtasks_running: waiting on its own background work. message_received / conversation: a message thread with no open work. on_hold / paused: stopped until resumed. completed: finished by the assistant. done_user_marked: marked done by the user. error, abandoned, failed_access (could not get access it needed), deferred_access (waiting for access), credits_blocked (out of credits), handled_by_other (another assistant took the thread), archived.pendingscheduledexecutingawaiting_user_inputawaiting_non_user_responsealarm_setsubtasks_runningmessage_receivedconversationon_holdpausedcompleteddone_user_markederrorabandonedfailed_accessdeferred_accesscredits_blockedhandled_by_otherarchived
summarystring | nullWhat the assistant has done, written by the assistant once there is something to report
errorstring | nullDetails of the failure when status is error
ownerstring | nullOwner's email
assistantobjectThe assistant working the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
onBehalfOfstring | nullWhose data and calendar the task acts on (an email)
followersobject[]People following the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
waitingOnContactsobject[]The contacts the task is waiting to hear from, while status is awaiting_non_user_response
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
skillsstring[]
planobject[]Checklist the assistant keeps for the task
textstring
statusenumpendingdoneskippedblocked
notestring
readyForReviewbooleanTrue when the work is finished and waiting for the user to look
scheduledForstring | nullWhen a scheduled task starts
scheduledHeadlinestring | nullOne line, for the user, on what the scheduled run will do
deadlinestring | nullThe user's due time for the outcome
alarmobject | nullThe time the task wakes itself to follow up or report back. Set by the assistant; null when none is set.
wakeAtstringWhen the task wakes
headlinestring | nullOne sentence, for the user, on why the alarm is set and what happens when it fires. Show this, not the alarm itself; null means show nothing.
statusenumset until it fires; fired or cancelled aftersetfiredcancelled
pendingCartobject | nullOutbound actions staged on this task and waiting on approval (a cart); null when nothing is staged. Read and approve it through the Approvals endpoints.
statusenumpending_approval: waiting for a person. time_boxed: will go out at timeBoxedExpiresAt unless someone stops it. executing: going out now.opensubmittedpending_approvaltime_boxedapprovedexecutingexecutedcancelledrejectedfailed
labelstringShort summary of what is staged
timeBoxedExpiresAtstring | nullFor time_boxed: when the window closes
timeBoxedExpiryenumFor time_boxed: what happens when the window closesexecutecancelnull
dispatchesobject[]Each staged action
typestringThe kind of action, such as send_message or send_email
descriptionstring
platformstringChannel, such as email, sms or slack
tostring[]
subjectstring
bodystring
statusstring
resolvedApprovalModeenumThe autonomy mode that applied to this actionautotime-boxedmanualnull
handledByobject | nullWhen status is handled_by_other: which of the user's assistants took the thread instead
assistantIdstring
assistantNamestring | null
decidingTaskIdstring | nullThat assistant's task for the same thread, when it exists
decidedAtstring | null
executedAtstring | nullFirst run
completedAtstring | nullWhen the task finished
modelTierenumlowmediumhighultra
effortenumReasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max.lowmediumhighxhighmax
createdByenumagent when the assistant proposed the taskuseragent
approvalGateenumFor tasks the assistant proposed: whether the user has approved it to runpending_user_approvalapproveddeclined
approvalOverrideobjectAutonomy setting for this task only. mode null means the task follows the user's settings.
modeenumautotime-boxedmanualnull
timeBoxedWindowMinnumber | nullFor time-boxed: minutes before a staged action proceeds
undoDelaySecnumber | nullSeconds a sent action is held so it can still be undone
chatIdstring | nullThe chat the task came from, if any
parentTaskIdstring | nullThe task this one was split from, if any
originobject | null
platformstring | nullChannel the task came from, such as chat, email or sms
createdAtstring
updatedAtstring
pageinteger
perPageinteger
totalinteger

Request

curl 'https://api.agnt.ai/tasks' \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]"

Response

{
  "ok": true,
  "tasks": [
    {
      "id": "6660c4a1f2e3b7d8a9c01234",
      "type": "type",
      "title": "Send Brightline the contract renewal",
      "description": "Draft it, get Maria to sign off, send it."
    }
  ],
  "page": 1,
  "perPage": 20
}
POST/tasks

Create a task

Creates a task for the user. To start it, run the task. A task with `status: "scheduled"` and a future `scheduledFor` starts on its own at that time. The assistant must be one the user has.

Request body

title reqstringShort name for the task
assistant reqstringId of an assistant the user has
descriptionstringWhat the user wants done, in their words
statusenumpending (the default) waits for POST /tasks/{taskId}/process; scheduled starts on its own at scheduledForpendingscheduled
scheduledForstringWith status scheduled and a time in the future, the task runs at this time. A past time is stored but schedules no run.
modelTierenumDefaults to the organization's task tier, then the account's, then medium.lowmediumhighultra
effortenumReasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max. Defaults like modelTier.lowmediumhighxhighmax
onBehalfOfstringWhose data and calendar the task acts on: the user's own email (the default) or the email of someone who has delegated to the user.
followersstring[]Email addresses of people following the task
skillsstring[]Skill names the task should use
notificationScopeenumactivity_only keeps the task's updates on its own timelinedefaultactivity_only
generateTitlebooleanTreat title as a placeholder and generate a title from the description

Responses

201Created task
ok reqenumtrue
task reqobject
idstringTask id
typestringtask for work, reminder for a reminder
titlestring
descriptionstring | null
statusenumpending: waiting for a run; POST /tasks/{taskId}/process starts one. scheduled: waits for scheduledFor. executing: a run is in progress. awaiting_user_input / awaiting_non_user_response: waiting on the user or on someone else, with a follow-up time set. alarm_set: will wake itself at a set time. subtasks_running: waiting on its own background work. message_received / conversation: a message thread with no open work. on_hold / paused: stopped until resumed. completed: finished by the assistant. done_user_marked: marked done by the user. error, abandoned, failed_access (could not get access it needed), deferred_access (waiting for access), credits_blocked (out of credits), handled_by_other (another assistant took the thread), archived.pendingscheduledexecutingawaiting_user_inputawaiting_non_user_responsealarm_setsubtasks_runningmessage_receivedconversationon_holdpausedcompleteddone_user_markederrorabandonedfailed_accessdeferred_accesscredits_blockedhandled_by_otherarchived
summarystring | nullWhat the assistant has done, written by the assistant once there is something to report
errorstring | nullDetails of the failure when status is error
ownerstring | nullOwner's email
assistantobjectThe assistant working the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
onBehalfOfstring | nullWhose data and calendar the task acts on (an email)
followersobject[]People following the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
waitingOnContactsobject[]The contacts the task is waiting to hear from, while status is awaiting_non_user_response
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
skillsstring[]
planobject[]Checklist the assistant keeps for the task
textstring
statusenumpendingdoneskippedblocked
notestring
readyForReviewbooleanTrue when the work is finished and waiting for the user to look
scheduledForstring | nullWhen a scheduled task starts
scheduledHeadlinestring | nullOne line, for the user, on what the scheduled run will do
deadlinestring | nullThe user's due time for the outcome
alarmobject | nullThe time the task wakes itself to follow up or report back. Set by the assistant; null when none is set.
wakeAtstringWhen the task wakes
headlinestring | nullOne sentence, for the user, on why the alarm is set and what happens when it fires. Show this, not the alarm itself; null means show nothing.
statusenumset until it fires; fired or cancelled aftersetfiredcancelled
pendingCartobject | nullOutbound actions staged on this task and waiting on approval (a cart); null when nothing is staged. Read and approve it through the Approvals endpoints.
statusenumpending_approval: waiting for a person. time_boxed: will go out at timeBoxedExpiresAt unless someone stops it. executing: going out now.opensubmittedpending_approvaltime_boxedapprovedexecutingexecutedcancelledrejectedfailed
labelstringShort summary of what is staged
timeBoxedExpiresAtstring | nullFor time_boxed: when the window closes
timeBoxedExpiryenumFor time_boxed: what happens when the window closesexecutecancelnull
dispatchesobject[]Each staged action
typestringThe kind of action, such as send_message or send_email
descriptionstring
platformstringChannel, such as email, sms or slack
tostring[]
subjectstring
bodystring
statusstring
resolvedApprovalModeenumThe autonomy mode that applied to this actionautotime-boxedmanualnull
handledByobject | nullWhen status is handled_by_other: which of the user's assistants took the thread instead
assistantIdstring
assistantNamestring | null
decidingTaskIdstring | nullThat assistant's task for the same thread, when it exists
decidedAtstring | null
executedAtstring | nullFirst run
completedAtstring | nullWhen the task finished
modelTierenumlowmediumhighultra
effortenumReasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max.lowmediumhighxhighmax
createdByenumagent when the assistant proposed the taskuseragent
approvalGateenumFor tasks the assistant proposed: whether the user has approved it to runpending_user_approvalapproveddeclined
approvalOverrideobjectAutonomy setting for this task only. mode null means the task follows the user's settings.
modeenumautotime-boxedmanualnull
timeBoxedWindowMinnumber | nullFor time-boxed: minutes before a staged action proceeds
undoDelaySecnumber | nullSeconds a sent action is held so it can still be undone
chatIdstring | nullThe chat the task came from, if any
parentTaskIdstring | nullThe task this one was split from, if any
originobject | null
platformstring | nullChannel the task came from, such as chat, email or sms
createdAtstring
updatedAtstring
400Missing title or assistant
401No user on the call: send X-User-Email with an account key, or use a user-scoped key
statusinteger
error_codestring
errorstring
403Assistant not available to this user
423KILL_SWITCH_ENGAGED: the account is frozen
statusinteger
error_codestring
errorstring

Request

curl 'https://api.agnt.ai/tasks' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Renew the Brightline Freight service contract",
  "assistant": "6702b1e8f9a0b1c2d3e4f5a6"
}'

Response

{
  "ok": true,
  "task": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "type": "type",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
GET/tasks/{taskId}

Retrieve a task

Retrieves a task with its recent activity. To read the full history, list the task's activities.

Path parameters

taskId reqstring

Responses

200Task
ok reqenumtrue
task reqobject
idstringTask id
typestringtask for work, reminder for a reminder
titlestring
descriptionstring | null
statusenumpending: waiting for a run; POST /tasks/{taskId}/process starts one. scheduled: waits for scheduledFor. executing: a run is in progress. awaiting_user_input / awaiting_non_user_response: waiting on the user or on someone else, with a follow-up time set. alarm_set: will wake itself at a set time. subtasks_running: waiting on its own background work. message_received / conversation: a message thread with no open work. on_hold / paused: stopped until resumed. completed: finished by the assistant. done_user_marked: marked done by the user. error, abandoned, failed_access (could not get access it needed), deferred_access (waiting for access), credits_blocked (out of credits), handled_by_other (another assistant took the thread), archived.pendingscheduledexecutingawaiting_user_inputawaiting_non_user_responsealarm_setsubtasks_runningmessage_receivedconversationon_holdpausedcompleteddone_user_markederrorabandonedfailed_accessdeferred_accesscredits_blockedhandled_by_otherarchived
summarystring | nullWhat the assistant has done, written by the assistant once there is something to report
errorstring | nullDetails of the failure when status is error
ownerstring | nullOwner's email
assistantobjectThe assistant working the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
onBehalfOfstring | nullWhose data and calendar the task acts on (an email)
followersobject[]People following the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
waitingOnContactsobject[]The contacts the task is waiting to hear from, while status is awaiting_non_user_response
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
skillsstring[]
planobject[]Checklist the assistant keeps for the task
textstring
statusenumpendingdoneskippedblocked
notestring
readyForReviewbooleanTrue when the work is finished and waiting for the user to look
scheduledForstring | nullWhen a scheduled task starts
scheduledHeadlinestring | nullOne line, for the user, on what the scheduled run will do
deadlinestring | nullThe user's due time for the outcome
alarmobject | nullThe time the task wakes itself to follow up or report back. Set by the assistant; null when none is set.
wakeAtstringWhen the task wakes
headlinestring | nullOne sentence, for the user, on why the alarm is set and what happens when it fires. Show this, not the alarm itself; null means show nothing.
statusenumset until it fires; fired or cancelled aftersetfiredcancelled
pendingCartobject | nullOutbound actions staged on this task and waiting on approval (a cart); null when nothing is staged. Read and approve it through the Approvals endpoints.
statusenumpending_approval: waiting for a person. time_boxed: will go out at timeBoxedExpiresAt unless someone stops it. executing: going out now.opensubmittedpending_approvaltime_boxedapprovedexecutingexecutedcancelledrejectedfailed
labelstringShort summary of what is staged
timeBoxedExpiresAtstring | nullFor time_boxed: when the window closes
timeBoxedExpiryenumFor time_boxed: what happens when the window closesexecutecancelnull
dispatchesobject[]Each staged action
typestringThe kind of action, such as send_message or send_email
descriptionstring
platformstringChannel, such as email, sms or slack
tostring[]
subjectstring
bodystring
statusstring
resolvedApprovalModeenumThe autonomy mode that applied to this actionautotime-boxedmanualnull
handledByobject | nullWhen status is handled_by_other: which of the user's assistants took the thread instead
assistantIdstring
assistantNamestring | null
decidingTaskIdstring | nullThat assistant's task for the same thread, when it exists
decidedAtstring | null
executedAtstring | nullFirst run
completedAtstring | nullWhen the task finished
modelTierenumlowmediumhighultra
effortenumReasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max.lowmediumhighxhighmax
createdByenumagent when the assistant proposed the taskuseragent
approvalGateenumFor tasks the assistant proposed: whether the user has approved it to runpending_user_approvalapproveddeclined
approvalOverrideobjectAutonomy setting for this task only. mode null means the task follows the user's settings.
modeenumautotime-boxedmanualnull
timeBoxedWindowMinnumber | nullFor time-boxed: minutes before a staged action proceeds
undoDelaySecnumber | nullSeconds a sent action is held so it can still be undone
chatIdstring | nullThe chat the task came from, if any
parentTaskIdstring | nullThe task this one was split from, if any
originobject | null
platformstring | nullChannel the task came from, such as chat, email or sms
createdAtstring
updatedAtstring
effectiveApprovalModeenumThe autonomy mode that applies to messages on this task right now, after the task override, the user's settings and any admin locks. Returned by GET and PUT on a single task.autotime-boxedmanualdeniednull
approvalLocksobject[]Autonomy rows an admin has locked, which the task override cannot loosen. Shown to the task's owner only; absent for anyone else.
resourcestringThe kind of outbound action
modeenumautotime-boxedmanualdenied
scopeenumWhich level locked itorgteamaccount
activitiesobject[]The most recent activity. For the full history, page through GET /tasks/{taskId}/activities.
idstring
typestringSuch as message or status_change
createdAtstring
messageobject
rolestringuser, assistant or another participant
contentstring
platformstring
404Task not found

Request

curl 'https://api.agnt.ai/tasks/<taskId>' \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]"

Response

{
  "ok": true,
  "task": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "type": "type",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
PUT/tasks/{taskId}

Update a task

Updates a task the user owns. Only the fields you send change.

Path parameters

taskId reqstring

Request body

titlestring
descriptionstring
assistantstringMove the task to another assistant the user has
statusenumpending to run again, scheduled to wait for scheduledFor, paused or on_hold to stop, archived to file it away. Other statuses are set by the platform; to finish a task use mark-done.pendingscheduledpausedon_holdarchived
scheduledForstring | nullWhen a scheduled task should run
followersstring[]Email addresses; replaces the list
skillsstring[]Skill names; replaces the list
approvalOverrideobject | nullAutonomy for this task only. null clears it so the task follows the user's settings.
modeenumautotime-boxedmanualnull
timeBoxedWindowMinnumber | nullMinutes, for time-boxed
modelTierenumCan be changed only before the task's first run; after that a different value returns 400.lowmediumhighultra

Responses

200Updated task
ok reqenumtrue
task reqobject
idstringTask id
typestringtask for work, reminder for a reminder
titlestring
descriptionstring | null
statusenumpending: waiting for a run; POST /tasks/{taskId}/process starts one. scheduled: waits for scheduledFor. executing: a run is in progress. awaiting_user_input / awaiting_non_user_response: waiting on the user or on someone else, with a follow-up time set. alarm_set: will wake itself at a set time. subtasks_running: waiting on its own background work. message_received / conversation: a message thread with no open work. on_hold / paused: stopped until resumed. completed: finished by the assistant. done_user_marked: marked done by the user. error, abandoned, failed_access (could not get access it needed), deferred_access (waiting for access), credits_blocked (out of credits), handled_by_other (another assistant took the thread), archived.pendingscheduledexecutingawaiting_user_inputawaiting_non_user_responsealarm_setsubtasks_runningmessage_receivedconversationon_holdpausedcompleteddone_user_markederrorabandonedfailed_accessdeferred_accesscredits_blockedhandled_by_otherarchived
summarystring | nullWhat the assistant has done, written by the assistant once there is something to report
errorstring | nullDetails of the failure when status is error
ownerstring | nullOwner's email
assistantobjectThe assistant working the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
onBehalfOfstring | nullWhose data and calendar the task acts on (an email)
followersobject[]People following the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
waitingOnContactsobject[]The contacts the task is waiting to hear from, while status is awaiting_non_user_response
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
skillsstring[]
planobject[]Checklist the assistant keeps for the task
textstring
statusenumpendingdoneskippedblocked
notestring
readyForReviewbooleanTrue when the work is finished and waiting for the user to look
scheduledForstring | nullWhen a scheduled task starts
scheduledHeadlinestring | nullOne line, for the user, on what the scheduled run will do
deadlinestring | nullThe user's due time for the outcome
alarmobject | nullThe time the task wakes itself to follow up or report back. Set by the assistant; null when none is set.
wakeAtstringWhen the task wakes
headlinestring | nullOne sentence, for the user, on why the alarm is set and what happens when it fires. Show this, not the alarm itself; null means show nothing.
statusenumset until it fires; fired or cancelled aftersetfiredcancelled
pendingCartobject | nullOutbound actions staged on this task and waiting on approval (a cart); null when nothing is staged. Read and approve it through the Approvals endpoints.
statusenumpending_approval: waiting for a person. time_boxed: will go out at timeBoxedExpiresAt unless someone stops it. executing: going out now.opensubmittedpending_approvaltime_boxedapprovedexecutingexecutedcancelledrejectedfailed
labelstringShort summary of what is staged
timeBoxedExpiresAtstring | nullFor time_boxed: when the window closes
timeBoxedExpiryenumFor time_boxed: what happens when the window closesexecutecancelnull
dispatchesobject[]Each staged action
typestringThe kind of action, such as send_message or send_email
descriptionstring
platformstringChannel, such as email, sms or slack
tostring[]
subjectstring
bodystring
statusstring
resolvedApprovalModeenumThe autonomy mode that applied to this actionautotime-boxedmanualnull
handledByobject | nullWhen status is handled_by_other: which of the user's assistants took the thread instead
assistantIdstring
assistantNamestring | null
decidingTaskIdstring | nullThat assistant's task for the same thread, when it exists
decidedAtstring | null
executedAtstring | nullFirst run
completedAtstring | nullWhen the task finished
modelTierenumlowmediumhighultra
effortenumReasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max.lowmediumhighxhighmax
createdByenumagent when the assistant proposed the taskuseragent
approvalGateenumFor tasks the assistant proposed: whether the user has approved it to runpending_user_approvalapproveddeclined
approvalOverrideobjectAutonomy setting for this task only. mode null means the task follows the user's settings.
modeenumautotime-boxedmanualnull
timeBoxedWindowMinnumber | nullFor time-boxed: minutes before a staged action proceeds
undoDelaySecnumber | nullSeconds a sent action is held so it can still be undone
chatIdstring | nullThe chat the task came from, if any
parentTaskIdstring | nullThe task this one was split from, if any
originobject | null
platformstring | nullChannel the task came from, such as chat, email or sms
createdAtstring
updatedAtstring
effectiveApprovalModeenumThe autonomy mode that applies to messages on this task right now, after the task override, the user's settings and any admin locks. Returned by GET and PUT on a single task.autotime-boxedmanualdeniednull
approvalLocksobject[]Autonomy rows an admin has locked, which the task override cannot loosen. Shown to the task's owner only; absent for anyone else.
resourcestringThe kind of outbound action
modeenumautotime-boxedmanualdenied
scopeenumWhich level locked itorgteamaccount
activitiesobject[]The most recent activity. For the full history, page through GET /tasks/{taskId}/activities.
idstring
typestringSuch as message or status_change
createdAtstring
messageobject
rolestringuser, assistant or another participant
contentstring
platformstring
400Invalid change, such as completing a task whose actions are waiting for approval, or changing modelTier after the first run
403Not the task's owner. Without X-User-Email there is no owner, so this always applies.
statusinteger
error_codestring
errorstring
404Task not found

Request

curl 'https://api.agnt.ai/tasks/<taskId>' \
  -X PUT \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "paused"
}'

Response

{
  "ok": true,
  "task": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "type": "type",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
DELETE/tasks/{taskId}

Delete a task

Permanently deletes a task with its activity, subtasks and run history. The owner, an account or organization admin, or an account key can delete it.

Path parameters

taskId reqstring

Responses

200Deleted
ok reqenumtrue
task reqobject
id reqstring
deletedboolean
messagestring

Request

curl 'https://api.agnt.ai/tasks/<taskId>' \
  -X DELETE \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]"

Response

{
  "ok": true,
  "task": {
    "id": "6660c4a1f2e3b7d8a9c01234"
  }
}
POST/tasks/{taskId}/process

Run a task

Starts a run of the task. Pass `message` to add the user's reply to the task before the run starts.

Path parameters

taskId reqstring

Request body

messagestringA new message from the user, saved to the task before it runs
filesobject[]Attachments: files already in the user's drive. Files the user cannot read are dropped.
fileId reqstringDrive file id (24 hex characters)
filenamestring
mimeTypestring

Responses

200Processing
ok reqenumtrue
process reqobject
success reqboolean
taskId reqstring
executionIdstring
messagestring
403The user can see the task but may not run it
statusinteger
error_codestring
errorstring
404Task not found, or not visible to this user
statusinteger
error_codestring
errorstring
423KILL_SWITCH_ENGAGED: the account is frozen
statusinteger
error_codestring
errorstring

Request

curl 'https://api.agnt.ai/tasks/<taskId>/process' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]" \
  -H "Content-Type: application/json" \
  -d '{
  "message": "Brightline agreed to a 3% increase. Update the draft to match."
}'

Response

{
  "ok": true,
  "process": {
    "success": true,
    "taskId": "6660c4a1f2e3b7d8a9c01234"
  }
}
POST/tasks/{taskId}/stop

Stop a task

Stops the current run and sets the status to `on_hold`. The task stays open; run it again to resume. Only the owner can stop a task.

Path parameters

taskId reqstring

Responses

200Task
ok reqenumtrue
task reqobject
idstringTask id
typestringtask for work, reminder for a reminder
titlestring
descriptionstring | null
statusenumpending: waiting for a run; POST /tasks/{taskId}/process starts one. scheduled: waits for scheduledFor. executing: a run is in progress. awaiting_user_input / awaiting_non_user_response: waiting on the user or on someone else, with a follow-up time set. alarm_set: will wake itself at a set time. subtasks_running: waiting on its own background work. message_received / conversation: a message thread with no open work. on_hold / paused: stopped until resumed. completed: finished by the assistant. done_user_marked: marked done by the user. error, abandoned, failed_access (could not get access it needed), deferred_access (waiting for access), credits_blocked (out of credits), handled_by_other (another assistant took the thread), archived.pendingscheduledexecutingawaiting_user_inputawaiting_non_user_responsealarm_setsubtasks_runningmessage_receivedconversationon_holdpausedcompleteddone_user_markederrorabandonedfailed_accessdeferred_accesscredits_blockedhandled_by_otherarchived
summarystring | nullWhat the assistant has done, written by the assistant once there is something to report
errorstring | nullDetails of the failure when status is error
ownerstring | nullOwner's email
assistantobjectThe assistant working the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
onBehalfOfstring | nullWhose data and calendar the task acts on (an email)
followersobject[]People following the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
waitingOnContactsobject[]The contacts the task is waiting to hear from, while status is awaiting_non_user_response
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
skillsstring[]
planobject[]Checklist the assistant keeps for the task
textstring
statusenumpendingdoneskippedblocked
notestring
readyForReviewbooleanTrue when the work is finished and waiting for the user to look
scheduledForstring | nullWhen a scheduled task starts
scheduledHeadlinestring | nullOne line, for the user, on what the scheduled run will do
deadlinestring | nullThe user's due time for the outcome
alarmobject | nullThe time the task wakes itself to follow up or report back. Set by the assistant; null when none is set.
wakeAtstringWhen the task wakes
headlinestring | nullOne sentence, for the user, on why the alarm is set and what happens when it fires. Show this, not the alarm itself; null means show nothing.
statusenumset until it fires; fired or cancelled aftersetfiredcancelled
pendingCartobject | nullOutbound actions staged on this task and waiting on approval (a cart); null when nothing is staged. Read and approve it through the Approvals endpoints.
statusenumpending_approval: waiting for a person. time_boxed: will go out at timeBoxedExpiresAt unless someone stops it. executing: going out now.opensubmittedpending_approvaltime_boxedapprovedexecutingexecutedcancelledrejectedfailed
labelstringShort summary of what is staged
timeBoxedExpiresAtstring | nullFor time_boxed: when the window closes
timeBoxedExpiryenumFor time_boxed: what happens when the window closesexecutecancelnull
dispatchesobject[]Each staged action
typestringThe kind of action, such as send_message or send_email
descriptionstring
platformstringChannel, such as email, sms or slack
tostring[]
subjectstring
bodystring
statusstring
resolvedApprovalModeenumThe autonomy mode that applied to this actionautotime-boxedmanualnull
handledByobject | nullWhen status is handled_by_other: which of the user's assistants took the thread instead
assistantIdstring
assistantNamestring | null
decidingTaskIdstring | nullThat assistant's task for the same thread, when it exists
decidedAtstring | null
executedAtstring | nullFirst run
completedAtstring | nullWhen the task finished
modelTierenumlowmediumhighultra
effortenumReasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max.lowmediumhighxhighmax
createdByenumagent when the assistant proposed the taskuseragent
approvalGateenumFor tasks the assistant proposed: whether the user has approved it to runpending_user_approvalapproveddeclined
approvalOverrideobjectAutonomy setting for this task only. mode null means the task follows the user's settings.
modeenumautotime-boxedmanualnull
timeBoxedWindowMinnumber | nullFor time-boxed: minutes before a staged action proceeds
undoDelaySecnumber | nullSeconds a sent action is held so it can still be undone
chatIdstring | nullThe chat the task came from, if any
parentTaskIdstring | nullThe task this one was split from, if any
originobject | null
platformstring | nullChannel the task came from, such as chat, email or sms
createdAtstring
updatedAtstring
403Not the task owner
404Task not found
409task_not_pauseable: the task is already finished

Request

curl 'https://api.agnt.ai/tasks/<taskId>/stop' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]"

Response

{
  "ok": true,
  "task": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "type": "type",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
POST/tasks/{taskId}/mark-done

Mark a task done

Stops the assistant and sets the status to `done_user_marked`.

Path parameters

taskId reqstring

Responses

200Task
ok reqenumtrue
task reqobject
idstringTask id
typestringtask for work, reminder for a reminder
titlestring
descriptionstring | null
statusenumpending: waiting for a run; POST /tasks/{taskId}/process starts one. scheduled: waits for scheduledFor. executing: a run is in progress. awaiting_user_input / awaiting_non_user_response: waiting on the user or on someone else, with a follow-up time set. alarm_set: will wake itself at a set time. subtasks_running: waiting on its own background work. message_received / conversation: a message thread with no open work. on_hold / paused: stopped until resumed. completed: finished by the assistant. done_user_marked: marked done by the user. error, abandoned, failed_access (could not get access it needed), deferred_access (waiting for access), credits_blocked (out of credits), handled_by_other (another assistant took the thread), archived.pendingscheduledexecutingawaiting_user_inputawaiting_non_user_responsealarm_setsubtasks_runningmessage_receivedconversationon_holdpausedcompleteddone_user_markederrorabandonedfailed_accessdeferred_accesscredits_blockedhandled_by_otherarchived
summarystring | nullWhat the assistant has done, written by the assistant once there is something to report
errorstring | nullDetails of the failure when status is error
ownerstring | nullOwner's email
assistantobjectThe assistant working the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
onBehalfOfstring | nullWhose data and calendar the task acts on (an email)
followersobject[]People following the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
waitingOnContactsobject[]The contacts the task is waiting to hear from, while status is awaiting_non_user_response
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
skillsstring[]
planobject[]Checklist the assistant keeps for the task
textstring
statusenumpendingdoneskippedblocked
notestring
readyForReviewbooleanTrue when the work is finished and waiting for the user to look
scheduledForstring | nullWhen a scheduled task starts
scheduledHeadlinestring | nullOne line, for the user, on what the scheduled run will do
deadlinestring | nullThe user's due time for the outcome
alarmobject | nullThe time the task wakes itself to follow up or report back. Set by the assistant; null when none is set.
wakeAtstringWhen the task wakes
headlinestring | nullOne sentence, for the user, on why the alarm is set and what happens when it fires. Show this, not the alarm itself; null means show nothing.
statusenumset until it fires; fired or cancelled aftersetfiredcancelled
pendingCartobject | nullOutbound actions staged on this task and waiting on approval (a cart); null when nothing is staged. Read and approve it through the Approvals endpoints.
statusenumpending_approval: waiting for a person. time_boxed: will go out at timeBoxedExpiresAt unless someone stops it. executing: going out now.opensubmittedpending_approvaltime_boxedapprovedexecutingexecutedcancelledrejectedfailed
labelstringShort summary of what is staged
timeBoxedExpiresAtstring | nullFor time_boxed: when the window closes
timeBoxedExpiryenumFor time_boxed: what happens when the window closesexecutecancelnull
dispatchesobject[]Each staged action
typestringThe kind of action, such as send_message or send_email
descriptionstring
platformstringChannel, such as email, sms or slack
tostring[]
subjectstring
bodystring
statusstring
resolvedApprovalModeenumThe autonomy mode that applied to this actionautotime-boxedmanualnull
handledByobject | nullWhen status is handled_by_other: which of the user's assistants took the thread instead
assistantIdstring
assistantNamestring | null
decidingTaskIdstring | nullThat assistant's task for the same thread, when it exists
decidedAtstring | null
executedAtstring | nullFirst run
completedAtstring | nullWhen the task finished
modelTierenumlowmediumhighultra
effortenumReasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max.lowmediumhighxhighmax
createdByenumagent when the assistant proposed the taskuseragent
approvalGateenumFor tasks the assistant proposed: whether the user has approved it to runpending_user_approvalapproveddeclined
approvalOverrideobjectAutonomy setting for this task only. mode null means the task follows the user's settings.
modeenumautotime-boxedmanualnull
timeBoxedWindowMinnumber | nullFor time-boxed: minutes before a staged action proceeds
undoDelaySecnumber | nullSeconds a sent action is held so it can still be undone
chatIdstring | nullThe chat the task came from, if any
parentTaskIdstring | nullThe task this one was split from, if any
originobject | null
platformstring | nullChannel the task came from, such as chat, email or sms
createdAtstring
updatedAtstring
403Not the task's owner. Without X-User-Email there is no owner, so this always applies.
statusinteger
error_codestring
errorstring
404Task not found

Request

curl 'https://api.agnt.ai/tasks/<taskId>/mark-done' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]"

Response

{
  "ok": true,
  "task": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "type": "type",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
POST/tasks/{taskId}/feedback

Leave feedback on a task

Records the user's thumbs up (`like`) or down (`dislike`) on the task. `null` clears it. Only people following the task can leave feedback.

Path parameters

taskId reqstring

Request body

status reqenumlikedislikenull

Responses

200Feedback
ok reqenumtrue
feedback reqobject
success reqboolean
taskId reqstring
status reqstring | null
message reqstring

Request

curl 'https://api.agnt.ai/tasks/<taskId>/feedback' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "like"
}'

Response

{
  "ok": true,
  "feedback": {
    "success": true,
    "taskId": "6660c4a1f2e3b7d8a9c01234",
    "status": "status",
    "message": "Prefers morning meetings."
  }
}
GET/tasks/{taskId}/activities

List a task's activities

Returns the task's timeline of messages, status changes and other events, newest first, up to 100 per page (default 50). While `hasMore` is `true`, pass the returned `cursor` as `before` to get older entries.

Path parameters

taskId reqstring

Query parameters

limitinteger
beforestringThe cursor from the previous page, passed back unchanged to get older entries. You can also pass an ISO 8601 timestamp.

Responses

200
ok reqenumtrue
activities reqobject[]
id reqstring
taskstring | null
type reqstring
visibilitystring
deliveryobjectDelivery state of an outbound assistant message. Read-only.
stateenumstaged: waiting in an approval (cart) and not sent yet. held: held back and not sent. provider_accepted: sent; the delivery service accepted it. unknown: AGNT has no confirmed delivery record, so do not assume it was or was not delivered. Other values describe messages that stayed inside AGNT, such as a reply shown only in the hosted app or a report between the assistant's own runs.stagedheldprovider_acceptedunknown
taskIdstringTask that sent it
cartIdstringApproval it went through, if any
createdAt reqstring
updatedAtstring
messageobject
role reqenumuserassistantpeer
contentstring
platformstring
metadataobject
deliveryobjectDelivery state of an outbound assistant message. Read-only.
stateenumstaged: waiting in an approval (cart) and not sent yet. held: held back and not sent. provider_accepted: sent; the delivery service accepted it. unknown: AGNT has no confirmed delivery record, so do not assume it was or was not delivered. Other values describe messages that stayed inside AGNT, such as a reply shown only in the hosted app or a report between the assistant's own runs.stagedheldprovider_acceptedunknown
taskIdstringTask that sent it
cartIdstringApproval it went through, if any
hasMore reqboolean
cursor reqstring | nullOpaque cursor; pass it back as `before` to get the next page. null on the last page.
400limit or before is invalid
statusinteger
error_codestring
errorstring
404Task not found in the caller's account and user scope
status reqinteger
error_codestring
error reqstring

Request

curl 'https://api.agnt.ai/tasks/<taskId>/activities' \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]"

Response

{
  "ok": true,
  "activities": [
    {
      "id": "6660c4a1f2e3b7d8a9c01234",
      "type": "type",
      "createdAt": "2026-10-15T14:30:00Z"
    }
  ],
  "hasMore": false,
  "cursor": "eyJ0IjoiMjAyNi0xMC0xNSJ9"
}
GET/tasks/{taskId}/usage

Retrieve a task's usage

Returns the tokens the task used, per run and in total, and the credits charged for each run.

Path parameters

taskId reqstring

Responses

200Usage
totalobject
inputTokensnumber
outputTokensnumber
cacheReadTokensnumber
cacheCreationTokensnumber
totalTokensnumber
runsinteger
turnsinteger
rowsobject[]One row per run and model, oldest first
runIdstring | null
seqinteger
modelTierstring | null
inputTokensnumber
outputTokensnumber
cacheReadTokensnumber
cacheCreationTokensnumber
totalTokensnumber
turnsinteger
startedAtstring | null
creditsobjectCredits charged, one entry per run
totalnumber
runsobject[]
chargedCreditsnumber
isBillableboolean
createdAtstring
404Task not found

Request

curl 'https://api.agnt.ai/tasks/<taskId>/usage' \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]"

Response

{
  "total": {
    "inputTokens": 1840,
    "outputTokens": 1840,
    "cacheReadTokens": 1840,
    "cacheCreationTokens": 1840
  },
  "rows": [
    {
      "runId": "6660c4a1f2e3b7d8a9c01234",
      "seq": 1,
      "modelTier": "modeltier",
      "inputTokens": 1840
    }
  ],
  "credits": {
    "total": 42,
    "runs": [
      {
        "chargedCredits": 5,
        "isBillable": true,
        "createdAt": "2026-10-15T14:30:00Z"
      }
    ]
  }
}
POST/tasks/{taskId}/approve

Approve a proposed task

Approves a task the assistant created and is holding for the user. The task starts, or waits for its scheduled time. Call it as a user who owns, follows or works on the task.

Path parameters

taskId reqstring

Request body

reasonstringOptional note recorded with the approval

Responses

200Approved task
ok reqenumtrue
task reqobject
idstringTask id
typestringtask for work, reminder for a reminder
titlestring
descriptionstring | null
statusenumpending: waiting for a run; POST /tasks/{taskId}/process starts one. scheduled: waits for scheduledFor. executing: a run is in progress. awaiting_user_input / awaiting_non_user_response: waiting on the user or on someone else, with a follow-up time set. alarm_set: will wake itself at a set time. subtasks_running: waiting on its own background work. message_received / conversation: a message thread with no open work. on_hold / paused: stopped until resumed. completed: finished by the assistant. done_user_marked: marked done by the user. error, abandoned, failed_access (could not get access it needed), deferred_access (waiting for access), credits_blocked (out of credits), handled_by_other (another assistant took the thread), archived.pendingscheduledexecutingawaiting_user_inputawaiting_non_user_responsealarm_setsubtasks_runningmessage_receivedconversationon_holdpausedcompleteddone_user_markederrorabandonedfailed_accessdeferred_accesscredits_blockedhandled_by_otherarchived
summarystring | nullWhat the assistant has done, written by the assistant once there is something to report
errorstring | nullDetails of the failure when status is error
ownerstring | nullOwner's email
assistantobjectThe assistant working the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
onBehalfOfstring | nullWhose data and calendar the task acts on (an email)
followersobject[]People following the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
waitingOnContactsobject[]The contacts the task is waiting to hear from, while status is awaiting_non_user_response
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
skillsstring[]
planobject[]Checklist the assistant keeps for the task
textstring
statusenumpendingdoneskippedblocked
notestring
readyForReviewbooleanTrue when the work is finished and waiting for the user to look
scheduledForstring | nullWhen a scheduled task starts
scheduledHeadlinestring | nullOne line, for the user, on what the scheduled run will do
deadlinestring | nullThe user's due time for the outcome
alarmobject | nullThe time the task wakes itself to follow up or report back. Set by the assistant; null when none is set.
wakeAtstringWhen the task wakes
headlinestring | nullOne sentence, for the user, on why the alarm is set and what happens when it fires. Show this, not the alarm itself; null means show nothing.
statusenumset until it fires; fired or cancelled aftersetfiredcancelled
pendingCartobject | nullOutbound actions staged on this task and waiting on approval (a cart); null when nothing is staged. Read and approve it through the Approvals endpoints.
statusenumpending_approval: waiting for a person. time_boxed: will go out at timeBoxedExpiresAt unless someone stops it. executing: going out now.opensubmittedpending_approvaltime_boxedapprovedexecutingexecutedcancelledrejectedfailed
labelstringShort summary of what is staged
timeBoxedExpiresAtstring | nullFor time_boxed: when the window closes
timeBoxedExpiryenumFor time_boxed: what happens when the window closesexecutecancelnull
dispatchesobject[]Each staged action
typestringThe kind of action, such as send_message or send_email
descriptionstring
platformstringChannel, such as email, sms or slack
tostring[]
subjectstring
bodystring
statusstring
resolvedApprovalModeenumThe autonomy mode that applied to this actionautotime-boxedmanualnull
handledByobject | nullWhen status is handled_by_other: which of the user's assistants took the thread instead
assistantIdstring
assistantNamestring | null
decidingTaskIdstring | nullThat assistant's task for the same thread, when it exists
decidedAtstring | null
executedAtstring | nullFirst run
completedAtstring | nullWhen the task finished
modelTierenumlowmediumhighultra
effortenumReasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max.lowmediumhighxhighmax
createdByenumagent when the assistant proposed the taskuseragent
approvalGateenumFor tasks the assistant proposed: whether the user has approved it to runpending_user_approvalapproveddeclined
approvalOverrideobjectAutonomy setting for this task only. mode null means the task follows the user's settings.
modeenumautotime-boxedmanualnull
timeBoxedWindowMinnumber | nullFor time-boxed: minutes before a staged action proceeds
undoDelaySecnumber | nullSeconds a sent action is held so it can still be undone
chatIdstring | nullThe chat the task came from, if any
parentTaskIdstring | nullThe task this one was split from, if any
originobject | null
platformstring | nullChannel the task came from, such as chat, email or sms
createdAtstring
updatedAtstring
403Not called as an end user: an account key without X-User-Email, or a certificate token
404Task not found or not visible to this user
409Task is not waiting for approval

Request

curl 'https://api.agnt.ai/tasks/<taskId>/approve' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Approved by Jane"
}'

Response

{
  "ok": true,
  "task": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "type": "type",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
POST/tasks/{taskId}/decline

Decline a proposed task

Declines a task the assistant is holding for the user. The proposed work is not done; the decline and optional `reason` go into the task's conversation, and the assistant follows up.

Path parameters

taskId reqstring

Request body

reasonstringOptional reason, shared with the assistant

Responses

200Declined task
ok reqenumtrue
task reqobject
idstringTask id
typestringtask for work, reminder for a reminder
titlestring
descriptionstring | null
statusenumpending: waiting for a run; POST /tasks/{taskId}/process starts one. scheduled: waits for scheduledFor. executing: a run is in progress. awaiting_user_input / awaiting_non_user_response: waiting on the user or on someone else, with a follow-up time set. alarm_set: will wake itself at a set time. subtasks_running: waiting on its own background work. message_received / conversation: a message thread with no open work. on_hold / paused: stopped until resumed. completed: finished by the assistant. done_user_marked: marked done by the user. error, abandoned, failed_access (could not get access it needed), deferred_access (waiting for access), credits_blocked (out of credits), handled_by_other (another assistant took the thread), archived.pendingscheduledexecutingawaiting_user_inputawaiting_non_user_responsealarm_setsubtasks_runningmessage_receivedconversationon_holdpausedcompleteddone_user_markederrorabandonedfailed_accessdeferred_accesscredits_blockedhandled_by_otherarchived
summarystring | nullWhat the assistant has done, written by the assistant once there is something to report
errorstring | nullDetails of the failure when status is error
ownerstring | nullOwner's email
assistantobjectThe assistant working the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
onBehalfOfstring | nullWhose data and calendar the task acts on (an email)
followersobject[]People following the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
waitingOnContactsobject[]The contacts the task is waiting to hear from, while status is awaiting_non_user_response
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
skillsstring[]
planobject[]Checklist the assistant keeps for the task
textstring
statusenumpendingdoneskippedblocked
notestring
readyForReviewbooleanTrue when the work is finished and waiting for the user to look
scheduledForstring | nullWhen a scheduled task starts
scheduledHeadlinestring | nullOne line, for the user, on what the scheduled run will do
deadlinestring | nullThe user's due time for the outcome
alarmobject | nullThe time the task wakes itself to follow up or report back. Set by the assistant; null when none is set.
wakeAtstringWhen the task wakes
headlinestring | nullOne sentence, for the user, on why the alarm is set and what happens when it fires. Show this, not the alarm itself; null means show nothing.
statusenumset until it fires; fired or cancelled aftersetfiredcancelled
pendingCartobject | nullOutbound actions staged on this task and waiting on approval (a cart); null when nothing is staged. Read and approve it through the Approvals endpoints.
statusenumpending_approval: waiting for a person. time_boxed: will go out at timeBoxedExpiresAt unless someone stops it. executing: going out now.opensubmittedpending_approvaltime_boxedapprovedexecutingexecutedcancelledrejectedfailed
labelstringShort summary of what is staged
timeBoxedExpiresAtstring | nullFor time_boxed: when the window closes
timeBoxedExpiryenumFor time_boxed: what happens when the window closesexecutecancelnull
dispatchesobject[]Each staged action
typestringThe kind of action, such as send_message or send_email
descriptionstring
platformstringChannel, such as email, sms or slack
tostring[]
subjectstring
bodystring
statusstring
resolvedApprovalModeenumThe autonomy mode that applied to this actionautotime-boxedmanualnull
handledByobject | nullWhen status is handled_by_other: which of the user's assistants took the thread instead
assistantIdstring
assistantNamestring | null
decidingTaskIdstring | nullThat assistant's task for the same thread, when it exists
decidedAtstring | null
executedAtstring | nullFirst run
completedAtstring | nullWhen the task finished
modelTierenumlowmediumhighultra
effortenumReasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max.lowmediumhighxhighmax
createdByenumagent when the assistant proposed the taskuseragent
approvalGateenumFor tasks the assistant proposed: whether the user has approved it to runpending_user_approvalapproveddeclined
approvalOverrideobjectAutonomy setting for this task only. mode null means the task follows the user's settings.
modeenumautotime-boxedmanualnull
timeBoxedWindowMinnumber | nullFor time-boxed: minutes before a staged action proceeds
undoDelaySecnumber | nullSeconds a sent action is held so it can still be undone
chatIdstring | nullThe chat the task came from, if any
parentTaskIdstring | nullThe task this one was split from, if any
originobject | null
platformstring | nullChannel the task came from, such as chat, email or sms
createdAtstring
updatedAtstring
403Not called as an end user
404Task not found or not visible to this user
409Task is not waiting for approval

Request

curl 'https://api.agnt.ai/tasks/<taskId>/decline' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Approved by Jane"
}'

Response

{
  "ok": true,
  "task": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "type": "type",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
POST/tasks/approve-batch

Approve proposed tasks in bulk

Approves up to 100 proposed tasks in one call. Each task is handled on its own; tasks that cannot be approved are listed in `failed`.

Request body

taskIds reqstring[]1 to 100 task ids

Responses

200Per-task results
ok reqboolean
batch reqobject
approvedstring[]
failedobject[]
taskIdstring
errorstring
400taskIds missing, empty or over 100
403Not called as an end user

Request

curl 'https://api.agnt.ai/tasks/approve-batch' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]" \
  -H "Content-Type: application/json" \
  -d '{
  "taskIds": [
    "6660c4a1f2e3b7d8a9c01234"
  ]
}'

Response

{
  "ok": true,
  "batch": {
    "approved": [
      "approved"
    ],
    "failed": [
      {
        "taskId": "6660c4a1f2e3b7d8a9c01234",
        "error": "error"
      }
    ]
  }
}
POST/tasks/{taskId}/mark-not-done

Reopen a task

Reopens a completed task, or one the user marked done. The status returns to `pending`, and the assistant asks the user how to proceed. Only the task owner can reopen it.

Path parameters

taskId reqstring

Responses

200Reopened task
ok reqenumtrue
task reqobject
idstringTask id
typestringtask for work, reminder for a reminder
titlestring
descriptionstring | null
statusenumpending: waiting for a run; POST /tasks/{taskId}/process starts one. scheduled: waits for scheduledFor. executing: a run is in progress. awaiting_user_input / awaiting_non_user_response: waiting on the user or on someone else, with a follow-up time set. alarm_set: will wake itself at a set time. subtasks_running: waiting on its own background work. message_received / conversation: a message thread with no open work. on_hold / paused: stopped until resumed. completed: finished by the assistant. done_user_marked: marked done by the user. error, abandoned, failed_access (could not get access it needed), deferred_access (waiting for access), credits_blocked (out of credits), handled_by_other (another assistant took the thread), archived.pendingscheduledexecutingawaiting_user_inputawaiting_non_user_responsealarm_setsubtasks_runningmessage_receivedconversationon_holdpausedcompleteddone_user_markederrorabandonedfailed_accessdeferred_accesscredits_blockedhandled_by_otherarchived
summarystring | nullWhat the assistant has done, written by the assistant once there is something to report
errorstring | nullDetails of the failure when status is error
ownerstring | nullOwner's email
assistantobjectThe assistant working the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
onBehalfOfstring | nullWhose data and calendar the task acts on (an email)
followersobject[]People following the task
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
waitingOnContactsobject[]The contacts the task is waiting to hear from, while status is awaiting_non_user_response
idstring
typeenumuserassistantcontact
emailstring
firstNamestring | null
lastNamestring | null
avatarstring | null
skillsstring[]
planobject[]Checklist the assistant keeps for the task
textstring
statusenumpendingdoneskippedblocked
notestring
readyForReviewbooleanTrue when the work is finished and waiting for the user to look
scheduledForstring | nullWhen a scheduled task starts
scheduledHeadlinestring | nullOne line, for the user, on what the scheduled run will do
deadlinestring | nullThe user's due time for the outcome
alarmobject | nullThe time the task wakes itself to follow up or report back. Set by the assistant; null when none is set.
wakeAtstringWhen the task wakes
headlinestring | nullOne sentence, for the user, on why the alarm is set and what happens when it fires. Show this, not the alarm itself; null means show nothing.
statusenumset until it fires; fired or cancelled aftersetfiredcancelled
pendingCartobject | nullOutbound actions staged on this task and waiting on approval (a cart); null when nothing is staged. Read and approve it through the Approvals endpoints.
statusenumpending_approval: waiting for a person. time_boxed: will go out at timeBoxedExpiresAt unless someone stops it. executing: going out now.opensubmittedpending_approvaltime_boxedapprovedexecutingexecutedcancelledrejectedfailed
labelstringShort summary of what is staged
timeBoxedExpiresAtstring | nullFor time_boxed: when the window closes
timeBoxedExpiryenumFor time_boxed: what happens when the window closesexecutecancelnull
dispatchesobject[]Each staged action
typestringThe kind of action, such as send_message or send_email
descriptionstring
platformstringChannel, such as email, sms or slack
tostring[]
subjectstring
bodystring
statusstring
resolvedApprovalModeenumThe autonomy mode that applied to this actionautotime-boxedmanualnull
handledByobject | nullWhen status is handled_by_other: which of the user's assistants took the thread instead
assistantIdstring
assistantNamestring | null
decidingTaskIdstring | nullThat assistant's task for the same thread, when it exists
decidedAtstring | null
executedAtstring | nullFirst run
completedAtstring | nullWhen the task finished
modelTierenumlowmediumhighultra
effortenumReasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max.lowmediumhighxhighmax
createdByenumagent when the assistant proposed the taskuseragent
approvalGateenumFor tasks the assistant proposed: whether the user has approved it to runpending_user_approvalapproveddeclined
approvalOverrideobjectAutonomy setting for this task only. mode null means the task follows the user's settings.
modeenumautotime-boxedmanualnull
timeBoxedWindowMinnumber | nullFor time-boxed: minutes before a staged action proceeds
undoDelaySecnumber | nullSeconds a sent action is held so it can still be undone
chatIdstring | nullThe chat the task came from, if any
parentTaskIdstring | nullThe task this one was split from, if any
originobject | null
platformstring | nullChannel the task came from, such as chat, email or sms
createdAtstring
updatedAtstring
400Task is not done
403Not the task's owner. Without X-User-Email there is no owner, so this always applies.
statusinteger
error_codestring
errorstring
404Task not found

Request

curl 'https://api.agnt.ai/tasks/<taskId>/mark-not-done' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]"

Response

{
  "ok": true,
  "task": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "type": "type",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}