dial-langchain
Official LangChain tools for Dial — phone numbers, SMS, WhatsApp, and AI voice calls for AI agents.
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 — no per-tool imports. 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())
DialToolkit is a standard LangChain BaseToolkit, so get_tools() works anywhere a list of tools is expected. DialConfig also takes an optional base_url (defaults to https://api.getdial.ai; override it for local or self-hosted setups).
Pick individual tools
When you only want a subset, import the tools directly and pass them the same client. Each Dial capability is a LangChain BaseTool:
from dial_sdk import DialClient, DialConfig
from dial_langchain import (
ListNumbersTool,
SendMessageTool,
MakeCallTool,
ListCallsTool,
GetCallTool,
WaitForMessageTool,
)
dial = DialClient(DialConfig(api_key="sk_live_..."))
tools = [
ListNumbersTool(client=dial),
SendMessageTool(client=dial),
MakeCallTool(client=dial),
]
# Drop into any LangChain agent:
from langchain.agents import create_react_agent
agent = create_react_agent(model, tools, prompt)
The tools are async — LangChain calls them via ainvoke.
Available tools
| Tool | Tool name (for the LLM) |
|---|---|
ListNumbersTool |
list_numbers |
PurchaseNumberTool |
purchase_number |
SetNumberPropertiesTool |
set_number_properties |
ListMessagesTool |
list_messages |
SendMessageTool |
send_message |
ReplyToMessageTool |
reply_to_message |
ListCallsTool |
list_calls |
MakeCallTool |
make_call |
GetCallTool |
get_call |
WaitForMessageTool |
wait_for_message |
Each tool wraps the corresponding dial-sdk call under the hood. DialToolkit.get_tools() returns all of them.
Related
dial-sdk— the underlying async Python SDK.- Documentation
Release files for dial-langchain 0.18.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dial_langchain-0.18.0.tar.gz | 137.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dial_langchain-0.18.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 147.1 kB
Release files / dial_langchain-0.18.0.tar.gz
| Download URL | dial_langchain-0.18.0.tar.gz |
|---|---|
| Size | 137.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a48e2d223fd1bb64124c68ba8049318628cb077c56e769ff808b6392f68dc406
|
|
BLAKE2b-256 checksum How to use checksums |
b985625c73875d4b538519e37cf6c38405388831780b40c4f6536ad1638cfc0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / dial_langchain-0.18.0-py3-none-any.whl
| Download URL | dial_langchain-0.18.0-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98416ccbd6596d9cdb0770211bcaaaa200c9eb3b4aa31542f0550400d5049e6e
|
|
BLAKE2b-256 checksum How to use checksums |
813af432f1e3c7dc1c9b1d49e43482d54f1a131286041894f33e4288df98daf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency log