Skip to main content
AutomationContext provides methods to attach structured annotations to objects, allowing automated analysis and validation workflows to provide meaningful feedback.

Object Annotations

Object annotations enable attaching different types of messages (errors, warnings, informational notes, and successes) to specific objects within an automation run. This helps in tracking issues, communicating insights, and guiding decision-making.
Why annotate objects? Annotations allow functions to return structured results, making them actionable in dashboards, reports, and workflows.

Example

Annotation Types

Metadata and Customisation

Annotations can be enriched with additional metadata to improve interpretability and visualization.
Using Metadata in Annotations: The metadata parameter allows storing arbitrary key-value pairs alongside annotations, making them more descriptive and informative.

Example

Gradient Visualization

Certain metadata keys affect how results are displayed in the model viewer:
  • gradient: Bool: Enables gradient-based visualization.
  • gradientValues: List[str]: Specifies values to apply to objects.
Example:

Best Practices

  • Use the appropriate annotation type to convey severity accurately.
  • Group related annotations into categories for better organization.
  • Provide clear, actionable messages to aid decision-making.
  • Include relevant object IDs to maintain traceability.
  • Leverage metadata for richer annotations and better UI integration.
By leveraging these methods, automation functions can provide structured feedback that enhances decision-making and workflow efficiency.
Last modified on July 18, 2026