langchain-ibm watsonx.ai SQL Database Toolkit that uses Flight service.
Overview
Integration details
Setup
To accesslangchain-ibm SQL Database toolkit you’ll need to create an IBM watsonx.ai account, get an API key, and install the langchain-ibm integration package.
Credentials
This cell defines the WML credentials required to work with watsonx SQL Database Toolkit. Action: Provide the IBM Cloud user API key. For details, see documentation.Installation
The LangChain IBM integration lives in thelangchain-ibm package:
Instantiation
To set up the SQL Database toolkit, you must first instantiate theWatsonxSQLDatabase class, which retrieves necessary information from IBM watsonx.ai database connection assets via the Flight SQL client. For more details on creating the Database connection Asset programmatically see a watsonx.ai Python SDK documentation.
APIClient object into the WatsonxSQLDatabase class.
WatsonxSQLDatabaseToolkit.
Tools
Get all tools
Running.get_tools method, one can get all available tools as a list.
Use within an agent
API reference
For detailed documentation of allWatsonxSQLDatabaseToolkit features and configurations head to the API reference.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

