Skip to content
Warlock.js v4

Warlock.js

AI-native TypeScript framework · v4

Build backends and AI agents on the same primitives.

Fourteen standalone packages — HTTP, ORM, cache, queues, auth, observability, and a first-class AI layer with typed agents, tools, and workflows. Pick what you need; ship faster.

14 packages 120+ skills MIT licensed

[ Same shape, different layer ]

Backends and AI on the same primitives

No bolted-on AI. No different mental model for the AI layer. An agent is just another piece of code with typed inputs and outputs.

HTTP route src/app/products/routes.ts
import { router } from "@warlock.js/core";
import { listProducts } from "./controllers/list-products.controller";
router.get("/products", listProducts);

One line registers a route. The controller, validation, response helpers, and module conventions live in core.

AI agent src/app/support/agents/triage.ts
import { ai } from "@warlock.js/ai";
import { OpenAISDK } from "@warlock.js/ai-openai";
const openai = new OpenAISDK({ apiKey: process.env.OPENAI_API_KEY! });
const supportAgent = ai.agent({
model: openai.model({ name: "gpt-4o-mini" }),
systemPrompt: "You are a concise senior engineer.",
});
const { text } = await supportAgent.execute("Why use generics?");

Pick a provider, define an agent, call it. Tools, retries, structured output, and middleware live in ai.

14
Standalone packages
Pick what you need
256
Documentation pages
Written & verified
120+
AI-readable skills
Per-task surface
5
AI provider adapters
Same agent API

[ Pick your path ]

Three ways to start

Different goals lead to different first pages. The framework doesn't care which one you take.