Advanced~120 minHazelJS
Design a Production Agent Runtime
Multi-page Meridian Ops flagship guide: App code, DNA, Store, platform, and AgentRuntime — with HITL, Skillgate, and what to copy into your product.
- Authors
- editorial-team
- Published
- Last reviewed
- /learn/agent-foundations (or equivalent AgentRuntime vocabulary)
- /learn/agentic-development strongly recommended
- Node 18+, ability to run curl/jq
- Clone or open
hazeljs-meridian-ops(pathhazeljs-meridian-ops/in the HazelJS monorepo)
- Boot Meridian and explain store:sync vs platform:sync
- Draw the five-layer model: App / DNA / Store / Platform / Runtime
- Contrast CLI stubs with real /api/chat execute paths
- Run a HITL refund pause/resume
- Fill an Absorb Meridian memo for your product
On this page
Direct answer
A production Agent Runtime on HazelJS is not a chat widget with tools bolted on. It is AgentRuntime living in the same TypeScript backend as your HTTP APIs — with durable runs, policies, HITL, timelines — while DNA / Store / platform sit beside the process to version contracts and declare desired state.
The canonical lab is Meridian Ops (hazeljs-meridian-ops/). This guide is a multi-page series — start Part 1 after reading this hub.
Pattern: /patterns/production-agent-runtime-blueprint. Docs: Agent OS.
Tagline (Meridian): Ship AI workers as part of your backend — versioned like packages, governed like APIs, declared like infrastructure.
Why Meridian
| Asset | What it shows | Gap |
|---|---|---|
hazeljs-agent-os-starter | Support desk + HITL + DNA export | Little Store / Skillgate / multi-DNA |
hazel agent run | DNA smoke | Stub tools |
| Meridian Ops | Full story in one backend | This guide’s lab |
First @Tool only? Use /guides/build-your-first-tool-using-agent.
Journeys
| Journey | Goal | Parts |
|---|---|---|
| A | Clone → sync → tour → chat | 1–3 |
| B | HITL refund pause/resume | 4 |
| C | Skillgate + MCP | 7 |
| D | Remote registry + Phase 6 | 8 (skip on first pass) |
Honesty
- Commerce/risk data is in-memory.
- HITL defaults off (
AGENT_OS_HITL=0). - Platform APIs are
v1alpha1. hazel agent runuses stub tools — product truth is/api/*/chat.- Phase 6 labs are opt-in (Part 8).
Clone one-liner
cd hazeljs-meridian-ops
cp -n .env.example .env
npm install
Then open Part 1 — Boot the Flagship.
Parts in this series
The part list appears below the hub content on this page (and as prev/next on each part). Lab time ~90–150 minutes with Meridian running. Pin: @hazeljs/*@2.0.1.
Parts in this series
- 1. Boot the Flagship
Clone Meridian Ops: env, store:sync, platform:sync, tour, and dev server with Skillgate + DNA overlay.
- 2. Five-Layer Mental Model
App code, DNA, Store, Platform, and Runtime — and why DNA alone cannot add cancelOrder.
- 3. Runtime Core: Execute, Tools, Timelines
AgentRuntime.execute via chat APIs, real tools against the demo store, Inspector timelines, and eval smoke.
- 4. HITL, Policies, and Contracts
Journey B: requiresApproval, durableSuspend, AGENT_OS_HITL=1, approvals API, and stub vs real anti-confusion.
- 5. DNA, Store, and Promotion
Multi-DNA packages, change prompt without rewriting tools, and grow from thin starters toward Meridian.
- 6. Control Plane Beside the Runtime
What platform apply does and does not do; packageRef vs nested DNA; events and reconcile (F19–F21).
- 7. Multi-Agent and Skillgate
Journey C: ops-router, fraud path, Skillgate report/tools, and MCP export.
- 8. Absorb Meridian: Production Design
Copy vs leave checklist, Phase 6 labs, troubleshooting, and the Absorb Meridian memo capstone.
Sources
- Meridian Ops README — hazeljs-meridian-ops/README.md — mental model + quick start
- Meridian TOUR.md — F1–F22 curl walkthrough
- Flagship project plan (21) — docs/agent-os/21-flagship-project-plan.md
- HazelJS Agent OS guide
- HazelJS Agent package
Continue learning
- Pattern · production agent runtime blueprint
- Pattern · tool using agent
- Pattern · human approval gate
- Pattern · durable agent run
- Pattern · bounded autonomy
- Glossary · agent-os
- Glossary · agent-runtime
- Glossary · agent-dna
- Glossary · hitl
- Glossary · durable-execution
- Glossary · skill
- Lesson · AgentRuntime Mental Model
- Lesson · Safe Writes, Approvals, and HITL
- Lesson · From Demo to Production Checklist