DataStax
If you installed lfx directly (not as part of langflow), install the DataStax bundle separately:
- Run
uv pip install lfx-datastax. - Restart Langflow.
- To confirm the bundle loaded, run
lfx extension list.
If you installed Langflow with uv pip install langflow, these bundle components are already included.
For more information, see Install LFX with bundle components.
Bundles contain custom components that support specific third-party integrations with Langflow.
This page describes the components that are available in the DataStax bundle, including components that read and write to Astra DB databases.
Astra DB
It is recommended that you create any databases, keyspaces, and collections you need before configuring the Astra DB component.
You can create new databases and collections through this component, but this is only possible in the Langflow visual editor (not at runtime), and you must wait while the database or collection initializes before proceeding with flow configuration. Additionally, not all database and collection configuration options are available through the Astra DB component, such as hybrid search options, PCU groups, vectorize integration management, and multi-region deployments.
The Astra DB component reads and writes to Astra DB Serverless databases, using an instance of AstraDBVectorStore to call the Data API and DevOps API.
About vector store instances
Because Langflow is based on LangChain, vector store components use an instance of LangChain vector store to drive the underlying read and write functions. These instances are provider-specific and configured according to the component's parameters, such as the connection string, index name, and schema.
In component code, this is often instantiated as vector_store, but some vector store components use a different name, such as the provider name.
Some LangChain classes don't expose all possible options as component parameters. Depending on the provider, these options might use default values or allow modification through environment variables, if they are supported in Langflow. For information about specific options, see the LangChain API reference and vector store provider's documentation.
Astra DB parameters
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
Some parameters are hidden by default in the visual editor. You can modify all component parameters through the component inspection panel that appears when you select a component.
Some parameters are conditional, and they are only available after you set other parameters or select specific options for other parameters. Conditional parameters may not be visible on the Controls pane until you set the required dependencies.
For information about accepted values and functionality, see the Astra DB Serverless documentation or inspect component code.
| Name | Display Name | Info |
|---|---|---|
| token | Astra DB Application Token | Input parameter. An Astra application token with permission to access your vector database. Once the connection is verified, additional fields are populated with your existing databases and collections. If you want to create a database through this component, the application token must have Organization Administrator permissions. |
| environment | Environment | Input parameter. The environment for the Astra DB API endpoint. Typically always prod. |
| database_name | Database | Input parameter. The name of the database that you want this component to connect to. Or, you can select New Database to create a new database, and then wait for the database to initialize before setting the remaining parameters. |
| endpoint | Astra DB API Endpoint | Input parameter. For multi-region databases, select the API endpoint for your nearest datacenter. To get the list of regions for a multi-region database, see List database regions. This field is automatically populated when you select a database, and it defaults to the primary region's endpoint. |
| keyspace | Keyspace | Input parameter. The keyspace in your database that contains the collection specified in collection_name. Default: default_keyspace. |
| collection_name | Collection | Input parameter. The name of the collection that you want to use with this flow. Or, select New Collection to create a new collection with limited configuration options. To ensure your collection is configured with the correct embedding provider and search capabilities, it is recommended to create the collection in the Astra Portal or with the Data API before configuring this component. For more information, see Manage collections in Astra DB Serverless. |
| embedding_model | Embedding Model | Input parameter. Attach an embedding model component to generate embeddings. Only available if the specified collection doesn't have a vectorize integration. If a vectorize integration exists, the component automatically uses the collection's integrated model. |
| ingest_data | Ingest Data | Input parameter. The documents to load into the specified collection. Accepts JSON or Table input. |
| search_query | Search Query | Input parameter. The query string for vector search. |
| cache_vector_store | Cache Vector Store | Input parameter. Whether to cache the vector store in Langflow memory for faster reads. Default: Enabled (true). |
| search_method | Search Method | Input parameter. The search methods to use, either Hybrid Search or Vector Search. Your collection must be configured to support the chosen option, and the default depends on what your collection supports. All vector-enabled collections in Astra DB Serverless (vector) databases support vector search, but hybrid search requires that you set specific collection settings when creating the collection. These options are only available when creating a collection programmatically. For more information, see Ways to find data in Astra DB Serverless and Create a collection that supports hybrid search. |
| reranker | Reranker | Input parameter. The re-ranker model to use for hybrid search, depending on the collection configuration. This parameter is only available for collections that support hybrid search. To determine if a collection supports hybrid search, get collection metadata, and then check that lexical and rerank both have "enabled": true. |
| lexical_terms | Lexical Terms | Input parameter. A space-separated string of keywords for hybrid search, like features, data, attributes, characteristics. This parameter is only available if the collection supports hybrid search. For more information, see the Hybrid search example. |
| number_of_results | Number of Search Results | Input parameter. The number of search results to return. Default: 4. |
| search_type | Search Type | Input parameter. The search type to use, either Similarity (default), Similarity with score threshold, and MMR (Max Marginal Relevance). |
| search_score_threshold | Search Score Threshold | Input parameter. The minimum similarity score threshold for vector search results with the Similarity with score threshold search type. Default: 0. |
| advanced_search_filter | Search Metadata Filter | Input parameter. An optional dictionary of metadata filters to apply in addition to vector or hybrid search. |
| autodetect_collection | Autodetect Collection | Input parameter. Whether to automatically fetch a list of available collections after providing an application token and API endpoint. |
| content_field | Content Field | Input parameter. For writes, this parameter specifies the name of the field in the documents that contains text strings for which you want to generate embeddings. |
| deletion_field | Deletion Based On Field | Input parameter. When provided, documents in the target collection with metadata field values matching the input metadata field value are deleted before new records are loaded. Use this setting for writes with upserts (overwrites). |
| ignore_invalid_documents | Ignore Invalid Documents | Input parameter. Whether to ignore invalid documents during writes. If disabled (false), then an error is raised for invalid documents. Default: Enabled (true). |
| astradb_vectorstore_kwargs | AstraDBVectorStore Parameters | Input parameter. An optional dictionary of additional parameters for the AstraDBVectorStore instance. |
Astra DB examples
Example: Vector RAG
For a tutorial that uses vector data in a flow, see Create a vector RAG chatbot.
The following example demonstrates how to use vector store components in flows alongside related components like embedding model and language model components. These steps walk through important configuration details, functionality, and best practices for using these components effectively. This is only one example; it isn't a prescriptive guide to all possible use cases or configurations.
-
Create a flow with the Vector Store RAG template.
This template has two subflows. The Load Data subflow loads embeddings and content into a vector database, and the Retriever subflow runs a vector search to retrieve relevant context based on a user's query.
-
Configure the database connection for both Astra DB components, or replace them with another pair of vector store components of your choice. Make sure the components connect to the same vector store, and that the component in the Retriever subflow is able to run a similarity search.
The parameters you set in each vector store component depend on the component's role in your flow. In this example, the Load Data subflow writes to the vector store, whereas the Retriever subflow reads from the vector store. Therefore, search-related parameters are only relevant to the Vector Search component in the Retriever subflow.
For information about specific parameters, see the documentation for your chosen vector store component.
-
To configure the embedding model, do one of the following:
-
Use an OpenAI model: In both OpenAI Embeddings components, enter your OpenAI API key. You can use the default model or select a different OpenAI embedding model.
-
Use another provider: Replace the OpenAI Embeddings components with another pair of embedding model components of your choice, and then configure the parameters and credentials accordingly.
-
Use Astra DB vectorize: If you are using an Astra DB vector store that has a vectorize integration, you can remove both OpenAI Embeddings components. If you do this, the vectorize integration automatically generates embeddings from the Ingest Data (in the Load Data subflow) and Search Query (in the Retriever subflow).
tipIf your vector store already contains embeddings, make sure your embedding model components use the same model as your previous embeddings. Mixing embedding models in the same vector store can produce inaccurate search results.
-
-
Recommended: In the Split Text component, optimize the chunking settings for your embedding model. For example, if your embedding model has a token limit of 512, then the Chunk Size parameter must not exceed that limit.
Additionally, because the Retriever subflow passes the chat input directly to the vector store component for vector search, make sure that your chat input string doesn't exceed your embedding model's limits. For this example, you can enter a query that is within the limits; however, in a production environment, you might need to implement additional checks or preprocessing steps to ensure compliance. For example, use additional components to prepare the chat input before running the vector search, or enforce chat input limits in your application code.
-
In the Language Model component, enter your OpenAI API key, or select a different provider and model to use for the chat portion of the flow.
-
Run the Load Data subflow to populate your vector store. In the Read File component, select one or more files, and then click Run component on the vector store component in the Load Data subflow.
The Load Data subflow loads files from your local machine, chunks them, generates embeddings for the chunks, and then stores the chunks and their embeddings in the vector database.

