Back to Langflow

IBM

docs/versioned_docs/version-1.12.0/Components/bundles-ibm.mdx

1.13.0.dev117.0 KB
Original Source

import Icon from "@site/src/components/icon"; import PartialParams from '@site/docs/_partial-hidden-params.mdx'; import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx'; import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx'; import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx'; import { GraduatedBundleInstall } from '@site/docs/_partial-bundle-graduated-install.mdx';

<GraduatedBundleInstall packageName="ibm" />

<Icon name="Blocks" aria-hidden="true" /> Bundles contain custom components that support specific third-party integrations with Langflow.

The IBM bundle provides access to IBM watsonx.ai models for text and embedding generation, IBM watsonx.data (Presto SQL and the watsonx.data remote MCP server), and an IBM Db2 Vector Store. These components require an IBM watsonx.ai deployment with API credentials, a watsonx.data instance, and/or a reachable IBM Db2 instance with the ibm-db driver.

For IBM Confluent (Kafka, Flink, Tableflow, and the Real-Time Context Engine) — the data-in-motion half of IBM's streaming lakehouse — see the IBM Confluent bundle.

IBM watsonx.ai

The IBM watsonx.ai component generates text using supported foundation models in IBM watsonx.ai. To use gateway models, use the OpenAI text generation component with the gateway model's OpenAI-compatible endpoint.

You can use the IBM watsonx.ai component anywhere you need a language model in a flow.

