Listen for tasks
A taskable agent is an asset entity, or group of entities that can perform tasks.
An agent calls the following API to listen for tasks assigned to it in Lattice:
StreamAsAgent— For monitoring tasks routed to the agent using REST.ListenAsAgent— For monitoring tasks routed to the agent using gRPC.
Before you begin
- To publish taskable entities, and subscribe to tasks, set up your Lattice environment.
- Familiarize yourself with entities and different entity types.
gRPC authentication
If you are using gRPC with client credentials, set up the token refresh module before running the examples on this page.
Integrate an agent
An asset is an entity under your control, or under the control of another operator or system. Assets may accept tasks such as search or tracking. An agent is an asset, or a group of assets, that can complete a specific set of defined tasks.
To publish an agent, do the following:
Define a TaskCatalog
The entity model’s TaskCatalog
component defines the tasks that an asset can execute. An operator, using the Lattice UI or
a programmatic SDK integration, can use an entity override
to modify the asset’s TaskCatalog.
For example, publish an asset with the following catalog to listen to, and execute VisualId and Investigate
tasks assigned to it:
Publish the agent
Use the PublishEntity method to publish a taskable agent:
If successful, you see the entity ID in the console. Copy the ID:
Stream tasks as an agent
Use StreamAsAgent,
or ListenAsAgent
for gRPC, and replace AGENT_ID with the ID of the agent you just published.
This lets the agent subscribe to, and listen for, tasks routed to it by Lattice:
If successful, you see the following output:
Assign a task using the Lattice UI
To assign a task, do the following:
- Open your environment’s Lattice UI, and select the entity you published in the Entity Explorer.
- From the entity’s detail page, click Assign Task:

- Select a task from the Available Tasks list, fill in the
fields under Task Configuration, then click
Submit Task. The form is generated from the task’s schema,
and submitting it sends a real
CreateTaskrequest:
Endpoints for operators
The operator should use the following endpoints from Lattice UI or a third-party UI:
CreateTask: Creates a new task. Lattice calls theCreateTaskendpoint after a task’s details have been populated in the UI, and an operator presses “Execute Task” for the first time.GetTask: Fetches the state of an existing task.QueryTasks: Finds tasks that match the specified criteria.
What’s next
- To learn more about tasks, see Task an asset.
- See tasks in action with the auto-reconnaissance sample app.