Skip to main content

Integrate with Lattice Tasking

This page describes how to integrate with Task Manager, the service that lets you create, update, monitor, and execute a task.

Task Management

Task Manager handles task state management and the correct routing of tasks to taskable agents.

In an integration with Lattice, operators and taskable agents interact with Task Manager to progress a task through its full lifecycle of creation to completion.

Endpoints for taskable agents

If you're integrating an agent with Lattice's tasking infrastructure, your robot should only use the following endpoints:

  • ListenAsAgent: monitor for and receive tasks.
  • UpdateStatus: report real-time status updates to Task Manager as the agent progresses through a task.

Define your agent's tasks

To ensure Lattice knows your agent can complete specific tasks, add TaskDefinitions in the entity's TaskCatalog field. The TaskCatalog specifies the types of tasks an agent can perform.

Lattice will not send a task to an agent for execution unless the task is listed in the agent's TaskCatalog.

Here's an example of an entity's TaskCatalog:

"taskCatalog": {
"taskDefinitions": [
{
"taskSpecificationUrl": "type.googleapis.com/anduril.tasks.v2.VisualId"
},
{
"taskSpecificationUrl": "type.googleapis.com/anduril.tasks.v2.Investigate”
}
]
}

In the example above, the agent can execute:

  • A "Visual Id" task, which might involve identifying or tracking visual targets.
  • An "Investigate" task, which might involve reconnaissance or surveillance.

Each task definition requires a taskSpecificationUrl, which is a URL that uniquely identifies the task's protobuf message type. Note that Anduril's proto path is prefixed with type.googleapis.com/.

Supported Task Types

This section provides a list of supported task types and a breakdown of their JSON payload structures. Replace the placeholder values (e.g., "$ENTITY_ID") with actual data relevant to your use case.

