Installation
Get started with the DeepAgents retrieval package for RAG and semantic search.Package Installation
Install the core package:Dependencies
The package includes these key dependencies:- fastembed - Local embedding generation
- sqlite-vec - Vector similarity search in SQLite
- langchain - Text splitting utilities
- unpdf - PDF text extraction
- rss-parser - RSS feed parsing
- @linear/sdk - Linear API client
Database Setup
The retrieval system requires a SQLite database. You can use either:Better SQLite3 (Recommended)
In-Memory Database
For development or testing:Embedding Model Setup
FastEmbed downloads models automatically on first use. Models are cached locally.Available Models
- BGESmallENV15 (384 dimensions) - Fast, good quality
- BGEBaseENV15 (768 dimensions) - Higher quality, slower
- AllMiniLML6V2 (384 dimensions) - Alternative lightweight model
- MLE5Large (1024 dimensions) - Best quality, largest
Basic Setup Example
Complete setup with all components:TypeScript Configuration
Ensure yourtsconfig.json includes:
Connector Imports
Connectors are available from a separate export path:Verify Installation
Test your setup with a quick example:Troubleshooting
Model Download Issues
If FastEmbed fails to download models:SQLite Version
Ensure you’re using a recent version of better-sqlite3 that supports the sqlite-vec extension.Memory Usage
For large ingestion jobs, use batching:Next Steps
Ingestion
Learn how to ingest documents
Connectors
Explore available connectors