
Building Production AI Agents with @hazeljs/agent
A tutorial on building stateful, tool-using AI agents with human-in-the-loop workflows using HazelJS. Note: Even HazelJS is still in beta, but it is running in Production already with quite a few agents, we will soon release the GA version. Reading time: ~12 minutes Introduction AI agents are everywhere—customer support bots, coding assistants, sales automation. But building production-grade agents is hard. You need state management, tool execution with safety guards, conversation memory, observability, and the ability to pause for human approval. Most teams end up hand-rolling these concerns, leading to brittle, hard-to-debug systems. @hazeljs/agent is an AI-native agent runtime for Node.js that gives you: Stateful execution — Agents maintain context across multiple steps Tool system — Declarative tools with automatic validation, timeouts, and approval workflows Memory & RAG — Persistent conversation history and retrieval-augmented generation Observability — Full event system for moni
Continue reading on Dev.to Tutorial
Opens in a new tab


