Docker & Remote Backends (Modal, Daytona)
Relevant source files
The following files were used as context for generating this wiki page:
Hermes Agent operates across multiple execution environments, including local machines, Docker containers, and remote backends like Modal or Daytona. This architecture ensures that skills function identically regardless of the underlying infrastructure by abstracting the environment layer. The system uses specific toolsets to manage dependencies, isolate project workspaces, and maintain consistent behavior across different platforms.
Sources: agent/learn_prompt.py:6, optional-skills/software-development/code-wiki/SKILL.md:15-18
Environment Abstraction and Compatibility
The agent determines the execution context during initialization. It identifies if it is running within a local shell, a Docker container, or a remote serverless environment. Skills declare their platform requirements in their metadata to ensure compatibility. For example, a skill using systemctl or /proc must declare [linux] as a supported platform.
Sources: agent/learn_prompt.py:46-52, optional-skills/software-development/code-wiki/SKILL.md:10-12
Platform Metadata
Metadata in the skill definition controls where the agent attempts to load or execute specific logic.
| Field | Purpose | Supported Values |
|---|---|---|
platforms | Restricts execution to specific OS environments. | [linux, macos, windows] |
dependencies | Lists external binaries required in the environment. | e.g., ffmpeg, git, docker |
metadata.hermes | Categorizes the skill for routing. | tags, related_skills |
Sources: agent/learn_prompt.py:42-55, optional-skills/software-development/code-wiki/SKILL.md:10-15
Docker Integration
Docker provides a reproducible environment for the agent to execute tasks without contaminating the host system. The docker/entrypoint.sh script initializes the agent within a container, ensuring all Hermes tools are available. Dockerized environments are particularly useful for tasks involving high-density data analysis or when a clean slate is required for each run.
Sources: agent/learn_prompt.py:6-8, docker/entrypoint.sh
The diagram shows how the agent abstracts the starting environment to reach a common execution step.
Sources: agent/learn_prompt.py:100-110, optional-skills/software-development/code-wiki/SKILL.md:40-45
Remote Backends: Modal and Daytona
Remote backends allow the agent to offload heavy compute tasks to the cloud. The Modal integration supports serverless execution, while Daytona facilitates remote development workspaces. These backends are treated as extensions of the local environment. The agent uses the terminal tool to communicate with these services, often utilizing specialized CLIs or APIs.
Sources: agent/learn_prompt.py:6-7, tools/environments/modal.py, optional-skills/software-development/code-wiki/SKILL.md:15-18
Remote Workspace Management
When working on remote backends, the agent manages project-specific directories to maintain state.
- Resolution: The agent resolves the target path (local, git URL, or remote temp dir).
- Cloning: Remote repositories are cloned into temporary cloud workspaces.
- Execution: Tools like
read_fileandsearch_filesoperate within the remote context. - Cleanup: Temporary workspaces are removed after the session concludes.
Sources: optional-skills/software-development/code-wiki/SKILL.md:46-55, optional-skills/creative/kanban-video-orchestrator/references/kanban-setup.md:200-210
Multi-Agent Orchestration in Shared Environments
In complex workflows, such as video production or large-scale code analysis, Hermes uses a kanban-based dispatcher. This system manages multiple profiles (assignees) within a shared workspace directory. By using the --workspace dir:<path> flag, the agent ensures that all Docker containers or remote tasks share the same filesystem context, allowing for artifact sharing between different agent roles.
Sources: optional-skills/creative/kanban-video-orchestrator/references/kanban-setup.md:130-145, optional-skills/creative/kanban-video-orchestrator/references/kanban-setup.md:195-200
The sequence shows how the shared workspace directory enables cross-profile collaboration in isolated environments.
Sources: optional-skills/creative/kanban-video-orchestrator/references/kanban-setup.md:160-185
Environment Prerequisites
Remote backends and Docker environments require specific configuration in the .env file located at ${HERMES_HOME:-~/.hermes}/.env. These variables ensure that the agent can authenticate with remote services and mount the correct local paths into containers.
| Environment Variable | Description | Requirement |
|---|---|---|
MODAL_TOKEN_ID | Authentication for Modal remote execution. | Required for Modal |
MODAL_TOKEN_SECRET | Authentication secret for Modal. | Required for Modal |
DOCKER_DEFAULT_IMAGE | The base image used for Docker tasks. | Optional (Hermes default) |
HERMES_WORKSPACE | The root directory for agent project isolation. | Required for kanban/shared work |
Sources: optional-skills/creative/kanban-video-orchestrator/references/kanban-setup.md:220-235, agent/learn_prompt.py:45-50
Summary
The Docker and Remote Backend integrations allow Hermes to scale from simple local scripts to complex, distributed workflows. By maintaining environment-agnostic skill authoring standards, the agent ensures that logic developed on one backend remains portable to another. This portability is facilitated by the terminal tool abstraction and the kanban shared-workspace pattern.
Sources: agent/learn_prompt.py:6-10, optional-skills/software-development/code-wiki/SKILL.md:15-20, optional-skills/creative/kanban-video-orchestrator/references/kanban-setup.md:250-260