openhands.core.config.app_config
AppConfig Objects
class AppConfig(BaseModel)
Configuration for the app.
Attributes:
llms
- Dictionary mapping LLM names to their configurations. The default configuration is stored under the 'llm' key.agents
- Dictionary mapping agent names to their configurations. The default configuration is stored under the 'agent' key.default_agent
- Name of the default agent to use.sandbox
- Sandbox configuration settings.runtime
- Runtime environment identifier.file_store
- Type of file store to use.file_store_path
- Path to the file store.save_trajectory_path
- Either a folder path to store trajectories with auto-generated filenames, or a designated trajectory file path.replay_trajectory_path
- Path to load trajectory and replay. If provided, trajectory would be replayed first before user's instruction.workspace_base
- Base path for the workspace. Defaults toagents
0 as absolute path.agents
1 - Path to mount the workspace. Defaults toworkspace_base
.agents
3 - Path to mount the workspace in sandbox. Defaults toagents
4.agents
5 - Path to rewrite the workspace mount path.agents
6 - Path to cache directory. Defaults toagents
7.agents
8 - Whether to run as openhands.agents
9 - Maximum number of iterations allowed.default_agent
0 - Maximum budget per task, agent stops if exceeded.default_agent
1 - E2B API key.default_agent
2 - Whether to disable terminal colors. For terminals that don't support color.default_agent
3 - Whether to enable debugging mode.default_agent
4 - Maximum file upload size in MB.default_agent
5 means unlimited.default_agent
6 - Whether to restrict upload file types.default_agent
7 - Allowed file extensions.default_agent
8 allows all.default_agent
9 - Whether to enable multiline input in CLI. When disabled, input is read line by line. When enabled, input continues until /exit command.
get_llm_config
def get_llm_config(name='llm') -> LLMConfig
'llm' is the name for default config (for backward compatibility prior to 0.8).
get_agent_config
def get_agent_config(name='agent') -> AgentConfig
'agent' is the name for default config (for backward compatibility prior to 0.8).
get_agent_to_llm_config_map
def get_agent_to_llm_config_map() -> dict[str, LLMConfig]
Get a map of agent names to llm configs.
model_post_init
def model_post_init(__context)
Post-initialization hook, called when the instance is created with only default values.