LangChain integration for AgentPhone — telephony tools for AI agents
Project description
langchain-agentphone
LangChain integration for AgentPhone — telephony tools that let LLM agents send SMS messages, make phone calls, and manage phone numbers.
Installation
pip install langchain-agentphone
Setup
Get your API key from agentphone.to and set it as an environment variable:
export AGENTPHONE_API_KEY="your-api-key"
Quick Start
Use all tools
from langchain_agentphone import AgentPhoneToolkit
toolkit = AgentPhoneToolkit()
tools = toolkit.get_tools()
Use specific tools
from langchain_agentphone import AgentPhoneToolkit
toolkit = AgentPhoneToolkit(selected_tools=["send_sms", "list_numbers"])
tools = toolkit.get_tools()
Use individual tools
from langchain_agentphone import AgentPhoneSendSMS
tool = AgentPhoneSendSMS()
result = tool.invoke({
"number_id": "num_abc123",
"to_number": "+14155551234",
"body": "Hello from LangChain!"
})
With a LangChain agent
from langchain_agentphone import AgentPhoneToolkit
from langchain_anthropic import ChatAnthropic
from langgraph.prebuilt import create_react_agent
llm = ChatAnthropic(model="claude-sonnet-4-20250514")
toolkit = AgentPhoneToolkit()
agent = create_react_agent(llm, toolkit.get_tools())
response = agent.invoke({
"messages": [("user", "Send an SMS from number num_abc123 to +14155551234 saying hello")]
})
Available Tools
| Tool | Name | Description |
|---|---|---|
AgentPhoneSendSMS |
agentphone_send_sms |
Send an SMS message |
AgentPhoneMakeCall |
agentphone_make_call |
Make an AI-powered outbound call |
AgentPhoneGetTranscript |
agentphone_get_transcript |
Get a call transcript |
AgentPhoneListCalls |
agentphone_list_calls |
List phone calls |
AgentPhoneListConversations |
agentphone_list_conversations |
List SMS conversations |
AgentPhoneGetConversation |
agentphone_get_conversation |
Get conversation with messages |
AgentPhoneBuyNumber |
agentphone_buy_number |
Buy a phone number |
AgentPhoneListNumbers |
agentphone_list_numbers |
List phone numbers |
AgentPhoneCreateAgent |
agentphone_create_agent |
Create an AI phone agent |
AgentPhoneListAgents |
agentphone_list_agents |
List AI phone agents |
AgentPhoneCreateContact |
agentphone_create_contact |
Create a contact |
AgentPhoneListContacts |
agentphone_list_contacts |
List contacts |
API Reference
See the AgentPhone documentation for full API details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_agentphone-0.1.0.tar.gz.
File metadata
- Download URL: langchain_agentphone-0.1.0.tar.gz
- Upload date:
- Size: 110.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c66888ee92d54c9a15ef31f1db98fe8953fb131b13326c1e63ed84f6407e5e39
|
|
| MD5 |
2012f3a8349926b641a81002e989efaa
|
|
| BLAKE2b-256 |
959f4bdf8237d3b3024e4b33b9e3fa645401fbdad4894f8e0579cc40742dd265
|
File details
Details for the file langchain_agentphone-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_agentphone-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
753ce613966d1c65aab734fe5190fcf14d1618cbd4fc4b701fd3e8e4d15a0cd8
|
|
| MD5 |
fe8dfadb13e28bca0b71762935c76335
|
|
| BLAKE2b-256 |
8f8f914bff74cd4c754a5ec556fc02cd25ccd32a7436c6d9079d8af17cd43e04
|