Skip to main content

Phone numbers, SMS, email, and voice for AI agents.

Project description

Agentline

Phone numbers, SMS, email, and voice for AI agents. Give your agent a phone number and email address it can actually use — for sign-ups, 2FA, voice calls, and customer communication.

pip install agentline

The 3-line DX

from agentline import Agentline

agent = Agentline(api_key="ag_live_...")
code = agent.get_verification_code("+18005551234", timeout=120)

All-in-one flow:

phone, code = agent.capture_code(area_code="415", timeout=60)
# phone = the number you give to the signup form
# code  = the 2FA code received via SMS

Agent self-signup

Agents can sign themselves up — no human required:

agent = Agentline.signup(
    email="my-agent@example.com",
    name="Customer Support Bot",
    purpose="Handle customer service inquiries",
)
phone = agent.provision_number(area_code="415")

Capabilities

Phone numbers

  • search_numbers(country_code, area_code, limit) — search available numbers
  • provision_number(phone_number=None, area_code=None) — provision a number
  • release_number(phone_number) — release when done
  • list_numbers() — list provisioned numbers

SMS

  • send_sms(from_, to, body) — send an outbound SMS
  • get_messages(phone_number, limit) — recent messages
  • wait_for_sms(phone_number, timeout, match) — long-poll for next inbound SMS
  • get_verification_code(phone_number, timeout, pattern) — wait for a 2FA code
  • capture_code(area_code, timeout, release_after) — provision + wait + release

Voice calls

  • make_call(from_, to, prompt, voice, first_message, ...) — outbound AI voice call
  • get_call(call_id) — call status + transcript
  • hangup(call_id) — end an active call

Email

  • create_email_address(local_part) — provision an email
  • list_email_addresses() / release_email_address(id)
  • send_email(from_, to, subject, body, body_html, reply_to)
  • get_emails(email_address, limit)
  • wait_for_email(email_address, timeout, match)
  • get_email_verification_code(email_address, timeout, pattern)
  • capture_email_code(local_part, timeout, release_after)

Error handling

from agentline import Agentline, AgentlineError

try:
    agent.provision_number(area_code="415")
except AgentlineError as e:
    print(f"{e.status_code}: {e}")

Context manager

with Agentline(api_key="ag_live_...") as agent:
    code = agent.get_verification_code("+18005551234", timeout=120)

Links

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

agentline-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

agentline-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentline-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2ffa147112f6564332c79d207fe8949e27a2faf4b67b536694e2daa057f3e570
MD5 d6bab898b327aeb35a8e9dc4fab92e5a
BLAKE2b-256 db70ca0e5fc0d36454c7919236d22ea6088444f0528f3f1391ae74943f395cc2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for agentline-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6748d3adb07e2db87e8e69a4e1702d649ee0e325f11f6e8785f87868d220ed1
MD5 83d6e777d44795e208227d6c5b41061a
BLAKE2b-256 b04a74eef80031f06a7c3f95d4c47b473c5cb71585d6159eb7c6972a9af511ce

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