tasks
Creates, updates, deletes, gets or lists a tasks resource.
Overview
| Name | tasks |
| Type | Resource |
| Id | google.discoveryengine.tasks |
Fields
The following fields are returned by SELECT queries:
- projects_locations_collections_engines_assistants_agents_a2a_v1_tasks_get
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier (e.g. UUID) for the task, generated by the server for a new task. |
artifacts | array | A set of output artifacts for a Task. |
contextId | string | Unique identifier (e.g. UUID) for the contextual collection of interactions (tasks and messages). Created by the A2A server. |
history | array | protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a task. |
metadata | object | protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task. |
status | object | The current status of a Task, including state and a message. (id: A2aV1TaskStatus) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
projects_locations_collections_engines_assistants_agents_a2a_v1_tasks_get | select | projectsId, locationsId, collectionsId, enginesId, assistantsId, agentsId, tasksId | historyLength | Get the current state of a task from the agent. |
projects_locations_collections_engines_assistants_agents_a2a_v1_tasks_subscribe | exec | projectsId, locationsId, collectionsId, enginesId, assistantsId, agentsId, tasksId | TaskSubscription is a streaming call that will return a stream of task update events. This attaches the stream to an existing in process task. If the task is complete the stream will return the completed task (like GetTask) and close the stream. | |
projects_locations_collections_engines_assistants_agents_a2a_v1_tasks_cancel | exec | projectsId, locationsId, collectionsId, enginesId, assistantsId, agentsId, tasksId | Cancel a task from the agent. If supported one should expect no more task updates for the task. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
agentsId | string | |
assistantsId | string | |
collectionsId | string | |
enginesId | string | |
locationsId | string | |
projectsId | string | |
tasksId | string | |
historyLength | integer (int32) |
SELECT examples
- projects_locations_collections_engines_assistants_agents_a2a_v1_tasks_get
Get the current state of a task from the agent.
SELECT
id,
artifacts,
contextId,
history,
metadata,
status
FROM google.discoveryengine.tasks
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND enginesId = '{{ enginesId }}' -- required
AND assistantsId = '{{ assistantsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND tasksId = '{{ tasksId }}' -- required
AND historyLength = '{{ historyLength }}'
;
Lifecycle Methods
- projects_locations_collections_engines_assistants_agents_a2a_v1_tasks_subscribe
- projects_locations_collections_engines_assistants_agents_a2a_v1_tasks_cancel
TaskSubscription is a streaming call that will return a stream of task update events. This attaches the stream to an existing in process task. If the task is complete the stream will return the completed task (like GetTask) and close the stream.
EXEC google.discoveryengine.tasks.projects_locations_collections_engines_assistants_agents_a2a_v1_tasks_subscribe
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@collectionsId='{{ collectionsId }}' --required,
@enginesId='{{ enginesId }}' --required,
@assistantsId='{{ assistantsId }}' --required,
@agentsId='{{ agentsId }}' --required,
@tasksId='{{ tasksId }}' --required
;
Cancel a task from the agent. If supported one should expect no more task updates for the task.
EXEC google.discoveryengine.tasks.projects_locations_collections_engines_assistants_agents_a2a_v1_tasks_cancel
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@collectionsId='{{ collectionsId }}' --required,
@enginesId='{{ enginesId }}' --required,
@assistantsId='{{ assistantsId }}' --required,
@agentsId='{{ agentsId }}' --required,
@tasksId='{{ tasksId }}' --required
;