Skip to main content

AgentPhone tools for OpenAI Agents SDK — telephony for AI agents

Project description

openai-agents-agentphone

PyPI version License: MIT

AgentPhone tools for the OpenAI Agents SDK — let your AI agents send SMS messages, make phone calls, and manage phone numbers.

Installation

pip install openai-agents-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 agents import Agent
from openai_agents_agentphone import get_tools

agent = Agent(
    name="Phone Assistant",
    instructions="You help users manage phone numbers, send messages, and make calls.",
    tools=get_tools(),
)

Use specific tools

from openai_agents_agentphone import get_tools

tools = get_tools(selected=["send_sms", "list_numbers", "make_call"])

Use individual tools

from agents import Agent
from openai_agents_agentphone import agentphone_send_sms, agentphone_make_call

agent = Agent(
    name="Outbound Agent",
    instructions="You make calls and send messages on behalf of the user.",
    tools=[agentphone_send_sms, agentphone_make_call],
)

Configure API key in code

from openai_agents_agentphone import configure

configure(api_key="your-api-key")

Full example with Runner

import asyncio
from agents import Agent, Runner
from openai_agents_agentphone import configure, get_tools

configure(api_key="your-api-key")

agent = Agent(
    name="Phone Assistant",
    instructions="You help users with phone calls and messages via AgentPhone.",
    tools=get_tools(),
)

async def main():
    result = await Runner.run(agent, "List my phone numbers")
    print(result.final_output)

asyncio.run(main())

Available Tools

Tool Name Description
agentphone_send_sms Send SMS Send an SMS message from an agent's phone number
agentphone_make_call Make Call Make an AI-powered outbound phone call
agentphone_get_transcript Get Transcript Get the full transcript of a call
agentphone_list_calls List Calls List recent phone calls with filters
agentphone_list_conversations List Conversations List SMS conversation threads
agentphone_get_conversation Get Conversation Get a conversation with messages
agentphone_buy_number Buy Number Buy a new phone number
agentphone_list_numbers List Numbers List all phone numbers
agentphone_create_agent Create Agent Create a new AI phone agent
agentphone_list_agents List Agents List all AI phone agents
agentphone_create_contact Create Contact Create a new contact
agentphone_list_contacts List Contacts List contacts

API Reference

See the AgentPhone documentation for full API details.

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

openai_agents_agentphone-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

openai_agents_agentphone-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file openai_agents_agentphone-0.1.0.tar.gz.

File metadata

File hashes

Hashes for openai_agents_agentphone-0.1.0.tar.gz
Algorithm Hash digest
SHA256 762f148a442e02efc4580c05e44125ab8b940ec58be09e838a3fd9945400c77e
MD5 a904b5d321e2ebc01e68695b99d0639b
BLAKE2b-256 bf2dedea71b3fbd95e3f1a2bd5858f895ab475a0b07ed4d3b55afa36b5fcf46c

See more details on using hashes here.

File details

Details for the file openai_agents_agentphone-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openai_agents_agentphone-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70ae14e1e5f9179268a408ac120e9b839e101ed08166e5fb299e45d0a21539ec
MD5 a519aedc02a401f2cbbe266e2484ae16
BLAKE2b-256 f890f38f66a4683d9d8a0c06605ee22fdc08d6a61b80c2dbf9ab665726e37254

See more details on using hashes here.

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