Dial LangChain Tools

Official LangChain tools for Dial — phone numbers, SMS, WhatsApp, and AI voice calls for AI agents.

This site documents the dial-langchain package. The full API Reference below is generated directly from the source docstrings. See the other SDK docs from the docs home, and the product docs at docs.getdial.ai.

Install

pip install dial-langchain
# or
uv add dial-langchain

This pulls in dial-sdk and langchain-core automatically. Requires Python 3.11+.

Quickstart

Build one DialClient, hand it to DialToolkit, and call get_tools() to give an agent the full set — every tool shares that one client (a single connection pool):

from dial_sdk import DialClient, DialConfig
from dial_langchain import DialToolkit
from langchain.chat_models import init_chat_model
from langgraph.prebuilt import create_react_agent

model = init_chat_model("claude-sonnet-4-6", model_provider="anthropic")

dial = DialClient(DialConfig(api_key="sk_live_..."))
toolkit = DialToolkit(client=dial)
agent = create_react_agent(model, toolkit.get_tools())

To use a subset, import the individual BaseTool classes (ListNumbersTool, SendMessageTool, MakeCallTool, …) and pass each the same client. The tools are async — LangChain calls them via ainvoke.