⚠️ DEPRECATED: This JSON configuration format is deprecated and maintained for legacy compatibility only. For new installations, please use the YAML configuration format instead.
Configuration Setup:
-
Copy the example configuration file:
cp trae_config.json.example trae_config.json
-
Edit
trae_config.jsonand replace the placeholder values with your actual credentials:- Replace
"your_openai_api_key"with your actual OpenAI API key - Replace
"your_anthropic_api_key"with your actual Anthropic API key - Replace
"your_google_api_key"with your actual Google API key - Replace
"your_azure_base_url"with your actual Azure base URL - Replace other placeholder URLs and API keys as needed
- Replace
Note: The trae_config.json file is ignored by git to prevent accidentally committing your API keys.
Trae Agent uses a JSON configuration file for settings. Please refer to the trae_config.json.example file in the root directory for the detailed configuration structure.
Configuration Priority:
- Command-line arguments (highest)
- Configuration file values
- Environment variables
- Default values (lowest)
The JSON configuration file contains provider-specific settings for various LLM services:
{
"default_provider": "anthropic",
"max_steps": 20,
"enable_lakeview": true,
"model_providers": {
"openai": {
"api_key": "your_openai_api_key",
"base_url": "https://api.openai.com/v1",
"model": "gpt-4o",
"max_tokens": 128000,
"temperature": 0.5,
"top_p": 1,
"max_retries": 10
},
"anthropic": {
"api_key": "your_anthropic_api_key",
"base_url": "https://api.anthropic.com",
"model": "claude-sonnet-4-20250514",
"max_tokens": 4096,
"temperature": 0.5,
"top_p": 1,
"top_k": 0,
"max_retries": 10
}
}
}To migrate from JSON to YAML configuration:
-
Create a new YAML configuration file:
cp trae_config.yaml.example trae_config.yaml
-
Transfer your settings from
trae_config.jsontotrae_config.yamlfollowing the new structure -
Remove the old JSON file (optional but recommended):
rm trae_config.json
For detailed YAML configuration instructions, please refer to the main README.md.