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 →Stop stitching LangChain, Express, and observability together. HazelJS is one TypeScript backend where agents, RAG, tools, and memory share auth, deployment, and production primitives from day one.
Not a library you bolt on — a cohesive runtime where every AI primitive shares dependency injection, security, and observability with the rest of your app.
A stateful execution engine — not a stateless API handler. Agents keep context across turns, run tools safely, pause for human approval, and resume where they left off.
const result = await agentRuntime
.withTools([searchOrders, updateTicket])
.withMemory('conversation')
.run({ input: userMessage });Start lightweight with HCEL in an existing codebase, or go all-in with agents, workflows, and a production scaffold.
For existing TypeScript apps
Install two packages and start orchestrating with HCEL (Hazel Composable Expression Language) — chain prompts, RAG, and agents without switching frameworks.
Install
npm install @hazeljs/core @hazeljs/aiHCEL example
const result = await ai.hazel
.prompt('Summarize: {{input}}')
.rag('engineering-docs')
.agent('support-specialist')
.execute(userTicket);For production AI agents
Stateful agents with tools, memory, and human-in-the-loop — the execution engine when your agent needs to run longer than a single HTTP request.
Install
npm install @hazeljs/agentRuntime example
const result = await agentRuntime
.withTools([searchOrders, updateTicket])
.withMemory('conversation')
.run({ input: userMessage });For long-running pipelines
Agents that run for hours or days. Checkpoint progress, wait on humans or webhooks, and resume exactly where you left off.
Install
npm install @hazeljs/flowFlow example
const def = flow('onboarding', '1.0.0')
.entry('ingest')
.node('ingest', ingestDocs)
.node('embed', embedChunks)
.edge('ingest', 'embed')
.build();Install two packages into your current app, or generate a full AI-native backend with agents, RAG, and monitoring pre-wired.
npm install @hazeljs/core @hazeljs/aicd my-app && npm install && npm run devBest for brownfield — add HCEL orchestration without restructuring your app.
// 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 });
}// 1. Just call the chain.
// Context flows implicitly.
async execute(input) {
return await this.ai.hazel
.prompt(template)
.rag('docs')
.agent('specialist')
.execute(input);
}NestJS gives you structure. LangChain gives you chains. HazelJS gives you both — in one TypeScript backend built for AI from day one.
Excellent backend structure — but AI is still an add-on.
NestJS is a proven TypeScript framework for APIs and microservices. For AI workloads you still wire LangChain, vector DBs, and observability yourself.
Real production patterns — not toy demos. Stateful agents, intelligent retrieval, and durable pipelines.
Ingest PDFs, wikis, and APIs — then query with semantic search or GraphRAG for multi-hop reasoning across your org.
Durable workflows that draft, review, and publish content on triggers — with checkpointing, retries, and full audit trails.
Zynli is a multi-tenant AI support platform: agentic RAG, guided flows, real-time inbox, embeddable widget, and Stripe billing — all powered by HazelJS packages in production.
Zynli.AI
Live in productionMulti-tenant AI support — RAG, flows, billing, and real-time handoff. Built by HumanBee AB.
01
Visitors get KB-grounded answers first; low-confidence turns escalate to live agents with full context.
02
Intent routing runs order tracking, ticket creation, and custom HTTP actions — the same patterns HazelJS documents for support agents.
03
Multi-tenant workspaces, subscriptions, real-time Socket.IO, and an embeddable React widget — shipped, not a demo repo.
HazelJS stack in production
Try the support widget on this page — it runs on the same HazelJS RAG stack as Zynli.
// KB → guided flow → ticket bot → LLM → human handoff
await askRag(question, tenantId, { sessionId });
await matchVisitorIntent(tenantId, message);
await tryExecuteVisitorFlow({ conversationId, tenantId, ... });Deep dives on agents, HCEL, RAG, and what we are shipping next.
Introducing @hazeljs/pubsub for HazelJS: decorator-based Google Cloud Pub/Sub consumers, typed publishing, ack/nack controls, and module-first integration.
Read more →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 →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 →Get help from developers shipping AI backends in production. Share patterns, debug agents, and shape the roadmap.
Connect with students and researchers building on HazelJS at your institution.
Ask questions, share agent patterns, and get feedback from builders in the trenches.
Shape the roadmap, test new packages, and get direct access to the core team.
Install in minutes. No credit card. No glue code. Just TypeScript, agents, and a backend built for production.
Push to GitHub and ship HazelJS apps to the edge — with preview environments for every PR and zero config.
Optimized build pipelines for AI backends
Connect your repo and go
Low-latency inference worldwide
Test agent changes before merge
Join 9+ developers for early access to HazelJS.Cloud
Our official consulting partner helps teams architect, implement, and ship HazelJS in production — faster.