Create the box
Use an existing OpenAI Chat Completions-compatible endpoint that supports tool calls. Increate.py, set Secret.hosts to its hostname, without the scheme or path.
Save create.py. The prompt reads the real model key on your workstation; only BoxLite’s Secret configuration receives it.
create.py
gateway run restore Gateway on every boot. This image digest was used for verification.
Configure Hermes
Save these two files on your workstation. Setmodel.base_url to your endpoint’s API base URL and model.default to its model ID. These are Hermes’s native model settings.
Keep <BOXLITE_SECRET:model> unchanged. API_SERVER_KEY is a separate credential for callers of your Gateway.
config.yaml
.env
python3 -c 'import secrets; print(secrets.token_hex(32))'.
Keep these files outside Git. Upload them and set ownership for Hermes:
restart reports State change in progress, inspect the box until its state settles. For a stopped box, run boxlite start hermes-agent; for a running box, retry boxlite restart hermes-agent. Then register the tunnel if the previous command did not reach that step.
Send a task
Replace<YOUR_TUNNEL_URL> with the returned URL. Run these commands on your workstation, in the directory containing the .env file you created above.
The . ./.env command loads that file into the current shell so curl can use API_SERVER_KEY. This key authenticates Gateway callers; the real model-provider key stays in BoxLite Secret. Check readiness first:
finish_reason: "stop" and the expected file content.
Hermes is ready. Any client supporting its Gateway API can submit tasks. No example-specific request client is required.
Optional: wake on a request
Keepauto_stop=0 to leave Gateway running. To stop between requests, set auto_stop=120 in create.py and keep wake on access enabled. Choose an idle interval that fits your workload.
Restore Gateway when the box starts
The create script preserves the official image entrypoint and savesgateway run as its command. The configuration under /opt/data and registered port 8642 let the same HTTPS URL reach Gateway after a restart.
Starting Gateway once through exec would not save a startup command for subsequent boots. Use the image entrypoint and command from this guide for request-triggered startup.
Check idle stop and request-triggered wake
- Complete the first task above, which creates
/opt/data/proof.txt. - Stop sending service requests. Use
boxlite inspect hermes-agentuntil the state isstopped. - Send the request below to the same URL, without calling
start,exec, orcpfirst.
.env file. It loads the Gateway caller key, then sends the request that wakes the box:
503 BOX_STARTING, wait for its Retry-After interval and retry. A timeout has an unknown outcome; inspect the task’s result before submitting it again.
Gateway starts as a new process after the box wakes. Do not poll its health endpoint while waiting for idle stop: service traffic can keep the box awake.

