System Variables
System variables are predefined, read-only variables that are automatically managed by the indigo.ai platform. Unlike custom variables, they cannot be edited using blocks like Set Value or Capture. Instead, they provide real-time context about the user, session, platform environment, and conversation history, allowing you to create more intelligent and personalized experiences.
System variables help your AI Agents:
Identify users, channels, and environments
React based on the time and date
Track conversation flow and user behavior
Dynamically adapt logic based on platform state
Access content retrieved via document search (RAG) or current workflow status
Use them to build smarter flows, trigger conditional logic, and create more relevant, responsive interactions.
Categories and Variables
π Platform & Session Context
$install_urlβ The URL where the widget is installed (useful for multi-site setups).$project_idβ Your workspace's unique identifier.$envβ ReturnsTESTorPRODUCTION, depending on where the assistant is running.$langβ Language code set for the workspace (e.g.,en,it).$detected_languageβ Language detected from the user's latest message.
π€ User Identification
$user_idβ Session-based ID for the current user.$user_refβ Persistent user identifier that remains consistent across sessions (ideal for CRM matching).
π Time & Date
$timestampβ Current time in seconds (Unix timestamp).$dateβ Full timestamp in your workspaceβs timezone (YYYY-MM-DD hh:mm:ss).$date_year,$date_month,$date_weekday,$date_hourβ Individual date components useful for business logic (e.g., trigger actions only during working hours).
π§ Conversation & Context
$last_user_messageβ Content of the user's most recent message or button click.$intentβ Last recognized intent label.$message_idβ ID of the most recent inbound message (for tracking or referencing externally).$conversationβ Full list of the last 100 messages in the current chat (in JSON format).
A βchatβ refers to messages from the latest session, while a βconversationβ spans all user interactions over time.
$context_1to$context_5β Store the last 1 to 5 pairs of user and assistant messages in plain text. Ideal for use in prompts or as input for LLMs.
π Content & Workflow State
$documentsβ A list of documents retrieved from your knowledge base. Use this to:Display matched sources
Trigger logic based on content relevance
Chain actions across workflows using retrieved data
$current_workflowβ Label of the currently executing workflow.$previous_workflowβ Label of the workflow executed immediately prior to the current one.
β
Utility
$trueβ A constant that always returnstrue. Handy for testing or creating unconditional branches in Condition Blocks.
Last updated
Was this helpful?