# Integrations

> Lists every Swiftide integration with the feature flag that enables it, the traits it implements, its main types, examples and guide.

Each Swiftide integration sits behind its own feature flag. The matrix below shows which flag to add, what the integration plugs into, and where its guide is. An integration is a model provider, storage backend, node cache, loader, transformer, agent tool, token estimator or observability layer that lives behind a feature flag of the `swiftide` crate.

## Feature flags

Name the feature flags of the integrations you use when you add `swiftide`:

```sh
cargo add swiftide@0.34 --features qdrant,fastembed
```

Feature flags are additive. Each one compiles its integration and the flags it depends on. Without its flag, an integration's module does not exist: `swiftide::integrations::qdrant` needs `qdrant`. Only `macros` is on by default.

Most integrations live under `swiftide::integrations`, which re-exports the `swiftide-integrations` crate with the same feature names. A few sit elsewhere. MCP (Model Context Protocol) tools are in `swiftide::agents::tools::mcp`, Langfuse is under `swiftide::langfuse`, and the tree-sitter transformers are also re-exported under `swiftide::indexing::transformers`.

Some flags turn on other flags:

- `groq`, `gemini`, `ollama`, `open-router` and `dashscope` each turn on `openai`. Their clients build on the OpenAI client.
- `mcp` and `langfuse` each turn on `swiftide-agents`, which turns on `swiftide-tasks`. You do not need to add `swiftide-agents` next to them.

Some flags compile native code or large SDKs (software development kits) and make builds slower:

- `fastembed` downloads ONNX (Open Neural Network Exchange) Runtime binaries at build time.
- `lancedb` compiles an embedded database. It also needs a `protoc` binary on your `PATH` at build time.
- `duckdb` links a DuckDB library that is already on your system. Point `DUCKDB_LIB_DIR` at it, make it findable through pkg-config, or set `DUCKDB_DOWNLOAD_LIB=1` to download it during the build.
- `kafka` builds librdkafka from source with CMake.
- `fluvio` compiles the Fluvio client.
- `aws-bedrock` compiles the AWS (Amazon Web Services) SDK.

Turn these on only in the crates that need them.

## The all feature

