Skip to main content
Version: LOC v0.7 (legacy)

Logic Variable Agent

import { LogicVariable } from "@fstnetwork/loc-logic-sdk";

Read a local environment variable (not to be confused with local storage data or secrets in agent configurations). These variable can be set via Studio or CLI, which are useful for configuring a data process' behavior without modifying the logic code.

info

Logic variables can be set in Studio (while creating or editing a logic) or deployed with CLI projects.

Availability

  • ✓ Generic logic
  • ✓ Aggregator logic

Read Local Variable

LogicVariable.get(name: string): string | null
ParameterDescription
nameLogic variable name

Returns a string or null if the variable name does not exist.

Example

const answer = LogicVariable.get("answer-to-life-universe-everything");