Official HazelJS Consulting Partner HumanBee
HazelJS LogoHazelJS
HazelJS Logo
Now in Beta

HazelJS

An AI-native backend framework with Agent Runtime, Agentic RAG, and persistent memory built in — designed for stateful AI agents and LLM-powered applications

v0.2.1-beta.1
Latest Version
11+
Packages
90%+
Test Coverage
MIT
Open Source

Why Choose HazelJS?

Built for AI-native applications. Production-grade Agent Runtime, Agentic RAG, and persistent memory—everything you need to build intelligent, stateful AI agents.

AI-Native Architecture

Built from the ground up for AI applications. Not a framework with AI bolted on—AI is at the core of every design decision.

Production Agent Runtime

Stateful execution engine for AI agents. Unlike stateless handlers, agents maintain context, execute tools safely, and support pause/resume workflows.

Agentic RAG

Self-improving retrieval system that plans queries, reflects on results, and adapts strategies. Build intelligent search that learns and improves over time.

Decorator-Based API

Declarative programming with decorators. @Agent, @Tool, @SemanticSearch—add AI capabilities with simple decorators. Clean, type-safe, and intuitive.

Tool Orchestration

Safe, auditable tool execution with approval workflows. Human-in-the-loop for sensitive operations with built-in timeout and retry logic.

Enterprise-Grade Framework

Type-safe, dependency injection, advanced routing, and comprehensive testing. All the framework features you need, built for AI applications.

Enterprise Security Built-In

Production-Ready Security

HazelJS includes enterprise-grade security middleware out of the box. No configuration needed—secure by default.

Security Headers

X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, and HSTS headers automatically applied.

Rate Limiting

Protect your APIs from abuse with configurable rate limiting middleware. In-memory or Redis-backed.

CSRF Protection

Built-in CSRF token generation and validation to protect against cross-site request forgery attacks.

Input Sanitization

Automatic XSS prevention with HTML and string sanitization utilities. Protect against injection attacks.

Built-in Integrations

HazelJS comes with powerful integrations and features out of the box.

Monorepo Packages

11+ modular packages: core, ai, agent, rag, cache, websocket, serverless, prisma, auth, config, swagger, cron, and cli. Install only what you need.

Enterprise Security

Built-in security middleware: Security headers, rate limiting, CSRF protection, and input sanitization. Production-ready by default.

Prisma Integration

First-class ORM support with repository pattern, automatic migrations, and type-safe database access.

Swagger Documentation

Automatic OpenAPI documentation generation with interactive API explorer using swagger-ui-express.

AI Service

Built-in AI integration with OpenAI, Anthropic, Gemini, Cohere, and Ollama. Build AI-powered applications with ease.

Agent Runtime

Production-grade execution engine for stateful AI agents. Built-in tool orchestration, memory integration, and human-in-the-loop workflows.

WebSocket & SSE

Real-time communication with WebSocket gateways, Server-Sent Events, and room management for scalable real-time apps.

RAG & Agentic RAG

Comprehensive RAG with 5 vector stores, Agentic RAG for self-improving retrieval, hybrid search, and semantic embeddings. Build intelligent search systems.

Persistent Memory

Conversation tracking, entity memory, fact storage, and working memory. Build context-aware AI applications that remember and learn.

Latest Blog Posts

Stay up to date with the latest news, tutorials, and updates from the HazelJS team.

Production Agent Runtime: Build Stateful AI Agents That Actually Work
General
Author
HazelJS Team
12/16/2025

Production Agent Runtime: Build Stateful AI Agents That Actually Work

Stop building chatbots. Start building production-grade AI agents with stateful execution, tool orchestration, memory integration, and human-in-the-loop workflows. See real examples of support agents, sales agents, and multi-agent systems.

Read More →
Beyond Chatbots: Building Self-Improving AI Agents with Agentic RAG
General
Author
HazelJS Team
12/15/2025

Beyond Chatbots: Building Self-Improving AI Agents with Agentic RAG

Discover how Agentic RAG and Production Agent Runtime transform AI from simple chatbots into autonomous, self-improving agents that plan, reflect, adapt, and learn—all with a few decorators.

Read More →
Building Context-Aware AI with the HazelJS Memory System
General
Author
HazelJS Team
12/13/2025

Building Context-Aware AI with the HazelJS Memory System

Discover how to build intelligent, context-aware AI applications with conversation tracking, entity memory, semantic search, and RAG integration using the new Memory System in @hazeljs/rag.

Read More →

Write Less, Do More

HazelJS makes it easy to write clean, efficient code with modern JavaScript features and built-in optimizations.

Monorepo Structure

Modular packages you can install independently. Choose only what you need for your project.

Security First

Built-in security middleware: Security headers, rate limiting, CSRF protection, and input sanitization.

Advanced Routing

Wildcards, optional params, API versioning with URI, Header, and Media Type strategies.

Prisma Integration

