Skip to main content

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

Release files for agentline 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentline 0.1.0
File Size Uploaded
agentline-0.1.0.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentline 0.1.0
File Interpreter ABI Platform
agentline-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / agentline-0.1.0.tar.gz

Download URL agentline-0.1.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2ffa147112f6564332c79d207fe8949e27a2faf4b67b536694e2daa057f3e570
BLAKE2b-256 checksum
How to use checksums
db70ca0e5fc0d36454c7919236d22ea6088444f0528f3f1391ae74943f395cc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / agentline-0.1.0-py3-none-any.whl

Download URL agentline-0.1.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6748d3adb07e2db87e8e69a4e1702d649ee0e325f11f6e8785f87868d220ed1
BLAKE2b-256 checksum
How to use checksums
b04a74eef80031f06a7c3f95d4c47b473c5cb71585d6159eb7c6972a9af511ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page