LlamaIndex.TS is built as a modular TypeScript framework organized as a pnpm monorepo. This architecture enables runtime-agnostic functionality, provider flexibility, and optimal bundle sizes.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/run-llama/LlamaIndexTS/llms.txt
Use this file to discover all available pages before exploring further.
Monorepo Structure
The framework is organized into three main package categories:Core Packages
Abstract base classes and runtime-agnostic functionality
Main Package
Aggregates core functionality with concrete implementations
Provider Packages
Specific integrations for LLMs, embeddings, and vector stores
Core Packages
@llamaindex/core package exports functionality as modular sub-modules for optimal tree-shaking:
Each sub-module can be imported independently, reducing bundle size by only including what you use.
Main Package
Thellamaindex package is the primary entry point that:
- Re-exports core abstractions from
@llamaindex/core - Provides concrete implementations (indices, engines, pipelines)
- Supports multiple runtime entry points
- Aggregates common functionality for convenience
package.json exports
Provider Packages
Providers are separate packages underpackages/providers/ for modularity:
LLM Providers
LLM Providers
@llamaindex/openai- OpenAI GPT models@llamaindex/anthropic- Anthropic Claude@llamaindex/ollama- Local Ollama models@llamaindex/google- Google Gemini@llamaindex/groq- Groq inference@llamaindex/mistral- Mistral AI- And many more…
Vector Store Providers
Vector Store Providers
@llamaindex/pinecone- Pinecone vector database@llamaindex/qdrant- Qdrant vector store@llamaindex/chroma- ChromaDB@llamaindex/weaviate- Weaviate@llamaindex/postgres- PostgreSQL with pgvector
Reader Providers
Reader Providers
@llamaindex/notion- Notion workspace reader@llamaindex/discord- Discord message reader@llamaindex/assemblyai- Audio transcription
Abstract Base Classes and Provider Pattern
LlamaIndex.TS uses abstract base classes to define interfaces that providers implement:LLM Provider Pattern
From @llamaindex/core/llms
Provider implementation
Embedding Provider Pattern
From @llamaindex/core/embeddings
Vector Store Provider Pattern
From @llamaindex/core/vector-store
This pattern allows you to swap providers without changing application code - just change the Settings configuration.
How Packages Work Together
Example: Full Stack
Real-world usage
Package Dependencies
The dependency flow ensures runtime compatibility:Package dependency example
Modular Design Benefits
Tree-Shaking
Only bundle what you import - sub-module exports enable optimal bundle sizes
Provider Flexibility
Swap LLMs, embeddings, or vector stores with minimal code changes
Runtime Agnostic
Core abstractions work across Node.js, Deno, Bun, and edge runtimes
Independent Releases
Provider packages can be updated independently from core
Build System
All packages use bunchee for building with dual CJS/ESM support:Build output structure
Next Steps
Multi-Runtime Support
Learn how LlamaIndex.TS works across different JavaScript runtimes
Settings Configuration
Configure global LLM, embeddings, and other settings