diff --git a/website/docs/developer-guide/architecture.md b/website/docs/developer-guide/architecture.md index 88ad962699..d44dc1d532 100644 --- a/website/docs/developer-guide/architecture.md +++ b/website/docs/developer-guide/architecture.md @@ -106,7 +106,7 @@ hermes-agent/ │ ├── credential_files.py # File-based credential passthrough │ ├── env_passthrough.py # Env var passthrough for sandboxes │ ├── ansi_strip.py # ANSI escape stripping -│ └── environments/ # Terminal backends (local, docker, ssh, modal, daytona, singularity) +│ └── environments/ # Terminal backends (local, docker, ssh, modal, daytona, singularity, koyeb) │ ├── gateway/ # Messaging platform gateway │ ├── run.py # GatewayRunner — message dispatch (~9,000 lines) diff --git a/website/docs/developer-guide/environments.md b/website/docs/developer-guide/environments.md index 3409f30473..0ec1968c77 100644 --- a/website/docs/developer-guide/environments.md +++ b/website/docs/developer-guide/environments.md @@ -84,7 +84,7 @@ The foundation from `atroposlib`. Provides: ### HermesAgentBaseEnv The hermes-agent layer (`environments/hermes_base_env.py`). Adds: -- **Terminal backend configuration** — sets `TERMINAL_ENV` for sandboxed execution (local, Docker, Modal, Daytona, SSH, Singularity) +- **Terminal backend configuration** — sets `TERMINAL_ENV` for sandboxed execution (local, Docker, Modal, Daytona, SSH, Singularity, Koyeb) - **Tool resolution** — `_resolve_tools_for_group()` calls hermes-agent's `get_tool_definitions()` to get the right tool schemas based on enabled/disabled toolsets - **Agent loop integration** — `collect_trajectory()` runs `HermesAgentLoop` and scores the result - **Two-phase operation** — Phase 1 (OpenAI server) for eval/SFT, Phase 2 (VLLM ManagedServer) for full RL with logprobs @@ -426,7 +426,7 @@ See `environments/benchmarks/yc_bench/yc_bench_env.py` for a clean, well-documen | `max_agent_turns` | `int` | `30` | Max LLM calls per rollout | | `agent_temperature` | `float` | `1.0` | Sampling temperature | | `system_prompt` | `str` | `None` | System message for the agent | -| `terminal_backend` | `str` | `"local"` | `local`, `docker`, `modal`, `daytona`, `ssh`, `singularity` | +| `terminal_backend` | `str` | `"local"` | `local`, `docker`, `modal`, `daytona`, `ssh`, `singularity`, `koyeb` | | `terminal_timeout` | `int` | `120` | Seconds per terminal command | | `terminal_lifetime` | `int` | `3600` | Max sandbox lifetime | | `dataset_name` | `str` | `None` | HuggingFace dataset identifier | diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md index 80f5c6f88b..517c50d645 100644 --- a/website/docs/user-guide/configuration.md +++ b/website/docs/user-guide/configuration.md @@ -83,17 +83,18 @@ Leaving these unset keeps the legacy defaults (`HERMES_API_TIMEOUT=1800`s, `HERM ## Terminal Backend Configuration -Hermes supports six terminal backends. Each determines where the agent's shell commands actually execute — your local machine, a Docker container, a remote server via SSH, a Modal cloud sandbox, a Daytona workspace, or a Singularity/Apptainer container. +Hermes supports seven terminal backends. Each determines where the agent's shell commands actually execute — your local machine, a Docker container, a remote server via SSH, a Modal cloud sandbox, a Daytona workspace, a Singularity/Apptainer container, or a Koyeb cloud sandbox. ```yaml terminal: - backend: local # local | docker | ssh | modal | daytona | singularity + backend: local # local | docker | ssh | modal | daytona | singularity | koyeb cwd: "." # Working directory ("." = current dir for local, "/root" for containers) timeout: 180 # Per-command timeout in seconds env_passthrough: [] # Env var names to forward to sandboxed execution (terminal + execute_code) singularity_image: "docker://nikolaik/python-nodejs:python3.11-nodejs20" # Container image for Singularity backend modal_image: "nikolaik/python-nodejs:python3.11-nodejs20" # Container image for Modal backend daytona_image: "nikolaik/python-nodejs:python3.11-nodejs20" # Container image for Daytona backend + koyeb_image: "koyeb/sandbox:latest" # Container image for Koyeb backend ``` For cloud sandboxes such as Modal and Daytona, `container_persistent: true` means Hermes will try to preserve filesystem state across sandbox recreation. It does not promise that the same live sandbox, PID space, or background processes will still be running later. @@ -108,6 +109,7 @@ For cloud sandboxes such as Modal and Daytona, `container_persistent: true` mean | **modal** | Modal cloud sandbox | Full (cloud VM) | Ephemeral cloud compute, evals | | **daytona** | Daytona workspace | Full (cloud container) | Managed cloud dev environments | | **singularity** | Singularity/Apptainer container | Namespaces (--containall) | HPC clusters, shared machines | +| **koyeb** | Koyeb cloud sandbox | Full (cloud sandbox) | Serverless cloud execution | ### Local Backend @@ -242,6 +244,28 @@ terminal: **Isolation:** Uses `--containall --no-home` for full namespace isolation without mounting the host home directory. +### Koyeb Backend + +Runs commands in a [Koyeb](https://www.koyeb.com) cloud sandbox. Each task gets an isolated sandbox that is deleted on cleanup. + +```yaml +terminal: + backend: koyeb + koyeb_image: "koyeb/sandbox:latest" +``` + +**Required:** `KOYEB_API_TOKEN` environment variable. Get one from the [Koyeb control panel](https://app.koyeb.com/account/api). + +**Install the SDK:** + +```bash +pip install "hermes-agent[koyeb]" +``` + +**Lifecycle:** A new sandbox is created for each task and deleted when the agent cleans up. There is no persistent state between sessions. + +**File sync:** `~/.hermes/` credentials and skills are synced to the sandbox via a single tarball upload for fast initialization. + ### Common Terminal Backend Issues If terminal commands fail immediately or the terminal tool is reported as disabled: @@ -252,6 +276,7 @@ If terminal commands fail immediately or the terminal tool is reported as disabl - **Modal** — Needs `MODAL_TOKEN_ID` env var or `~/.modal.toml`. Run `hermes doctor` to check. - **Daytona** — Needs `DAYTONA_API_KEY`. The Daytona SDK handles server URL configuration. - **Singularity** — Needs `apptainer` or `singularity` in `$PATH`. Common on HPC clusters. +- **Koyeb** — Needs `KOYEB_API_TOKEN` and `pip install koyeb-sdk`. Run `hermes doctor` to check. When in doubt, set `terminal.backend` back to `local` and verify that commands run there first. diff --git a/website/docs/user-guide/features/tools.md b/website/docs/user-guide/features/tools.md index 2283c16fb4..4174e80add 100644 --- a/website/docs/user-guide/features/tools.md +++ b/website/docs/user-guide/features/tools.md @@ -64,13 +64,14 @@ The terminal tool can execute commands in different environments: | `singularity` | HPC containers | Cluster computing, rootless | | `modal` | Cloud execution | Serverless, scale | | `daytona` | Cloud sandbox workspace | Persistent remote dev environments | +| `koyeb` | Koyeb cloud sandbox | Serverless cloud execution | ### Configuration ```yaml # In ~/.hermes/config.yaml terminal: - backend: local # or: docker, ssh, singularity, modal, daytona + backend: local # or: docker, ssh, singularity, modal, daytona, koyeb cwd: "." # Working directory timeout: 180 # Command timeout in seconds ``` @@ -123,7 +124,7 @@ Configure CPU, memory, disk, and persistence for all container backends: ```yaml terminal: - backend: docker # or singularity, modal, daytona + backend: docker # or singularity, modal, daytona, koyeb container_cpu: 1 # CPU cores (default: 1) container_memory: 5120 # Memory in MB (default: 5GB) container_disk: 51200 # Disk in MB (default: 50GB)