Getting Started
7 Lessons
Section
















Starlark is a lightweight scripting language designed to be simple, safe, and easy to embed into larger systems. It is most commonly described as a “Python-like” language because its syntax and structure are heavily inspired by Python, making it approachable for developers already familiar with Python programming.
However, Starlark is not the same as Python (also see the FAQ). While the languages look very similar, Starlark is intentionally more restricted and deterministic. It was originally created for the Bazel build system, where reproducibility and security were important requirements. Unlike Python, Starlark is sandboxed, meaning it cannot freely access the operating system, spawn arbitrary processes, or import external libraries unless the host application explicitly allows it.
This makes Starlark particularly well suited for embedded workflow engines and configuration-driven systems where users need flexibility without compromising security or stability.
The Telegraf project (which the FixedIT Data Agent is built on) adopted Starlark as a way to implement flexible filtering, transformation, and processing logic directly inside Telegraf pipelines. In Axis IP devices, Starlark and Telegraf can be used directly on the device by installing the FixedIT Data Agent ACAP application. Instead of writing full standalone edge applications in C or C++, users can write small Starlark scripts that manipulate live data streams as they flow through the processing pipeline.
For example, Starlark scripts in the FixedIT Data Agent can be used to:
Filter unwanted Scene Metadata detections or device events
Calculate custom metrics and implement advanced algorithms
Track object state over time
Trigger logic based on thresholds, timing or other conditions
Combine multiple analytics streams into higher-level events
Because Starlark is embedded directly into the Telegraf runtime, these scripts execute locally on the edge device itself. This allows developers to add sophisticated custom logic to Axis IP devices without needing to build or deploy low-level embedded applications.
One important thing to understand is that Starlark usage in Telegraf differs somewhat from how it is used in Bazel. While the core language is the same, the available functions, data structures, and APIs depend on the host application. In the case of Telegraf, Starlark scripts interact with Telegraf metrics and processing pipelines. Because of this, the Telegraf Starlark processor documentation should generally be considered the primary reference when developing scripts for the FixedIT Data Agent.
Further references: