The AI ecosystem has a tendency to make simple concepts overly complicated. Lately, the term "AI Agent" has become synonymous with elaborate execution graphs, state machines, and heavy orchestration frameworks. While these architectural patterns have their place, they often introduce unnecessary friction and maintenance overhead for the majority of use cases.
With NodeLLM 1.14, we are reaffirming our core philosophy: an agent is simply a language model equipped with executable tools.
You don't need a framework that dictates how a model should "think" or "plan." Modern foundation models are fully capable of reasoning through multi-step problems if you provide them with clear instructions and the right tool interfaces.
The Core Philosophy: LLMs + Tools
In previous releases, we introduced the declarative Agent class to codify agent behaviors in a clean, reusable way. Version 1.12 refines this experience by emphasizing context injection and dynamic tool resolution.
Instead of hardcoding tools or relying on global state, NodeLLM allows you to resolve an agent's capabilities dynamically based on the current runtime context:
import { Agent, Tool, z } from "@node-llm/core";
// Define a tool
class SearchDocs extends Tool {
name = "search_docs";
description = "Searches our documentation";
schema = z.object({ query: z.string() });
async execute({ query }) {
// Search implementation...
return "Results found...";
}
}
// Define the required context
interface WorkContext {
userName: string;
workspace: string;
}
// Define the declarative Agent
class WorkAssistant extends Agent<WorkContext> {
static model = "gpt-4o";
// Dynamic instructions resolved at runtime
static instructions = (inputs: WorkContext) =>
`You are helping ${inputs.userName} in the ${inputs.workspace} workspace.`;
// Dynamic tools resolved at runtime
static tools = (inputs: WorkContext) => [
new SearchDocs({ scope: inputs.workspace })
];
}
When you instantiate or run the agent, you provide the context needed for this specific interaction.
// Context is isolated per invocation
const agent = new WorkAssistant({
inputs: { userName: "Alice", workspace: "hr" }
});
await agent.ask("What's on my todo list?");
The execution loop is handled transparently by the underlying NodeLLM core. There are no directed acyclic graphs to manage. The agent reasons, invokes the necessary tools, and processes their results sequentially until it derives the final answer. It is just readable, maintainable TypeScript.
Persistence and "Code Wins"
Real applications need persistent conversations. NodeLLM’s @node-llm/orm provides AgentSession with full database integration. We built this entirely on the "Code Wins" principle.
import { createAgentSession, loadAgentSession } from "@node-llm/orm/prisma";
import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
// Create a persistent session, with agent config applied
const session = await createAgentSession(prisma, llm, WorkAssistant, {
metadata: { userName: "Alice", workspace: "hr" }
});
await session.ask("What's on my todo list?");
// Load an existing session, apply runtime config natively from the Agent class
const existingSession = await loadAgentSession(prisma, llm, WorkAssistant, session.id);
// User sends a message, everything persists to Prisma automatically
await existingSession.ask("Follow up on my earlier question.");
createAgentSession persists the session layout and metadata. loadAgentSession fetches messages, but re-applies the logic natively from your Agent class. This distinction matters deeply when your prompts and available tools evolve faster than your database rows.
Expanding the Provider Ecosystem
A framework is only as good as the models it supports. NodeLLM 1.14 brings substantial updates to our provider integrations, adding two highly requested partners as first-class citizens.
1. Native xAI (Grok) Integration
Grok has matured into a formidable model family, and @node-llm/core now fully supports grok-3, grok-3-mini, and grok-2 natively. The xAI provider supports standard conversational reasoning, but also completely maps its image generation and vision features to NodeLLM bounds.
import { createLLM } from "@node-llm/core";
const llm = createLLM({ provider: "xai" });
// Grok Vision
const chat = llm.chat("grok-2-vision-1212");
const response = await chat.ask([
{ type: "text", text: "What is in this image?" },
{ type: "image_url", image_url: { url: "https://example.com/image.jpg" } }
]);
// Grok Image Generation
const image = await llm.paint("A futuristic city at night, cyberpunk style", {
model: "grok-imagine-image"
});
We've abstracted xAI's specific API nuances into our standardized interfaces, ensuring that swapping from OpenAI or Anthropic to xAI is a one-line configuration change.
2. Comprehensive Mistral Integration
While we've historically supported Mistral conversational models, version 1.14 implements the entire Mistral feature suite. mistral-large-latest is fully capable of robust tool-calling and execution, leaving you covered on general multi-turn reasoning natively. We've additionally included full peripheral coverage:
import { createLLM, Content } from "@node-llm/core";
const llm = createLLM({ provider: "mistral" });
// Pixtral Multimodal Support
const response = await llm
.chat("pixtral-large-latest")
.say(Content.text("What's in this image?").image("https://example.com/photo.jpg"))
.then((r) => r.text);
// Mistral Embeddings
const result = await llm.embed("mistral-embed", "Hello world");
console.log(result.vectors[0]); // [0.123, -0.456, ...]
All of these features flow through the identical declarative APIs that NodeLLM users are accustomed to, including native support for audio transcription (voxtral-mini-latest) and content moderation (mistral-moderation-latest).
Building Boring AI Infrastructure
The goal of NodeLLM is to make AI infrastructure boring, predictable, and simple to scale. We believe that by treating "agents" as sophisticated configurations of language models rather than esoteric software architectures, we can deliver a better developer experience and help teams build production-grade workflows much faster.
NodeLLM 1.14 is available now on npm:
npm install @node-llm/core@1.14.0 @node-llm/orm@0.6.0
For the complete release notes and documentation, check out our GitHub repository.
Top comments (0)