Open source · MIT · 11 providers

The Backend-First AI SDK for Node.js

Open-source infrastructure for building production-grade agents in Node.js — provider-agnostic, database-backed, with minimal dependencies.

Replace provider SDKs, prompt glue code, and ad-hoc agent state with a single, versioned backend API.

Get Started (5 mins) View on GitHub

Unified support for

OpenAI Anthropic Gemini DeepSeek Bedrock OpenRouter xAI Ollama Mistral Azure AI Foundry TypeSafe

OpenAI · Anthropic · Gemini · DeepSeek · Bedrock · OpenRouter · xAI · Ollama · Mistral · Azure AI Foundry · TypeSafe

Provider Agnostic

Switch between OpenAI, Anthropic, Gemini, Bedrock, and DeepSeek with zero code changes. A unified API for 1,000+ models.

Backend First

Optimized for workers, CRON jobs, and microservices. Built for long-running stability, not just frontend streaming.

Agentic Zero Trust

The "Invisible Perimeter" for your agents. Automatic key redaction, PII masking, and guardrails built in.

Actively maintained · Versioned releases · Clean, predictable architecture

One API. All Capabilities.

No more vendor-specific SDK boilerplate. Whether you're building streaming tools, vision-powered analytics, or reasoning agents, NodeLLM provides a single mental model.

const chat = NodeLLM.chat("gpt-5");
chat.withTool(DatabaseTool);

// Automates tools & real-time streaming
for await (const s of chat.stream("Supply...")) process.stdout.write(s.content);

// Multi-modal Senses: Image Gen & Audio
const art = await NodeLLM.paint("3D Logo");
const text = await NodeLLM.transcribe("memo.mp3");
import { z } from "zod";
const schema = z.object({ analysis: z.string(), risk: z.number() });

// Strictly typed JSON extraction
const res = await chat
  .withSchema(schema)
  .ask("Analyze risk");

console.log(res.data.analysis);
// Access CoT of Claude 3.7 or R1
const res = await chat
  .withThinking({ budget: 16000 })
  .ask("Security audit of Postgres");

// Internal reasoning & result
console.log(res.thinking.text); 
console.log(res.content);
import { createChat } from "@node-llm/orm";
import { NodeLLM } from "@node-llm/core";

// Auto-persisted history, costs, & tokens
const chat = await createChat(prisma, NodeLLM, { 
  model: "gpt-5" 
});

// DB state is managed automatically
await chat.ask("Recall previous security scan");

Built with NodeLLM

An AI QA tester: turns user stories into tests, runs them in a real Chrome, and replays them as regression tests without calling a model. Built by the NodeLLM team on @node-llm/core and @node-llm/orm.

Open-source pentest reporting platform with 2.9k GitHub stars. Uses @node-llm/core in its backend.