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. Use Secret option to make a variable masked/unmusked. If a variable was saved with the Secret option, you will not be able to unmask it in the UI. To change the Secret parameter value to false for a masked variable, you must set a new value.
  6. Click Save.
  7. Save and 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.
OMIT_THOUGHT_PREMESSAGEIf True, agent will not receive message chunk of format "Thought: thought_num" in the end of the promptFalse
BETA_FAST_FORM_TOOLBeta feature - instead of filling one session result during one agent call, FormAgent fills all needed fields in one agent callFalse
MODEL_KWARGSAdditional parameters for creating the LLM handler in code through the LangChain object. Value must be a JSON string with parameters.{}
LLM_KWARGSAdditional parameters that will be included in the generation request sent to the LLM provider. Value must be a JSON string with parameters.{}

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

VariableDescriptionDefault
TELEGRAM_SHOW_KEYBOARD_REPLYEnables keyboard in Telegram integration (legacy)True

Channels

‼️ Critical: Set environmental variables directly into the channels. Read More...

VariableDescriptionDefault
SHOW_VOICE_TRANSCRIPTIONShow transcription text for voice messages. WhatsApp and Telegram onlyTrue
LOG_WEBHOOK_MESSAGESWhether to log all requests that come to WhatsApp webhookFalse
INTERCOM_TEAM_ID_FILTERA comma-separated list of Intercom team IDs from which the agent should accept messages. For example: INTERCOM_TEAM_ID_FILTER=7727961,7727960True
EMAIL_RETRY_LIMITDefine number of email client request attempts before graceful exit. IMAP/SMTP channel only.3

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.