AreaSearch Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.AreaSearch
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.AreaSearch",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"priors": [
// Repeat for each prior information to be used in the AreaSearch.
{
"entityId": "$ENTITY_ID" // string: Entity ID
// Alternatively, define "point" with the same structure as in "objective"
}
// ...
],
"participants": [
// Repeat for each agent participating in the AreaSearch.
{
"entityId": "$ENTITY_ID" // string: Entity ID
}
// ...
],
"controlAreas": [
// Repeat for each control area applicable to the AreaSearch.
{
"entityId": "$ENTITY_ID", // string: Entity ID
"controlAreaType": "$CONTROL_AREA_TYPE" // enum: The type of control area - valid enums: "CONTROL_AREA_TYPE_INVALID","CONTROL_AREA_TYPE_KEEP_IN_ZONE", "CONTROL_AREA_TYPE_KEEP_OUT_ZONE", "CONTROL_AREA_TYPE_DITCH_ZONE"
}
// ...
]
}
BattleDamageAssessment Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.BattleDamageAssessment
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.BattleDamageAssessment",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"parameters": {
"speedMS": "$SPEED_MS", // float: Target speed in meters per second
"standoffDistanceM": "$STANDOFF_DISTANCE_M", // float: Standoff distance in meters
"standoffAngle": "$STANDOFF_ANGLE", // float: Standoff angle in degrees
"expirationTimeMs": "$EXPIRATION_TIME_MS" // uint64: Task expiration time in milliseconds
}
}
GimbalPoint Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.GimbalPoint
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.GimbalPoint",
"parameters": {
"speedMS": "$SPEED_MS", // float: Target speed in meters per second (if applicable)
"standoffDistanceM": "$STANDOFF_DISTANCE_M", // float: Standoff distance in meters (if applicable)
"standoffAngle": "$STANDOFF_ANGLE", // float: Standoff angle in degrees (if applicable)
"expirationTimeMs": "$EXPIRATION_TIME_MS" // uint64: Task expiration time in milliseconds (if applicable)
},
"lookAt": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
}
// Alternatively, to point at a celestial location:
// "celestialLocation": {
// "azimuth": "$AZIMUTH", // double: Azimuth in degrees
// "elevation": "$ELEVATION" // double: Elevation in degrees
// }
// Alternatively, to point to a location in the video feed:
// "frameLocation": {
// "x": "$X", // float: Normalized x-axis location (0 to 1)
// "y": "$Y", // float: Normalized y-axis location (0 to 1)
// "timestamp": "$TIMESTAMP" // timestamp: Frame timestamp
// }
}
GimbalZoom Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.GimbalZoom
Example of Specification in JSON Payload:
specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.GimbalZoom",
// Set zoom level by specifying the horizontal field of view:
"setHorizontalFov": $HORIZONTAL_FOV // double: Horizontal field of view in degrees
// Alternatively, set zoom level by specifying magnification:
// "setMagnification": $MAGNIFICATION // float: Zoom magnification level
}
ImproveTrackQuality Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.ImproveTrackQuality
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.ImproveTrackQuality",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"terminationTrackQuality": $TERMINATION_TRACK_QUALITY // uint32: Desired track quality level for task termination
}
Investigate Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.Investigate
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.Investigate",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"parameters": {
"speedMS": "$SPEED_MS", // float: Target speed in meters per second
"standoffDistanceM": "$STANDOFF_DISTANCE_M", // float: Standoff distance in meters
"standoffAngle": "$STANDOFF_ANGLE", // float: Standoff angle in degrees
"expirationTimeMs": "$EXPIRATION_TIME_MS" // uint64: Task expiration time in milliseconds
}
}
Loiter Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.Loiter
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.Loiter",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"loiterType": {
"orbitType": {
"direction": "$ORBIT_DIRECTION", // enum: Orbit direction - valid enums: "ORBIT_DIRECTION_DIRECTION_INVALID", "ORBIT_DIRECTION_RIGHT", "ORBIT_DIRECTION_LEFT"
"pattern": "$ORBIT_PATTERN", // enum: Orbit pattern - valid enums: "ORBIT_PATTERN_INVALID", "ORBIT_PATTERN_CIRCLE", "ORBIT_PATTERN_RACETRACK", "ORBIT_PATTERN_FIGURE_EIGHT"
"duration": {
"durationRange": {
"min": "$DURATION_MIN", // string: Minimum duration of loiter (in seconds - e.g. "3.1s")
"max": "$DURATION_MAX" // string: Maximum duration of loiter (in seconds - e.g. "3.1s")
},
// Alternatively, for loitering with a number of orbits, define
// "numOfOrbits": "$NUM_OF_ORBITS" // uint64: Number of orbits to loiter
}
}
},
"parameters": {
"speedMS": "$SPEED_MS", // float: Target speed in meters per second
"standoffDistanceM": "$STANDOFF_DISTANCE_M", // float: Standoff distance in meters
"standoffAngle": "$STANDOFF_ANGLE", // float: Standoff angle in degrees
"expirationTimeMs": "$EXPIRATION_TIME_MS" // uint64: Task expiration time in milliseconds
}
}
Map Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.Map
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.Map",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"parameters": {
"speedMS": "$SPEED_MS", // float: Target speed in meters per second
"standoffDistanceM": "$STANDOFF_DISTANCE_M", // float: Standoff distance in meters
"standoffAngle": "$STANDOFF_ANGLE", // float: Standoff angle in degrees
"expirationTimeMs": "$EXPIRATION_TIME_MS" // uint64: Task expiration time in milliseconds
},
"minNiirs": "$MIN_NIIRS" // uint32: Minimum desired NIIRS value for image quality
}
Marshal Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.Marshal
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.Marshal",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
}
Monitor Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.Monitor
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.Monitor",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
}
}
ReleasePayload Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.ReleasePayload
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.ReleasePayload",
"payloads": [
{
"capabilityId": "$CAPABILITY_ID", // string: Capability ID
"quantity": $QUANTITY // uint32: Quantity of payloads to employ
}
// ...
],
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"precisionRelease": { } // empty: Include to indicate a precision release method
}
Scan Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.Scan
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.Scan",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"parameters": {
"speedMS": "$SPEED_MS", // float: Target speed in meters per second
"standoffDistanceM": "$STANDOFF_DISTANCE_M", // float: Standoff distance in meters
"standoffAngle": "$STANDOFF_ANGLE", // float: Standoff angle in degrees
"expirationTimeMs": "$EXPIRATION_TIME_MS" // uint64: Task expiration time in milliseconds
}
}
SetLaunchRoute Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.SetLaunchRoute
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.SetLaunchRoute",
"plan": {
"route": {
"path": [
{
"waypoint": {
"llaPoint": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
// }
}
// Alternatively, for loiters, see the Loiter task type
// "loiter": { ... }
}
// ...
]
}
},
"trackingMode": "$TRACKING_MODE" // enum: Tracking mode for the route - valid enums: "LAUNCH_TRACKING_MODE_INVALID", "LAUNCH_TRACKING_MODE_GO_TO_WAYPOINT", "LAUNCH_TRACKING_MODE_TRACK_TO_WAYPOINT"
}
Shadow Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.Shadow
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.Shadow",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"parameters": {
"speedMS": "$SPEED_MS", // float: Target speed in meters per second
"standoffDistanceM": "$STANDOFF_DISTANCE_M", // float: Standoff distance in meters
"standoffAngle": "$STANDOFF_ANGLE", // float: Standoff angle in degrees
"expirationTimeMs": "$EXPIRATION_TIME_MS" // uint64: Task expiration time in milliseconds
}
}
Smack Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.Smack
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.Smack",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"parameters": {
"payloadsToEmploy": [
{
"capabilityId": "$CAPABILITY_ID", // string: Capability ID
"quantity": $QUANTITY // int: Quantity of payloads to employ
}
// ...
],
"desiredImpactTime": "$DESIRED_IMPACT_TIME", // string: Duration (in seconds - e.g. "3.1s") from now when the strike should occur
"runInBearing": $RUN_IN_BEARING, // double: Desired run-in bearing in degrees
"glideSlopeAngle": $GLIDE_SLOPE_ANGLE // double: Desired glide slope angle in degrees
}
}
Strike Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.Strike
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.Strike",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"ingressAngle": {
"min": $INGRESS_ANGLE_MIN, // double: Lower bound of the ingress angle in radians
"max": $INGRESS_ANGLE_MAX // double: Upper bound of the ingress angle in radians
},
"strikeReleaseConstraint": {
"releaseArea": {
"altitudeConstraint": {
"min": $ALTITUDE_MIN, // double: Minimum altitude (AGL) in meters
"max": $ALTITUDE_MAX // double: Maximum altitude (AGL) in meters
}
}
},
"parameters": {
"payloadsToEmploy": [
{
"capabilityId": "$CAPABILITY_ID", // string: Capability ID
"quantity": $QUANTITY // int: Quantity of payloads to employ
}
// ...
],
"desiredImpactTime": "$DESIRED_IMPACT_TIME", // string: Duration (in seconds - e.g. "3.1s") from now when the strike should occur
"runInBearing": $RUN_IN_BEARING, // double: Desired run-in bearing in degrees
"glideSlopeAngle": $GLIDE_SLOPE_ANGLE // double: Desired glide slope angle in degrees
}
}
Transit Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.Transit
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.Transit",
"plan": {
"route": {
"path": [
{
"waypoint": {
"llaPoint": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
// }
}
// Alternatively, for loiters, see the Loiter task type
// "loiter": { ... }
}
// ...
]
}
}
}
VisualId Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.VisualId
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.VisualId",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"parameters": {
"speedMS": "$SPEED_MS", // float: Target speed in meters per second
"standoffDistanceM": "$STANDOFF_DISTANCE_M", // float: Standoff distance in meters
"standoffAngle": "$STANDOFF_ANGLE", // float: Standoff angle in degrees
"expirationTimeMs": "$EXPIRATION_TIME_MS" // uint64: Task expiration time in milliseconds
}
}
VolumeSearch Task
Task Specification URL:type.googleapis.com/anduril.tasks.v2.VolumeSearch
Example of Specification in JSON Payload:
"specification": {
"@type": "type.googleapis.com/anduril.tasks.v2.VolumeSearch",
"objective": {
"entityId": "$ENTITY_ID" // string: Entity ID
/* Alternatively, for a location-based objective, define "point":
"point": {
"referenceName": "$REF_NAME", // string: A human-readable name for the point
"lla": {
"lon": $LONGITUDE, // double: Longitude in degrees
"lat": $LATITUDE, // double: Latitude in degrees
"alt": $ALTITUDE, // double: Altitude in meters
"is2d": $IS2D, // bool: Indicates if altitude is unreliable (true if altitude is unset or uncertain)
"altitudeReference": "$ALTITUDE_REFERENCE" // enum: Reference for altitude measurement - valid enums: "ALTITUDE_REFERENCE_INVALID", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_WGS84", "ALTITUDE_REFERENCE_HEIGHT_ABOVE_EGM96", "ALTITUDE_REFERENCE_UNKNOWN", "ALTITUDE_REFERENCE_BAROMETRIC", "ALTITUDE_REFERENCE_ABOVE_SEA_FLOOR", "ALTITUDE_REFERENCE_BELOW_SEA_SURFACE"
},
"backingEntityId": "$BACKING_ENTITY_ID" // string (optional): An entity ID for reverse lookup purposes
} */
},
"priors": [
// Repeat for each prior information to be used in the VolumeSearch.
{
"entityId": "$ENTITY_ID" // string: Entity ID
// Alternatively, define "point" with the same structure as in "objective"
}
// ...
],
"participants": [
// Repeat for each agent participating in the VolumeSearch.
{
"entityId": "$ENTITY_ID" // string: Entity ID
}
// ...
],
"controlAreas": [
// Repeat for each control area applicable to the VolumeSearch.
{
"entityId": "$ENTITY_ID", // string: Entity ID
"controlAreaType": "$CONTROL_AREA_TYPE" // enum: The type of control area - valid enums: "CONTROL_AREA_TYPE_INVALID","CONTROL_AREA_TYPE_KEEP_IN_ZONE", "CONTROL_AREA_TYPE_KEEP_OUT_ZONE", "CONTROL_AREA_TYPE_DITCH_ZONE"
}
// ...
]
}

