ai/agents/tasks endpoints allow you to perform the following actions:
- Create a task: Give an instruction to work on. Returns the task ID you need for all subsequent actions.
- List tasks: Retrieve a list of all tasks, optionally filtered by any combination of the task’s project, branch, status, and creation date.
- Find the status of a task: Check the current status and details of a task.
- Handle decisions: Approve tool use or answer questions when pauses mid-task and asks for your input.
- Read messages: Retrieve the message history for a task to follow ‘s reasoning or collect its output.
- Send a follow-up message: Send additional instructions to an existing task—for example, to give clarification, redirect , or resume it after it’s stopped.
- Stop a task: Stop a running task. finishes what it’s currently doing before stopping.
- Delete a task: Permanently delete a task and all of its associated data.
- Update task permissions: Replace the full set of tools is permitted to use.
These endpoints currently only work with Matillion-hosted and GitHub projects.
Create a task
Use this endpoint to create a new task and send an instruction to work on. A successful request returns a task ID that you use in all subsequent requests.Request fields
Example request
Base URL:POST /v1/ai/agents/tasks
Example request body:
List tasks
Use this endpoint to retrieve a list of all tasks. You can filter the results by any combination of the task’s project, branch, status, and creation date.Query parameters
Example request
Base URL:GET /v1/ai/agents/tasks
Example success response:
Find the status of a task
Use this endpoint to check the current status and details of a task.Task statuses
Example request
Base URL:GET /v1/ai/agents/tasks/{taskId}
Example success response:
Handle decisions
Use this endpoint to submit decisions on a stopped task and resume the agent. WhenpendingDecisions is not empty on a STOPPED task, the agent is paused waiting for your input.
There are two decision types:
- Approve the use of a tool so that can use this tool to complete its task.
- Answer a question that asked as part of completing its task.
Example request: Tool approval
Base URL:POST /v1/ai/agents/tasks/{taskId}/decisions
id value comes from pendingDecisions[].toolId on the task. Set scope to "CONVERSATION" to pre-approve the tool for the remainder of the task—useful when the agent will call the same tool many times in a loop.
Example request: Answer a question
Read messages
Use this endpoint to retrieve the message history for a task and follow the agent’s reasoning or collect its output. This is the primary way to see what the agent is doing and read its results.Query parameters
Example request
Base URL:GET /v1/ai/agents/tasks/{taskId}/messages
The response includes a results array of events ordered chronologically, and a more field containing the pagination token for the next page. When more is absent and the task status is STOPPED or ERRORED, there are no more events to retrieve.
Send a follow-up message
Use this endpoint to send an additional instruction to an existing task—for example, to give clarification, redirect the agent, or resume it after it has stopped.Request fields
Example request
Base URL:POST /v1/ai/agents/tasks/{taskId}/messages
Example request body:
Stop a task
Use this endpoint to stop a task that is running. finishes what it is currently doing before stopping. UseGET /v1/ai/agents/tasks/{taskId} to monitor the task status until it reaches STOPPED before attempting further operations on the task. Once stopped, you can resume the task by sending it a new message, or delete it.
Example request
Base URL:POST /v1/ai/agents/tasks/{taskId}/stop
No request body is required.
Example success response:
Delete a task
Use this endpoint to permanently delete a task and all of its associated data. Deleting a task means that you won’t have an audit trail for any changes that made as part of the deleted task.Example request
Base URL:DELETE /v1/ai/agents/tasks/{taskId}
Example success response:
Update task permissions
Use this endpoint to replace the full set of tools the agent has been granted permission to use. This is a complete replacement—whatever you send becomes the new list. For a list of available tools and theirtoolName values, read Available tools below.
This endpoint replaces the full permission set, not individual permissions. To add a single permission, re-send the complete list including the new entry. Pass an empty list (
[]) to clear all permissions.Example request
Base URL:PUT /v1/ai/agents/tasks/{taskId}/permissions
Example request body:
Available tools
The following table lists all tools that can use as part of a task. Use the names in the Tool name column as the value of thetoolName field when creating a task or updating task permissions.
