New: HCEL — Compose AI pipelines in fluent TypeScript Learn more →
HazelJS LogoHazelJS
5-minute quickstart for your first agent API

Build Your AI Backend and Ship It This Week.

HazelJS gives you one TypeScript backend for agents, RAG, tools, and memory so you can move from prototype to production without rewriting your stack.

37+
Stars
58+
Developers Trying HazelJS
200K++
NPM DOWNLOADS LAST 30 DAYS
hazel-orchestration.ts
const result = await ai.hazel
.prompt('Summarize this issue: {{input}}')
.rag('engineering-docs')
.agent('support-specialist')
.ml('sentiment')
.conditional((res) => res.confidence > 0.8)
.persist('analysis-chain')
.observe((e) => log(e.type))
.execute(userTicket);
Real-time Trace
Summarizing user feedback about dashboard latency...

Start Building in Seconds

Perfect for adding HCEL orchestration to your existing codebase. Minimal footprint, high impact.

$npm install @hazeljs/core @hazeljs/ai
# Minimal overhead. Just the logic.

Ultra-Light Core

  • • Use HCEL in Any Framework
  • • Direct API Orchestration
  • • Zero External Dependencies
  • Perfect for: Backend logic additions.

Standard Stack

  • • Production Agent Runtime
  • • Pre-configured RAG & Vectors
  • • Built-in Auth & Observability
  • Perfect for: Starting from scratch.
Framework Evolution

Elegance Meets Intelligence.

Stop wrestling with manual integration. HazelJS brings enterprise-grade structure to the age of AI.

The Old WayLegacy Frameworks + Glue Code
// 1. Setup DI
// 2. Configure OpenAI Adapter
// 3. Setup LangChain Chain
// 4. Manually pipe input to RAG
// 5. Manually pipe RAG output to Agent
// 6. Handle tool failures manually
// 7. Write 50 lines of boilerplate...

async execute(input) {
  const docs = await this.rag.search(input);
  const prompt = this.template.fill(input, docs);
  const agent = new AgentExecutor({ ... });
  return agent.call({ prompt });
}
The HazelJS WayNative HCEL Orchestration
// 1. Just call the chain.
// Context flows implicitly.

async execute(input) {
  return await this.ai.hazel
    .prompt(template)
    .rag('docs')
    .agent('specialist')
    .execute(input);
}
NEW: HCEL (Hazel Composable Expression Language)

Compose AI Pipelines Like Fluent TypeScript

HCEL gives you a chainable DSL to orchestrate prompts, RAG, agents, and ML in one typed flow. Less glue code, better observability, and production-ready orchestration by default.

Fluent Chaining

Build multi-step AI workflows with a readable chain API instead of nested async glue code.

Implicit Context Flow

Output from one operation automatically becomes input to the next, keeping pipelines concise and clear.

Built-In Observability

Trace each step with context and timing hooks so debugging and production monitoring are straightforward.

hcel-example.ts
import { HazelAI } from '@hazeljs/ai';

const ai = HazelAI.create({ defaultProvider: 'openai', model: 'gpt-4o' });

const result = await ai.hazel
  .prompt('Summarize this issue: {{input}}')
  .rag('engineering-docs')
  .agent('support-specialist')
  .ml('sentiment')
  .observe((event) => console.log(event.type, event.timestamp))
  .execute(userTicket);

What can you build with HazelJS?

Skip the boilerplate. From simple chatbots to enterprise-grade AI agents, build it in a weekend.

🤖

Customer Support Agent

A stateful agent that uses RAG to browse your docs and Tools to check order status directly in your database.

AgentRAGTools
Building Guide
🧠

Knowledge Intelligence

Upload PDFs, CSVs, or web links and query them with semantic search and GraphRAG for complex reasoning.

GraphRAGPostgresHCEL
Coming soon

Automated Content Pipeline

Build durable workflows that generate, review, and publish content based on real-time data triggers.

FlowWorkersObservability
Coming soon

The Enterprise AI Stack

One stack. 44+ packages. AI-native from day one.

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.

HCEL Orchestration

Compose prompts, RAG, agents, and ML in one fluent TypeScript chain with implicit context and built-in observability.

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.

Latest Blog Posts

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

Introducing @hazeljs/pubsub: Google Cloud Messaging, HazelJS Style
General
Author
HazelJS Team
4/6/2026

Introducing @hazeljs/pubsub: Google Cloud Messaging, HazelJS Style

Introducing @hazeljs/pubsub for HazelJS: decorator-based Google Cloud Pub/Sub consumers, typed publishing, ack/nack controls, and module-first integration.

Read More →
Introducing HCEL: The Most Fluent Way to Build AI Pipelines in TypeScript
General
Author
HazelJS Team
4/1/2026

Introducing HCEL: The Most Fluent Way to Build AI Pipelines in TypeScript

A deep dive into HCEL (HazelJS Composable Expression Language), a fluent DSL for orchestrating prompts, RAG, and AI agents with minimal boilerplate and maximum type safety.

Read More →
HazelJS v0.4.0: Distributed Sagas, Locking, and Zero-Config Documentation
General
Author
HazelJS Team
3/26/2026

HazelJS v0.4.0: Distributed Sagas, Locking, and Zero-Config Documentation

Major update with distributed sagas, distributed locking, zero-config documentation, performance monitoring, and enhanced error handling. Enterprise-grade distributed systems capabilities now available.

Read More →
Invite-Only Developer 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.

🚀 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 for early access to HazelJS.Cloud

HumanBee
Official HazelJS Consulting Partner

HumanBee

Need help shipping AI agents, RAG, or production backends on HazelJS? HumanBee is the official consulting partner for architecture, implementation, and team enablement.

Visit HumanBee

Sponsors & Partners

We're grateful to our sponsors and partners who support the HazelJS ecosystem.

HUMANBEE
EftaaPay
Bizaldo

Interested in becoming a sponsor or partner?

Get in Touch