Skip to main content

Analysis Runtimes

The runtime decides which language your Analysis is written in, how it gets its dependencies, and what it can reach while it runs. You pick one in the Runtime field when you create the Analysis. Admin lists each option by language and runtime code, such as Deno - deno-rt2025, and the code is what the API stores.

Available runtimes

RuntimeCodeLanguageDependenciesRuns on
Denodeno-rt2025TypeScript, JavaScriptResolved automatically from npm: and URL importsTagoIO or External
Node.jsnode-rt2025JavaScriptOne bundled file carrying every dependencyTagoIO or External
Pythonpython-rt2025PythonResolved automatically with uvTagoIO or External
Luauluau-rt2026LuauNoneTagoIO only
OtherotherAnyYours to install and manageExternal only
tip

Choose Deno (deno-rt2025) to edit scripts directly in TagoIO and resolve dependencies from imports. Choose Node.js (node-rt2025) when your workflow builds and tests a bundled script locally before upload.

Deno (deno-rt2025)

Deno runs TypeScript and JavaScript with built-in TypeScript support, so there is no compilation step. Dependencies resolve automatically: you import packages directly from npm: specifiers or URLs, with no bundling and no upload.

import { Analysis, Device } from "npm:@tago-io/sdk";
import { DateTime } from "npm:luxon";

Write the whole Analysis in the TagoIO editor, add imports as you need them, and run. The editor includes linting and formatting. Dependencies are fetched and cached on first run, so early executions take a little longer.

Choose Deno when you want to maintain the script in the TagoIO editor without a local bundling step.

Node.js (node-rt2025)

When hosted on TagoIO, Node.js runs JavaScript from a single bundled file containing the script's dependencies. Build the bundle locally with the TagoIO Analysis Builder, then upload it. The hosted runtime does not resolve npm packages from imports at execution time.

npm install -g @tago-io/builder
analysis-builder my_script.js
# Upload the generated .tago-io.js file to the Analysis

The full walkthrough, including the local project setup, is in Running Analysis as External using Node.js, under the Analysis-Builder section.

Choose Node.js when you want to develop and test the script locally, then upload a bundle containing its dependencies. You can organize the source across files and modules before building. Changes require rebuilding and uploading the bundle.

Python (python-rt2025)

Python resolves dependencies automatically with uv. Declare them in the script header and imports that are not part of the standard library are installed when the Analysis runs.

# /// script
# dependencies = [
# "tagoio-sdk",
# "pandas",
# "requests<3",
# ]
# ///

from tagoio_sdk import Analysis, Device
import pandas as pd
import requests
from datetime import datetime, timedelta

Resolution is standard Python packaging, so you import from PyPI the same way you would locally. Pick Python for data work that needs pandas, numpy, or scipy. First runs are slower while packages install; later runs use the cached environment.

Luau (luau-rt2026)

Luau is the low-cost option for reading and writing device and entity data. It can work with devices and entities, list Analyses, and start other Analyses. It cannot do anything else: no libraries, no internet access, no Secrets, and no Analysis Token.

Use it for the small jobs that run frequently: converting a reading and saving it back, averaging recent data, flagging a threshold, or tidying up device names and tags. It also picks up where a Payload Parser stops, since a parser can only rework the payload that just arrived while Luau can read earlier data and change the device.

Choose Deno, Node.js, or Python instead when the script calls an outside service, needs a library, or works with resources other than devices, entities, and Analyses.

Luau runs on TagoIO only, so the External option is not available for it. See Luau Runtime for what it can do, how to write one, and its limits.

Other (other)

other covers any language or runtime TagoIO does not host. An Analysis on other runs externally only: your code runs on your own machine or server and connects back to TagoIO. Nothing is uploaded and nothing runs on TagoIO.

Deprecated runtimes

node-legacy and python-legacy still appear for Analyses created before the current runtimes existed. Both ship outdated packages. Move those Analyses to node-rt2025 or python-rt2025.

Choosing

  • node-rt2025 for a local development, testing, and bundling workflow.
  • deno-rt2025 to maintain the script in the TagoIO editor, with dependencies resolved from imports.
  • python-rt2025 for data processing that leans on the scientific libraries.
  • luau-rt2026 for small device jobs that run often and stay inside TagoIO.
  • other when the code runs on your own infrastructure in a language TagoIO does not host.

Deno and Node.js use the JavaScript SDK; Python uses the Python SDK. Use the documentation for your SDK's method signatures and data types.

Luau uses its own built-in functions and is not source-compatible with these SDKs.