templates/ and get seeded into the gateway’s local git repo as template/<name> branches on first boot.
Template files
Key scripts in
skills/hq/scripts/:
How provisioning works
When you create an agent, HQ forks the selected template branch into the agent’s personal branch, then patches identity fields (slug, name, emoji, channel).
Model resolution at provision time
The model field inagent.json is optional. At provision time, add-agent.sh resolves the agent’s model using this cascade:
- CLI argument — if the
provisioncommand payload includesmodel, use it - Template’s
agent.json— if the template specifies a model, use it - Gateway default — the workspace default from Settings → Connections
- First connected model — detected from
openclaw models status

