CrewAI integration for AgentPhone — telephony tools that let AI agents send SMS messages, make phone calls, and manage phone numbers.
pip install crewai-agentphoneGet your API key from agentphone.to and set it as an environment variable:
export AGENTPHONE_API_KEY="your-api-key"from crewai import Agent
from crewai_agentphone import AgentPhoneToolkit
toolkit = AgentPhoneToolkit()
agent = Agent(
role="Sales Caller",
goal="Call leads and send follow-up texts",
tools=toolkit.get_tools(),
)from crewai_agentphone import AgentPhoneToolkit
toolkit = AgentPhoneToolkit(selected_tools=["send_sms", "make_call"])
tools = toolkit.get_tools()from crewai_agentphone import AgentPhoneSendSMS
tool = AgentPhoneSendSMS()
result = tool.run(
number_id="num_abc123",
to_number="+14155551234",
body="Hello from CrewAI!"
)from crewai import Agent, Task, Crew
from crewai_agentphone import AgentPhoneToolkit
toolkit = AgentPhoneToolkit()
caller = Agent(
role="Outbound Caller",
goal="Call leads to schedule demos",
backstory="You are a friendly sales rep who calls prospects to schedule product demos.",
tools=toolkit.get_tools(),
)
task = Task(
description="Call +14155551234 and schedule a demo for next week",
expected_output="Call transcript and confirmation of scheduled demo",
agent=caller,
)
crew = Crew(agents=[caller], tasks=[task])
result = crew.kickoff()| 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 |
See the AgentPhone documentation for full API details.