Skip to main content

Environment Variables: Customizing AI Agent Behavior and Integrations

This page explains how to use environment variables to customize the behavior, integrations, and prompts of your Flametree AI agents. Environment variables allow you to set system-wide or agent-specific parameters, override prompts, and control integrations without modifying the agent’s core configuration.

Prerequisites

  • Access to the Flametree platform with permissions to edit AI agents
  • Basic understanding of agent configuration and advanced settings

How to Set Environment Variables

  1. Open the desired AI agent’s card.
  2. Go to Advanced card (right-hand section).
  3. Open Set Environment Variables.
  4. Click the plus icon to add a new parameter:
    • key: The variable name (e.g., START_PHRASE)
    • value: The value to assign
  5. Click Save.
  6. Restart the agent for changes to take effect.

❗️ Important: Changes to environment variables require a manual agent restart.

Environment Variables by Topic

Agent Customization

VariableDescriptionDefault
GAC_SYSTEMField system of the Global Agent ConfigAlways reply in English language
ENABLE_FILLER_PHRASESEnables filler phrases in custom-stateful agentsFalse
FILLER_PHRASES_WITH_CHAINPhrase generation principle (chain or agent)False
REPHRASING_IT_TEXTCustom text for error messageI apologize, but I'm unable to provide an answer...
START_PHRASESets the initial greeting messageExample: Hello! How can I help you today?
START_PHRASE_APPENDIXAdditional text to append to the greeting phrase""
PROMPT_FIELD_<AGENT_NAME>_<PROMPT_FIELD_NAME>Overrides a specific prompt field for an agentExample:
Key: PROMPT_FIELD_MYAGENT_IDENTITY
Value: You are a friendly assistant.

Language and Speech Settings

VariableDescriptionDefault
REPLY_IN_USER_LANGUAGEReply in user's detected languageFalse
TRANSLATE_TO_ENTranslate user messages to English before sending to the modelFalse
WHISPER_LANGUAGELanguage(s) for speech recognition (STT)Example: en, en,kk,ru
WHISPER_PROMPTCustom prompt for the Whisper model. Prompting guide-
VAD_THRESHOLDVoice activity detection threshold for STT0.6
LANG_DETECTION_MIN_LENGTHMinimum message length to trigger language detection20
ENABLE_NEREnables masking for named entities in translationFalse
TTS_AZURE_SSML_MODEEnable SSML mode with XML in Azure TTSFalse

Knowledge Base

VariableDescriptionDefault
SHOW_RAG_CHUNK_NUMBERSDisplay chunk numbers in KB responsesFalse
SEARCH_TOOL_TOP_KTop K for vector search in search tool15
KB_SEARCH_CONTEXT_WINDOWSize of context window in chunks for SingleSearchFAQ tool4
KB_SEARCH_MAX_SOURCES_LENMax length of context chunks from KB in SingleSearchFAQ tool (symbols)25000

Session

VariableDescriptionDefault
SESSION_TIMEOUT_SECSession timeout (3*24*60*60 seconds)259200
DOUBLE_TEXTING_TIMEOUTTimeout for grouping sequential WhatsApp messages (seconds)0
CUSTOM_STOP_MESSAGECustom stop message on session stop""
SIMPLE_AGENT_FLOWEnables SimpleAgent instance for custom session typesFalse

Summarization

VariableDescriptionDefault
ENABLE_SUMMARIZATIONEnable/disable scratchpad summarizationTrue
SUMMARY_LIMITLimit at which summarization of old scratchpad records begins20
SUMMARY_MEMORY_LIMITLimit at which prepared summary is inserted into the scratchpad30

Integrations and Channels

❗️ Important: It is also possible to set environmental variables specifically for the channels. Read More...

VariableDescriptionDefault
SHOW_VOICE_TRANSCRIPTIONShow transcription text for voice messages. WhatsApp and Telegram onlyTrue

(Legacy) Environment Variables for Outdated Integrations

VariableDescriptionDefault
TELEGRAM_SHOW_KEYBOARD_REPLYEnables keyboard in TelegramTrue

Channel Environment Variables

Set these variables directly into the channel.

VariableDescriptionDefault
LOG_WEBHOOK_MESSAGESWhether to log all requests that come to WhatsApp webhookFalse

System

VariableDescriptionDefault
LOG_LEVELControls the verbosity of system logs. Available levels: DEBUG (most verbose), INFO (standard), WARNING, ERROR (least verbose)INFO

Common Issues & Solutions

Changes to environment variables don’t take effect

Solution: Save your changes and restart the agent to apply new environment variables.

Prompt override not working

Solution: Check the variable name format (PROMPT_FIELD_<AGENT_NAME>_<PROMPT_FIELD_NAME>) and ensure there are no typos or case mismatches.

FAQ

How do I set the initial greeting phrase?

Set the START_PHRASE environment variable in the agent’s advanced settings.