Skip to main content

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

Project description

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

The quickest way is DialToolkit — construct it once with your API key and call get_tools() to hand an agent the full set, no per-tool imports:

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")

toolkit = DialToolkit(api_key="sk_live_...")
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. It also accepts an optional base_url (defaults to https://getdial.ai; override it for local or self-hosted setups).

Pick individual tools

When you only want a subset, import the tools directly and hand them to the agent yourself. Each Dial capability is a LangChain BaseTool:

from dial_langchain import (
    ListNumbersTool,
    SendMessageTool,
    MakeCallTool,
    ListCallsTool,
    GetCallTool,
    WaitForMessageTool,
)

tools = [
    ListNumbersTool(api_key="sk_live_..."),
    SendMessageTool(api_key="sk_live_..."),
    MakeCallTool(api_key="sk_live_..."),
]

# 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
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dial_langchain-0.10.0.tar.gz (125.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dial_langchain-0.10.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file dial_langchain-0.10.0.tar.gz.

File metadata

  • Download URL: dial_langchain-0.10.0.tar.gz
  • Upload date:
  • Size: 125.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dial_langchain-0.10.0.tar.gz
Algorithm Hash digest
SHA256 1e4f2e1a095cfe6bb4f3563d833097a7c36ab3330c0560afd07ef7b1ba80a962
MD5 747f51135a726aa98784cd44afd47f46
BLAKE2b-256 490b9ad415c68e25f7d4c234581fa6426405e4a91632d0ceb2b46c569d28ec3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dial_langchain-0.10.0.tar.gz:

Publisher: publish-sdk-langchain.yml on GENWAY-AI/dial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dial_langchain-0.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dial_langchain-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8660a924e308caa04420cd25e2cc05e1077ffadde3e71a74f71d30f65f01808a
MD5 a3a915edf089ab1c400498a953beb188
BLAKE2b-256 c94fa712220cfcba4d9a1df56072f73060a1c7a31a56bc73fb9d1a70881679d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for dial_langchain-0.10.0-py3-none-any.whl:

Publisher: publish-sdk-langchain.yml on GENWAY-AI/dial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page