A ready-to-run example is available here!In warm-pool deployments server pods are booted before a user is matched to one. The pod starts in a dormant state — stateless services (tool preload, VSCode, etc.) come up normally, but all
/api/* routes return 503 until
POST /api/init delivers the per-user runtime configuration (credentials,
workspace paths, session keys).
This pattern reduces cold-start latency for users while keeping per-user data
out of the image.
State Machine
When
deferred_init is false (the default), the /api/init endpoints return
404 and all /api/* routes are live immediately.
Enabling Dormant Mode
Set theOH_DEFERRED_INIT environment variable when starting the server:
OH_SECRET_KEY value is used to authenticate POST /api/init via the
X-Init-API-Key request header. The orchestrator already holds this key for
encryption purposes, so no additional secret distribution is required.
Checking the Init State
GET /api/init is unauthenticated and returns the current state at any time:
Activating the Server
SendPOST /api/init with the X-Init-API-Key header set to the bootstrap
secret. The body is an InitRequest and all fields are optional — only the
values you provide override the dormant configuration:
InitRequest fields:
Error Handling
If initialization fails, the state rolls back todormant and the error is
stored in GET /api/init response’s error field. The orchestrator can then
retry POST /api/init:
Ready-to-run Example
This example is available on GitHub: examples/02_remote_agent_server/16_deferred_init.py
503 gate, activating it via POST /api/init, and
running a conversation on the ready server.
examples/02_remote_agent_server/16_deferred_init.py
The model name should follow the LiteLLM convention:
provider/model_name (e.g., anthropic/claude-sonnet-4-5-20250929, openai/gpt-4o).
The LLM_API_KEY should be the API key for your chosen provider.Next Steps
- Local Agent Server — Run a server in the same process
- Docker Sandbox — Isolated Docker-based deployment
- Settings & Secrets API — Manage per-user secrets securely
- Agent Server Overview — Architecture and deployment options

