From bca46cafc406c3f91235c8b3570abb0f034b8e7c Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Fri, 15 Nov 2024 01:21:42 +0545 Subject: [PATCH 01/18] Fix Issue #3325 Added a configuration options md file to openhands/docs. Added appropriately to sidebars.ts. Fixes #3325 --- docs/configuration-options.md | 98 +++++++++++++++++++++++++++++++++++ docs/sidebars.ts | 5 ++ 2 files changed, 103 insertions(+) create mode 100644 docs/configuration-options.md diff --git a/docs/configuration-options.md b/docs/configuration-options.md new file mode 100644 index 000000000000..b000f159e3fc --- /dev/null +++ b/docs/configuration-options.md @@ -0,0 +1,98 @@ +# Configuration Options + +This guide details all configuration options available for OpenHands, helping you customize its behavior and integrate it with other services. Required options and those with recommended settings are highlighted. + +--- + +## Table of Contents +1. [General Settings](#general-settings) +2. [AWS Configuration](#aws-configuration) +3. [Base Image and Caching](#base-image-and-caching) +4. [File Uploads](#file-uploads) +5. [Language Model (LLM) Settings](#language-model-llm-settings) +6. [Execution and Security](#execution-and-security) +7. [Workspace Configuration](#workspace-configuration) + +--- + +## General Settings +- **AGENT** (Type: `string`, Default: `null`): Defines the agent type used by OpenHands. + - **Example**: `"AGENT": "default"` + +- **AGENT_MEMORY_ENABLED** (Type: `boolean`, Default: `false`): Enables memory persistence for the agent. + - **Use Case**: Enable to maintain agent state between sessions. + +- **AGENT_MEMORY_MAX_THREADS** (Type: `integer`, Default: `4`): Maximum threads allocated for agent memory operations. + - **Example**: Set to `8` for high-memory environments. + +## AWS Configuration +- **AWS_ACCESS_KEY_ID** (Type: `string`, Required): Access key for AWS services. + - **Example**: `"AWS_ACCESS_KEY_ID": "your_aws_key"` + +- **AWS_REGION_NAME** (Type: `string`, Default: `"us-west-1"`): AWS region for deployment. + - **Example**: `"AWS_REGION_NAME": "us-east-1"` + +- **AWS_SECRET_ACCESS_KEY** (Type: `string`, Required): Secret key for AWS API access. + +## Base Image and Caching +- **BASE_CONTAINER_IMAGE** (Type: `string`, Default: `"openhands/base:latest"`): Base image for containerized setups. +- **CACHE_DIR** (Type: `string`, Default: `"/tmp/openhands/cache"`): Directory for caching data. +- **CONFIRMATION_MODE** (Type: `boolean`, Default: `true`): Enables confirmation prompts for critical actions. + +## File Uploads +- **FILE_UPLOADS_ALLOWED_EXTENSIONS** (Type: `array`, Default: `["pdf", "jpg", "png"]`): Permitted file extensions for uploads. +- **FILE_UPLOADS_MAX_FILE_SIZE_MB** (Type: `integer`, Default: `10`): Maximum file size for uploads (MB). +- **FILE_UPLOADS_RESTRICT_FILE_TYPES** (Type: `boolean`, Default: `true`): Restricts file types to those allowed in `FILE_UPLOADS_ALLOWED_EXTENSIONS`. + +## Language Model (LLM) Settings +These settings configure language model integration. + +- **LLM_API_KEY** (Type: `string`, Required): API key to access the LLM service. + - **Example**: `"LLM_API_KEY": "api_key_123"` + +- **LLM_API_VERSION** (Type: `string`, Default: `"v1"`): Version of the LLM API. +- **LLM_BASE_URL** (Type: `string`, Default: `"https://api.llmprovider.com"`): Base URL for the LLM service. +- **LLM_CACHING_PROMPT** (Type: `boolean`, Default: `false`): Caches prompts for faster processing. +- **LLM_CUSTOM_LLM_PROVIDER** (Type: `string`, Default: `null`): Allows setting a custom provider. + - **Example**: `"LLM_CUSTOM_LLM_PROVIDER": "myLLMProvider"` + +- **LLM_DROP_PARAMS** (Type: `array`, Default: `[]`): Parameters to exclude from LLM requests. + - **Example**: `"LLM_DROP_PARAMS": ["param1", "param2"]` + +- **LLM_EMBEDDING_BASE_URL** (Type: `string`, Default: `null`): URL for LLM embedding service. +- **LLM_EMBEDDING_DEPLOYMENT_NAME** (Type: `string`, Default: `null`): Name for embedding deployment. +- **LLM_EMBEDDING_MODEL** (Type: `string`, Default: `"default_embedding_model"`): Embedding model used. +- **LLM_MAX_INPUT_TOKENS** (Type: `integer`, Default: `2048`): Maximum tokens for input. +- **LLM_MAX_OUTPUT_TOKENS** (Type: `integer`, Default: `512`): Maximum tokens for output. +- **LLM_MODEL** (Type: `string`, Default: `"default"`): Model type for language processing. +- **LLM_NUM_RETRIES** (Type: `integer`, Default: `3`): Retry attempts for request failures. +- **LLM_RETRY_MAX_WAIT** (Type: `integer`, Default: `60`): Maximum wait time between retries (seconds). +- **LLM_RETRY_MIN_WAIT** (Type: `integer`, Default: `1`): Minimum wait time between retries (seconds). +- **LLM_TEMPERATURE** (Type: `float`, Default: `0.7`): Controls response creativity (range 0-1). + - **Recommended Setting**: Use `0.5` for factual responses, `0.9` for creative tasks. + +- **LLM_TIMEOUT** (Type: `integer`, Default: `30`): Timeout for LLM requests (seconds). +- **LLM_TOP_P** (Type: `float`, Default: `0.9`): Controls diversity in output. +- **LLM_DISABLE_VISION** (Type: `boolean`, Default: `false`): Disables vision processing if supported. + +## Execution and Security +- **MAX_ITERATIONS** (Type: `integer`, Default: `10`): Maximum iterations per operation. + - **Example**: Increase to handle larger processes. + +- **RUN_AS_OPENHANDS** (Type: `boolean`, Default: `false`): Runs the instance as OpenHands. +- **SANDBOX_TIMEOUT** (Type: `integer`, Default: `300`): Timeout for sandboxed environments (seconds). +- **SANDBOX_USER_ID** (Type: `string`, Default: `null`): User ID for sandbox environments. +- **SECURITY_ANALYZER** (Type: `boolean`, Default: `true`): Enables security analysis tools. +- **USE_HOST_NETWORK** (Type: `boolean`, Default: `false`): Enables use of the host network for container operations. + +## Workspace Configuration +- **WORKSPACE_BASE** (Type: `string`, Default: `"/var/workspace"`): Root directory for workspace files. +- **WORKSPACE_MOUNT_PATH** (Type: `string`, Default: `"/mnt/workspace"`): Path where workspace is mounted. +- **WORKSPACE_MOUNT_PATH_IN_SANDBOX** (Type: `string`, Default: `"/sandbox/mnt/workspace"`): Workspace mount path in a sandboxed environment. +- **WORKSPACE_MOUNT_REWRITE** (Type: `boolean`, Default: `false`): Enables mount path rewriting. + +--- + +> **Note**: Adjust configurations carefully, especially for memory, security, and network-related settings to ensure optimal performance and security. + + diff --git a/docs/sidebars.ts b/docs/sidebars.ts index 7ce0a1f210c2..3ebc6a62f5fb 100644 --- a/docs/sidebars.ts +++ b/docs/sidebars.ts @@ -105,6 +105,11 @@ const sidebars: SidebarsConfig = { label: 'Custom Sandbox', id: 'usage/how-to/custom-sandbox-guide', }, + { + type: 'doc', + label: 'Configuration Options', + id: 'configuration-options', + }, ], }, { From ed23401a479d62692f1f9f01f1ab32239af1b452 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Fri, 15 Nov 2024 02:11:03 +0545 Subject: [PATCH 02/18] Update configuration-options.md --- docs/configuration-options.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index b000f159e3fc..1f6eec56db7d 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -1,3 +1,7 @@ +--- +id: configuration-options +--- + # Configuration Options This guide details all configuration options available for OpenHands, helping you customize its behavior and integrate it with other services. Required options and those with recommended settings are highlighted. From 65fa1d463b9bc3dae22dfda8c3608188b69c59f2 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Fri, 15 Nov 2024 02:15:31 +0545 Subject: [PATCH 03/18] Update configuration-options.md --- docs/configuration-options.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 1f6eec56db7d..3478073eb55a 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -1,5 +1,7 @@ --- id: configuration-options +title: Configuration Options +sidebar_label: Configuration Options --- # Configuration Options From 9278bc6e92a236b75f1294caa60d2a8f36e0c479 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Sat, 16 Nov 2024 00:14:16 +0545 Subject: [PATCH 04/18] Updated --- docs/configuration-options.md | 527 ++++++++++++++++++++++++++++------ docs/sidebars.ts | 18 +- 2 files changed, 456 insertions(+), 89 deletions(-) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 3478073eb55a..0a7788bec822 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -10,95 +10,456 @@ This guide details all configuration options available for OpenHands, helping yo --- -## Table of Contents -1. [General Settings](#general-settings) -2. [AWS Configuration](#aws-configuration) -3. [Base Image and Caching](#base-image-and-caching) -4. [File Uploads](#file-uploads) -5. [Language Model (LLM) Settings](#language-model-llm-settings) -6. [Execution and Security](#execution-and-security) -7. [Workspace Configuration](#workspace-configuration) +# Table of Contents + +1. [Core Configuration](#core-configuration) + - [API Keys](#api-keys) + - [Workspace](#workspace) + - [Debugging and Logging](#debugging-and-logging) + - [Session Management](#session-management) + - [Trajectories](#trajectories) + - [File Store](#file-store) + - [Task Management](#task-management) + - [Sandbox Configuration](#sandbox-configuration) + - [Miscellaneous](#miscellaneous) +2. [LLM Configuration](#llm-configuration) + - [AWS Credentials](#aws-credentials) + - [API Configuration](#api-configuration) + - [Custom LLM Provider](#custom-llm-provider) + - [Embeddings](#embeddings) + - [Message Handling](#message-handling) + - [Model Selection](#model-selection) + - [Retrying](#retrying) + - [Advanced Options](#advanced-options) +3. [Agent Configuration](#agent-configuration) + - [Microagent Configuration](#microagent-configuration) + - [Memory Configuration](#memory-configuration) + - [LLM Configuration](#llm-configuration-2) + - [ActionSpace Configuration](#actionspace-configuration) + - [Microagent Usage](#microagent-usage) +4. [Sandbox Configuration](#sandbox-configuration-2) + - [Execution](#execution) + - [Container Image](#container-image) + - [Networking](#networking) + - [Linting and Plugins](#linting-and-plugins) + - [Dependencies and Environment](#dependencies-and-environment) + - [Evaluation](#evaluation) +5. [Security Configuration](#security-configuration) + - [Confirmation Mode](#confirmation-mode) + - [Security Analyzer](#security-analyzer) + --- -## General Settings -- **AGENT** (Type: `string`, Default: `null`): Defines the agent type used by OpenHands. - - **Example**: `"AGENT": "default"` - -- **AGENT_MEMORY_ENABLED** (Type: `boolean`, Default: `false`): Enables memory persistence for the agent. - - **Use Case**: Enable to maintain agent state between sessions. - -- **AGENT_MEMORY_MAX_THREADS** (Type: `integer`, Default: `4`): Maximum threads allocated for agent memory operations. - - **Example**: Set to `8` for high-memory environments. - -## AWS Configuration -- **AWS_ACCESS_KEY_ID** (Type: `string`, Required): Access key for AWS services. - - **Example**: `"AWS_ACCESS_KEY_ID": "your_aws_key"` - -- **AWS_REGION_NAME** (Type: `string`, Default: `"us-west-1"`): AWS region for deployment. - - **Example**: `"AWS_REGION_NAME": "us-east-1"` - -- **AWS_SECRET_ACCESS_KEY** (Type: `string`, Required): Secret key for AWS API access. - -## Base Image and Caching -- **BASE_CONTAINER_IMAGE** (Type: `string`, Default: `"openhands/base:latest"`): Base image for containerized setups. -- **CACHE_DIR** (Type: `string`, Default: `"/tmp/openhands/cache"`): Directory for caching data. -- **CONFIRMATION_MODE** (Type: `boolean`, Default: `true`): Enables confirmation prompts for critical actions. - -## File Uploads -- **FILE_UPLOADS_ALLOWED_EXTENSIONS** (Type: `array`, Default: `["pdf", "jpg", "png"]`): Permitted file extensions for uploads. -- **FILE_UPLOADS_MAX_FILE_SIZE_MB** (Type: `integer`, Default: `10`): Maximum file size for uploads (MB). -- **FILE_UPLOADS_RESTRICT_FILE_TYPES** (Type: `boolean`, Default: `true`): Restricts file types to those allowed in `FILE_UPLOADS_ALLOWED_EXTENSIONS`. - -## Language Model (LLM) Settings -These settings configure language model integration. - -- **LLM_API_KEY** (Type: `string`, Required): API key to access the LLM service. - - **Example**: `"LLM_API_KEY": "api_key_123"` - -- **LLM_API_VERSION** (Type: `string`, Default: `"v1"`): Version of the LLM API. -- **LLM_BASE_URL** (Type: `string`, Default: `"https://api.llmprovider.com"`): Base URL for the LLM service. -- **LLM_CACHING_PROMPT** (Type: `boolean`, Default: `false`): Caches prompts for faster processing. -- **LLM_CUSTOM_LLM_PROVIDER** (Type: `string`, Default: `null`): Allows setting a custom provider. - - **Example**: `"LLM_CUSTOM_LLM_PROVIDER": "myLLMProvider"` - -- **LLM_DROP_PARAMS** (Type: `array`, Default: `[]`): Parameters to exclude from LLM requests. - - **Example**: `"LLM_DROP_PARAMS": ["param1", "param2"]` - -- **LLM_EMBEDDING_BASE_URL** (Type: `string`, Default: `null`): URL for LLM embedding service. -- **LLM_EMBEDDING_DEPLOYMENT_NAME** (Type: `string`, Default: `null`): Name for embedding deployment. -- **LLM_EMBEDDING_MODEL** (Type: `string`, Default: `"default_embedding_model"`): Embedding model used. -- **LLM_MAX_INPUT_TOKENS** (Type: `integer`, Default: `2048`): Maximum tokens for input. -- **LLM_MAX_OUTPUT_TOKENS** (Type: `integer`, Default: `512`): Maximum tokens for output. -- **LLM_MODEL** (Type: `string`, Default: `"default"`): Model type for language processing. -- **LLM_NUM_RETRIES** (Type: `integer`, Default: `3`): Retry attempts for request failures. -- **LLM_RETRY_MAX_WAIT** (Type: `integer`, Default: `60`): Maximum wait time between retries (seconds). -- **LLM_RETRY_MIN_WAIT** (Type: `integer`, Default: `1`): Minimum wait time between retries (seconds). -- **LLM_TEMPERATURE** (Type: `float`, Default: `0.7`): Controls response creativity (range 0-1). - - **Recommended Setting**: Use `0.5` for factual responses, `0.9` for creative tasks. - -- **LLM_TIMEOUT** (Type: `integer`, Default: `30`): Timeout for LLM requests (seconds). -- **LLM_TOP_P** (Type: `float`, Default: `0.9`): Controls diversity in output. -- **LLM_DISABLE_VISION** (Type: `boolean`, Default: `false`): Disables vision processing if supported. - -## Execution and Security -- **MAX_ITERATIONS** (Type: `integer`, Default: `10`): Maximum iterations per operation. - - **Example**: Increase to handle larger processes. - -- **RUN_AS_OPENHANDS** (Type: `boolean`, Default: `false`): Runs the instance as OpenHands. -- **SANDBOX_TIMEOUT** (Type: `integer`, Default: `300`): Timeout for sandboxed environments (seconds). -- **SANDBOX_USER_ID** (Type: `string`, Default: `null`): User ID for sandbox environments. -- **SECURITY_ANALYZER** (Type: `boolean`, Default: `true`): Enables security analysis tools. -- **USE_HOST_NETWORK** (Type: `boolean`, Default: `false`): Enables use of the host network for container operations. - -## Workspace Configuration -- **WORKSPACE_BASE** (Type: `string`, Default: `"/var/workspace"`): Root directory for workspace files. -- **WORKSPACE_MOUNT_PATH** (Type: `string`, Default: `"/mnt/workspace"`): Path where workspace is mounted. -- **WORKSPACE_MOUNT_PATH_IN_SANDBOX** (Type: `string`, Default: `"/sandbox/mnt/workspace"`): Workspace mount path in a sandboxed environment. -- **WORKSPACE_MOUNT_REWRITE** (Type: `boolean`, Default: `false`): Enables mount path rewriting. +## Core Configuration +The core configuration options are defined in the `[core]` section of the `config.toml` file. + +**API Keys** +- `e2b_api_key` + - Type: `str` + - Default: `""` + - Description: API key for E2B + +- `modal_api_token_id` + - Type: `str` + - Default: `""` + - Description: API token ID for Modal + +- `modal_api_token_secret` + - Type: `str` + - Default: `""` + - Description: API token secret for Modal + +**Workspace** +- `workspace_base` + - Type: `str` + - Default: `"./workspace"` + - Description: Base path for the workspace + +- `cache_dir` + - Type: `str` + - Default: `"/tmp/cache"` + - Description: Cache directory path + +**Debugging and Logging** +- `debug` + - Type: `bool` + - Default: `false` + - Description: Enable debugging + +- `disable_color` + - Type: `bool` + - Default: `false` + - Description: Disable color in terminal output + +**Session Management** +- `enable_cli_session` + - Type: `bool` + - Default: `false` + - Description: Enable saving and restoring the session when run from CLI + +**Trajectories** +- `trajectories_path` + - Type: `str` + - Default: `"./trajectories"` + - Description: Path to store trajectories (can be a folder or a file) + +**File Store** +- `file_store_path` + - Type: `str` + - Default: `"/tmp/file_store"` + - Description: File store path + +- `file_store` + - Type: `str` + - Default: `"memory"` + - Description: File store type + +- `file_uploads_allowed_extensions` + - Type: `list of str` + - Default: `[".*"]` + - Description: List of allowed file extensions for uploads + +- `file_uploads_max_file_size_mb` + - Type: `int` + - Default: `0` + - Description: Maximum file size for uploads, in megabytes + +- `file_uploads_restrict_file_types` + - Type: `bool` + - Default: `false` + - Description: Restrict file types for file uploads + +- `file_uploads_allowed_extensions` + - Type: `list of str` + - Default: `[".*"]` + - Description: List of allowed file extensions for uploads + +**Task Management** +- `max_budget_per_task` + - Type: `float` + - Default: `0.0` + - Description: Maximum budget per task (0.0 means no limit) + +- `max_iterations` + - Type: `int` + - Default: `100` + - Description: Maximum number of iterations + +**Sandbox Configuration** +- `workspace_mount_path_in_sandbox` + - Type: `str` + - Default: `"/workspace"` + - Description: Path to mount the workspace in the sandbox + +- `workspace_mount_path` + - Type: `str` + - Default: `""` + - Description: Path to mount the workspace + +- `workspace_mount_rewrite` + - Type: `str` + - Default: `""` + - Description: Path to rewrite the workspace mount path to + +**Miscellaneous** +- `run_as_openhands` + - Type: `bool` + - Default: `true` + - Description: Run as OpenHands + +- `runtime` + - Type: `str` + - Default: `"eventstream"` + - Description: Runtime environment + +- `default_agent` + - Type: `str` + - Default: `"CodeActAgent"` + - Description: Name of the default agent + +- `jwt_secret` + - Type: `str` + - Default: `""` + - Description: JWT secret for authentication + +## LLM Configuration +The LLM (Large Language Model) configuration options are defined in the `[llm]` section of the `config.toml` file. + +**AWS Credentials** +- `aws_access_key_id` + - Type: `str` + - Default: `""` + - Description: AWS access key ID + +- `aws_region_name` + - Type: `str` + - Default: `""` + - Description: AWS region name + +- `aws_secret_access_key` + - Type: `str` + - Default: `""` + - Description: AWS secret access key + +**API Configuration** +- `api_key` + - Type: `str` + - Default: `"your-api-key"` + - Description: API key to use + +- `base_url` + - Type: `str` + - Default: `""` + - Description: API base URL + +- `api_version` + - Type: `str` + - Default: `""` + - Description: API version + +- `input_cost_per_token` + - Type: `float` + - Default: `0.0` + - Description: Cost per input token + +- `output_cost_per_token` + - Type: `float` + - Default: `0.0` + - Description: Cost per output token + +**Custom LLM Provider** +- `custom_llm_provider` + - Type: `str` + - Default: `""` + - Description: Custom LLM provider + +**Embeddings** +- `embedding_base_url` + - Type: `str` + - Default: `""` + - Description: Embedding API base URL + +- `embedding_deployment_name` + - Type: `str` + - Default: `""` + - Description: Embedding deployment name + +- `embedding_model` + - Type: `str` + - Default: `"local"` + - Description: Embedding model to use + +**Message Handling** +- `max_message_chars` + - Type: `int` + - Default: `10000` + - Description: Maximum number of characters in an observation's content + +- `max_input_tokens` + - Type: `int` + - Default: `0` + - Description: Maximum number of input tokens + +- `max_output_tokens` + - Type: `int` + - Default: `0` + - Description: Maximum number of output tokens + +**Model Selection** +- `model` + - Type: `str` + - Default: `"gpt-4o"` + - Description: Model to use + +**Retrying** +- `num_retries` + - Type: `int` + - Default: `8` + - Description: Number of retries to attempt + +- `retry_max_wait` + - Type: `int` + - Default: `120` + - Description: Maximum wait time (in seconds) between retry attempts + +- `retry_min_wait` + - Type: `int` + - Default: `15` + - Description: Minimum wait time (in seconds) between retry attempts + +- `retry_multiplier` + - Type: `float` + - Default: `2.0` + - Description: Multiplier for exponential backoff calculation + +**Advanced Options** +- `drop_params` + - Type: `bool` + - Default: `false` + - Description: Drop any unmapped (unsupported) params without causing an exception + +- `caching_prompt` + - Type: `bool` + - Default: `true` + - Description: Using the prompt caching feature if provided by the LLM and supported + +- `ollama_base_url` + - Type: `str` + - Default: `""` + - Description: Base URL for the OLLAMA API + +- `temperature` + - Type: `float` + - Default: `0.0` + - Description: Temperature for the API + +- `timeout` + - Type: `int` + - Default: `0` + - Description: Timeout for the API + +- `top_p` + - Type: `float` + - Default: `1.0` + - Description: Top p for the API + +- `disable_vision` + - Type: `bool` + - Default: `true` + - Description: If model is vision capable, this option allows to disable image processing (useful for cost reduction) + +## Agent Configuration +The agent configuration options are defined in the `[agent]` and `[agent.]` sections of the `config.toml` file. + +**Microagent Configuration** +- `micro_agent_name` + - Type: `str` + - Default: `""` + - Description: Name of the micro agent to use for this agent + +**Memory Configuration** +- `memory_enabled` + - Type: `bool` + - Default: `false` + - Description: Whether long-term memory (embeddings) is enabled + +- `memory_max_threads` + - Type: `int` + - Default: `3` + - Description: The maximum number of threads indexing at the same time for embeddings + +**LLM Configuration** +- `llm_config` + - Type: `str` + - Default: `'your-llm-config-group'` + - Description: The name of the LLM config to use + +**ActionSpace Configuration** +- `function_calling` + - Type: `bool` + - Default: `true` + - Description: Whether function calling is enabled + +- `codeact_enable_browsing` + - Type: `bool` + - Default: `false` + - Description: Whether browsing delegate is enabled in the action space (only works with function calling) + +- `codeact_enable_llm_editor` + - Type: `bool` + - Default: `false` + - Description: Whether LLM editor is enabled in the action space (only works with function calling) + +- `codeact_enable_jupyter` + - Type: `bool` + - Default: `false` + - Description: Whether Jupyter is enabled in the action space + +**Microagent Usage** +- `use_microagents` + - Type: `bool` + - Default: `true` + - Description: Whether to use microagents at all + +- `disabled_microagents` + - Type: `list of str` + - Default: `None` + - Description: A list of microagents to disable + +## Sandbox Configuration +The sandbox configuration options are defined in the `[sandbox]` section of the `config.toml` file. + +**Execution** +- `timeout` + - Type: `int` + - Default: `120` + - Description: Sandbox timeout in seconds + +- `user_id` + - Type: `int` + - Default: `1000` + - Description: Sandbox user ID + +**Container Image** +- `base_container_image` + - Type: `str` + - Default: `"nikolaik/python-nodejs:python3.12-nodejs22"` + - Description: Container image to use for the sandbox + +**Networking** +- `use_host_network` + - Type: `bool` + - Default: `false` + - Description: Use host network + +**Linting and Plugins** +- `enable_auto_lint` + - Type: `bool` + - Default: `false` + - Description: Enable auto linting after editing + +- `initialize_plugins` + - Type: `bool` + - Default: `true` + - Description: Whether to initialize plugins + +**Dependencies and Environment** +- `runtime_extra_deps` + - Type: `str` + - Default: `""` + - Description: Extra dependencies to install in the runtime image + +- `runtime_startup_env_vars` + - Type: `dict` + - Default: `{}` + - Description: Environment variables to set at the launch of the runtime + +**Evaluation** +- `browsergym_eval_env` + - Type: `str` + - Default: `""` + - Description: BrowserGym environment to use for evaluation + +## Security Configuration +The security configuration options are defined in the `[security]` section of the `config.toml` file. + +**Confirmation Mode** +- `confirmation_mode` + - Type: `bool` + - Default: `false` + - Description: Enable confirmation mode + +**Security Analyzer** +- `security_analyzer` + - Type: `str` + - Default: `""` + - Description: The security analyzer to use + --- > **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. diff --git a/docs/sidebars.ts b/docs/sidebars.ts index 3ebc6a62f5fb..f0cc2c0efb6c 100644 --- a/docs/sidebars.ts +++ b/docs/sidebars.ts @@ -44,6 +44,17 @@ const sidebars: SidebarsConfig = { }, ], }, + { + type: 'category', + label: 'Configuration Options', + items: [ + { + type: 'doc', + label: 'Overview', + id: 'usage/configuration-options', + }, + ], + }, { type: 'category', label: 'Advanced Configuration', @@ -104,12 +115,7 @@ const sidebars: SidebarsConfig = { type: 'doc', label: 'Custom Sandbox', id: 'usage/how-to/custom-sandbox-guide', - }, - { - type: 'doc', - label: 'Configuration Options', - id: 'configuration-options', - }, + }, ], }, { From da5ea1e99a8e7170bb98dd229753a03d97e4e165 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Sat, 16 Nov 2024 00:18:28 +0545 Subject: [PATCH 05/18] Create configuration-options.md --- docs/modules/usage/configuration-options.md | 465 ++++++++++++++++++++ 1 file changed, 465 insertions(+) create mode 100644 docs/modules/usage/configuration-options.md diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md new file mode 100644 index 000000000000..0a7788bec822 --- /dev/null +++ b/docs/modules/usage/configuration-options.md @@ -0,0 +1,465 @@ +--- +id: configuration-options +title: Configuration Options +sidebar_label: Configuration Options +--- + +# Configuration Options + +This guide details all configuration options available for OpenHands, helping you customize its behavior and integrate it with other services. Required options and those with recommended settings are highlighted. + +--- + +# Table of Contents + +1. [Core Configuration](#core-configuration) + - [API Keys](#api-keys) + - [Workspace](#workspace) + - [Debugging and Logging](#debugging-and-logging) + - [Session Management](#session-management) + - [Trajectories](#trajectories) + - [File Store](#file-store) + - [Task Management](#task-management) + - [Sandbox Configuration](#sandbox-configuration) + - [Miscellaneous](#miscellaneous) +2. [LLM Configuration](#llm-configuration) + - [AWS Credentials](#aws-credentials) + - [API Configuration](#api-configuration) + - [Custom LLM Provider](#custom-llm-provider) + - [Embeddings](#embeddings) + - [Message Handling](#message-handling) + - [Model Selection](#model-selection) + - [Retrying](#retrying) + - [Advanced Options](#advanced-options) +3. [Agent Configuration](#agent-configuration) + - [Microagent Configuration](#microagent-configuration) + - [Memory Configuration](#memory-configuration) + - [LLM Configuration](#llm-configuration-2) + - [ActionSpace Configuration](#actionspace-configuration) + - [Microagent Usage](#microagent-usage) +4. [Sandbox Configuration](#sandbox-configuration-2) + - [Execution](#execution) + - [Container Image](#container-image) + - [Networking](#networking) + - [Linting and Plugins](#linting-and-plugins) + - [Dependencies and Environment](#dependencies-and-environment) + - [Evaluation](#evaluation) +5. [Security Configuration](#security-configuration) + - [Confirmation Mode](#confirmation-mode) + - [Security Analyzer](#security-analyzer) + + +--- + +## Core Configuration +The core configuration options are defined in the `[core]` section of the `config.toml` file. + +**API Keys** +- `e2b_api_key` + - Type: `str` + - Default: `""` + - Description: API key for E2B + +- `modal_api_token_id` + - Type: `str` + - Default: `""` + - Description: API token ID for Modal + +- `modal_api_token_secret` + - Type: `str` + - Default: `""` + - Description: API token secret for Modal + +**Workspace** +- `workspace_base` + - Type: `str` + - Default: `"./workspace"` + - Description: Base path for the workspace + +- `cache_dir` + - Type: `str` + - Default: `"/tmp/cache"` + - Description: Cache directory path + +**Debugging and Logging** +- `debug` + - Type: `bool` + - Default: `false` + - Description: Enable debugging + +- `disable_color` + - Type: `bool` + - Default: `false` + - Description: Disable color in terminal output + +**Session Management** +- `enable_cli_session` + - Type: `bool` + - Default: `false` + - Description: Enable saving and restoring the session when run from CLI + +**Trajectories** +- `trajectories_path` + - Type: `str` + - Default: `"./trajectories"` + - Description: Path to store trajectories (can be a folder or a file) + +**File Store** +- `file_store_path` + - Type: `str` + - Default: `"/tmp/file_store"` + - Description: File store path + +- `file_store` + - Type: `str` + - Default: `"memory"` + - Description: File store type + +- `file_uploads_allowed_extensions` + - Type: `list of str` + - Default: `[".*"]` + - Description: List of allowed file extensions for uploads + +- `file_uploads_max_file_size_mb` + - Type: `int` + - Default: `0` + - Description: Maximum file size for uploads, in megabytes + +- `file_uploads_restrict_file_types` + - Type: `bool` + - Default: `false` + - Description: Restrict file types for file uploads + +- `file_uploads_allowed_extensions` + - Type: `list of str` + - Default: `[".*"]` + - Description: List of allowed file extensions for uploads + +**Task Management** +- `max_budget_per_task` + - Type: `float` + - Default: `0.0` + - Description: Maximum budget per task (0.0 means no limit) + +- `max_iterations` + - Type: `int` + - Default: `100` + - Description: Maximum number of iterations + +**Sandbox Configuration** +- `workspace_mount_path_in_sandbox` + - Type: `str` + - Default: `"/workspace"` + - Description: Path to mount the workspace in the sandbox + +- `workspace_mount_path` + - Type: `str` + - Default: `""` + - Description: Path to mount the workspace + +- `workspace_mount_rewrite` + - Type: `str` + - Default: `""` + - Description: Path to rewrite the workspace mount path to + +**Miscellaneous** +- `run_as_openhands` + - Type: `bool` + - Default: `true` + - Description: Run as OpenHands + +- `runtime` + - Type: `str` + - Default: `"eventstream"` + - Description: Runtime environment + +- `default_agent` + - Type: `str` + - Default: `"CodeActAgent"` + - Description: Name of the default agent + +- `jwt_secret` + - Type: `str` + - Default: `""` + - Description: JWT secret for authentication + +## LLM Configuration +The LLM (Large Language Model) configuration options are defined in the `[llm]` section of the `config.toml` file. + +**AWS Credentials** +- `aws_access_key_id` + - Type: `str` + - Default: `""` + - Description: AWS access key ID + +- `aws_region_name` + - Type: `str` + - Default: `""` + - Description: AWS region name + +- `aws_secret_access_key` + - Type: `str` + - Default: `""` + - Description: AWS secret access key + +**API Configuration** +- `api_key` + - Type: `str` + - Default: `"your-api-key"` + - Description: API key to use + +- `base_url` + - Type: `str` + - Default: `""` + - Description: API base URL + +- `api_version` + - Type: `str` + - Default: `""` + - Description: API version + +- `input_cost_per_token` + - Type: `float` + - Default: `0.0` + - Description: Cost per input token + +- `output_cost_per_token` + - Type: `float` + - Default: `0.0` + - Description: Cost per output token + +**Custom LLM Provider** +- `custom_llm_provider` + - Type: `str` + - Default: `""` + - Description: Custom LLM provider + +**Embeddings** +- `embedding_base_url` + - Type: `str` + - Default: `""` + - Description: Embedding API base URL + +- `embedding_deployment_name` + - Type: `str` + - Default: `""` + - Description: Embedding deployment name + +- `embedding_model` + - Type: `str` + - Default: `"local"` + - Description: Embedding model to use + +**Message Handling** +- `max_message_chars` + - Type: `int` + - Default: `10000` + - Description: Maximum number of characters in an observation's content + +- `max_input_tokens` + - Type: `int` + - Default: `0` + - Description: Maximum number of input tokens + +- `max_output_tokens` + - Type: `int` + - Default: `0` + - Description: Maximum number of output tokens + +**Model Selection** +- `model` + - Type: `str` + - Default: `"gpt-4o"` + - Description: Model to use + +**Retrying** +- `num_retries` + - Type: `int` + - Default: `8` + - Description: Number of retries to attempt + +- `retry_max_wait` + - Type: `int` + - Default: `120` + - Description: Maximum wait time (in seconds) between retry attempts + +- `retry_min_wait` + - Type: `int` + - Default: `15` + - Description: Minimum wait time (in seconds) between retry attempts + +- `retry_multiplier` + - Type: `float` + - Default: `2.0` + - Description: Multiplier for exponential backoff calculation + +**Advanced Options** +- `drop_params` + - Type: `bool` + - Default: `false` + - Description: Drop any unmapped (unsupported) params without causing an exception + +- `caching_prompt` + - Type: `bool` + - Default: `true` + - Description: Using the prompt caching feature if provided by the LLM and supported + +- `ollama_base_url` + - Type: `str` + - Default: `""` + - Description: Base URL for the OLLAMA API + +- `temperature` + - Type: `float` + - Default: `0.0` + - Description: Temperature for the API + +- `timeout` + - Type: `int` + - Default: `0` + - Description: Timeout for the API + +- `top_p` + - Type: `float` + - Default: `1.0` + - Description: Top p for the API + +- `disable_vision` + - Type: `bool` + - Default: `true` + - Description: If model is vision capable, this option allows to disable image processing (useful for cost reduction) + +## Agent Configuration +The agent configuration options are defined in the `[agent]` and `[agent.]` sections of the `config.toml` file. + +**Microagent Configuration** +- `micro_agent_name` + - Type: `str` + - Default: `""` + - Description: Name of the micro agent to use for this agent + +**Memory Configuration** +- `memory_enabled` + - Type: `bool` + - Default: `false` + - Description: Whether long-term memory (embeddings) is enabled + +- `memory_max_threads` + - Type: `int` + - Default: `3` + - Description: The maximum number of threads indexing at the same time for embeddings + +**LLM Configuration** +- `llm_config` + - Type: `str` + - Default: `'your-llm-config-group'` + - Description: The name of the LLM config to use + +**ActionSpace Configuration** +- `function_calling` + - Type: `bool` + - Default: `true` + - Description: Whether function calling is enabled + +- `codeact_enable_browsing` + - Type: `bool` + - Default: `false` + - Description: Whether browsing delegate is enabled in the action space (only works with function calling) + +- `codeact_enable_llm_editor` + - Type: `bool` + - Default: `false` + - Description: Whether LLM editor is enabled in the action space (only works with function calling) + +- `codeact_enable_jupyter` + - Type: `bool` + - Default: `false` + - Description: Whether Jupyter is enabled in the action space + +**Microagent Usage** +- `use_microagents` + - Type: `bool` + - Default: `true` + - Description: Whether to use microagents at all + +- `disabled_microagents` + - Type: `list of str` + - Default: `None` + - Description: A list of microagents to disable + +## Sandbox Configuration +The sandbox configuration options are defined in the `[sandbox]` section of the `config.toml` file. + +**Execution** +- `timeout` + - Type: `int` + - Default: `120` + - Description: Sandbox timeout in seconds + +- `user_id` + - Type: `int` + - Default: `1000` + - Description: Sandbox user ID + +**Container Image** +- `base_container_image` + - Type: `str` + - Default: `"nikolaik/python-nodejs:python3.12-nodejs22"` + - Description: Container image to use for the sandbox + +**Networking** +- `use_host_network` + - Type: `bool` + - Default: `false` + - Description: Use host network + +**Linting and Plugins** +- `enable_auto_lint` + - Type: `bool` + - Default: `false` + - Description: Enable auto linting after editing + +- `initialize_plugins` + - Type: `bool` + - Default: `true` + - Description: Whether to initialize plugins + +**Dependencies and Environment** +- `runtime_extra_deps` + - Type: `str` + - Default: `""` + - Description: Extra dependencies to install in the runtime image + +- `runtime_startup_env_vars` + - Type: `dict` + - Default: `{}` + - Description: Environment variables to set at the launch of the runtime + +**Evaluation** +- `browsergym_eval_env` + - Type: `str` + - Default: `""` + - Description: BrowserGym environment to use for evaluation + +## Security Configuration +The security configuration options are defined in the `[security]` section of the `config.toml` file. + +**Confirmation Mode** +- `confirmation_mode` + - Type: `bool` + - Default: `false` + - Description: Enable confirmation mode + +**Security Analyzer** +- `security_analyzer` + - Type: `str` + - Default: `""` + - Description: The security analyzer to use + + +--- + +> **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. + + From bd01fe68ca4c16f0483c20acfda40456db0a0249 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Thu, 21 Nov 2024 19:40:34 +0545 Subject: [PATCH 06/18] Delete configuration-options.md --- docs/configuration-options.md | 465 ---------------------------------- 1 file changed, 465 deletions(-) delete mode 100644 docs/configuration-options.md diff --git a/docs/configuration-options.md b/docs/configuration-options.md deleted file mode 100644 index 0a7788bec822..000000000000 --- a/docs/configuration-options.md +++ /dev/null @@ -1,465 +0,0 @@ ---- -id: configuration-options -title: Configuration Options -sidebar_label: Configuration Options ---- - -# Configuration Options - -This guide details all configuration options available for OpenHands, helping you customize its behavior and integrate it with other services. Required options and those with recommended settings are highlighted. - ---- - -# Table of Contents - -1. [Core Configuration](#core-configuration) - - [API Keys](#api-keys) - - [Workspace](#workspace) - - [Debugging and Logging](#debugging-and-logging) - - [Session Management](#session-management) - - [Trajectories](#trajectories) - - [File Store](#file-store) - - [Task Management](#task-management) - - [Sandbox Configuration](#sandbox-configuration) - - [Miscellaneous](#miscellaneous) -2. [LLM Configuration](#llm-configuration) - - [AWS Credentials](#aws-credentials) - - [API Configuration](#api-configuration) - - [Custom LLM Provider](#custom-llm-provider) - - [Embeddings](#embeddings) - - [Message Handling](#message-handling) - - [Model Selection](#model-selection) - - [Retrying](#retrying) - - [Advanced Options](#advanced-options) -3. [Agent Configuration](#agent-configuration) - - [Microagent Configuration](#microagent-configuration) - - [Memory Configuration](#memory-configuration) - - [LLM Configuration](#llm-configuration-2) - - [ActionSpace Configuration](#actionspace-configuration) - - [Microagent Usage](#microagent-usage) -4. [Sandbox Configuration](#sandbox-configuration-2) - - [Execution](#execution) - - [Container Image](#container-image) - - [Networking](#networking) - - [Linting and Plugins](#linting-and-plugins) - - [Dependencies and Environment](#dependencies-and-environment) - - [Evaluation](#evaluation) -5. [Security Configuration](#security-configuration) - - [Confirmation Mode](#confirmation-mode) - - [Security Analyzer](#security-analyzer) - - ---- - -## Core Configuration -The core configuration options are defined in the `[core]` section of the `config.toml` file. - -**API Keys** -- `e2b_api_key` - - Type: `str` - - Default: `""` - - Description: API key for E2B - -- `modal_api_token_id` - - Type: `str` - - Default: `""` - - Description: API token ID for Modal - -- `modal_api_token_secret` - - Type: `str` - - Default: `""` - - Description: API token secret for Modal - -**Workspace** -- `workspace_base` - - Type: `str` - - Default: `"./workspace"` - - Description: Base path for the workspace - -- `cache_dir` - - Type: `str` - - Default: `"/tmp/cache"` - - Description: Cache directory path - -**Debugging and Logging** -- `debug` - - Type: `bool` - - Default: `false` - - Description: Enable debugging - -- `disable_color` - - Type: `bool` - - Default: `false` - - Description: Disable color in terminal output - -**Session Management** -- `enable_cli_session` - - Type: `bool` - - Default: `false` - - Description: Enable saving and restoring the session when run from CLI - -**Trajectories** -- `trajectories_path` - - Type: `str` - - Default: `"./trajectories"` - - Description: Path to store trajectories (can be a folder or a file) - -**File Store** -- `file_store_path` - - Type: `str` - - Default: `"/tmp/file_store"` - - Description: File store path - -- `file_store` - - Type: `str` - - Default: `"memory"` - - Description: File store type - -- `file_uploads_allowed_extensions` - - Type: `list of str` - - Default: `[".*"]` - - Description: List of allowed file extensions for uploads - -- `file_uploads_max_file_size_mb` - - Type: `int` - - Default: `0` - - Description: Maximum file size for uploads, in megabytes - -- `file_uploads_restrict_file_types` - - Type: `bool` - - Default: `false` - - Description: Restrict file types for file uploads - -- `file_uploads_allowed_extensions` - - Type: `list of str` - - Default: `[".*"]` - - Description: List of allowed file extensions for uploads - -**Task Management** -- `max_budget_per_task` - - Type: `float` - - Default: `0.0` - - Description: Maximum budget per task (0.0 means no limit) - -- `max_iterations` - - Type: `int` - - Default: `100` - - Description: Maximum number of iterations - -**Sandbox Configuration** -- `workspace_mount_path_in_sandbox` - - Type: `str` - - Default: `"/workspace"` - - Description: Path to mount the workspace in the sandbox - -- `workspace_mount_path` - - Type: `str` - - Default: `""` - - Description: Path to mount the workspace - -- `workspace_mount_rewrite` - - Type: `str` - - Default: `""` - - Description: Path to rewrite the workspace mount path to - -**Miscellaneous** -- `run_as_openhands` - - Type: `bool` - - Default: `true` - - Description: Run as OpenHands - -- `runtime` - - Type: `str` - - Default: `"eventstream"` - - Description: Runtime environment - -- `default_agent` - - Type: `str` - - Default: `"CodeActAgent"` - - Description: Name of the default agent - -- `jwt_secret` - - Type: `str` - - Default: `""` - - Description: JWT secret for authentication - -## LLM Configuration -The LLM (Large Language Model) configuration options are defined in the `[llm]` section of the `config.toml` file. - -**AWS Credentials** -- `aws_access_key_id` - - Type: `str` - - Default: `""` - - Description: AWS access key ID - -- `aws_region_name` - - Type: `str` - - Default: `""` - - Description: AWS region name - -- `aws_secret_access_key` - - Type: `str` - - Default: `""` - - Description: AWS secret access key - -**API Configuration** -- `api_key` - - Type: `str` - - Default: `"your-api-key"` - - Description: API key to use - -- `base_url` - - Type: `str` - - Default: `""` - - Description: API base URL - -- `api_version` - - Type: `str` - - Default: `""` - - Description: API version - -- `input_cost_per_token` - - Type: `float` - - Default: `0.0` - - Description: Cost per input token - -- `output_cost_per_token` - - Type: `float` - - Default: `0.0` - - Description: Cost per output token - -**Custom LLM Provider** -- `custom_llm_provider` - - Type: `str` - - Default: `""` - - Description: Custom LLM provider - -**Embeddings** -- `embedding_base_url` - - Type: `str` - - Default: `""` - - Description: Embedding API base URL - -- `embedding_deployment_name` - - Type: `str` - - Default: `""` - - Description: Embedding deployment name - -- `embedding_model` - - Type: `str` - - Default: `"local"` - - Description: Embedding model to use - -**Message Handling** -- `max_message_chars` - - Type: `int` - - Default: `10000` - - Description: Maximum number of characters in an observation's content - -- `max_input_tokens` - - Type: `int` - - Default: `0` - - Description: Maximum number of input tokens - -- `max_output_tokens` - - Type: `int` - - Default: `0` - - Description: Maximum number of output tokens - -**Model Selection** -- `model` - - Type: `str` - - Default: `"gpt-4o"` - - Description: Model to use - -**Retrying** -- `num_retries` - - Type: `int` - - Default: `8` - - Description: Number of retries to attempt - -- `retry_max_wait` - - Type: `int` - - Default: `120` - - Description: Maximum wait time (in seconds) between retry attempts - -- `retry_min_wait` - - Type: `int` - - Default: `15` - - Description: Minimum wait time (in seconds) between retry attempts - -- `retry_multiplier` - - Type: `float` - - Default: `2.0` - - Description: Multiplier for exponential backoff calculation - -**Advanced Options** -- `drop_params` - - Type: `bool` - - Default: `false` - - Description: Drop any unmapped (unsupported) params without causing an exception - -- `caching_prompt` - - Type: `bool` - - Default: `true` - - Description: Using the prompt caching feature if provided by the LLM and supported - -- `ollama_base_url` - - Type: `str` - - Default: `""` - - Description: Base URL for the OLLAMA API - -- `temperature` - - Type: `float` - - Default: `0.0` - - Description: Temperature for the API - -- `timeout` - - Type: `int` - - Default: `0` - - Description: Timeout for the API - -- `top_p` - - Type: `float` - - Default: `1.0` - - Description: Top p for the API - -- `disable_vision` - - Type: `bool` - - Default: `true` - - Description: If model is vision capable, this option allows to disable image processing (useful for cost reduction) - -## Agent Configuration -The agent configuration options are defined in the `[agent]` and `[agent.]` sections of the `config.toml` file. - -**Microagent Configuration** -- `micro_agent_name` - - Type: `str` - - Default: `""` - - Description: Name of the micro agent to use for this agent - -**Memory Configuration** -- `memory_enabled` - - Type: `bool` - - Default: `false` - - Description: Whether long-term memory (embeddings) is enabled - -- `memory_max_threads` - - Type: `int` - - Default: `3` - - Description: The maximum number of threads indexing at the same time for embeddings - -**LLM Configuration** -- `llm_config` - - Type: `str` - - Default: `'your-llm-config-group'` - - Description: The name of the LLM config to use - -**ActionSpace Configuration** -- `function_calling` - - Type: `bool` - - Default: `true` - - Description: Whether function calling is enabled - -- `codeact_enable_browsing` - - Type: `bool` - - Default: `false` - - Description: Whether browsing delegate is enabled in the action space (only works with function calling) - -- `codeact_enable_llm_editor` - - Type: `bool` - - Default: `false` - - Description: Whether LLM editor is enabled in the action space (only works with function calling) - -- `codeact_enable_jupyter` - - Type: `bool` - - Default: `false` - - Description: Whether Jupyter is enabled in the action space - -**Microagent Usage** -- `use_microagents` - - Type: `bool` - - Default: `true` - - Description: Whether to use microagents at all - -- `disabled_microagents` - - Type: `list of str` - - Default: `None` - - Description: A list of microagents to disable - -## Sandbox Configuration -The sandbox configuration options are defined in the `[sandbox]` section of the `config.toml` file. - -**Execution** -- `timeout` - - Type: `int` - - Default: `120` - - Description: Sandbox timeout in seconds - -- `user_id` - - Type: `int` - - Default: `1000` - - Description: Sandbox user ID - -**Container Image** -- `base_container_image` - - Type: `str` - - Default: `"nikolaik/python-nodejs:python3.12-nodejs22"` - - Description: Container image to use for the sandbox - -**Networking** -- `use_host_network` - - Type: `bool` - - Default: `false` - - Description: Use host network - -**Linting and Plugins** -- `enable_auto_lint` - - Type: `bool` - - Default: `false` - - Description: Enable auto linting after editing - -- `initialize_plugins` - - Type: `bool` - - Default: `true` - - Description: Whether to initialize plugins - -**Dependencies and Environment** -- `runtime_extra_deps` - - Type: `str` - - Default: `""` - - Description: Extra dependencies to install in the runtime image - -- `runtime_startup_env_vars` - - Type: `dict` - - Default: `{}` - - Description: Environment variables to set at the launch of the runtime - -**Evaluation** -- `browsergym_eval_env` - - Type: `str` - - Default: `""` - - Description: BrowserGym environment to use for evaluation - -## Security Configuration -The security configuration options are defined in the `[security]` section of the `config.toml` file. - -**Confirmation Mode** -- `confirmation_mode` - - Type: `bool` - - Default: `false` - - Description: Enable confirmation mode - -**Security Analyzer** -- `security_analyzer` - - Type: `str` - - Default: `""` - - Description: The security analyzer to use - - ---- - -> **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. - - From aef24386c40bd268f93da8951c59dce213604ad9 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Tue, 26 Nov 2024 20:42:57 +0545 Subject: [PATCH 07/18] Update docs/modules/usage/configuration-options.md Co-authored-by: Engel Nyst --- docs/modules/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index 0a7788bec822..9956357e0e67 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -180,7 +180,7 @@ The core configuration options are defined in the `[core]` section of the `confi - `jwt_secret` - Type: `str` - - Default: `""` + - Default: `uuid.uuid4().hex` - Description: JWT secret for authentication ## LLM Configuration From 34994694ebd9658fbef64710c1fb60fd723e01e9 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Tue, 26 Nov 2024 20:43:10 +0545 Subject: [PATCH 08/18] Update docs/modules/usage/configuration-options.md Co-authored-by: Engel Nyst --- docs/modules/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index 9956357e0e67..90e17a0ea9b9 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -181,7 +181,7 @@ The core configuration options are defined in the `[core]` section of the `confi - `jwt_secret` - Type: `str` - Default: `uuid.uuid4().hex` - - Description: JWT secret for authentication + - Description: JWT secret for authentication. Please set it to your own value. ## LLM Configuration The LLM (Large Language Model) configuration options are defined in the `[llm]` section of the `config.toml` file. From 9fefe19a365770f4084e82d886631fa44c25f71d Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Tue, 26 Nov 2024 20:43:21 +0545 Subject: [PATCH 09/18] Update docs/modules/usage/configuration-options.md Co-authored-by: Engel Nyst --- docs/modules/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index 90e17a0ea9b9..631fcdcba1e0 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -160,7 +160,7 @@ The core configuration options are defined in the `[core]` section of the `confi - `workspace_mount_rewrite` - Type: `str` - Default: `""` - - Description: Path to rewrite the workspace mount path to + - Description: Path to rewrite the workspace mount path to. You can usually ignore this, it refers to special cases of running inside another container. **Miscellaneous** - `run_as_openhands` From 97640e0714d679af091337aa62466a86f0b1c0f6 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Tue, 26 Nov 2024 20:43:37 +0545 Subject: [PATCH 10/18] Update docs/modules/usage/configuration-options.md Co-authored-by: Engel Nyst --- docs/modules/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index 631fcdcba1e0..6b0862947fb5 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -102,7 +102,7 @@ The core configuration options are defined in the `[core]` section of the `confi - `trajectories_path` - Type: `str` - Default: `"./trajectories"` - - Description: Path to store trajectories (can be a folder or a file) + - Description: Path to store trajectories (can be a folder or a file). If it's a folder, the trajectories will be saved in a file named with the session id name and .json extension, in that folder. **File Store** - `file_store_path` From 848d5639b5ab4c7fdf6e24da2700956ba8955ea3 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Tue, 26 Nov 2024 20:43:49 +0545 Subject: [PATCH 11/18] Update docs/modules/usage/configuration-options.md Co-authored-by: Engel Nyst --- docs/modules/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index 6b0862947fb5..31da8d7777ad 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -205,7 +205,7 @@ The LLM (Large Language Model) configuration options are defined in the `[llm]` **API Configuration** - `api_key` - Type: `str` - - Default: `"your-api-key"` + - Default: `None` - Description: API key to use - `base_url` From c6789892a811883861c0a65e4ee4c28b0552c8f7 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Tue, 26 Nov 2024 20:43:57 +0545 Subject: [PATCH 12/18] Update docs/modules/usage/configuration-options.md Co-authored-by: Engel Nyst --- docs/modules/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index 31da8d7777ad..f83ac7a3e9f3 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -253,7 +253,7 @@ The LLM (Large Language Model) configuration options are defined in the `[llm]` **Message Handling** - `max_message_chars` - Type: `int` - - Default: `10000` + - Default: `30000` - Description: Maximum number of characters in an observation's content - `max_input_tokens` From ef80d566f3f40aabfb8c5c62b149be79fb8cdb43 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Tue, 26 Nov 2024 20:44:05 +0545 Subject: [PATCH 13/18] Update docs/modules/usage/configuration-options.md Co-authored-by: Engel Nyst --- docs/modules/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index f83ac7a3e9f3..1f0765f1c134 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -254,7 +254,7 @@ The LLM (Large Language Model) configuration options are defined in the `[llm]` - `max_message_chars` - Type: `int` - Default: `30000` - - Description: Maximum number of characters in an observation's content + - Description: The approximate maximum number of characters in the content of an event included in the prompt to the LLM. Larger observations are truncated. - `max_input_tokens` - Type: `int` From c7f59851a61600927855db3d2bc2791169833a3d Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Tue, 26 Nov 2024 20:44:12 +0545 Subject: [PATCH 14/18] Update docs/modules/usage/configuration-options.md Co-authored-by: Engel Nyst --- docs/modules/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index 1f0765f1c134..814f7b3d814d 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -269,7 +269,7 @@ The LLM (Large Language Model) configuration options are defined in the `[llm]` **Model Selection** - `model` - Type: `str` - - Default: `"gpt-4o"` + - Default: `"claude-3-5-sonnet-20241022"` - Description: Model to use **Retrying** From 150b10ce47e22885bd76c228271856aab9fba662 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Tue, 26 Nov 2024 20:44:20 +0545 Subject: [PATCH 15/18] Update docs/modules/usage/configuration-options.md Co-authored-by: Engel Nyst --- docs/modules/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index 814f7b3d814d..dae8561599e5 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -326,7 +326,7 @@ The LLM (Large Language Model) configuration options are defined in the `[llm]` - `disable_vision` - Type: `bool` - - Default: `true` + - Default: `None` - Description: If model is vision capable, this option allows to disable image processing (useful for cost reduction) ## Agent Configuration From d42285c23e1b9f91ad597949f243e75d623a7cf6 Mon Sep 17 00:00:00 2001 From: Faraz Shamim Date: Tue, 26 Nov 2024 20:46:36 +0545 Subject: [PATCH 16/18] Update configuration-options.md --- docs/modules/usage/configuration-options.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index dae8561599e5..7f3a0a68251d 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -92,12 +92,6 @@ The core configuration options are defined in the `[core]` section of the `confi - Default: `false` - Description: Disable color in terminal output -**Session Management** -- `enable_cli_session` - - Type: `bool` - - Default: `false` - - Description: Enable saving and restoring the session when run from CLI - **Trajectories** - `trajectories_path` - Type: `str` From 51eb8175b7765c680405c4aa4dee04cf011ea5c9 Mon Sep 17 00:00:00 2001 From: Engel Nyst Date: Tue, 26 Nov 2024 16:14:12 +0100 Subject: [PATCH 17/18] Update docs/sidebars.ts --- docs/sidebars.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sidebars.ts b/docs/sidebars.ts index f0cc2c0efb6c..413a684f8342 100644 --- a/docs/sidebars.ts +++ b/docs/sidebars.ts @@ -115,7 +115,7 @@ const sidebars: SidebarsConfig = { type: 'doc', label: 'Custom Sandbox', id: 'usage/how-to/custom-sandbox-guide', - }, + }, ], }, { From f75d5d1d83d6419f9fb1755ee37ad0d138557a50 Mon Sep 17 00:00:00 2001 From: Engel Nyst Date: Tue, 26 Nov 2024 16:17:38 +0100 Subject: [PATCH 18/18] Update docs/modules/usage/configuration-options.md --- docs/modules/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index 7f3a0a68251d..c145e4227c87 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -6,7 +6,7 @@ sidebar_label: Configuration Options # Configuration Options -This guide details all configuration options available for OpenHands, helping you customize its behavior and integrate it with other services. Required options and those with recommended settings are highlighted. +This guide details all configuration options available for OpenHands, helping you customize its behavior and integrate it with other services. ---