Skip to content
Warlock.js v4.2.11

Warlock.js

AI-native TypeScript framework · v4.2.11

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.

[ Why Warlock ]

One framework, one mental model

The AI layer isn't a separate world bolted to the side. It's the same shape as everything else you write.

01

Same primitives, top to bottom

An HTTP controller and an AI agent are both just typed code with typed inputs and outputs. No second mental model for the AI layer.

02

Typed end to end

Seal schemas are validation, TypeScript types, and JSON schema at once. Define a shape once; it holds at the edge, in the compiler, and in tool calls.

03

Pick what you need

Every package is independently installable. Start with Core, add Cascade, cache, auth, or the AI layer only when your app actually reaches for them.

04

AI-native, not bolted on

Agents, tools, workflows, and supervisors are first-class — with five provider adapters behind a single API. Swap models without touching agent code.

[ What's in the box ]

A package for every layer

Independently installable, designed to compose. Here are six of the headline packages.

Core

The HTTP backbone.

Routing, modules, middleware, mail, and file storage — with the conventions every Warlock app is built on.

Cascade

Typed database ORM.

Models with relations and migrations, atomic operations, and built-in vector search — all fully typed.

Cache

Multi-driver caching.

Tags, locks, stale-while-revalidate, and similarity search behind one consistent API.

Auth & Access

Identity and permissions.

Tokens, route protection, and custom user types — plus RBAC checks and ABAC policies when you need them.

Seal

One schema, three jobs.

Validation that doubles as TypeScript types and JSON schema — define a shape once and reuse it everywhere.

AI

Agents on the same stack.

Typed agents, tools, workflows, and supervisors — with five provider adapters behind a single API.

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

[ AI-native ]

A first-class AI layer, not a plugin

Typed agents, tools, and workflows that behave like everything else you write. Swap the model provider without touching your agent code.

  • Typed agents Inputs and outputs are typed; structured output is validated, not parsed by hope.
  • Tools Define a tool with Seal and hand it to an agent — the schema is the contract.
  • Workflows & supervisors Compose agents into multi-step workflows, with a supervisor routing the work.
  • Same envelope Retries, middleware, and errors behave exactly like the rest of the framework.

[ Pick your path ]

Three ways to start

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

[ Ship it ]

Ready to build?

Scaffold a project, register a route, run your first agent — all on the same primitives. You'll be productive in an afternoon.