Trieve
All-in-one self-hostable platform for hybrid search, RAG, recommendations, and analytics built on Rust and Qdrant.
Trieve is an open-source, API-first platform that unifies semantic search, recommendation engines, retrieval-augmented generation (RAG), and search analytics into a single deployable system. Built for developers and AI teams who are tired of stitching together a vector database, an embedding service, a reranking model, and a RAG framework separately, Trieve ships all of it as one cohesive stack with no mandatory cloud dependency.
The backend is written in Rust using Actix-web and Diesel, with Qdrant handling vector storage and PostgreSQL managing metadata and structured data. Hybrid search combines dense semantic vectors (via OpenAI or Jina embeddings), sparse neural vectors (via SPLADE), and BM25 keyword matching, with optional BAAI/bge-reranker-large cross-encoder reranking for maximum precision. Search results can be further tuned with SemanticBoost — an algebraic vector manipulation technique that shifts a chunk’s embedding toward a concept at index time.
The ecosystem extends well beyond search: a TypeScript SDK, Python client, MCP server for AI agents, Docusaurus and VitePress plugins, a Shopify extension, and an n8n node integration mean Trieve plugs into existing development workflows rather than demanding a dedicated integration effort. Built-in analytics via ClickHouse track queries, click-through rates, and RAG responses, closing the feedback loop between user behavior and search quality.
Deployment targets include Docker Compose for local development, Helm charts for Kubernetes, and documented paths for AWS and GCP. PDF-to-markdown conversion, web crawling via Firecrawl, and a hallucination detection module round out a platform that covers the full AI retrieval stack without requiring a managed cloud subscription.
What You Get
- Hybrid search with three retrieval modes - Simultaneously queries dense semantic vectors (OpenAI or Jina), SPLADE sparse neural vectors, and BM25 keyword matching, then fuses results with configurable weights for maximum recall and precision.
- Cross-encoder reranking - Pipes hybrid search results through BAAI/bge-reranker-large or a custom cross-encoder to reorder candidates by deep semantic relevance before returning them to the client.
- SemanticBoost and FullTextBoost - Algebraically shifts a chunk’s embedding vector toward a concept phrase at index time, or multiplicatively inflates SPLADE token weights, enabling fine-grained merchandising without manual data manipulation.
- RAG API with topic memory - Built-in retrieval-augmented generation endpoints connect to any OpenRouter-compatible LLM, supporting both fully managed topic-based conversation threads and custom context selection.
- Recommendation engine - Returns semantically similar chunks or file-level groups based on positive and negative examples, suitable for bookmark-based feeds, related-content widgets, and product discovery.
- Search analytics via ClickHouse - Tracks every query, click-through, recommendation, and RAG response with per-query IDs that can be enriched with custom conversion events from the client, feeding a built-in analytics dashboard.
- Web crawling and Shopify scraping - Firecrawl-backed crawler auto-indexes websites or Shopify product catalogs into searchable datasets, with configurable chunking by HTML heading hierarchy.
- PDF-to-markdown pipeline - Standalone pdf2md service converts PDFs to structured markdown using GPT-4o-mini or Gemini Flash via a vision model pipeline written in Rust, feeding clean text into search indexes.
- MCP server for AI agents - First-party Model Context Protocol server allows Claude, Cursor, and other MCP-compatible agents to search, ingest, and query Trieve datasets directly as tools.
- Hallucination detection module - Optional Rust crate that runs NER-based factual consistency scoring on RAG-generated responses, flagging claims not grounded in retrieved context.
Common Use Cases
- Documentation site search - A developer tools company deploys Trieve’s Docusaurus or VitePress plugin to replace basic keyword search with hybrid semantic search over their docs, reducing support ticket volume from users unable to find answers.
- E-commerce product discovery - An online retailer uses Trieve’s Shopify extension to crawl their catalog, then serves hybrid search with SemanticBoost on category terms and tracks add-to-cart events through the analytics API to tune relevance automatically.
- Customer support RAG chatbot - A SaaS company indexes its knowledge base into Trieve, configures RAG with topic-based memory, and connects it to Claude via the MCP server so support agents get AI-suggested answers grounded in official documentation.
- AI agent memory and retrieval - A team building autonomous agents uses Trieve’s MCP server to give their agents a persistent, searchable memory store — ingesting observations as chunks and retrieving relevant context before each LLM call.
- Research paper search engine - A university lab indexes thousands of PDFs through pdf2md and Trieve’s ingestion API, exposing a hybrid search interface with cross-encoder reranking so researchers find the most semantically relevant papers, not just keyword matches.
- Internal enterprise knowledge base - An enterprise IT team self-hosts Trieve in their VPC, connecting it to their document management system and using the recommendation API to surface related articles as users browse, without sending data to a third-party cloud.
Under The Hood
Architecture Trieve follows a layered handler-operator pattern within an Actix-web HTTP server where handlers remain thin request/response adapters and operators encapsulate all domain logic — search, chunking, crawling, recommendations, analytics, and model inference each isolated in dedicated modules. Alongside the main API server, a set of purpose-built async worker binaries handle ingestion, file processing, web crawling, group updates, and dataset deletion via a Broccoli/Redis-based task queue, decoupling throughput-sensitive operations from the request path. Dependency injection flows through Actix’s app_data mechanism and environment-variable configuration, keeping the application stateless and horizontally scalable. The system deploys as a set of Docker services with clearly bounded responsibilities: API server, Qdrant, PostgreSQL, Redis, ClickHouse, Keycloak, embedding servers, and worker processes, each independently versioned and replaceable.
Tech Stack The backend is Rust on Actix-web 4 with Diesel and diesel-async for typed PostgreSQL access via async connection pooling. Qdrant 1.12 handles vector storage through the official Rust client with support for dense, sparse, and hybrid vector collections across configurable distance metrics. Redis manages session state, response caching via a custom actix middleware, and job queue persistence through the Broccoli queue abstraction. ClickHouse stores all analytics events — queries, clicks, RAG calls — enabling aggregation queries for the analytics dashboard. Keycloak handles OIDC authentication with actix-identity and actix-session. Embedding models run as separate Docker services supporting SPLADE (naver/efficient-splade-VI-BT-large-query), BGE cross-encoders, Jina, and any OpenAI-compatible endpoint. The frontend monorepo uses SolidJS, TypeScript, and Tailwind CSS built with Turbo, covering a search playground, chat interface, analytics dashboard, and public demo pages.
Code Quality The Rust server maintains a well-typed custom error hierarchy through a ServiceError enum with proper HTTP status mapping via Actix’s ResponseError trait, ensuring consistent error responses across all endpoints. Distributed tracing is comprehensively applied with hundreds of #[tracing::instrument] decorations across handlers and operators, enabling full request-path observability. Testing exists primarily at the SDK layer using Vitest with type-level assertions that validate API response shapes — behavioral coverage in the TypeScript SDK is present but relies on live API calls without mock isolation. The Rust backend has limited unit test coverage, with meaningful tests only in the parse operator. Clippy and cargo fmt are enforced in CI based on release commit patterns, though no strict deny directives appear in the codebase. The overall quality reflects an ambitious production system that prioritizes feature velocity alongside reasonable structural discipline.
What Makes It Unique Trieve’s most distinctive technical contribution is the combination of three retrieval modes — dense semantic vectors, SPLADE sparse neural vectors, and BM25 — in a single hybrid search query with configurable fusion weights and cross-encoder reranking, all self-hostable without a cloud vendor. SemanticBoost, which algebraically shifts a chunk’s stored embedding vector toward a concept phrase at index time, is not commonly found in open-source search platforms and enables merchandising-style relevance tuning without reindexing. The optional hallucination detection module uses NER-based factual consistency scoring to flag RAG responses not grounded in retrieved context — a rare first-class capability in self-hosted RAG stacks. The MCP server integration makes Trieve datasets natively accessible to AI agents running in Claude, Cursor, and compatible environments, positioning it as a retrievable memory layer for agentic workflows rather than just a search API.
Self-Hosting
Trieve is released under the MIT License, which is one of the most permissive open-source licenses available. You can use it commercially, modify the source, redistribute it, and build proprietary products on top of it without any copyleft obligations. There is no open-core model, no enterprise license tier required for self-hosted deployments, and no feature gating between the community version and the cloud offering — the same MIT-licensed code runs at trieve.ai and in your infrastructure.
Running Trieve yourself is a real operational commitment. The full stack spans at least eight services: the Actix-web API server, PostgreSQL, Qdrant, Redis, ClickHouse, Keycloak, one or more embedding model servers (CPU or GPU), and optional workers for ingestion, file processing, crawling, and group updates. GPU-accelerated embedding servers require appropriate hardware or cloud instances to achieve production-grade throughput. You are responsible for backup strategies across PostgreSQL (structured metadata), Qdrant (vector collections), Redis (queue state), and ClickHouse (analytics). Kubernetes deployment with the provided Helm chart is the recommended production path; Docker Compose is supported for development and small deployments. The project provides detailed self-hosting guides for AWS, GCP, Kubernetes, and Docker Compose, but ongoing upgrades, schema migrations (managed by Diesel), and ClickHouse migration scripts are your responsibility.
The cloud-hosted Trieve at trieve.ai offers a managed experience with a free tier (1,000 chunks), Stripe-based billing, and direct support from the maintainers via Discord and Matrix. Compared to self-hosting, the cloud version removes the need to manage infrastructure, handle zero-downtime upgrades, or maintain the Keycloak OIDC configuration. The team explicitly offers professional services and is available for direct support calls, which is unusually accessible for an early-stage open-source project. Self-hosters trading away managed convenience gain complete data sovereignty, no per-query pricing surprises, and the ability to deploy embedding and reranking models on their own GPU hardware.
Related Apps
Ollama
AI Development · Developer Tools
Run Llama, Gemma, DeepSeek, and other open LLMs on your own machine with one command and an OpenAI-compatible API.
Ollama
MITLangflow
AI Agents · AI Development
Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.
Langflow
MITDify
No Code Platforms · AI Development · Developer Tools
Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.