Skip to content

Guides

Task groups

Build ordered task flows, link them to assistants, and override task instructions per assistant.

A task group is a named, ordered sequence of tasks — a structured flow the assistant can follow (e.g. a booking flow: collect name, collect date, confirm). Task groups belong to your tenant; you link them to individual assistants, and can override a task's instructions for one assistant without touching the shared definition.

MethodPathPurpose
GET/taskgroupsList task groups (with nested ordered tasks)
GET/taskgroups/{id}Get one task group with its tasks
POST/taskgroupsCreate a task group
PATCH/taskgroups/{id}Update name/description
DELETE/taskgroups/{id}Soft-delete (cascades to its tasks)
GET/taskgroups/{id}/tasksList tasks, ordered by order ascending
POST/taskgroups/{id}/tasksCreate a task
POST/taskgroups/{id}/tasks/reorderBulk-reorder all tasks
PATCH/taskgroups/{id}/tasks/{taskId}Update a task
DELETE/taskgroups/{id}/tasks/{taskId}Soft-delete a task
GET/assistants/{id}/taskgroupsList task groups linked to an assistant
POST/assistants/{id}/taskgroupsLink a task group
DELETE/assistants/{id}/taskgroups/{taskgroupId}Unlink a task group
GET/assistants/{id}/tasks/overridesList the assistant's task instruction overrides
POST/assistants/{id}/tasks/{taskId}/overrideSet an instruction override
DELETE/assistants/{id}/tasks/{taskId}/overrideRemove an instruction override

Task-driven mode

Assistants have a taskDrivenMode boolean (set via POST /assistants or PATCH /assistants/{id}) that enables task-group-driven conversation flow.

Create a task group#

POST /taskgroups

FieldTypeRequiredDescription
namestringYesMax 255 chars, must match ^[a-z0-9_]+$ (lowercase letters, digits, underscore)
descriptionstringYesWhat the flow is for
bash
curl -X POST https://core-api.heysadie.ai/taskgroups \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "table_booking",
    "description": "Collects everything needed to book a table."
  }'

PATCH /taskgroups/{id} updates name and/or description. DELETE /taskgroups/{id} soft-deletes the group and cascades to its tasks.

Add tasks#

POST /taskgroups/{id}/tasks

FieldTypeRequiredDescription
orderinteger ≥ 0YesPosition in the flow
namestringYesMax 255 chars
descriptionstringYesWhat the task achieves
instructionsstringYesHow the assistant should perform the task
outputsstring[] | nullNoOutput keys the task produces — each must be a valid identifier (^[A-Za-z_][A-Za-z0-9_]*$)
toolNamesstring[] | nullNoNames of tools the task may use
typestring | nullNoFree-form task type label, max 50 chars
Terminal
curl -X POST https://core-api.heysadie.ai/taskgroups/TASKGROUP_ID/tasks \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "order": 0,
    "name": "Collect party size",
    "description": "Find out how many people the booking is for.",
    "instructions": "Ask the caller how many guests will be dining. Accept 1-20.",
    "outputs": ["party_size"]
  }'

PATCH /taskgroups/{id}/tasks/{taskId} takes the same fields, all optional. DELETE /taskgroups/{id}/tasks/{taskId} soft-deletes a single task.

Reorder tasks#

POST /taskgroups/{id}/tasks/reorder — bulk-reorders all tasks in the group in one call:

Terminal
curl -X POST https://core-api.heysadie.ai/taskgroups/TASKGROUP_ID/tasks/reorder \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "order": [
      { "taskId": "0195f1e2-...", "order": 0 },
      { "taskId": "0195f1e2-...", "order": 1 }
    ]
  }'

The response is the full re-ordered task list. GET /taskgroups/{id}/tasks always returns tasks ordered by order ascending.

bash
curl -X POST https://core-api.heysadie.ai/assistants/ASSISTANT_ID/taskgroups \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskgroupId": "TASKGROUP_ID" }'
  • GET /assistants/{id}/taskgroups lists the groups linked to that assistant.
  • DELETE /assistants/{id}/taskgroups/{taskgroupId} unlinks a group (the group itself is untouched).

Per-assistant task overrides#

When one assistant needs slightly different instructions for a shared task, set an instruction override instead of forking the task group:

Terminal
curl -X POST https://core-api.heysadie.ai/assistants/ASSISTANT_ID/tasks/TASK_ID/override \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "instructionOverride": "For this venue, also ask whether the caller wants indoor or outdoor seating." }'
  • GET /assistants/{id}/tasks/overrides lists all overrides for the assistant's linked tasks.
  • DELETE /assistants/{id}/tasks/{taskId}/override removes the override, restoring the shared task's instructions.

Next steps#

  • Assistants — enable taskDrivenMode and manage the rest of the configuration.
  • Tools — the tools referenced by toolNames.