New: Decision Runtime — closed-set judgments for Agent OS. Read the guide →
HazelJS LogoHazelJS

TypeScript Multi-Agent Framework

A multi-agent framework coordinates specialized agents under shared identity, execution, and authorization rules. HazelJS supports coordinator patterns with AgentGraph, SupervisorAgent, @Delegate, and A2A — each tool call still passes Gatekeeper.

01What it is

Multi-agent systems split work across specialized agents under a coordinator. The hard parts are not the prompts — they are shared identity, authorized tool access, shared durable execution, and observability when one agent fails mid-flight.

User
 ↓
Coordinator Agent
 ├── Research Agent
 ├── Support Agent
 ├── Billing Agent
 └── Operations Agent

02Problem it solves

  • One mega-agent prompt becomes unmaintainable as domains grow
  • Cross-agent tool calls must not bypass least-privilege policy
  • Failure in a child agent should suspend/resume, not orphan state
  • Operators need one place to inspect runs across the society of agents

03How you use it today

  • Identity: Agent DNA + in-process AgentRegistry
  • Communication: @Delegate, supervisor routing, optional A2A
  • Execution: AgentRuntime with shared durable run stores
  • Authorization: Gatekeeper per tool — cross-agent does not bypass policy
  • Lifecycle: AgentOS / hazeld start, pause, delete
  • Failures: durable suspend, HITL resume, run cancel/resume CLI
  • Observability: JSONL timelines, hazel logs, inspector

04Where it sits in the stack

Multi-agent patterns build on the orchestration primitives and the Agent Runtime. Packaging coordinators as DNA lets you apply the society with hazel apply.

05Boundaries

  • Start with one runtime + coordinator before introducing A2A across processes
  • Organism / society features are advanced — not required for a first multi-agent demo
  • Hosted multi-tenant agent meshes are not the default open-source path

06FAQ

Do child agents skip Gatekeeper?
No. Every tool call — including cross-agent paths — still goes through Gatekeeper.
Is A2A required?
No. Many teams start with @Delegate and supervisors in one process, then add A2A when they need interoperable agent cards.
Where do I read more?
Multi-agent systems in TypeScript and the A2A guide.

07Register and execute an agent

typescript
import { AgentRuntime, createMockLlmProvider } from '@hazeljs/agent';

const runtime = new AgentRuntime({
  llmProvider: createMockLlmProvider(),
  enableRetry: false,
});
runtime.registerAgent(SupportAgent);

const result = await runtime.execute('support-agent', 'Check open orders', {
  maxSteps: 8,
  loop: { maxIterations: 8, successScore: 95 },
});