Overview
FTL uses environment variables for two distinct purposes:- FTL infrastructure credentials - API keys for FTL itself (Anthropic, AWS, Langfuse)
- Project credentials - Secrets your agent needs, loaded from
.envand shadowed
FTL Infrastructure Credentials
These credentials are stored in~/.ftl/credentials and loaded automatically on every FTL invocation. You don’t need to export them in each session.
Setting Credentials
Useftl auth to save credentials persistently:
Credentials File Format
The file~/.ftl/credentials uses a simple KEY=VALUE format:
~/.ftl/credentials
- Lines starting with
#are comments - Each line is
KEY=VALUE(no quotes needed) - File permissions are set to
0600(owner read/write only) - Values are loaded into
os.environat startup
Required Variables by Feature
string
Required for:
- Agent:
"claude-code" - Agent:
"aider"(if using Anthropic models) - Tester:
"claude-*"models
string
Required for:
- Agent:
"codex" - Agent:
"aider"(if using OpenAI models) - Tester:
"openai/*"models
string
Required for:
- Snapshot backend:
"s3" - Secrets Manager integration
- Bedrock Guardrails
- CloudWatch tracing
- Tester:
"bedrock/*"models
string
AWS secret access key. Required for all AWS integrations.
string
AWS region for S3, Secrets Manager, CloudWatch, and Bedrock.Default:
us-east-1Optional Tracing Variables
string
Langfuse public key for LLM observability. Requires
pip install -e ".[tracing]".string
Langfuse secret key. Required when using Langfuse tracing.
string
Langfuse API host.Default:
https://cloud.langfuse.comProject Credentials (Shadow System)
How Shadow Credentials Work
FTL generates fake “shadow” values for your real credentials and injects only the shadows into the sandbox. The agent never sees your real keys. Your.env file:
.env
Shadow Value Format
Shadow values follow a recognizable pattern:ftl/credentials.py:64-67
Loading Project Credentials
FTL loads project credentials from two sources:.envfile in project root - EveryKEY=VALUEpair is treated as sensitiveshadow_envconfig - Additional var names from.ftlconfigpulled from hostos.environ
.ftlconfig
ftl/credentials.py:70-91
Credential Swap Table
For the optional network proxy feature, FTL builds a swap table mapping shadow values to real values:ftl/credentials.py:94-111
Forwarding Non-Sensitive Variables
Useagent_env in .ftlconfig to forward environment variables without shadowing:
.ftlconfig
os.environ.
AWS Secrets Manager Integration
Whensecrets_manager_prefix is set in .ftlconfig, FTL fetches secrets from AWS Secrets Manager instead of reading .env.
.ftlconfig
Secret Value Formats
JSON object secrets are expanded:.env loading.
Security Notes
Source Reference
- Credentials loading:
ftl/credentials.py:10-35 - Shadow generation:
ftl/credentials.py:64-111 - Save credential:
ftl/credentials.py:38-61 - File location:
ftl/credentials.py:7