Publish your TaskCatalog

Once you've defined the tasks your agent can complete, publish your entity via PublishEntities.

Subscribe to tasks

With the ListenAsAgent endpoint, your asset can subscribe to tasks that Task Manager routes to it and monitor for task updates. If a task is assigned to an agent that is not monitoring this endpoint, the task will fail to send.

For example, the following snippet imports the Task Manager API and streams tasks for the entityIds listed in the request, to be executed by the agent:

import (
"context"
"fmt"
"github.com/anduril/lattice-sdk-go/src/anduril/taskmanager/v1"
)

func listenAsAgent(client taskmanager.TaskManagerAPIClient, entityIDs []string) error {
ctx := context.Background()
req := &taskmanager.ListenAsAgentRequest{
AgentSelector: &taskmanager.ListenAsAgentRequest_EntityIds{
EntityIds: &taskmanager.EntityIds{
EntityIds: entityIDs,
},
},
}
stream, err := client.ListenAsAgent(ctx, req)
if err != nil {
return fmt.Errorf("error setting up ListenAsAgent: %v", err)
}
for {
resp, err := stream.Recv()
if err != nil {
return fmt.Errorf("error receiving from ListenAsAgent stream: %v", err)
}
processExecuteRequest(resp.GetExecuteRequest())
}
}

