Metadata-Version: 2.4
Name: openai-agents-agentphone
Version: 0.1.0
Summary: AgentPhone tools for OpenAI Agents SDK — telephony for AI agents
Project-URL: Homepage, https://agentphone.to
Project-URL: Documentation, https://docs.agentphone.to
Project-URL: Repository, https://github.com/AgentPhone-AI/openai-agents-agentphone
Project-URL: PyPI, https://pypi.org/project/openai-agents-agentphone/
Author-email: AgentPhone <support@agentphone.to>
License: MIT
License-File: LICENSE
Keywords: agentphone,agents,ai-agents,openai,sms,telephony,voice
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Telephony
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: agentphone<1.0.0,>=0.5.0
Requires-Dist: openai-agents>=0.0.7
Description-Content-Type: text/markdown

# openai-agents-agentphone

[![PyPI version](https://img.shields.io/pypi/v/openai-agents-agentphone)](https://pypi.org/project/openai-agents-agentphone/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

[AgentPhone](https://agentphone.to) tools for the [OpenAI Agents SDK](https://github.com/openai/openai-agents-python) — let your AI agents send SMS messages, make phone calls, and manage phone numbers.

## Installation

```bash
pip install openai-agents-agentphone
```

## Setup

Get your API key from [agentphone.to](https://agentphone.to) and set it as an environment variable:

```bash
export AGENTPHONE_API_KEY="your-api-key"
```

## Quick Start

### Use all tools

```python
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

```python
from openai_agents_agentphone import get_tools

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

### Use individual tools

```python
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

```python
from openai_agents_agentphone import configure

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

### Full example with Runner

```python
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](https://docs.agentphone.to) for full API details.
