This page outlines all available configuration options for OpenHands, allowing you to customize its behavior and integrate it with other services.
config.toml
Fileconfig.toml
file for configuration, which must be
located in the same directory from which the command is run. Alternatively, you may use the --config-file
option to
specify a different path to the config.toml
file.
[core]
section of the config.toml
file.
workspace_base
(Deprecated)
str
"./workspace"
SANDBOX_VOLUMES
instead.cache_dir
str
"/tmp/cache"
debug
bool
false
disable_color
bool
false
save_trajectory_path
str
"./trajectories"
replay_trajectory_path
str
""
file_store_path
str
"/tmp/file_store"
file_store
str
"memory"
file_uploads_allowed_extensions
list of str
[".*"]
file_uploads_max_file_size_mb
int
0
file_uploads_restrict_file_types
bool
false
file_uploads_allowed_extensions
list of str
[".*"]
max_budget_per_task
float
0.0
max_iterations
int
100
volumes
str
None
workspace_mount_path_in_sandbox
(Deprecated)
str
"/workspace"
SANDBOX_VOLUMES
instead.workspace_mount_path
(Deprecated)
str
""
SANDBOX_VOLUMES
instead.workspace_mount_rewrite
(Deprecated)
str
""
SANDBOX_VOLUMES
instead.run_as_openhands
bool
true
runtime
str
"docker"
default_agent
str
"CodeActAgent"
jwt_secret
str
uuid.uuid4().hex
[llm]
section of the config.toml
file.
To use these with the docker command, pass in -e LLM_<option>
. Example: -e LLM_NUM_RETRIES
.
aws_access_key_id
str
""
aws_region_name
str
""
aws_secret_access_key
str
""
api_key
str
None
base_url
str
""
api_version
str
""
input_cost_per_token
float
0.0
output_cost_per_token
float
0.0
custom_llm_provider
str
""
max_message_chars
int
30000
max_input_tokens
int
0
max_output_tokens
int
0
model
str
"claude-3-5-sonnet-20241022"
num_retries
int
8
retry_max_wait
int
120
retry_min_wait
int
15
retry_multiplier
float
2.0
drop_params
bool
false
caching_prompt
bool
true
ollama_base_url
str
""
temperature
float
0.0
timeout
int
0
top_p
float
1.0
disable_vision
bool
None
[agent]
and [agent.<agent_name>]
sections of the config.toml
file.
llm_config
str
'your-llm-config-group'
function_calling
bool
true
enable_browsing
bool
false
enable_llm_editor
bool
false
enable_jupyter
bool
false
enable_history_truncation
bool
true
enable_prompt_extensions
bool
true
disabled_microagents
list of str
None
[sandbox]
section of the config.toml
file.
To use these with the docker command, pass in -e SANDBOX_<option>
. Example: -e SANDBOX_TIMEOUT
.
timeout
int
120
user_id
int
1000
base_container_image
str
"nikolaik/python-nodejs:python3.12-nodejs22"
use_host_network
bool
false
runtime_binding_address
str
0.0.0.0
enable_auto_lint
bool
false
initialize_plugins
bool
true
runtime_extra_deps
str
""
runtime_startup_env_vars
dict
{}
browsergym_eval_env
str
""
[security]
section of the config.toml
file.
To use these with the docker command, pass in -e SECURITY_<option>
. Example: -e SECURITY_CONFIRMATION_MODE
.
confirmation_mode
bool
false
security_analyzer
str
""
Note: Adjust configurations carefully, especially for memory, security, and network-related settings to ensure optimal performance and security. Please note that the configuration options may be subject to change in future versions of OpenHands. It’s recommended to refer to the official documentation for the most up-to-date information.