Skip to main content


The LangChain integrations related to IBM platform.

IBMยฎ watsonx.aiโ„ข AI studio is part of the IBM watsonxโ„ข AI and data platform, bringing together new generative AI capabilities powered by foundation models and traditional machine learning (ML) into a powerful studio spanning the AI lifecycle. Tune and guide models with your enterprise data to meet your needs with easy-to-use tools for building and refining performant prompts. With, you can build AI applications in a fraction of the time and with a fraction of the data. offers:

  • Multi-model variety and flexibility: Choose from IBM-developed, open-source and third-party models, or build your own model.
  • Differentiated client protection: IBM stands behind IBM-developed models and indemnifies the client against third-party IP claims.
  • End-to-end AI governance: Enterprises can scale and accelerate the impact of AI with trusted data across the business, using data wherever it resides.
  • Hybrid, multi-cloud deployments: IBM provides the flexibility to integrate and deploy your AI workloads into your hybrid-cloud stack of choice.

Installation and Setupโ€‹

Install the integration package with

pip install -qU langchain-ibm

Get an IBM api key and set it as an environment variable (WATSONX_APIKEY)

import os

os.environ["WATSONX_APIKEY"] = "your IBM api key"



See a usage example.

from langchain_ibm import WatsonxLLM

Embedding Modelsโ€‹


See a usage example.

from langchain_ibm import WatsonxEmbeddings

Was this page helpful?

You can also leave detailed feedback on GitHub.