Skip to main content

Client library for AI Text-a-roo — give any AI agent a phone number

Project description

AI Text-a-roo

Give any AI agent a phone number. In 60 seconds.

pip install aitextaroo

What is this?

AI Text-a-roo is an SMS gateway for AI agents. You sign up, get a phone number, and your agent can send and receive text messages.

This library connects your agent to the gateway. No webhook, no public IP, no server setup — just one outbound HTTPS connection.

Setup

Let your agent do it

Tell your agent:

Go to aitextaroo.com and set up SMS for me.

Your agent will find the setup instructions and handle everything.

Or use the CLI

# 1. Install
pip install aitextaroo

# 2. Verify your phone (sends a 6-digit code)
aitextaroo-setup --phone +12125551234

# 3. Enter the code, get your API key
aitextaroo-setup --phone +12125551234 --code 123456

# 4. Start the bridge
aitextaroo-bridge --api-key YOUR_KEY

The bridge auto-detects your AI agent and starts piping SMS through it.

Supported agents: claude (Claude Code), hermes, openclaw, nanoclaw.

How it works

Your phone                AI Text-a-roo              Your machine
    │                         │                          │
    ├── SMS "hey" ──────────► │                          │
    │                         ├── SSE stream ──────────► │
    │                         │                          ├── Agent processes
    │                         │   POST /v1/send ◄────────┤   the message
    │  ◄── SMS "hello!" ──────┤                          │
    │                         │                          │
  1. User texts your assigned number
  2. AI Text-a-roo pushes the message via SSE (Server-Sent Events)
  3. Your agent processes it and replies via client.send()
  4. The reply is delivered as SMS

No polling. No webhooks. No public IP. Works behind NAT, firewalls, VPNs.

Features

Conversation history

The bridge keeps conversation context in memory so your agent can have coherent multi-turn conversations over SMS. History is local — nothing is stored on our servers.

SMS formatting

Agent responses are automatically cleaned for SMS — markdown bold, italic, code blocks, and headers are stripped to plain text.

SMS commands

Your user can text these commands:

Command What it does
/help List available commands
/new Start a fresh conversation
/status Show agent name, uptime, message count

Python API

TextarooClient

import asyncio
from aitextaroo import TextarooClient

async def main():
    client = TextarooClient(api_key="your-key")

    async for message in client.listen():
        print(f"Got: {message.text}")
        await client.send(f"You said: {message.text}")

asyncio.run(main())

listen(auto_reconnect=True)AsyncIterator[InboundMessage]

Opens an SSE stream and yields messages as they arrive. Handles reconnection automatically.

send(text)str

Send an SMS to the registered user. Returns the message ID.

account()dict

Get account info (tier, assigned number, usage).

close()

Release resources.

Signup API (static methods)

# Send verification code
await TextarooClient.request_verification(phone="+12125551234")

# Confirm and get API key
result = await TextarooClient.confirm_verification(phone="+12125551234", code="123456")
print(result["api_key"])
print(result["assigned_number"])

InboundMessage

Field Type Description
id str Unique message ID (UUID)
text str Message body
received_at str ISO 8601 timestamp
channel str Always "sms"
has_pin bool Whether sender has a PIN

Privacy

  • Messages pass through and disappear — nothing is stored on our servers
  • Conversation history lives in your bridge process memory only
  • When the bridge stops, history is gone
  • Your phone number is hashed and encrypted at rest

Environment Variables

Variable Description
AITEXTAROO_API_KEY Your API key (alternative to --api-key)
AITEXTAROO_BASE_URL Custom API URL (for self-hosted)

License

MIT

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

aitextaroo-0.1.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

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

aitextaroo-0.1.0-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aitextaroo-0.1.0.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aitextaroo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0dd7ec7080cbf77244b1bc19eabe9ca36b0ecb929f64c30331fbebdc9a23cde6
MD5 5dd9a92809b103cdebc87248543a3627
BLAKE2b-256 bd2259362bc033f28f6a73bc0c17208f110bdf237c1e01a72a1077a43911ebf0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aitextaroo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aitextaroo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2ded6896e0b4334d3dd097f74a03710a08b80597d818b27f11118054d0a0e43
MD5 4aa5ff91340377cf842a104e31dc53d5
BLAKE2b-256 9943844f51a5f8e438d16d82a9d6a09d67d1024fb1f3ed8dc231fcd643c2196f

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