dial_langchain.toolkit

Classes

DialToolkit

All Dial tools in one bundle — phone numbers, SMS/WhatsApp, and voice calls.

Module Contents

class dial_langchain.toolkit.DialToolkit

Bases: langchain_core.tools.BaseToolkit

All Dial tools in one bundle — phone numbers, SMS/WhatsApp, and voice calls.

Build one DialClient and construct the toolkit with it, then call get_tools() to hand the full set to an agent. Every tool shares that one client — a single connection pool for the whole agent:

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")
client = DialClient(DialConfig(api_key="sk_live_..."))
toolkit = DialToolkit(client=client)
agent = create_react_agent(model, toolkit.get_tools())
get_tools() list[langchain_core.tools.BaseTool]

Return every Dial tool, each sharing this toolkit’s client.

client: dial_sdk.DialClient
model_config