Environment Variables¶
Environment variables are configuration values stored at the operating system level that can be accessed by applications and scripts. They provide a flexible way to configure application behavior without hardcoding values in your source code.
Environment variables are loaded in the following order (highest to lowest priority):
.env
file in the current directory- System environment variables
- Default values in code
Example:
# .env file
UIPATH_FOLDER_PATH=/default/path
# System environment
export UIPATH_FOLDER_PATH=/system/path
Warning
When deploying your agent to production, ensure that all required environment variables (such as API keys and custom configurations) are properly configured in your process settings. This step is crucial for the successful operation of your published package.
Design¶
Create a .env
file in your project's root directory to manage environment variables locally. When using the uipath auth
or uipath new my-agent
commands, this file is automatically created.
The uipath auth
command automatically populates this file with essential variables:
UIPATH_URL
: Your UiPath Orchestrator instance URLUIPATH_ACCESS_TOKEN
: Authentication token for API access
Folder Configuration¶
Most UiPath services operate within a specific folder context. Configure your folder context using either:
UIPATH_FOLDER_PATH
: The full path to your target folderUIPATH_FOLDER_KEY
: The unique identifier for your target folder
To obtain the folder path, right-click on the folder in UiPath Orchestrator and select "Copy folder path" from the context menu.
Telemetry¶
To help us improve the developer experience, the CLI collects basic usage data about command invocations. For more details about UiPath's privacy practices, please review the privacy statement.
Telemetry is enabled by default. You can opt out by setting the UIPATH_TELEMETRY_ENABLED
environment variable to false
in your .env
file:
Runtime¶
When executing processes or starting jobs, you can configure environment variables through the UiPath Orchestrator interface. For sensitive information like API keys and secrets, we strongly recommend using secret assets instead of environment variables. Secret assets provide enhanced security and better management capabilities.
Secret Assets¶
To use a secret asset in your environment variables, reference it using the following format:
Sensitive Variables¶
If you must use environment variables for sensitive information (not recommended), variables containing API_KEY
or SECRET
in their names will have their values masked as ****
in the interface for security purposes.
Log Level¶
The LOG_LEVEL
environment variable controls the verbosity of logging in the Orchestrator UI's Log tab during runtime execution. This setting determines which log messages are displayed in the interface.
Level | Description |
---|---|
TRACE | Most detailed logging level, shows all possible information |
DEBUG | Detailed information for debugging purposes |
INFORMATION | General operational information |
WARNING | Warning messages for potentially harmful situations |
ERROR | Error events that might still allow the application to continue |
CRITICAL | Critical events that may lead to application failure |
NONE | No logging |
The default value is INFORMATION
Builtin Variables¶
The runtime environment automatically includes certain variables (such as UIPATH_FOLDER_KEY
, UIPATH_ROBOT_KEY
), eliminating the need for manual configuration.