Advanced~12 minHazelJS
Five-Layer Mental Model
App code, DNA, Store, Platform, and Runtime — and why DNA alone cannot add cancelOrder.
- Authors
- editorial-team
- Published
- Last reviewed
- Answer the five questions table from memory
- Explain DNA ≠ implementation and overlay safety
- Sketch Meridian’s HTTP → AgentRuntime → specialists path
On this page
Mental model (must stick)
Five questions
| Piece | Question it answers | Meridian home |
|---|---|---|
App code (@Agent / @Tool / Skillgate) | What can this agent do? | src/agents/*, src/skillgate/*, src/api/* |
| DNA | Who is this agent as a package? | dna/*.marketplace.json |
| Store | How do we version/share that package? | npm run store:sync, .hazel/agents/lock.json |
| Platform | What should this env run? | platform/*.yaml, .hazel/platform/ |
| Runtime | What happens right now? | POST /api/chat, durable runs, timelines |
DNA ≠ implementation
DNA lists tool names, prompts, and policies. Side effects stay in TypeScript.
| Contract (DNA) | Implementation (app) |
|---|---|
dna/support-desk.marketplace.json | src/agents/support.agent.ts (lookupOrder, processRefund, …) |
Overlay (AGENT_OS_DNA_OVERLAY=1) applies prompt / model / policies onto already registered agents. It must never replace live @Tool handlers with empty stubs (safeOverlayDna in src/platform/dna-overlay.ts).
Architecture (one picture)
text
Customer / Operator
│
▼
POST /api/chat or /api/support|ops|fraud|helpdesk/chat
│
▼
┌─────────────────────────────────────────────┐
│ Meridian (Hazel app) │
│ AgentRuntime + durable runs + Inspector │
│ optional: local platform (apply/reconcile) │
│ │
│ ops-router ──► support-desk │
│ ├─► safe-desk (fallback/twin) │
│ ├─► api-concierge (Skillgate) │
│ ├─► fraud-triage (HITL freeze) │
│ └─► helpdesk (RAG FAQ) │
└─────────────────────────────────────────────┘
▲
.hazel/agents/* + lock.json
.hazel/platform/resources.json
Checkpoint B
Explain in one sentence why editing DNA alone cannot add a new cancelOrder tool.
Artifact: One sentence: why editing DNA cannot add cancelOrder
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