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
- Open the desired AI agent’s card.
- Go to Advanced card (right-hand section).
- Open Set Environment Variables.
- Click the plus icon to add a new parameter:
- key: The variable name (e.g.,
START_PHRASE
) - value: The value to assign
- key: The variable name (e.g.,
- Click Save.
- Restart the agent for changes to take effect.
❗️ Important: Changes to environment variables require a manual agent restart.
Environment Variables by Topic
Agent Customization
Variable | Description | Default |
---|---|---|
GAC_SYSTEM | Field system of the Global Agent Config | Always reply in English language |
ENABLE_FILLER_PHRASES | Enables filler phrases in custom-stateful agents | False |
FILLER_PHRASES_WITH_CHAIN | Phrase generation principle (chain or agent) | False |
REPHRASING_IT_TEXT | Custom text for error message | I apologize, but I'm unable to provide an answer... |
START_PHRASE | Sets the initial greeting message | Example: Hello! How can I help you today? |
START_PHRASE_APPENDIX | Additional text to append to the greeting phrase | "" |
PROMPT_FIELD_<AGENT_NAME>_<PROMPT_FIELD_NAME> | Overrides a specific prompt field for an agent | Example: Key: PROMPT_FIELD_MYAGENT_IDENTITY Value: You are a friendly assistant. |
Language and Speech Settings
Variable | Description | Default |
---|---|---|
REPLY_IN_USER_LANGUAGE | Reply in user's detected language | False |
TRANSLATE_TO_EN | Translate user messages to English before sending to the model | False |
WHISPER_LANGUAGE | Language(s) for speech recognition (STT) | Example: en , en,kk,ru |
WHISPER_PROMPT | Custom prompt for the Whisper model. Prompting guide | - |
VAD_THRESHOLD | Voice activity detection threshold for STT | 0.6 |
LANG_DETECTION_MIN_LENGTH | Minimum message length to trigger language detection | 20 |
ENABLE_NER | Enables masking for named entities in translation | False |
TTS_AZURE_SSML_MODE | Enable SSML mode with XML in Azure TTS | False |
Knowledge Base
Variable | Description | Default |
---|---|---|
SHOW_RAG_CHUNK_NUMBERS | Display chunk numbers in KB responses | False |
SEARCH_TOOL_TOP_K | Top K for vector search in search tool | 15 |
KB_SEARCH_CONTEXT_WINDOW | Size of context window in chunks for SingleSearchFAQ tool | 4 |
KB_SEARCH_MAX_SOURCES_LEN | Max length of context chunks from KB in SingleSearchFAQ tool (symbols) | 25000 |
Session
Variable | Description | Default |
---|---|---|
SESSION_TIMEOUT_SEC | Session timeout (3*24*60*60 seconds) | 259200 |
DOUBLE_TEXTING_TIMEOUT | Timeout for grouping sequential WhatsApp messages (seconds) | 0 |
CUSTOM_STOP_MESSAGE | Custom stop message on session stop | "" |
SIMPLE_AGENT_FLOW | Enables SimpleAgent instance for custom session types | False |
Summarization
Variable | Description | Default |
---|---|---|
ENABLE_SUMMARIZATION | Enable/disable scratchpad summarization | True |
SUMMARY_LIMIT | Limit at which summarization of old scratchpad records begins | 20 |
SUMMARY_MEMORY_LIMIT | Limit at which prepared summary is inserted into the scratchpad | 30 |
Integrations and Channels
❗️ Important: It is also possible to set environmental variables specifically for the channels. Read More...
Variable | Description | Default |
---|---|---|
SHOW_VOICE_TRANSCRIPTION | Show transcription text for voice messages. WhatsApp and Telegram only | True |
(Legacy) Environment Variables for Outdated Integrations
Variable | Description | Default |
---|---|---|
TELEGRAM_SHOW_KEYBOARD_REPLY | Enables keyboard in Telegram | True |
Channel Environment Variables
Set these variables directly into the channel.
Variable | Description | Default |
---|---|---|
LOG_WEBHOOK_MESSAGES | Whether to log all requests that come to WhatsApp webhook | False |
System
Variable | Description | Default |
---|---|---|
LOG_LEVEL | Controls 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.