IBM watsonx.ai parameters {#ibm-watsonxai-parameters}

<PartialParams />
NameTypeDescription
urlStringInput parameter. The watsonx API base URL for your deployment and region.
project_idStringInput parameter. Your watsonx Project ID.
api_keySecretStringInput parameter. A watsonx API key to authenticate watsonx API access to the specified watsonx.ai deployment and model.
model_nameStringInput parameter. The name of the watsonx model to use. Options are dynamically fetched from the API.
max_tokensIntegerInput parameter. The maximum number of tokens to generate. Default: 1000.
stop_sequenceStringInput parameter. The sequence where generation should stop.
temperatureFloatInput parameter. Controls randomness in the output. Default: 0.1.
top_pFloatInput parameter. Controls nucleus sampling, which limits the model to tokens whose probability is below the top_p value. Range: Default: 0.9.
frequency_penaltyFloatInput parameter. Controls frequency penalty. A positive value decreases the probability of repeating tokens, and a negative value increases the probability. Range: Default: 0.5.
presence_penaltyFloatInput parameter. Controls presence penalty. A positive value increases the likelihood of new topics being introduced. Default: 0.3.
seedIntegerInput parameter. A random seed for the model. Default: 8.
logprobsBooleanInput parameter. Whether to return log probabilities of output tokens or not. Default: true.
top_logprobsIntegerInput parameter. The number of most likely tokens to return at each position. Default: 3.
logit_biasStringInput parameter. A JSON string of token IDs to bias or suppress.

IBM watsonx.ai output

The IBM watsonx.ai component can output either a Model Response (Message) or a Language Model (LanguageModel).

Use the Language Model output when you want to use an IBM watsonx.ai model as the LLM for another LLM-driven component, such as an Agent or Smart Transform component. For more information, see Language model components.

The LanguageModel output from the IBM watsonx.ai component is an instance of [ChatWatsonx](https://docs.langchain.com/oss/python/integrations/chat/ibm_watsonx) configured according to the component's parameters.

IBM watsonx.ai Embeddings

The IBM watsonx.ai Embeddings component uses the supported foundation models in IBM watsonx.ai for embedding generation.

The output is Embeddings generated with WatsonxEmbeddings.

For more information about using embedding model components in flows, see Embedding model components.

IBM watsonx.ai Embeddings parameters

<PartialParams />
NameDisplay NameInfo
urlwatsonx API EndpointInput parameter. The watsonx API base URL for your deployment and region.
project_idwatsonx project idInput parameter. Your watsonx Project ID.
api_keyAPI KeyInput parameter. A watsonx API key to authenticate watsonx API access to the specified watsonx.ai deployment and model.
model_nameModel NameInput parameter. The name of the embedding model to use. Supports default embedding models and automatically updates after connecting to your watsonx.ai deployment.
truncate_input_tokensTruncate Input TokensInput parameter. The maximum number of tokens to process. Default: 200.
input_textInclude the original text in the outputInput parameter. Determines if the original text is included in the output. Default: true.

Default embedding models

By default, the IBM watsonx.ai Embeddings component supports the following default models:

  • sentence-transformers/all-minilm-l12-v2: 384-dimensional embeddings
  • ibm/slate-125m-english-rtrvr-v2: 768-dimensional embeddings
  • ibm/slate-30m-english-rtrvr-v2: 768-dimensional embeddings
  • intfloat/multilingual-e5-large: 1024-dimensional embeddings

After entering your API endpoint and credentials, the component automatically fetches the list of available models from your watsonx.ai deployment.

IBM Db2 Vector Store

You can use the IBM Db2 Vector Store component to read and write to an IBM Db2 database using an instance of DB2VS vector store. Includes support for remote Db2 instances with enterprise-grade security and performance.

<details> <summary>About vector store instances</summary> <PartialVectorStoreInstance /> </details>

When writing, the component can create a new table at the specified location.

:::tip IBM Db2 Vector Store provides enterprise-grade vector search capabilities with built-in security validation and support for multiple distance strategies. :::

<PartialVectorSearchResults />

Use the IBM Db2 Vector Store component in a flow

The IBM Db2 Vector Store component can be used for both reads and writes:

  • When writing, it splits JSON from a URL component into chunks, computes embeddings with attached Embedding Model component, and then loads the chunks and embeddings into the Db2 vector store. To trigger writes, click <Icon name="Play" aria-hidden="true"/> Run component on the IBM Db2 Vector Store component.

  • When reading, it uses chat input to perform a similarity search on the vector store, and then print the search results to the chat. To trigger reads, open the Playground and enter a chat message.

After running the flow once, you can click <Icon name="TextSearch" aria-hidden="true"/> Inspect Output on each component to understand how the data transformed as it passed from component to component.

IBM Db2 Vector Store 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.

<PartialParams /> <PartialConditionalParams />

For information about accepted values and functionality, see the provider's documentation or inspect component code.

NameTypeDescription
Table Name (collection_name)StringInput parameter. The name of your Db2 table to store vectors. Default: LANGFLOW_VECTORS. The table will be created if it doesn't exist.
Database Name (database)StringInput parameter. Name of the Db2 database. Use a Generic-typed global variable or direct input. Credential-typed variables are not allowed for database names.
Hostname (hostname)StringInput parameter. Db2 server hostname or IP address. Use a Generic-typed global variable or direct input.
Port (port)IntegerInput parameter. Db2 server port. Default: 50000.
Username (username)StringInput parameter. Db2 database username. Use a Generic-typed global variable or direct input.
Password (password)StringInput parameter. Db2 database password. This should use a Credential-typed global variable for security.
Ingest Data (ingest_data)JSON or TableInput parameter. JSON or Table input containing the records to write to the vector store. Only relevant for writes.
Search Query (search_query)StringInput parameter. The query to use for vector search. Only relevant for reads.
Cache Vector Store (should_cache_vector_store)BooleanInput parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true).
Embedding (embedding)EmbeddingsInput parameter. The embedding function to use for the vector store. You must attach an Embedding Model component to generate embeddings for your data.
Allow Duplicates (allow_duplicates)BooleanInput parameter. If true (default), writes don't check for existing duplicates in the collection, allowing you to store multiple copies of the same content. If false, writes won't add documents that match existing documents already present in the collection. Only relevant for writes.
Search Type (search_type)StringInput parameter. The type of search to perform: Similarity, MMR, or similarity_score_threshold. Only relevant for reads.
Number of Results (number_of_results)IntegerInput parameter. The number of search results to return. Default: 4. Only relevant for reads.
Distance Strategy (distance_strategy)StringInput parameter. Distance calculation strategy: COSINE, EUCLIDEAN_DISTANCE, or DOT_PRODUCT. Default: COSINE.

IBM watsonx.data Presto {#ibm-watsonxdata-presto}

The IBM watsonx.data Presto component runs a SQL query on an IBM watsonx.data Presto engine (Java or C++) and returns the rows as a DataFrame. Use it to bring lakehouse data — Iceberg tables, federated sources, and Confluent Tableflow tables registered as an Iceberg REST datasource — into a flow, or expose it to an Agent in Tool Mode so the Agent writes the SQL.

The component uses the Presto DBAPI client (presto-python-client) over HTTPS. On watsonx.data on IBM Cloud, authenticate with api_key: the user name is ibmlhapikey and the password is an IBM Cloud IAM API key. On watsonx.data software, choose basic and provide the user name and password your instance expects, plus the instance CA certificate.

IBM watsonx.data Presto parameters

<PartialParams /> <PartialConditionalParams />
NameTypeDescription
Presto Host (host)StringInput parameter. Presto engine host name, without https://.
Port (port)IntegerInput parameter. Default: 443.
Catalog (catalog)StringInput parameter. Default catalog for unqualified table names, for example iceberg_data.
Schema (schema_name)StringInput parameter. Default schema for unqualified table names.
Authentication (auth_mode)DropdownInput parameter. api_key (default) or basic.
User Name (username)StringInput parameter. Defaults to ibmlhapikey for api_key authentication.
IBM Cloud API Key (api_key)SecretStringInput parameter. Shown for api_key authentication.
Password (password)SecretStringInput parameter. Shown for basic authentication.
SQL Query (query)StringInput parameter. Presto SQL to run. Available to Agents in Tool Mode.
Max Rows (max_rows)IntegerInput parameter. Default: 10000, capped at 1000000.
Verify SSL Certificate (verify_ssl)BooleanInput parameter. Default: true.
SSL CA Certificate (ssl_ca_file)StringInput parameter. Path or https URL of the CA bundle for software instances.
Request Timeout (seconds) (request_timeout)IntegerInput parameter. Default: 60.
Result TableDataFrameOutput. Query rows.

IBM watsonx.data MCP {#ibm-watsonxdata-mcp}

The IBM watsonx.data MCP component gives an Agent component governed access to watsonx.data document libraries, document sets, and data assets through the watsonx.data remote MCP server. The server exposes LIST_DOCUMENT_LIBRARY, QUERY_DOCUMENT_LIBRARY, LIST_DOCUMENT_SET, QUERY_DOCUMENT_SET, LIST_DATA_ASSETS, and QUERY_DATA_ASSETS (natural-language queries over selected Presto tables).

The component builds the /api/v2/mcp/ endpoint from the instance URL, authenticates with a bearer token — or exchanges an IBM Cloud API key for one on each connection — and reuses Langflow's MCP client engine. Turn on Tool Mode and connect the Toolset output to an Agent, or pick a Tool and use the Response output directly.

IBM watsonx.data MCP parameters

<PartialParams /> <PartialConditionalParams />
NameTypeDescription
watsonx.data Instance URL (instance_url)StringInput parameter. Base URL of the instance; /api/v2/mcp/ is appended automatically.
Authentication (auth_mode)DropdownInput parameter. bearer_token (default) or ibm_iam_apikey.
Bearer Token (bearer_token)SecretStringInput parameter. Access token sent as Authorization: Bearer. Shown for bearer_token.
IBM Cloud API Key (api_key)SecretStringInput parameter. Exchanged for a token before each connection. Shown for ibm_iam_apikey.
IAM Endpoint (iam_url)StringInput parameter. Default: https://iam.cloud.ibm.com.
Endpoint Override (endpoint_override)StringInput parameter. Full MCP endpoint URL.
Tool (tool)DropdownInput parameter. Tool to run for the Response output; the refresh button re-reads the list from the server.
Tool Arguments (JSON) (tool_arguments)StringInput parameter. JSON object passed as the selected tool's arguments. Ignored in Tool Mode.
Tool Execution Timeout (seconds) (tool_execution_timeout)FloatInput parameter. 0 uses the system-configured MCP timeout.
Verify SSL Certificate (verify_ssl)BooleanInput parameter. Default: true.
ToolsetToolsOutput. Available when Tool Mode is on.
ResponseDataFrameOutput. Result of running the selected tool once.

Use other watsonx.data services from Langflow

watsonx.data also ships Milvus and OpenSearch, and existing Langflow components connect to them directly:

See also