Backup-bdg/OpenHands
0
1###################### OpenHands Configuration Example ######################2#3# All settings have default values, so you only need to uncomment and4# modify what you want to change5# The fields within each section are sorted in alphabetical order.6#7##############################################################################8 9#################################### Core ####################################10# General core configurations11##############################################################################12[core]13# API key for E2B14#e2b_api_key = ""15 16# API key for Modal17#modal_api_token_id = ""18#modal_api_token_secret = ""19 20# API key for Daytona21#daytona_api_key = ""22 23# Daytona Target24#daytona_target = ""25 26# Base path for the workspace27#workspace_base = "./workspace"28 29# Cache directory path30#cache_dir = "/tmp/cache"31 32# Reasoning effort for o1 models (low, medium, high, or not set)33#reasoning_effort = "medium"34 35# Debugging enabled36#debug = false37 38# Disable color in terminal output39#disable_color = false40 41# Path to store trajectories, can be a folder or a file42# If it's a folder, the session id will be used as the file name43#save_trajectory_path="./trajectories"44 45# Whether to save screenshots in the trajectory46# The screenshots are encoded and can make trajectory json files very large47#save_screenshots_in_trajectory = false48 49# Path to replay a trajectory, must be a file path50# If provided, trajectory will be loaded and replayed before the51# agent responds to any user instruction52#replay_trajectory_path = ""53 54# File store path55#file_store_path = "/tmp/file_store"56 57# File store type58#file_store = "memory"59 60# Maximum file size for uploads, in megabytes61#file_uploads_max_file_size_mb = 062 63# Maximum budget per task, 0.0 means no limit64#max_budget_per_task = 0.065 66# Maximum number of iterations67#max_iterations = 25068 69# Path to mount the workspace in the sandbox70#workspace_mount_path_in_sandbox = "/workspace"71 72# Path to mount the workspace73#workspace_mount_path = ""74 75# Path to rewrite the workspace mount path to76#workspace_mount_rewrite = ""77 78# Run as openhands79#run_as_openhands = true80 81# Runtime environment82#runtime = "docker"83 84# Name of the default agent85#default_agent = "CodeActAgent"86 87# JWT secret for authentication88#jwt_secret = ""89 90# Restrict file types for file uploads91#file_uploads_restrict_file_types = false92 93# List of allowed file extensions for uploads94#file_uploads_allowed_extensions = [".*"]95 96# Whether to enable the default LLM summarizing condenser when no condenser is specified in config97# When true, a LLMSummarizingCondenserConfig will be used as the default condenser98# When false, a NoOpCondenserConfig (no summarization) will be used99#enable_default_condenser = true100 101# Maximum number of concurrent conversations per user102#max_concurrent_conversations = 3103 104# Maximum age of conversations in seconds before they are automatically closed105#conversation_max_age_seconds = 864000 # 10 days106 107#################################### LLM #####################################108# Configuration for LLM models (group name starts with 'llm')109# use 'llm' for the default LLM config110##############################################################################111[llm]112# AWS access key ID113#aws_access_key_id = ""114 115# AWS region name116#aws_region_name = ""117 118# AWS secret access key119#aws_secret_access_key = ""120 121# API key to use (For Headless / CLI only - In Web this is overridden by Session Init)122api_key = ""123 124# API base URL (For Headless / CLI only - In Web this is overridden by Session Init)125#base_url = ""126 127# API version128#api_version = ""129 130# Cost per input token131#input_cost_per_token = 0.0132 133# Cost per output token134#output_cost_per_token = 0.0135 136# Custom LLM provider137#custom_llm_provider = ""138 139# Maximum number of characters in an observation's content140#max_message_chars = 10000141 142# Maximum number of input tokens143#max_input_tokens = 0144 145# Maximum number of output tokens146#max_output_tokens = 0147 148# Model to use. (For Headless / CLI only - In Web this is overridden by Session Init)149model = "gpt-4o"150 151# Number of retries to attempt when an operation fails with the LLM.152# Increase this value to allow more attempts before giving up153#num_retries = 8154 155# Maximum wait time (in seconds) between retry attempts156# This caps the exponential backoff to prevent excessively long157#retry_max_wait = 120158 159# Minimum wait time (in seconds) between retry attempts160# This sets the initial delay before the first retry161#retry_min_wait = 15162 163# Multiplier for exponential backoff calculation164# The wait time increases by this factor after each failed attempt165# A value of 2.0 means each retry waits twice as long as the previous one166#retry_multiplier = 2.0167 168# Drop any unmapped (unsupported) params without causing an exception169#drop_params = false170 171# Modify params for litellm to do transformations like adding a default message, when a message is empty.172# Note: this setting is global, unlike drop_params, it cannot be overridden in each call to litellm.173#modify_params = true174 175# Using the prompt caching feature if provided by the LLM and supported176#caching_prompt = true177 178# Base URL for the OLLAMA API179#ollama_base_url = ""180 181# Temperature for the API182#temperature = 0.0183 184# Timeout for the API185#timeout = 0186 187# Top p for the API188#top_p = 1.0189 190# If model is vision capable, this option allows to disable image processing (useful for cost reduction).191#disable_vision = true192 193# Custom tokenizer to use for token counting194# https://docs.litellm.ai/docs/completion/token_usage195#custom_tokenizer = ""196 197# Whether to use native tool calling if supported by the model. Can be true, false, or None by default, which chooses the model's default behavior based on the evaluation.198# ATTENTION: Based on evaluation, enabling native function calling may lead to worse results199# in some scenarios. Use with caution and consider testing with your specific use case.200# https://github.com/All-Hands-AI/OpenHands/pull/4711201#native_tool_calling = None202 203 204 205[llm.gpt4o-mini]206api_key = ""207model = "gpt-4o"208 209 210#################################### Agent ###################################211# Configuration for agents (group name starts with 'agent')212# Use 'agent' for the default agent config213# otherwise, group name must be `agent.<agent_name>` (case-sensitive), e.g.214# agent.CodeActAgent215##############################################################################216[agent]217 218# Whether the browsing tool is enabled219enable_browsing = true220 221# Whether the LLM draft editor is enabled222enable_llm_editor = false223 224# Whether the standard editor tool (str_replace_editor) is enabled225# Only has an effect if enable_llm_editor is False226enable_editor = true227 228# Whether the IPython tool is enabled229enable_jupyter = true230 231# Whether the command tool is enabled232enable_cmd = true233 234# Whether the think tool is enabled235enable_think = true236 237# Whether the finish tool is enabled238enable_finish = true239 240# LLM config group to use241#llm_config = 'your-llm-config-group'242 243# Whether to use prompt extension (e.g., microagent, repo/runtime info) at all244#enable_prompt_extensions = true245 246# List of microagents to disable247#disabled_microagents = []248 249# Whether history should be truncated to continue the session when hitting LLM context250# length limit251enable_history_truncation = true252 253[agent.RepoExplorerAgent]254# Example: use a cheaper model for RepoExplorerAgent to reduce cost, especially255# useful when an agent doesn't demand high quality but uses a lot of tokens256llm_config = 'gpt3'257 258[agent.CustomAgent]259# Example: use a custom agent from a different package260# This will be automatically be registered as a new agent named "CustomAgent"261classpath = "my_package.my_module.MyCustomAgent"262 263#################################### Sandbox ###################################264# Configuration for the sandbox265##############################################################################266[sandbox]267# Sandbox timeout in seconds268#timeout = 120269 270# Sandbox user ID271#user_id = 1000272 273# Container image to use for the sandbox274#base_container_image = "nikolaik/python-nodejs:python3.12-nodejs22"275 276# Use host network277#use_host_network = false278 279# Runtime extra build args280#runtime_extra_build_args = ["--network=host", "--add-host=host.docker.internal:host-gateway"]281 282# Enable auto linting after editing283#enable_auto_lint = false284 285# Whether to initialize plugins286#initialize_plugins = true287 288# Extra dependencies to install in the runtime image289#runtime_extra_deps = ""290 291# Environment variables to set at the launch of the runtime292#runtime_startup_env_vars = {}293 294# BrowserGym environment to use for evaluation295#browsergym_eval_env = ""296 297# Platform to use for building the runtime image (e.g., "linux/amd64")298#platform = ""299 300# Force rebuild of runtime image even if it exists301#force_rebuild_runtime = false302 303# Runtime container image to use (if not provided, will be built from base_container_image)304#runtime_container_image = ""305 306# Keep runtime alive after session ends307#keep_runtime_alive = false308 309# Pause closed runtimes instead of stopping them310#pause_closed_runtimes = false311 312# Delay in seconds before closing idle runtimes313#close_delay = 300314 315# Remove all containers when stopping the runtime316#rm_all_containers = false317 318# Enable GPU support in the runtime319#enable_gpu = false320 321# Additional Docker runtime kwargs322#docker_runtime_kwargs = {}323 324# Specific port to use for VSCode. If not set, a random port will be chosen.325# Useful when deploying OpenHands in a remote machine where you need to expose a specific port.326#vscode_port = 41234327 328# Volume mounts in the format 'host_path:container_path[:mode]'329# e.g. '/my/host/dir:/workspace:rw'330# Multiple mounts can be specified using commas331# e.g. '/path1:/workspace/path1,/path2:/workspace/path2:ro'332 333# Configure volumes under the [sandbox] section:334# [sandbox]335# volumes = "/my/host/dir:/workspace:rw,/path2:/workspace/path2:ro"336 337#################################### Security ###################################338# Configuration for security features339##############################################################################340[security]341 342# Enable confirmation mode (For Headless / CLI only - In Web this is overridden by Session Init)343#confirmation_mode = false344 345# The security analyzer to use (For Headless / CLI only - In Web this is overridden by Session Init)346#security_analyzer = ""347 348# Whether to enable security analyzer349#enable_security_analyzer = false350 351#################################### Condenser #################################352# Condensers control how conversation history is managed and compressed when353# the context grows too large. Each agent uses one condenser configuration.354##############################################################################355[condenser]356# The type of condenser to use. Available options:357# - "noop": No condensing, keeps full history (default)358# - "observation_masking": Keeps full event structure but masks older observations359# - "recent": Keeps only recent events and discards older ones360# - "llm": Uses an LLM to summarize conversation history361# - "amortized": Intelligently forgets older events while preserving important context362# - "llm_attention": Uses an LLM to prioritize most relevant context363type = "noop"364 365# Examples for each condenser type (uncomment and modify as needed):366 367# 1. NoOp Condenser - No additional settings needed368#type = "noop"369 370# 2. Observation Masking Condenser371#type = "observation_masking"372# Number of most-recent events where observations will not be masked373#attention_window = 100374 375# 3. Recent Events Condenser376#type = "recent"377# Number of initial events to always keep (typically includes task description)378#keep_first = 1379# Maximum number of events to keep in history380#max_events = 100381 382# 4. LLM Summarizing Condenser383#type = "llm"384# Reference to an LLM config to use for summarization385#llm_config = "condenser"386# Number of initial events to always keep (typically includes task description)387#keep_first = 1388# Maximum size of history before triggering summarization389#max_size = 100390 391# 5. Amortized Forgetting Condenser392#type = "amortized"393# Number of initial events to always keep (typically includes task description)394#keep_first = 1395# Maximum size of history before triggering forgetting396#max_size = 100397 398# 6. LLM Attention Condenser399#type = "llm_attention"400# Reference to an LLM config to use for attention scoring401#llm_config = "condenser"402# Number of initial events to always keep (typically includes task description)403#keep_first = 1404# Maximum size of history before triggering attention mechanism405#max_size = 100406 407# Example of a custom LLM configuration for condensers that require an LLM408# If not provided, it falls back to the default LLM409#[llm.condenser]410#model = "gpt-4o"411#temperature = 0.1412#max_input_tokens = 1024413 414#################################### Eval ####################################415# Configuration for the evaluation, please refer to the specific evaluation416# plugin for the available options417##############################################################################418 