HazelJS LogoHazelJS
HazelJS Blog

How to Deploy AI Agents Locally with HazelJS

Author
HazelJS Team
10/21/2026
General
How to Deploy AI Agents Locally with HazelJS
← Back to Blog

hazel new agent, hazel dev, and hazel apply with hazeld — develop locally, keep agents Running after the terminal closes.

HazelJS Agent OS is local-first. You do not need a proprietary cloud to experience the operating layer: package an agent, apply it, keep it Running, inspect logs, and approve sensitive tools on your laptop.

“Deploy” here means desired state on a local supervisor node — not kubectl apply and not a hosted control plane. There is no hazel deploy command today. The supported path is hazel apply / hazeld. Distributed and Kubernetes backends remain experimental.

Ideal workflow

Scaffold and iterate in the foreground:

npm install -g @hazeljs/​cli
hazel new agent support-agent
cd support-agent
npm install
hazel dev

hazel dev runs AgentOS in the foreground — it dies with the terminal. That is fine for inner-loop coding.

When you want agents to keep Running after you close the shell:

hazel apply agent.yaml
# or simply: hazel apply

That ensures hazeld (the local supervisor node) is up, applies DNA/YAML, and returns. Agents behave like local services.

Day-2 local ops

hazel ps
hazel inspect support_agent
hazel logs support_agent
hazel start support_agent
hazel stop support_agent
hazel approvals
hazel approve <taskId>
hazel secret set MY_KEY
hazel doctor
hazel ui

hazel ui serves a status page on 127.0.0.1. DNA packages can be published to the local file-backed store:

hazel store publish
hazel store install <name>
hazel store list

Hosted registry / managed apply are optional Team SKUs — never required for local Agent OS.

DNA vs code

agent.yaml / Agent DNA captures identity, prompt/model metadata, tool declarations, and policies. Tool implementations stay in TypeScript (or arrive via Skillgate handlers). Applying DNA does not replace your @Tool method bodies.

Foreground vs daemon (remember this)

CommandBehavior
hazel devForeground AgentOS + reconcile; dies with the TTY
hazel applyEnsure hazeld, apply DNA/YAML, return; agents keep Running
hazeldLong-lived supervisor node (also started by apply)

If Google (or a teammate) “deployed” with hazel dev and wonders why agents vanished — they closed the terminal.

What local deploy is not

  • Not multi-tenant auth on the control socket today
  • Not a claim that Kubernetes is production-ready in open source
  • Not a requirement to join the Cloud waitlist — Cloud is optional hosted registry/apply

Read next