Patterns
A browsable library of agentic design patterns. Published entries are complete; the editorial backlog lists what comes next — not fake stubs.
Augmented LLM
A single HazelJS AgentRuntime call enriched with retrieval, bounded tools, or structured output—without an open-ended agent loop.
Foundation~12 minHazelJS
Tool-Using Agent
A bounded AgentRuntime observe→decide→act loop where HazelJS validates tool calls via ToolRegistry and feeds observations back to the model.
Intermediate~18 minHazelJS
Human Approval Gate
Pause a HazelJS AgentRun with durableSuspend before high-impact tools until a human approves or rejects via approveAndResume.
Intermediate~14 minHazelJS
Evaluator–Optimizer
Iterate generation with HazelJS AgentRuntime loop stages (plan/execute/critique/validate) until quality bars or budgets are met.
Intermediate~14 minHazelJS
Durable Agent Run
Persist AgentRun checkpoints and leases with createDurableRunStore / createSqlDurableRunStore so HazelJS agents survive crashes without double-applying side effects.
Advanced~20 minHazelJS
Memory Layers
Separate working context, session state, long-term memory, and artifacts in HazelJS so agents scale without stuffing everything into one prompt.
Intermediate~16 minHazelJS
Idempotent Tool Execution
Make AgentRuntime write tools safe under retries and durable resume using idempotency keys and dedupe semantics in adapters.
Intermediate~16 minHazelJS
Compensating Action
Undo or neutralize partial side effects after agent or workflow failure using saga/flow compensation and idempotent reverse tools.
Intermediate~18 minHazelJS
Bounded Autonomy
Cap what a HazelJS agent may do unsupervised using capabilities, PolicyEngine effects, maxSteps, and HITL—not prompt instructions alone.
Intermediate~15 minHazelJS
Budget-Aware Execution
Enforce hard economic stops with RunBudget maxTokens/maxCostUsd plus maxSteps—budgets that live in AgentRuntime, not in prompt text.
Intermediate~12 minHazelJS
Agent Sandbox
Reduce blast radius for HazelJS agents using session/tenant isolation, curated tools, and policy—without claiming an unreleased OS/container sandbox product.
Advanced~14 minHazelJS
Router
Route intents to specialized agents or subgraphs with AgentGraph conditional edges or SupervisorAgent.
Intermediate~14 minHazelJS
Sequential Workflow
Fixed-stage pipelines with @hazeljs/flow nodes or runtime.pipeline—when stages are stable.
Foundation~12 minHazelJS
Parallel Fan-Out / Fan-In
Run independent branches concurrently with AgentGraph parallel nodes, then merge.
Intermediate~14 minHazelJS
Planner–Executor
Produce an explicit plan artifact, then execute under validation—via loop stages or split agents.
Intermediate~14 minHazelJS
Agent Loop
Canonical observe→decide→act loop owned by AgentRuntime—not ad-hoc while(true) in app code.
Foundation~10 minHazelJS
Reflection / Critique Loop
Require a structured critique pass before committing answers or side effects—via loop stages or evaluator–optimizer.
Intermediate~12 minHazelJS
Supervisor and Specialists
A supervisor delegates to specialist agents with narrow tools via createSupervisor / AgentGraph.
Intermediate~14 minHazelJS
Agent Handoff
Transfer goals and minimal state between agents or to humans without dumping full transcripts unsafely.
Intermediate~12 minHazelJS
Retrieval Before Action
Require grounded lookup/RAG before write tools fire—via policy, graph edges, or tool allow-order discipline.
Intermediate~12 minHazelJS
Model Routing
Choose models by task class, cost, and risk using per-agent model prefs and documented cost routing—not one frontier model for everything.
Intermediate~12 minHazelJS
Production Agent Runtime Blueprint
Reference architecture for a HazelJS production Agent Runtime: App code, DNA, Store, platform desired state, and AgentRuntime execute — as taught by Meridian Ops.
Advanced~25 minHazelJS
Editorial backlog
Not published yet. 1 draft stubs in the content model.
- Cloud Control Plane Adoption Path
- Production Agent Runtime Blueprint (Phase D)