The `all` flag turns on ten common integrations, but not `anthropic`, `lancedb`, `mcp` or `swiftide-agents`. It also includes `fastembed` and `aws-bedrock`, so it builds slowly. [The all bundle](/reference/feature-flags/#the-all-bundle) lists exactly what it includes.

## TLS

The HTTP (Hypertext Transfer Protocol) clients use rustls for TLS (Transport Layer Security) and need no setup: each uses the rustls crypto provider your application installed, or else its own. The exception is Redis over `rediss://`, where Swiftide installs aws-lc-rs as the process-wide provider before connecting if none is installed, so install yours before the first Redis call to use another.

The `fastembed` model download goes through native TLS, which means OpenSSL on Linux.

## Matrix columns

Every flag, type and example in the matrix matches Swiftide 0.34.

- **Integration** names the provider or backend, with a short note.
- **Feature flag** is the flag to pass to `cargo add`.
- **Provides** says where the integration plugs in:
  - **LLM**: a large language model (LLM) client for prompts, chat completions and agents (`SimplePrompt`, `ChatCompletion`).
  - **Embeddings** and **Sparse embeddings**: an embedder for dense or sparse vectors (`EmbeddingModel`, `SparseEmbeddingModel`).
  - **Structured output**: typed responses through `StructuredPrompt`.
  - **Storage**: a backend that the indexing pipeline stores nodes in (`Persist`).
  - **Retrieval**: a retriever for the query pipeline (`Retrieve`). The storage guide for each backend lists the search strategies it supports.
  - **Node cache**: a node cache that skips nodes an indexing pipeline has already processed (`NodeCache`).
  - **Loader**: a loader that produces nodes (`Loader`).
  - **Transformers**: transformers and chunkers for the indexing pipeline.
  - **Reranking**: a response transformer that reorders retrieved documents (`TransformResponse`).
  - **Agent tooling**: tools for agents, or token estimation.
  - **Observability**: traces or metrics.
- **Main types** are the types you build. Each links to docs.rs for the pinned release.
- **Examples** link to example files in the Swiftide repository at the pinned commit.
- **Guide** is the page on this site that shows the integration in use.

| Integration                                                                                              | Feature flag  | Provides                                 | Main types                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Examples                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Guide                                                                          |
| -------------------------------------------------------------------------------------------------------- | ------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| OpenAI: Chat Completions and the Responses API; Azure OpenAI through `GenericOpenAI` with `AzureConfig`. | `openai`      | LLM, Embeddings, Structured output       | [`OpenAI`](https://docs.rs/swiftide/0.34/swiftide/integrations/openai/type.OpenAI.html), [`GenericOpenAI`](https://docs.rs/swiftide/0.34/swiftide/integrations/openai/struct.GenericOpenAI.html)                                                                                                                                                                                                                                                                   | [`responses_api.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/responses_api.rs), [`responses_api_reasoning.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/responses_api_reasoning.rs), [`structured_prompt.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/structured_prompt.rs), [`describe_image.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/describe_image.rs) | [integrations/openai](/integrations/openai/)                                   |
| Anthropic                                                                                                | `anthropic`   | LLM                                      | [`Anthropic`](https://docs.rs/swiftide/0.34/swiftide/integrations/anthropic/struct.Anthropic.html)                                                                                                                                                                                                                                                                                                                                                                 | [`streaming_agents.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/streaming_agents.rs)                                                                                                                                                                                                                                                                                                                                                                                                                                     | [integrations/anthropic](/integrations/anthropic/)                             |
| AWS Bedrock: Uses the Bedrock Converse API.                                                              | `aws-bedrock` | LLM, Structured output                   | [`AwsBedrock`](https://docs.rs/swiftide/0.34/swiftide/integrations/aws_bedrock_v2/struct.AwsBedrock.html)                                                                                                                                                                                                                                                                                                                                                          | [`aws_bedrock.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/aws_bedrock.rs), [`aws_bedrock_agent.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/aws_bedrock_agent.rs)                                                                                                                                                                                                                                                                                                   | [integrations/aws-bedrock](/integrations/aws-bedrock/)                         |
| Groq: OpenAI-compatible client preconfigured for Groq.                                                   | `groq`        | LLM, Structured output                   | [`Groq`](https://docs.rs/swiftide/0.34/swiftide/integrations/groq/type.Groq.html)                                                                                                                                                                                                                                                                                                                                                                                  | [`index_groq.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/index_groq.rs)                                                                                                                                                                                                                                                                                                                                                                                                                                                 | [integrations/openai-compatible](/integrations/openai-compatible/)             |
| Google Gemini: OpenAI-compatible client preconfigured for the Gemini API.                                | `gemini`      | LLM, Embeddings, Structured output       | [`Gemini`](https://docs.rs/swiftide/0.34/swiftide/integrations/gemini/type.Gemini.html)                                                                                                                                                                                                                                                                                                                                                                            | [`hello_agents.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/hello_agents.rs)                                                                                                                                                                                                                                                                                                                                                                                                                                             | [integrations/openai-compatible](/integrations/openai-compatible/)             |
| Ollama: OpenAI-compatible client preconfigured for a local Ollama server.                                | `ollama`      | LLM, Embeddings, Structured output       | [`Ollama`](https://docs.rs/swiftide/0.34/swiftide/integrations/ollama/type.Ollama.html)                                                                                                                                                                                                                                                                                                                                                                            | [`index_ollama.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/index_ollama.rs), [`index_md_into_pgvector.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/index_md_into_pgvector.rs)                                                                                                                                                                                                                                                                                       | [integrations/openai-compatible](/integrations/openai-compatible/)             |
| OpenRouter: OpenAI-compatible client preconfigured for OpenRouter.                                       | `open-router` | LLM, Structured output                   | [`OpenRouter`](https://docs.rs/swiftide/0.34/swiftide/integrations/open_router/type.OpenRouter.html)                                                                                                                                                                                                                                                                                                                                                               | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | [integrations/openai-compatible](/integrations/openai-compatible/)             |
| Dashscope: OpenAI-compatible client preconfigured for Alibaba Dashscope.                                 | `dashscope`   | LLM, Embeddings, Structured output       | [`Dashscope`](https://docs.rs/swiftide/0.34/swiftide/integrations/dashscope/type.Dashscope.html)                                                                                                                                                                                                                                                                                                                                                                   | [`dashscope.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/dashscope.rs)                                                                                                                                                                                                                                                                                                                                                                                                                                                   | [integrations/openai-compatible](/integrations/openai-compatible/)             |
| FastEmbed: Runs dense, sparse and reranking models locally with ONNX Runtime.                            | `fastembed`   | Embeddings, Sparse embeddings, Reranking | [`FastEmbed`](https://docs.rs/swiftide/0.34/swiftide/integrations/fastembed/struct.FastEmbed.html), [`Rerank`](https://docs.rs/swiftide/0.34/swiftide/integrations/fastembed/struct.Rerank.html)                                                                                                                                                                                                                                                                   | [`fastembed.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/fastembed.rs), [`hybrid_search.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/hybrid_search.rs), [`reranking.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/reranking.rs)                                                                                                                                                                                   | [integrations/fastembed](/integrations/fastembed/)                             |
| Qdrant: Similarity and hybrid (dense + sparse) search, named vectors, filters.                           | `qdrant`      | Storage, Retrieval                       | [`Qdrant`](https://docs.rs/swiftide/0.34/swiftide/integrations/qdrant/struct.Qdrant.html)                                                                                                                                                                                                                                                                                                                                                                          | [`index_codebase.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/index_codebase.rs), [`hybrid_search.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/hybrid_search.rs), [`store_multiple_vectors.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/store_multiple_vectors.rs)                                                                                                                                               | [integrations/qdrant](/integrations/qdrant/)                                   |
| PgVector                                                                                                 | `pgvector`    | Storage, Retrieval                       | [`PgVector`](https://docs.rs/swiftide/0.34/swiftide/integrations/pgvector/struct.PgVector.html)                                                                                                                                                                                                                                                                                                                                                                    | [`index_md_into_pgvector.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/index_md_into_pgvector.rs)                                                                                                                                                                                                                                                                                                                                                                                                                         | [integrations/pgvector](/integrations/pgvector/)                               |
| LanceDB: Embedded, no server required; also supports custom queries.                                     | `lancedb`     | Storage, Retrieval                       | [`LanceDB`](https://docs.rs/swiftide/0.34/swiftide/integrations/lancedb/struct.LanceDB.html)                                                                                                                                                                                                                                                                                                                                                                       | [`lancedb.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/lancedb.rs), [`dashscope.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/dashscope.rs)                                                                                                                                                                                                                                                                                                                           | [integrations/lancedb](/integrations/lancedb/)                                 |
| DuckDB: Embedded; similarity and hybrid search.                                                          | `duckdb`      | Storage, Retrieval, Node cache           | [`Duckdb`](https://docs.rs/swiftide/0.34/swiftide/integrations/duckdb/struct.Duckdb.html)                                                                                                                                                                                                                                                                                                                                                                          | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | [indexing/storage](/indexing/storage/)                                         |
| Redis: Also stores agent message history.                                                                | `redis`       | Storage, Node cache                      | [`Redis`](https://docs.rs/swiftide/0.34/swiftide/integrations/redis/struct.Redis.html)                                                                                                                                                                                                                                                                                                                                                                             | [`index_into_redis.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/index_into_redis.rs), [`index_codebase.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/index_codebase.rs)                                                                                                                                                                                                                                                                                               | [indexing/caching](/indexing/caching/)                                         |
| Redb: Embedded node cache, no server required.                                                           | `redb`        | Node cache                               | [`Redb`](https://docs.rs/swiftide/0.34/swiftide/integrations/redb/struct.Redb.html)                                                                                                                                                                                                                                                                                                                                                                                | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | [indexing/caching](/indexing/caching/)                                         |
| Kafka                                                                                                    | `kafka`       | Loader, Storage                          | [`Kafka`](https://docs.rs/swiftide/0.34/swiftide/integrations/kafka/struct.Kafka.html)                                                                                                                                                                                                                                                                                                                                                                             | [`kafka.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/kafka.rs)                                                                                                                                                                                                                                                                                                                                                                                                                                                           | [indexing/loading](/indexing/loading/)                                         |
| Fluvio                                                                                                   | `fluvio`      | Loader                                   | [`Fluvio`](https://docs.rs/swiftide/0.34/swiftide/integrations/fluvio/struct.Fluvio.html)                                                                                                                                                                                                                                                                                                                                                                          | [`fluvio.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/fluvio.rs)                                                                                                                                                                                                                                                                                                                                                                                                                                                         | [indexing/loading](/indexing/loading/)                                         |
| Parquet                                                                                                  | `parquet`     | Loader                                   | [`Parquet`](https://docs.rs/swiftide/0.34/swiftide/integrations/parquet/struct.Parquet.html)                                                                                                                                                                                                                                                                                                                                                                       | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | [indexing/loading](/indexing/loading/)                                         |
| Scraping (spider)                                                                                        | `scraping`    | Loader, Transformers                     | [`ScrapingLoader`](https://docs.rs/swiftide/0.34/swiftide/integrations/scraping/struct.ScrapingLoader.html), [`HtmlToMarkdownTransformer`](https://docs.rs/swiftide/0.34/swiftide/integrations/scraping/struct.HtmlToMarkdownTransformer.html)                                                                                                                                                                                                                     | [`scraping_index_to_markdown.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/scraping_index_to_markdown.rs)                                                                                                                                                                                                                                                                                                                                                                                                                 | [indexing/loading](/indexing/loading/)                                         |
| Tree-sitter: Code-aware chunking, outlines and metadata; Perl behind `tree-sitter-perl`.                 | `tree-sitter` | Transformers                             | [`ChunkCode`](https://docs.rs/swiftide/0.34/swiftide/indexing/transformers/struct.ChunkCode.html), [`MetadataQACode`](https://docs.rs/swiftide/0.34/swiftide/indexing/transformers/struct.MetadataQACode.html), [`OutlineCodeTreeSitter`](https://docs.rs/swiftide/0.34/swiftide/indexing/transformers/struct.OutlineCodeTreeSitter.html), [`MetadataRefsDefsCode`](https://docs.rs/swiftide/0.34/swiftide/indexing/transformers/struct.MetadataRefsDefsCode.html) | [`index_codebase.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/index_codebase.rs), [`index_codebase_reduced_context.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/index_codebase_reduced_context.rs)                                                                                                                                                                                                                                                                   | [integrations/tree-sitter](/integrations/tree-sitter/)                         |
| MCP: Exposes the tools of any MCP server (via rmcp) to an agent.                                         | `mcp`         | Agent tooling                            | [`McpToolbox`](https://docs.rs/swiftide/0.34/swiftide/agents/tools/mcp/struct.McpToolbox.html)                                                                                                                                                                                                                                                                                                                                                                     | [`agents_mcp_tools.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/agents_mcp_tools.rs)                                                                                                                                                                                                                                                                                                                                                                                                                                     | [agents/mcp](/agents/mcp/)                                                     |
| tiktoken: Token estimation with OpenAI tokenizers.                                                       | `tiktoken`    | Agent tooling                            | [`TikToken`](https://docs.rs/swiftide/0.34/swiftide/integrations/tiktoken/struct.TikToken.html)                                                                                                                                                                                                                                                                                                                                                                    | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | [models/errors-backoff-and-usage](/models/errors-backoff-and-usage/)           |
| Langfuse: A tracing layer that sends agent and pipeline spans to Langfuse.                               | `langfuse`    | Observability                            | [`LangfuseLayer`](https://docs.rs/swiftide/0.34/swiftide/langfuse/struct.LangfuseLayer.html)                                                                                                                                                                                                                                                                                                                                                                       | [`langfuse.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/langfuse.rs)                                                                                                                                                                                                                                                                                                                                                                                                                                                     | [observability/langfuse](/observability/langfuse/)                             |
| Metrics: Emits usage and pipeline metrics through the `metrics` crate facade.                            | `metrics`     | Observability                            | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | [`usage_metrics.rs`](https://github.com/bosun-ai/swiftide/blob/e377c4a2e76fe2559629ae0efdae3c6e0fb4d829/examples/usage_metrics.rs)                                                                                                                                                                                                                                                                                                                                                                                                                                           | [observability/metrics-and-statistics](/observability/metrics-and-statistics/) |

## Guides

This section has a page for each of these integrations:

- [OpenAI and Azure](/integrations/openai/): Chat Completions, the Responses API (application programming interface), and Azure OpenAI.
- [OpenAI-compatible providers](/integrations/openai-compatible/): Groq, Gemini, Ollama, OpenRouter, Dashscope and any OpenAI-compatible gateway.
- [Anthropic](/integrations/anthropic/): prompts, chat completions, streaming and agents with Claude.
- [AWS Bedrock](/integrations/aws-bedrock/): Bedrock models through the Converse API.
- [FastEmbed](/integrations/fastembed/): dense and sparse embeddings and reranking on your CPU (central processing unit).
- [Qdrant](/integrations/qdrant/): storage with similarity and hybrid search.
- [PgVector](/integrations/pgvector/): storage in Postgres with the pgvector extension.
- [LanceDB](/integrations/lancedb/): an embedded vector store in a local directory.
- [Tree-sitter](/integrations/tree-sitter/): chunking, outlines and metadata for source code.

The other integrations are covered on the page for the feature they serve. The Guide column in the matrix links to each one: DuckDB, Redis and Redb with storage and caching, Kafka, Fluvio, Parquet and scraping with loading, MCP with agents, tiktoken with model usage, and Langfuse and metrics with observability.

## Reference

- [`swiftide::integrations`](https://docs.rs/swiftide/0.34/swiftide/integrations/index.html)
- [`swiftide` crate root, Cargo Features section](https://docs.rs/swiftide/0.34/swiftide/index.html#cargo-features)
- [`SimplePrompt`](https://docs.rs/swiftide/0.34/swiftide/traits/trait.SimplePrompt.html), [`ChatCompletion`](https://docs.rs/swiftide/0.34/swiftide/traits/trait.ChatCompletion.html) and [`StructuredPrompt`](https://docs.rs/swiftide/0.34/swiftide/traits/trait.StructuredPrompt.html)
- [`EmbeddingModel`](https://docs.rs/swiftide/0.34/swiftide/traits/trait.EmbeddingModel.html) and [`SparseEmbeddingModel`](https://docs.rs/swiftide/0.34/swiftide/traits/trait.SparseEmbeddingModel.html)
- [`Persist`](https://docs.rs/swiftide/0.34/swiftide/traits/trait.Persist.html), [`Retrieve`](https://docs.rs/swiftide/0.34/swiftide/traits/trait.Retrieve.html) and [`NodeCache`](https://docs.rs/swiftide/0.34/swiftide/traits/trait.NodeCache.html)
- [`Loader`](https://docs.rs/swiftide/0.34/swiftide/traits/trait.Loader.html) and [`TransformResponse`](https://docs.rs/swiftide/0.34/swiftide/traits/trait.TransformResponse.html)
- [`swiftide::agents::tools::mcp`](https://docs.rs/swiftide/0.34/swiftide/agents/tools/mcp/index.html)
- [`swiftide::langfuse`](https://docs.rs/swiftide/0.34/swiftide/langfuse/index.html)
- [`swiftide::indexing::transformers`](https://docs.rs/swiftide/0.34/swiftide/indexing/transformers/index.html)
- [Feature flags](/reference/feature-flags/)
- [Crates](/reference/crates/)

## Next

[OpenAI and Azure](/integrations/openai/)