Skip to main content

Overview

The llamaindex package is the primary entry point for LlamaIndex.TS. It aggregates and re-exports functionality from @llamaindex/core and other packages, providing a unified API for building LLM applications.

Installation

Package Structure

The package provides multiple runtime-specific entry points:
  • Node.js: Default import with file system support
  • Edge Runtime: Vercel Edge, Cloudflare Workers
  • React Server Components: Next.js App Router
  • Cloudflare Workers: Workerd-specific optimizations

Sub-module Exports

The package uses tree-shakeable sub-module exports:

Core Modules

Indices

Engines

Storage

Node Parsing

Ingestion

Global Settings

Quick Start Example

Runtime Compatibility

Node.js

Edge Runtime

Cloudflare Workers

Environment Variables

Common environment variables:

TypeScript Support

Full TypeScript support with type inference:

Next.js Integration

Deprecated Features

The following features are deprecated:
  • Agents (llamaindex/agent): Use @llamaindex/workflow instead
  • ReACTAgent: Migrate to workflow-based agents

See Also