Key Differences
Language & Type System
Python:- Dynamic typing (with optional type hints)
- Duck typing and runtime flexibility
- Python-specific features (decorators, context managers)
- Static typing with full TypeScript support
- Compile-time type checking
- Modern JavaScript/TypeScript patterns
Runtime Environment Support
LlamaIndex.TS is designed to work across multiple JavaScript runtimes:- Node.js >= 18.0.0
- Deno
- Bun
- Vercel Edge Runtime
- Cloudflare Workers
- Nitro
Browser support is currently limited due to the lack of AsyncLocalStorage-like APIs.
Package Structure
Python
TypeScript
- LlamaIndex.TS uses a modular package structure with provider-specific packages
- Install only what you need:
npm install llamaindex @llamaindex/openai - Core functionality in
llamaindex, providers in@llamaindex/*packages
API Mapping
Settings Configuration
Document Loading
Creating an Index
Query Engine
Chat Engine
Common Migration Patterns
Async/Await
All I/O operations in TypeScript are async:Streaming Responses
Custom Node Parsers
Vector Stores
Naming Conventions
Provider Packages
Unlike Python where providers are organized as namespaces, TypeScript uses separate npm packages:Not Yet Implemented
Some Python features are not yet available in TypeScript:- Some specialized readers and data connectors
- Certain advanced query engines
- Some evaluation metrics
- GraphRAG components
Getting Help
If you’re migrating from Python and need help:- Join our Discord community
- Check GitHub Discussions
- Review the examples