Handle stream interruptions

Agents should gracefully handle stream interruptions. If the connection to Task Manager fails, the stream will close. Your system should handle potential stream errors and retry the connection to Task Manager when necessary. This ensures the agent maintains its subscription to task updates, even during transient network or service interruptions.

Update task status

The agent uses the UpdateStatus endpoint to move a task along its task lifecycle and report any errors.

For example, the following snippet imports the Task Manager API and updates a task with a new task status:

import (
"context"
"fmt"
"github.com/anduril/lattice-sdk-go/src/anduril/taskmanager/v1"
)

func updateTaskStatus(client taskmanager.TaskManagerAPIClient, taskID string, newStatus taskmanager.Status) error {
ctx := context.Background()
statusUpdate := &taskmanager.StatusUpdate{
Version: &taskmanager.TaskVersion{
TaskId: taskID,
// You will need to provide the specific version of the task you are updating here.
// StatusVersion: <current_status_version>,
// DefinitionVersion: <current_definition_version>
},
Status: &taskmanager.TaskStatus{
Status: newStatus, // For example, newStatus could be taskmanager.Status_STATUS_EXECUTING
},
// The author of the status update, which is the entity reporting status updates
Author: &taskmanager.Principal{
Agent: &taskmanager.Principal_System{
System: &taskmanager.System{
EntityId: "test-entity"
},
},
},
}
req := &taskmanager.UpdateStatusRequest{
StatusUpdate: statusUpdate,
}
_, err := client.UpdateStatus(ctx, req)
if err != nil {
return fmt.Errorf("error updating task status: %v", err)
}
return nil
}

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 the CreateTask endpoint after a task's details have been populated in the UI, and an operator presses "Execute Task" for the first time.
  • GetTask: gets the state of an existing task.
  • QueryTasks: find tasks that match request criteria.