The Load Data subflow is separate from the Retriever subflow because you probably won't run it every time you use the chat. You can run the Load Data subflow as needed to preload or update the data in your vector store. Then, your chat interactions only use the components that are necessary for chat.
If your vector store already contains data that you want to use for vector search, then you don't need to run the Load Data subflow.
-
Open the Playground and start chatting to run the Retriever subflow.
The Retriever subflow generates an embedding from chat input, runs a vector search to retrieve similar content from your vector store, parses the search results into supplemental context for the LLM, and then uses the LLM to generate a natural language response to your query. The LLM uses the vector search results along with its internal training data and tools, such as basic web search and datetime information, to produce the response.

To avoid passing the entire block of raw search results to the LLM, the Parser component extracts
textstrings from the search resultsJSONobject, and then passes them to the Prompt Template component inMessageformat. From there, the strings and other template content are compiled into natural language instructions for the LLM.You can use other components for this transformation, such as the JSON Operations component, depending on how you want to use the search results.
To view the raw search results, click Inspect output on the vector store component after running the Retriever subflow.
Example: Hybrid search
The Astra DB component supports the Data API's hybrid search feature. Hybrid search performs a vector similarity search and a lexical search, compares the results of both searches, and then returns the most relevant results overall.
To use hybrid search through the Astra DB component, do the following:
-
Use the Data API to create a collection that supports hybrid search if you don't already have one.
Although you can create a collection through the Astra DB component, you have more control and insight into the collection settings when using the Data API for this operation.
-
Create a flow based on the Hybrid Search RAG template, which includes an Astra DB component that is pre-configured for hybrid search.
After loading the template, check for Upgrade available alerts on the components. If any components have an upgrade pending, upgrade and reconnect them before continuing.
-
In the Language Model components, add your OpenAI API key. If you want to use a different provider or model, see Language model components.
-
Delete the Language Model component that is connected to the Structured Output component's Input Message port, and then connect the Chat Input component to that port.
-
Configure the Astra DB vector store component:
- Enter your Astra DB application token.
- In the Database field, select your database.
- In the Collection field, select your collection with hybrid search enabled.
Once you select a collection that supports hybrid search, the other parameters automatically update to allow hybrid search options.
-
Connect the first Parser component's Parsed Text output to the Astra DB component's Lexical Terms input. This input only appears after connecting a collection that support hybrid search with reranking.
-
Update the Structured Output template:
-
Click the Structured Output component to expose the component inspection panel.
-
Find the Format Instructions row, click Expand, and then replace the prompt with the following text:
You are a database query planner that takes a user's requests, and then converts to a search against the subject matter in question.You should convert the query into:1. A list of keywords to use against a Lucene text analyzer index, no more than 4. Strictly unigrams.2. A question to use as the basis for a QA embedding engine.Avoid common keywords associated with the user's subject matter. -
Click Finish Editing, and then click Close to save your changes to the component.
-
-
Open the Playground, and then enter a natural language question that you would ask about your database.
In this example, your input is sent to both the Astra DB and Structured Output components:
-
The input sent directly to the Astra DB component's Search Query port is used as a string for similarity search. An embedding is generated from the query string using the collection's Astra DB vectorize integration.
-
The input sent to the Structured Output component is processed by the Structured Output, Language Model, and Parser components to extract space-separated
keywordsused for the lexical search portion of the hybrid search.
The complete hybrid search query is executed against your database using the Data API's
find_and_rerankcommand. The API's response is output as aTablethat is transformed into a text stringMessageby another Parser component. Finally, the Chat Output component prints theMessageresponse to the Playground. -
-
Optional: Exit the Playground, and then click Inspect Output on each individual component to understand how lexical keywords were constructed and view the raw response from the Data API. This is helpful for debugging flows where a certain component isn't receiving input as expected from another component.
-
Structured Output component: The output is the
JSONobject produced by applying the output schema to the LLM's response to the input message and format instructions. The following example is based on the aforementioned instructions for keyword extraction:1. Keywords: features, data, attributes, characteristics2. Question: What characteristics can be identified in my data? -
Parser component: The output is the string of keywords extracted from the structured output
JSON, and then used as lexical terms for the hybrid search. -
Astra DB component: The output is the
Tablecontaining the results of the hybrid search as returned by the Data API.
-
Astra DB output
If you use a vector store component to query your vector database, it produces search results that you can pass to downstream components in your flow as a list of JSON objects or a tabular Table.
If both types are supported, you can set the format near the vector store component's output port in the visual editor.
Vector Store Connection port
The Astra DB component has an additional Vector Store Connection output.
This output can only connect to a VectorStore input port, and it was intended for use with dedicated Graph RAG components.
The only non-legacy component that supports this input is the Graph RAG component, which can be a Graph RAG extension to the Astra DB component. Instead, use the Astra DB Graph component that includes both the vector store connection and Graph RAG functionality.
Astra DB CQL
The Astra DB CQL component allows agents to query data from CQL tables in Astra DB.
The output is a list of JSON objects containing the query results from the Astra DB CQL table. Each Data object contains the document fields specified by the projection fields. Limited by the number_of_results parameter.
Astra DB CQL parameters
Some parameters are hidden by default in the visual editor. You can modify all component parameters through the component inspection panel that appears when you select a component.
| Name | Type | Description |
|---|---|---|
| Tool Name | String | Input parameter. The name used to reference the tool in the agent's prompt. |
| Tool Description | String | Input parameter. A brief description of the tool to guide the model in using it. |
| Keyspace | String | Input parameter. The name of the keyspace. |
| Table Name | String | Input parameter. The name of the Astra DB CQL table to query. |
| Token | SecretString | Input parameter. The authentication token for Astra DB. |
| API Endpoint | String | Input parameter. The Astra DB API endpoint. |
| Projection Fields | String | Input parameter. The attributes to return, separated by commas. Default: "*". |
| Partition Keys | Dict | Input parameter. Required parameters that the model must fill to query the tool. |
| Clustering Keys | Dict | Input parameter. Optional parameters the model can fill to refine the query. Required parameters should be marked with an exclamation mark, for example, !customer_id. |
| Static Filters | Dict | Input parameter. Attribute-value pairs used to filter query results. |
| Limit | String | Input parameter. The number of records to return. |