First-class ORM support with repository pattern and automatic database migrations.

// Install only what you need
npm install @hazeljs/core @hazeljs/ai

import { Controller, Get, Injectable } from '@hazeljs/core';
import { AIService } from '@hazeljs/ai';

@Injectable()
class UserService {
  constructor(private ai: AIService) {}
  
  async getUsers() {
    // Use AI service, Prisma, Cache, etc.
    return [{ id: 1, name: 'John' }];
  }
}

@Controller('/users')
class UserController {
  constructor(private service: UserService) {}
  
  @Get()
  getAll() {
    return this.service.getUsers();
  }
}

Loved by Developers

See what developers are saying about HazelJS

Sarah Chen
Sarah Chen
Senior Backend Developer

The decorator-based API and dependency injection make building scalable applications a breeze. The modular architecture is exactly what we needed!

Alex Rodriguez
Alex Rodriguez
Tech Lead at StartupX

Built-in AI integration saved us weeks of development time. The testing utilities and security features are fantastic too!

Emma Wilson
Emma Wilson
Full Stack Developer

Lightweight and powerful with all the features I need. The Prisma integration, exception filters, and monorepo structure are game-changers!

Invite-Only University Community

Join the HazelJS Community

Connect with developers from universities around the world. Share knowledge, collaborate on projects, and build amazing applications together in our invite-only community platform.

University Groups

Join groups from your university. Connect with fellow students, researchers, and faculty members.

Discussions

Share knowledge, ask questions, and engage in meaningful discussions with the community.

Secure & Private

Invite-only access ensures a safe, focused environment for academic and professional collaboration.

Ready to Get Started?

Join the growing community of HazelJS developers and start building amazing applications today.

Build AI-Powered Apps in Minutes

Native OpenAI and Ollama integration. Production-grade Agent Runtime for stateful AI agents. No complex setup, no external libraries—just pure AI power built right into the framework.

OpenAI Ready

GPT-4, GPT-3.5, and DALL-E integration with just a few lines of code. Build chatbots, content generators, and more.

Ollama Support

Run local LLMs with Ollama. Privacy-first AI with Llama 2, Mistral, and other open-source models.

Agent Runtime

Production-grade execution engine for stateful AI agents. Tool orchestration, memory integration, and pause/resume workflows built-in.

As Easy As This

Inject the AI service into any controller or service and start building intelligent features. No configuration needed.

@Injectable()
class ChatService {
  constructor(private ai: AIService) {}

  async chat(message: string) {
    return this.ai.openai.chat({
      model: 'gpt-4',
      messages: [{ role: 'user', content: message }]
    });
  }
}
🚀 COMING SOON - Get Early Access!

Deploy in Seconds, Not Hours

The fastest way to deploy your HazelJS applications. Push to GitHub or Bitbucket and watch your app go live instantly—zero configuration, zero hassle.

Lightning Fast

Deploy in under 30 seconds with optimized build pipelines

Zero Config

No setup required—just connect your repo and deploy

Global Edge

Deployed to edge locations worldwide for ultra-low latency

Auto Previews

Preview every PR automatically before merging

Seamless Git Integration

Connect your GitHub or Bitbucket repository and deploy automatically on every push. It's that simple.

GitHubGitHub
BitbucketBitbucket

Join 9+ developers on the waitlist

Agentic RAG & Vector Search

Build Intelligent AI Applications

HazelJS includes comprehensive RAG capabilities with Agentic RAG for self-improving retrieval, semantic search, and vector databases. Build smarter applications with autonomous, adaptive AI.

5 Vector Stores

Memory, Pinecone, Qdrant, Weaviate, and ChromaDB with unified interface. Switch seamlessly between dev and production.

Agentic RAG

Self-improving retrieval with query planning, self-reflection, adaptive strategies, and multi-hop reasoning. Autonomous, intelligent search that learns and adapts.

Smart Embeddings

OpenAI and Cohere providers with extensibility. High-quality vector embeddings for semantic search.

Advanced Retrieval

Hybrid search, multi-query retrieval, and BM25 ranking. Combine semantic understanding with keyword precision. Decorator-based API for clean integration.

rag-example.ts
import { AgenticRAGService } from '@hazeljs/rag/agentic';
import { MemoryVectorStore } from '@hazeljs/rag';
import { OpenAIEmbeddings } from '@hazeljs/ai';

// Initialize with Agentic RAG
const vectorStore = new MemoryVectorStore(new OpenAIEmbeddings());
const agenticRAG = new AgenticRAGService({ vectorStore });

// Self-improving retrieval with query planning,
// self-reflection, and adaptive strategies
const results = await agenticRAG.retrieve('What is HazelJS?');

Sponsors & Partners

We're grateful to our sponsors and partners who support the HazelJS community and help us build the future of JavaScript.

HUMANBEE
EftaaPay
Bizaldo

Interested in becoming a sponsor or partner?

Get in Touch