LangChain
Give your LangChain agent a real phone number. Make calls, send messages, buy numbers, and manage voice agents — all through the langchain-agentphone package.
Get your API key from agentphone.ai/settings. Tool calls and hosted voice do not require your own webhook server. For real-time inbound handling in your application, configure a webhook endpoint.
Installation
Set your API key as an environment variable:
langchain-agentphone 0.1.0 requires langchain-core<1. The example uses the compatible 0.3-era LangChain stack; it is not a LangChain 1.x example. For a project on current LangChain, connect the hosted MCP server using LangChain’s MCP integration instead of forcing incompatible dependency versions.
Configure credentials for the model provider separately (the example uses ANTHROPIC_API_KEY).
Setup
Using the toolkit
The AgentPhoneToolkit gives your agent access to all 12 LangChain tools at once. Use selected_tools to expose only the capabilities you need.
Selecting specific tools
Importing individual tools
Use cases
- Autonomous phone calls — have your agent call a number and hold a full AI conversation, then retrieve the transcript after the call ends
- SMS messaging — send and receive texts, manage conversation threads across multiple numbers
- Phone number management — provision numbers with specific area codes, assign them to agents
- AI voice agents — create agents with configurable voices, system prompts, and model tiers that handle calls autonomously
- Appointment reminders — pull schedules from a calendar API and text or call customers with reminders
- Lead qualification — call new leads within seconds, qualify interest, and book meetings automatically
Available tools
The package provides 12 LangChain tools:
Every tool has a full Pydantic schema so your LLM knows exactly what arguments to pass.

