set task.md

set_task()

call.set_task() directs the agent toward a new goal mid-call. It accepts an objective, an ordered checklist of steps, and a task ID for binding completion handlers.

export const SET_TASK_SIG_PY = call.set_task( task_id: str, objective: str = "", checklist: list[Field | Say | str] | None = None, completion_criteria: str = "", );

export const SET_TASK_SIG_TS = await call.setTask({ taskId: string, objective?: string, checklist?: (FieldItem | SayItem | string)[], });

<CodeTabs python={{ code: SET_TASK_SIG_PY, filename: "signature" }} typescript={{ code: SET_TASK_SIG_TS, filename: "signature" }} />

Full reference: See the Task page for parameter details, checklist item types, and a complete example.