langchain-ibm
An integration package connecting IBM watsonx.ai and LangChain
Decision gist · record as of 2026-08-14
Yes, if you are already using LangChain and need to integrate IBM watsonx.ai models. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is MIT-licensed. Requires IBM Cloud credentials and familiarity with LangChain's model abstraction layer; not suitable if you do not have access to IBM watsonx.ai or prefer other model providers.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires IBM Cloud API key set as WATSONX_API_KEY environment variable; also requires project_id or space_id from IBM watsonx.ai service.
- Low install friction with a pure Python wheel.
- Actively maintained with recent commits; last release 72 days ago.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you may use, modify, and distribute this package with minimal restrictions.
last release 2026-06-03 (72 days) · last repo commit 2026-08-11 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 716,196 downloads/mo, #5,246 on PyPI
Alternatives
Verify before relying
pip install langchain-ibm
from langchain_ibm import ChatWatsonx
from ibm_watsonx_ai.foundation_models.schema import TextChatParameters
params = TextChatParameters(temperature=0.5, max_completion_tokens=1024)
model = ChatWatsonx(
model_id="ibm/granite-4-h-small",
url="https://us-south.ml.cloud.ibm.com",
project_id="YOUR_PROJECT_ID",
params=params
)
model.invoke("Sing a ballad of LangChain.")- Whether all four model classes (ChatWatsonx, WatsonxLLM, WatsonxEmbeddings, WatsonxRerank) are production-ready or still experimental.
- Performance characteristics and latency expectations when calling IBM watsonx.ai endpoints.
- Support scope for different IBM Cloud regions and Cloud Pak for Data deployments.
What it is and what it does
langchain-ibm is a LangChain integration package that bridges LangChain applications to IBM watsonx.ai foundation models. It exposes four main model classes—ChatWatsonx for chat interactions, WatsonxLLM for text generation, WatsonxEmbeddings for semantic embeddings, and WatsonxRerank for relevance reranking—each wrapping IBM's models through the ibm-watsonx-ai SDK.
The package handles authentication via IBM Cloud API keys, parameter configuration through model-specific schema classes, and toolkit utilities for agent-based workflows. It depends on langchain-core for the base LangChain abstractions and json-repair for robustness. Setup requires an IBM Cloud account, API key, and a watsonx.ai project or space; once configured, you instantiate a model class with your credentials and invoke it like any other LangChain model.
Use it for
- Build LangChain chat applications using IBM's Granite or other watsonx.ai foundation models without writing custom SDK wrappers.
- Add semantic search to LangChain RAG pipelines using WatsonxEmbeddings for document indexing and retrieval.
- Create multi-step LLM workflows in LangChain that call IBM text generation models for content synthesis or summarization.
- Implement reranking stages in LangChain retrieval chains to improve relevance of search results using WatsonxRerank.
- Deploy LangChain agents with WatsonxToolkit to orchestrate IBM watsonx.ai capabilities in autonomous workflows.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are already using LangChain and need to integrate IBM watsonx.ai models.
The package is actively maintained, has low install friction, carries no known vulnerabilities, and is MIT-licensed. Requires IBM Cloud credentials and familiarity with LangChain's model abstraction layer; not suitable if you do not have access to IBM watsonx.ai or prefer other model providers.
Install
langchain-ibm on PyPI
Before you install
Low install friction with a pure Python wheel. Actively maintained with recent commits; last release 72 days ago. Depends on langchain-core, ibm-watsonx-ai, and json-repair.
Requires IBM Cloud API key set as WATSONX_API_KEY environment variable; also requires project_id or space_id from IBM watsonx.ai service.
License in practice
MIT license is permissive; you may use, modify, and distribute this package with minimal restrictions.
Quickstart
pip install langchain-ibm
from langchain_ibm import ChatWatsonx
from ibm_watsonx_ai.foundation_models.schema import TextChatParameters
params = TextChatParameters(temperature=0.5, max_completion_tokens=1024)
model = ChatWatsonx(
model_id="ibm/granite-4-h-small",
url="https://us-south.ml.cloud.ibm.com",
project_id="YOUR_PROJECT_ID",
params=params
)
model.invoke("Sing a ballad of LangChain.")
Verify before relying
- Whether all four model classes (ChatWatsonx, WatsonxLLM, WatsonxEmbeddings, WatsonxRerank) are production-ready or still experimental.
- Performance characteristics and latency expectations when calling IBM watsonx.ai endpoints.
- Support scope for different IBM Cloud regions and Cloud Pak for Data deployments.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <3.15,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packageslangchain-coreibm-watsonx-aijson-repair |
| Maintenance | Actively maintained 72 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 716,196 / month, #5,246 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: langchain_ibm-1.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “IBM watsonx LangChain integration”
- langchain-ibmIntegrates IBM watsonx.ai models with LangChain, providing chat,…
- llama-index-llms-ibmIntegrates IBM watsonx.ai foundation models with LlamaIndex's LLM…
- llama-index-embeddings-ibmIntegrates IBM watsonx.ai embedding models with LlamaIndex, allowing…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also llama-index-embeddings-ibm · qianfan · ibm-watsonx-ai · langchain-oci · llama-index-llms-ibm · langchain-cohere · langchain-google-genai · langchain-baseten · langchain-elasticsearch · unique-toolkit