7 Best llm.ts Alternatives in 2026 (Open Source)

llm.ts — Call any LLM with a single API. Zero dependencies. vs Vercel AI SDK / LangChain.js: zero-dependency TypeScript library under 10kB that sends prompts to 30+ models from 3 providers in a single call — optimized for lightweight multi-model comparison

Short answer

  • Closest match to llm.ts: AI SDK.
  • Most actively developed: Mastra (4,044 commits in the last 90 days).
  • Fastest growing: Mastra (+969 GitHub stars in the last 30 days).
  • No commit in 6+ months: MiniChain.

These 7 open-source tools do the same job. They are ordered by how closely they match llm.ts, with live GitHub data so you can see which projects are actively maintained.

ToolGitHub starsStars / 30dLast commit
llm.ts(original)21302023-05-09
AI SDK27.1k+6422026-10-01
LangChain18.2k+1422026-10-01
Mastra28.5k+9692026-10-02
voltagent10.7k+5812026-09-28
rigging418+22026-09-29
MiniChain1.2k02023-12-07
MCP TypeScript SDK13.5k+2372026-10-01
  1. 1. AI SDK

    The AI Toolkit for TypeScript. From the creators of Next.js, the AI SDK is a free open-source library for building AI-powered applications and agents

    What sets it apart: Best-in-class TypeScript AI SDK with native UI hooks and Vercel integration — the React/Next.js standard for AI apps, unlike LangChain's Python-first approach

    Best for: Full-stack TypeScript AI applications with React/Next.js; Building chatbots and generative UI with streaming

  2. 2. LangChain

    The agent engineering platform

    What sets it apart: vs LlamaIndex.TS: broader agent/chain abstractions and larger integration ecosystem; vs AI SDK: more opinionated with built-in chain patterns and LangSmith observability

    Best for: Building LLM-powered apps in TypeScript/JavaScript; Rapid prototyping with multiple LLM providers; RAG applications with diverse data sources

  3. 3. Mastra

    From the team behind Gatsby, Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.

    What sets it apart: Unlike LangChain (Python-first, complex abstraction) or CrewAI (Python multi-agent), Mastra is purpose-built for TypeScript with native Next.js/React integration, graph-based workflows with .then()/.branch()/.parallel() syntax, and built-in evals — making it the most natural choice for JS/TS production agent development.

    Best for: TypeScript/Node.js teams building production AI agents with React/Next.js frontends; Developers who want agent workflows with human-in-the-loop approval built into their existing JS stack

  4. 4. voltagent

    AI Agent Engineering Platform built on an Open Source TypeScript AI Agent Framework

    What sets it apart: Full-stack TypeScript agent platform with built-in workflow engine, voice support, and observability console — more opinionated than Vercel AI SDK, more TypeScript-native than LangChain

    Best for: TypeScript developers building production agent systems with observability; Multi-agent systems with workflow orchestration and voice capabilities

  5. 5. rigging

    Lightweight LLM Interaction Framework

    What sets it apart: Unlike heavyweight frameworks like LangChain, Rigging combines Pydantic structured parsing with unstructured text seamlessly, using LiteLLM connection strings for zero-config model switching — designed for production simplicity over framework complexity

    Best for: Python developers building production LLM applications who want structured outputs with minimal boilerplate; Security researchers at Dreadnode using LLMs for red-teaming and adversarial testing

  6. 6. MiniChain

    A tiny library for coding with large language models.

    What sets it apart: vs LangChain / LlamaIndex: extremely smaller and simpler — core prompt chaining with typed validation and Gradio visualization, without the complexity of full agent frameworks

    Best for: Retrieval-augmented QA and multi-turn chat; Chain-of-thought reasoning pipelines; Developers wanting minimal LLM abstractions without framework bloat

  7. 7. MCP TypeScript SDK

    The official TypeScript SDK for Model Context Protocol servers and clients

    What sets it apart: The official reference TypeScript implementation of MCP — ensures full spec compliance and first-party support vs community implementations

    Best for: Building MCP-compatible tools and servers in TypeScript; Exposing data sources and tools to LLM applications via standard protocol

FAQ

What are the best alternatives to llm.ts?
The closest open-source alternatives to llm.ts are AI SDK, LangChain and Mastra, followed by voltagent, rigging and MiniChain. They are ranked by how closely they match what llm.ts does.
Which llm.ts alternative is the most popular?
Mastra has the most GitHub stars among llm.ts alternatives, with 28,498 stars.
Which llm.ts alternative is the most actively maintained?
By recent activity, Mastra (4,044 commits in the last 90 days) is the most actively developed alternative.