provenance.task_definition_id. In the app they are under
Saved tasks.
Prerequisites
- An agent with a working model in the workspace.
- Permission to run that agent. Running a saved task is a run of its agent, so
it needs
executeon the agent; saving one does not. - An access token, exported as
AGENTAREA_TOKEN, the API base URL asAGENTAREA_URL, and the workspace slug asWORKSPACE.
Steps
Save the task
name is 1–255 characters, description is what the agent is asked and
must not be blank, and the agent must exist in the workspace. parameters
take the same keys as a task’s; delivery_address and session are
refused, as on a task.Run it
parameters are merged over the saved ones for
this run only. The response is the task, as POST .../agents/{id}/tasks/sync
returns it. The run belongs to the caller: provenance.origin_type is
user and provenance.source_identity is user:<your id>. A caller
without execute on the agent gets 403 and nothing starts.Point a trigger at it
Pass A saved task of another agent, or of another workspace, is refused with
task_definition_id when creating or updating a trigger of the same
agent. Each firing then asks the saved task’s text with its parameters, in
place of the trigger’s own task_parameters, so a cron trigger needs no
text of its own:400. Send "task_definition_id": null on an update to go back to the
trigger’s own text.Verify
Every task started from it carries the saved task’s id:A run you started reads
origin: "user"; one a trigger fired reads
origin: "trigger", with the trigger in provenance.origin_id.Troubleshooting
Deleting a saved task, or changing its agent, answers 409
Deleting a saved task, or changing its agent, answers 409
Triggers still run it. A trigger was bound to one agent, so the saved task
cannot move to another or disappear under it. Point those triggers at
another saved task, or send
"task_definition_id": null with
task_parameters.text, then try again.Related
Schedule an agent
A cron trigger, its limits, and how to check it fired.
Triggers and channels
What starts a task when nobody is there.