openhands.core.config.app_config
AppConfig Objects
@dataclass
class AppConfig()
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.trajectories_path
- Folder path to store trajectories.workspace_base
- Base path for the workspace. Defaults to./workspace
as absolute path.agents
0 - Path to mount the workspace. Defaults toworkspace_base
.agents
2 - Path to mount the workspace in sandbox. Defaults toagents
3.agents
4 - Path to rewrite the workspace mount path.agents
5 - Path to cache directory. Defaults toagents
6.agents
7 - Whether to run as openhands.agents
8 - Maximum number of iterations allowed.agents
9 - Maximum budget per task, agent stops if exceeded.default_agent
0 - E2B API key.default_agent
1 - Whether to disable terminal colors. For terminals that don't support color.default_agent
2 - Whether to enable debugging mode.default_agent
3 - Maximum file upload size in MB.default_agent
4 means unlimited.default_agent
5 - Whether to restrict upload file types.default_agent
6 - Allowed file extensions.default_agent
7 allows all.
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.
__post_init__
def __post_init__()
Post-initialization hook, called when the instance is created with only default values.
defaults_to_dict
def defaults_to_dict() -> dict
Serialize fields to a dict for the frontend, including type hints, defaults, and whether it's optional.