10 LangChain Toolkits: SQL, Playwright, GitHub, Slack (2026)
Explore 10 LangChain toolkits including SQLDatabaseToolkit, PlaywrightBrowserToolkit, GitHubToolkit, and SlackToolkit with full Python code and comparison table.
Get more content like this on Telegram!
Daily AI tips, notes & resources — free
LangChain toolkits give agents pre-built, production-ready capabilities without writing custom tool code. Instead of building a SQL query tool from scratch, you plug in SQLDatabaseToolkit and your agent immediately knows how to inspect schemas, run queries, and handle errors.
This guide covers 10 of the most useful LangChain toolkits, shows complete Python code for each, and provides a comparison table to help you choose the right combination for your application.
For the agent foundation that uses these toolkits, see Build AI agent with LangChain and the LangChain tutorial 2025.
What Makes a Toolkit Different from a Tool?
A single tool is one function. A toolkit is a coherent set of tools that work together:
from langchain_community.agent_toolkits import SQLDatabaseToolkit
from langchain_community.utilities import SQLDatabase
from langchain_openai import ChatOpenAI
db = SQLDatabase.from_uri("sqlite:///example.db")
llm = ChatOpenAI(model="gpt-4o")
toolkit = SQLDatabaseToolkit(db=db, llm=llm)
tools = toolkit.get_tools()
for tool in tools:
print(f"Tool: {tool.name}")
print(f"Description: {tool.description[:100]}\n")
# → sql_db_query, sql_db_schema, sql_db_list_tables, sql_db_query_checker
The four SQL tools work as a unit — the agent calls sql_db_list_tables to discover tables, sql_db_schema to understand structure, sql_db_query_checker to validate SQL, and sql_db_query to execute it. This multi-step reasoning pattern is what makes toolkits more powerful than individual tools.
Toolkit 1: SQLDatabaseToolkit
The most widely used toolkit. Gives agents the ability to query any SQL database:
from langchain_community.agent_toolkits import SQLDatabaseToolkit, create_sql_agent
from langchain_community.utilities import SQLDatabase
from langchain_openai import ChatOpenAI
import sqlite3
# Create a test database
conn = sqlite3.connect("sales.db")
cursor = conn.cursor()
cursor.executescript("""
CREATE TABLE IF NOT EXISTS customers (
id INTEGER PRIMARY KEY,
name TEXT,
email TEXT,
signup_date DATE,
plan TEXT
);
CREATE TABLE IF NOT EXISTS orders (
id INTEGER PRIMARY KEY,
customer_id INTEGER,
product TEXT,
amount DECIMAL,
order_date DATE,
FOREIGN KEY (customer_id) REFERENCES customers(id)
);
""")
# Insert sample data
cursor.executemany("INSERT OR IGNORE INTO customers VALUES (?,?,?,?,?)", [
(1, "Alice Chen", "alice@example.com", "2024-01-15", "enterprise"),
(2, "Bob Smith", "bob@example.com", "2024-03-20", "starter"),
(3, "Carol Davis", "carol@example.com", "2025-06-01", "enterprise"),
])
cursor.executemany("INSERT OR IGNORE INTO orders VALUES (?,?,?,?,?)", [
(1, 1, "Analytics Suite", 2499.00, "2025-01-10"),
(2, 1, "API Access", 499.00, "2025-03-05"),
(3, 2, "Basic Plan", 99.00, "2025-04-01"),
])
conn.commit()
conn.close()
# Connect LangChain to the database
db = SQLDatabase.from_uri(
"sqlite:///sales.db",
include_tables=["customers", "orders"], # Whitelist for safety
sample_rows_in_table_info=3
)
llm = ChatOpenAI(model="gpt-4o", temperature=0)
toolkit = SQLDatabaseToolkit(db=db, llm=llm)
# Create SQL agent
agent_executor = create_sql_agent(
llm=llm,
toolkit=toolkit,
verbose=True,
agent_type="tool-calling",
max_iterations=10
)
# Natural language queries
result = agent_executor.invoke({
"input": "Who are our top 3 customers by total order value? Show their names and total spend."
})
print(result["output"])
# → "The top 3 customers by total order value are:
# 1. Alice Chen: $2,998.00
# 2. Carol Davis: (no orders yet)
# 3. Bob Smith: $99.00"
Security best practices:
# Always use read-only credentials in production
db_read_only = SQLDatabase.from_uri(
"postgresql://readonly_user:password@host/db",
include_tables=["public.orders", "public.customers"], # explicit whitelist
max_string_length=500 # truncate long text fields
)
Toolkit 2: PlaywrightBrowserToolkit
Gives your agent a full browser — click buttons, fill forms, extract content from JavaScript-rendered pages:
# pip install langchain-community playwright
# playwright install chromium
import asyncio
from langchain_community.agent_toolkits import PlayWrightBrowserToolkit
from langchain_community.tools.playwright.utils import create_async_playwright_browser
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_openai import ChatOpenAI
async def run_browser_agent():
# Create browser instance
async_browser = await create_async_playwright_browser(headless=True)
toolkit = PlayWrightBrowserToolkit.from_browser(async_browser=async_browser)
tools = toolkit.get_tools()
print("Available browser tools:")
for tool in tools:
print(f" - {tool.name}: {tool.description[:80]}")
# → navigate_browser, click_element, fill_form_element, get_elements, etc.
llm = ChatOpenAI(model="gpt-4o", temperature=0)
prompt = ChatPromptTemplate.from_messages([
("system", "You are a web research assistant with browser access. Navigate websites to find information."),
MessagesPlaceholder(variable_name="chat_history"),
("human", "{input}"),
MessagesPlaceholder(variable_name="agent_scratchpad")
])
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools, verbose=True, max_iterations=15)
# Research task
result = await executor.ainvoke({
"input": "Go to python.org and find the current Python version. Then go to pypi.org and check the latest version of langchain.",
"chat_history": []
})
await async_browser.close()
return result["output"]
# Run the browser agent
result = asyncio.run(run_browser_agent())
print(result)
Browser toolkit tools include: navigate_browser, click_element, fill_form_element, extract_text, get_elements, get_current_page, and extract_hyperlinks. This enables RPA (Robotic Process Automation) workflows directly from Python.
Toolkit 3: GitHubToolkit
Interact with GitHub repositories — read files, open issues, create pull requests, and search code:
import os
from langchain_community.agent_toolkits.github.toolkit import GitHubToolkit
from langchain_community.utilities.github import GitHubAPIWrapper
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_openai import ChatOpenAI
# Set environment variables
os.environ["GITHUB_ACCESS_TOKEN"] = "ghp_your_personal_access_token"
os.environ["GITHUB_REPOSITORY"] = "your-username/your-repo"
# Initialize GitHub toolkit
github_wrapper = GitHubAPIWrapper()
toolkit = GitHubToolkit.from_github_api_wrapper(github_wrapper)
tools = toolkit.get_tools()
print("GitHub tools available:")
for tool in tools:
print(f" - {tool.name}")
# → get_issues, get_issue, comment_on_issue, list_open_pull_requests,
# get_pull_request, create_file, read_file, update_file, list_files_in_main_branch, etc.
llm = ChatOpenAI(model="gpt-4o", temperature=0)
prompt = ChatPromptTemplate.from_messages([
("system", """You are a GitHub assistant. Help with repository management, code review, and issue tracking.
When asked to do something that modifies the repository, confirm with the user first."""),
MessagesPlaceholder(variable_name="chat_history"),
("human", "{input}"),
MessagesPlaceholder(variable_name="agent_scratchpad")
])
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(
agent=agent,
tools=tools,
verbose=True,
max_iterations=8
)
# Example: Code review assistant
result = executor.invoke({
"input": "List all open pull requests and summarize what changes they contain.",
"chat_history": []
})
print(result["output"])
# Example: Issue triage
triage_result = executor.invoke({
"input": "Look at the open issues and categorize them as bug, feature request, or documentation.",
"chat_history": []
})
Toolkit 4: SlackToolkit
Send messages, read channels, and interact with Slack workspaces:
import os
from langchain_community.agent_toolkits import SlackToolkit
# Set environment variables
os.environ["SLACK_BOT_TOKEN"] = "xoxb-your-bot-token"
toolkit = SlackToolkit()
tools = toolkit.get_tools()
print("Slack tools:")
for tool in tools:
print(f" - {tool.name}: {tool.description[:80]}")
# → get_channel, get_messages_history, send_message, schedule_message, get_guilds
# Build Slack agent
from langchain.agents import AgentExecutor, create_tool_calling_agent
llm = ChatOpenAI(model="gpt-4o", temperature=0)
prompt = ChatPromptTemplate.from_messages([
("system", "You are a Slack assistant. Help users manage messages, channels, and notifications."),
MessagesPlaceholder(variable_name="chat_history"),
("human", "{input}"),
MessagesPlaceholder(variable_name="agent_scratchpad")
])
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
# Send a deployment notification
result = executor.invoke({
"input": "Send a message to #deployments saying 'Version 2.4.1 deployed successfully to production at 14:30 UTC'",
"chat_history": []
})
# Read recent messages
read_result = executor.invoke({
"input": "What are the 5 most recent messages in #general?",
"chat_history": []
})
To set up the Slack Bot token: create a Slack App, add bot scopes (channels:read, chat:write, channels:history), install the app to your workspace, and copy the Bot User OAuth Token.
Toolkit 5: JiraToolkit
Manage tickets, sprints, and projects in Jira:
from langchain_community.agent_toolkits.jira.toolkit import JiraToolkit
from langchain_community.utilities.jira import JiraAPIWrapper
import os
os.environ["JIRA_API_TOKEN"] = "your-jira-api-token"
os.environ["JIRA_USERNAME"] = "your-email@company.com"
os.environ["JIRA_INSTANCE_URL"] = "https://your-domain.atlassian.net"
os.environ["JIRA_CLOUD"] = "True"
jira_wrapper = JiraAPIWrapper()
toolkit = JiraToolkit.from_jira_api_wrapper(jira_wrapper)
tools = toolkit.get_tools()
# Jira tools: create_issue, search, update_issue, get_projects, etc.
executor = AgentExecutor(
agent=create_tool_calling_agent(ChatOpenAI(model="gpt-4o"), tools, prompt),
tools=tools,
verbose=True
)
result = executor.invoke({
"input": "Create a high-priority bug ticket in project BACKEND titled 'API response time exceeds 2 seconds on /users endpoint'. Add the description: Observed in production since 2026-05-30. Affects 15% of users.",
"chat_history": []
})
Toolkit 6: O365Toolkit (Office 365)
Interact with Microsoft 365 — email, calendar, and files:
from langchain_community.agent_toolkits import O365Toolkit
import os
os.environ["O365_CLIENT_ID"] = "your-azure-app-client-id"
os.environ["O365_CLIENT_SECRET"] = "your-azure-app-secret"
toolkit = O365Toolkit()
tools = toolkit.get_tools()
# Tools: send_email, search_email, create_calendar_event, get_events, etc.
executor = AgentExecutor(
agent=create_tool_calling_agent(ChatOpenAI(model="gpt-4o"), tools, prompt),
tools=tools,
verbose=True
)
result = executor.invoke({
"input": "Schedule a team meeting for tomorrow at 3pm titled 'Q2 Planning Session' and send calendar invites to alice@company.com and bob@company.com",
"chat_history": []
})
Toolkit 7: FileManagementToolkit
Read, write, and manage local files:
from langchain_community.agent_toolkits import FileManagementToolkit
# Restrict to a specific directory for safety
toolkit = FileManagementToolkit(
root_dir="./workspace", # Agent can only access files here
selected_tools=["read_file", "write_file", "list_directory", "copy_file"]
# Omit "delete_file" unless you're sure
)
tools = toolkit.get_tools()
# → read_file, write_file, list_directory, copy_file, move_file, delete_file, file_search
executor = AgentExecutor(
agent=create_tool_calling_agent(ChatOpenAI(model="gpt-4o"), tools, prompt),
tools=tools,
verbose=True
)
result = executor.invoke({
"input": "Read all .txt files in the workspace folder and create a summary file called 'summary.txt' containing a brief description of each file's content.",
"chat_history": []
})
Always set root_dir to restrict the agent to a sandboxed directory. Never give file management tools unrestricted filesystem access.
Toolkit 8: OpenAPIToolkit
Turn any OpenAPI spec into callable tools automatically:
from langchain_community.agent_toolkits.openapi import planner
from langchain_community.agent_toolkits.openapi.spec import reduce_openapi_spec
from langchain_community.utilities.requests import RequestsWrapper
import yaml
import requests
# Load an OpenAPI spec
spec_url = "https://petstore3.swagger.io/api/v3/openapi.json"
raw_spec = requests.get(spec_url).json()
# Reduce spec (removes excessive description text)
reduced_spec = reduce_openapi_spec(raw_spec)
requests_wrapper = RequestsWrapper(
headers={"Authorization": "Bearer your-api-token"}
)
llm = ChatOpenAI(model="gpt-4o", temperature=0)
agent = planner.create_openapi_agent(
api_spec=reduced_spec,
requests_wrapper=requests_wrapper,
llm=llm,
verbose=True
)
result = agent.invoke({
"input": "Find all available pets with status 'available' and list their names."
})
print(result["output"])
This is one of the most powerful patterns for enterprise integrations. If an internal service has an OpenAPI spec, you can turn it into an AI-accessible toolkit in under 10 lines.
Toolkit 9: PandasDataframeAgentToolkit
Analyze DataFrames with natural language:
from langchain_experimental.agents import create_pandas_dataframe_agent
from langchain_openai import ChatOpenAI
import pandas as pd
import numpy as np
# Create sample dataset
np.random.seed(42)
df = pd.DataFrame({
"date": pd.date_range("2025-01-01", periods=100),
"product": np.random.choice(["Widget A", "Widget B", "Widget C"], 100),
"region": np.random.choice(["North", "South", "East", "West"], 100),
"revenue": np.random.normal(5000, 1500, 100).round(2),
"units": np.random.randint(10, 200, 100)
})
llm = ChatOpenAI(model="gpt-4o", temperature=0)
agent = create_pandas_dataframe_agent(
llm=llm,
df=df,
verbose=True,
agent_type="tool-calling",
allow_dangerous_code=True # Required flag — ensure df contains no sensitive data
)
result = agent.invoke("Which product generates the highest average revenue per unit? Show the calculation.")
print(result["output"])
result2 = agent.invoke("Create a monthly revenue breakdown and identify the best performing month.")
print(result2["output"])
For a complete data analysis agent, see the LangChain tutorial 2025 which covers the pandas agent in depth.
Toolkit 10: VectorStoreToolkit
Turn any vector store into a searchable tool for agents:
from langchain_community.agent_toolkits import VectorStoreToolkit, VectorStoreInfo
from langchain_community.vectorstores import Chroma
from langchain_openai import OpenAIEmbeddings, ChatOpenAI
from langchain_core.documents import Document
# Build a knowledge base vector store
embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
docs = [
Document(page_content="LangChain supports Python and JavaScript.", metadata={"topic": "langchain"}),
Document(page_content="Pinecone is a cloud vector database.", metadata={"topic": "vector-db"}),
Document(page_content="RAG improves LLM accuracy on specific domains.", metadata={"topic": "rag"}),
]
vectorstore = Chroma.from_documents(docs, embeddings, collection_name="knowledge_base")
# Define vector store info for the agent
vectorstore_info = VectorStoreInfo(
name="company_knowledge_base",
description="Company knowledge base covering AI tools, APIs, and best practices. Use this to answer questions about company technology stack.",
vectorstore=vectorstore
)
toolkit = VectorStoreToolkit(
vectorstore_info=vectorstore_info,
llm=ChatOpenAI(model="gpt-4o")
)
tools = toolkit.get_tools()
# → company_knowledge_base_search (semantic search)
# → company_knowledge_base_search_with_relevance_scores
executor = AgentExecutor(
agent=create_tool_calling_agent(ChatOpenAI(model="gpt-4o"), tools, prompt),
tools=tools,
verbose=True
)
result = executor.invoke({
"input": "What vector databases do we use and why?",
"chat_history": []
})
Toolkit Comparison Table
| Toolkit | Use Case | Auth Required | Modifies Data | Risk Level |
|---|---|---|---|---|
| SQLDatabaseToolkit | Database queries | DB credentials | Configurable | Medium |
| PlaywrightBrowserToolkit | Web browsing/scraping | None | No (read-only) | Low |
| GitHubToolkit | Repo management | GitHub PAT | Yes | Medium |
| SlackToolkit | Messaging | Slack Bot Token | Yes | Low |
| JiraToolkit | Ticket management | Jira API Token | Yes | Low |
| O365Toolkit | Email/Calendar | Azure App creds | Yes | Medium |
| FileManagementToolkit | File I/O | None (local) | Yes | High |
| OpenAPIToolkit | API integration | API key | Varies | Varies |
| PandasDataframeAgent | Data analysis | None | No | Low |
| VectorStoreToolkit | Knowledge search | Depends on store | No | Low |
Combining Multiple Toolkits
The real power comes from combining toolkits:
from langchain_community.agent_toolkits import SQLDatabaseToolkit, SlackToolkit
from langchain_community.agent_toolkits import FileManagementToolkit
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_openai import ChatOpenAI
# Combine SQL + Slack + File tools
db = SQLDatabase.from_uri("sqlite:///analytics.db", include_tables=["metrics"])
llm = ChatOpenAI(model="gpt-4o", temperature=0)
sql_tools = SQLDatabaseToolkit(db=db, llm=llm).get_tools()
slack_tools = SlackToolkit().get_tools()
file_tools = FileManagementToolkit(
root_dir="./reports",
selected_tools=["write_file", "read_file"]
).get_tools()
all_tools = sql_tools + slack_tools + file_tools
prompt = ChatPromptTemplate.from_messages([
("system", """You are a business intelligence assistant with access to:
- SQL database (read-only analytics data)
- Slack (for notifications)
- File system (for saving reports)
Typical workflow: query data → save report → notify team on Slack."""),
MessagesPlaceholder(variable_name="chat_history"),
("human", "{input}"),
MessagesPlaceholder(variable_name="agent_scratchpad")
])
agent = create_tool_calling_agent(llm, all_tools, prompt)
executor = AgentExecutor(agent=agent, tools=all_tools, verbose=True, max_iterations=15)
# Complex multi-step task
result = executor.invoke({
"input": """
1. Query the metrics table for this week's revenue by region
2. Save the results as a CSV report file called 'weekly_revenue.csv'
3. Send a summary to #analytics Slack channel
""",
"chat_history": []
})
print(result["output"])
This three-toolkit combination handles a complete business workflow that used to require custom code for each integration.
For more agent patterns using toolkits, see Build AI agent with LangChain, AI research agent build, and AI agents explained. For alternative agent frameworks that bundle their own tool ecosystems, compare with CrewAI tutorial.
Frequently Asked Questions
What is the difference between a LangChain tool and a toolkit? A tool is a single callable function with a name, description, and input schema. A toolkit is a collection of related tools bundled together — for example, SQLDatabaseToolkit provides query, schema inspection, and table listing tools as a package. Use get_tools() to extract individual tools from a toolkit.
Is it safe to give an AI agent access to SQLDatabaseToolkit on a production database? Only if you use read-only credentials and explicit table whitelisting. Always create a separate read-only database user for AI agents, use the include_tables parameter to restrict which tables are accessible, and never grant INSERT, UPDATE, or DELETE permissions to the agent's database user.
How do I authenticate the GitHubToolkit with LangChain? Create a GitHub Personal Access Token with the required scopes (repo for private repos, public_repo for public only). Set it as GITHUB_ACCESS_TOKEN in your environment. Instantiate with github_api_wrapper = GitHubAPIWrapper() and pass it to GitHubToolkit.
Frequently Asked Questions
AiTechWorlds Team
✓ Verified WriterThe AiTechWorlds team is passionate about AI, technology, and education. We create high-quality, research-backed content to help you learn, grow, and succeed in the modern digital world.
Related Articles
AutoGen vs LangChain: Which for Multi-Agent Systems in 2026?
AutoGen vs LangChain for multi-agent systems in 2026 — feature comparison, same use case in both frameworks, and an honest verdict on when each wins.
Build a Data Analysis Agent with AutoGPT (CSV, SQL, Plots)
Build a data analysis agent using AutoGPT that reads CSVs, queries SQL databases, and generates plots automatically. Full code with pandas and matplotlib.
AutoGPT vs LangChain Agents: Which is More Autonomous?
Compare AutoGPT's zero-shot autonomy against LangChain's ReAct agents. Discover which handles complex tasks better and when to choose each framework.
7 AutoGPT Web Browsing Capabilities (Selenium, Playwright)
Explore AutoGPT's 7 web browsing capabilities using Selenium and Playwright. Compare browser automation tools and build safe autonomous web navigation agents.