ACAgentic Craft

Part 2 of 8 · Design a Production Agent Runtime

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

You will leave with

  • 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

PieceQuestion it answersMeridian home
App code (@Agent / @Tool / Skillgate)What can this agent do?src/agents/*, src/skillgate/*, src/api/*
DNAWho is this agent as a package?dna/*.marketplace.json
StoreHow do we version/share that package?npm run store:sync, .hazel/agents/lock.json
PlatformWhat should this env run?platform/*.yaml, .hazel/platform/
RuntimeWhat 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.jsonsrc/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 READMEhazeljs-meridian-ops/README.md — mental model + quick start
  • Meridian TOUR.mdF1–F22 curl walkthrough
  • Flagship project plan (21)docs/agent-os/21-flagship-project-plan.md
  • HazelJS Agent OS guide
  • HazelJS Agent package

Continue