Guides
Comprehensive guides for building with HazelJS. Learn about security, AI features, core concepts, and deployment.
Tutorial
Tutorial: Build a REST API
Step-by-step guide to build a complete Task Management API with CRUD, validation, DI, modules, guards, and error handling.
Build a TypeScript RAG API
Ingest documents, retrieve context, and generate answers over HTTP with @hazeljs/rag and @hazeljs/ai.
Production AI Agents in Node.js
Stateful tools, approvals, memory, RAG, and Agent OS for production TypeScript agent backends.
Skillgate — REST to Agent Skills
Comprehensive guide: OpenAPI / fromModule, @AgentSkill, safety defaults, HITL, MCP export, and Agent OS wiring.
Agent OS
Production agent lifecycle — loops, DNA, twin, durable HITL, SQL AgentRun stores, worker leases, and CLI.
Docs Quality and LLM Readiness
Checklist and process to keep docs and machine-readable metadata consistent, accurate, and LLM-friendly.
Migration
Migrate from NestJS
Map NestJS modules, controllers, and DI to HazelJS — then replace LangChain glue with agents, RAG, and HCEL.
Migrate from Express
Map Express routes and middleware to HazelJS controllers and modules, then add native AI packages.
Migrate a LangChain Agent
Map LangChain / LangGraph agents to HazelJS @Agent and @Tool with memory, RAG, and HTTP.
Security
Core
Modules
Organize your application with modules. Learn about imports, exports, dynamic modules, and module composition.
Middleware
Powerful middleware for request timeouts, CORS, rate limiting, and more.
Controllers
Build RESTful APIs with decorator-based controllers and routing.
Exception Filters
Handle errors gracefully with custom exception filters and error responses.
Interceptors
Transform requests and responses with interceptors for logging, caching, and more.
Pipes
Transform and validate input data with pipes before it reaches your handlers.
Providers
Understand dependency injection and how to create and use providers.
AI
Memory
Persistent memory system for AI agents: conversation tracking, entity memory, and facts.
Agentic RAG
Self-improving retrieval with query planning, self-reflection, and adaptive strategies.
RAG Patterns
Common RAG patterns and best practices for building intelligent search systems.
RAG vs Agentic RAG
Compare standard RAG and Agentic RAG. Learn when to use each approach for your use case.
Vector Stores
Use vector databases for semantic search: Memory, Pinecone, Qdrant, Weaviate, and ChromaDB.