Skip to main content

Twilio SMS/MMS channel support for MeshAgent

Project description

MeshAgent Twilio

Twilio SMS/MMS channel support for MeshAgent process agents.

This package exports TwilioChannel and create_channel(...) for use with a MeshAgent process channel shim.

The channel turns validated Twilio webhook queue messages into trusted MeshAgent user turns and sends completed agent responses through Twilio's Messages API. Inbound MMS media from Twilio MediaUrl{N} webhook fields is downloaded with the channel's Twilio credentials, uploaded to room storage, and passed to the room agent as AgentFileContent. Text responses are sent as SMS. File attachments emitted by the agent with attach_file are sent as MMS media URLs when they are HTTP(S) URLs, or when room:///... storage URLs can be resolved through room.storage.download_url(path=...). Agent-generated image events are written to room storage as binary media and sent through signed MMS media URLs. Base64/data URL room files are decoded before being exposed to Twilio.

Set MESHAGENT_TWILIO_ALLOWED_FROM_NUMBERS to a comma-separated phone number allowlist to process and send messages only for specific SMS/MMS numbers. Numbers are matched by digits, so +1 (555) 010-1000 and 15550101000 are equivalent. Leave it empty to allow all senders.

Inbound MMS files are stored under MESHAGENT_TWILIO_MEDIA_STORAGE_PREFIX (.threads/twilio-media by default). Set MESHAGENT_TWILIO_INBOUND_MEDIA_MAX_BYTES to cap each inbound media download; the default is 25000000.

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

meshagent_twilio-0.44.16.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

meshagent_twilio-0.44.16-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file meshagent_twilio-0.44.16.tar.gz.

File metadata

  • Download URL: meshagent_twilio-0.44.16.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for meshagent_twilio-0.44.16.tar.gz
Algorithm Hash digest
SHA256 16ea09d58a3d5cf65a83f17c89634d4167a9f21e64b8cb540ec856e5cc6f6324
MD5 a1d285019589fa8bcf2c5f4985ad614d
BLAKE2b-256 268bb81a780f1551d26538facc6b9b531f5ca0b09789c039200c79eef6df40db

See more details on using hashes here.

File details

Details for the file meshagent_twilio-0.44.16-py3-none-any.whl.

File metadata

File hashes

Hashes for meshagent_twilio-0.44.16-py3-none-any.whl
Algorithm Hash digest
SHA256 5b99953f460f6712db15f04a26756fafb1368b520325f1562005673eba4f0597
MD5 7a57b2b7ee04d23f0332bc13944af47f
BLAKE2b-256 e0ca90527f5efd1e6b753b2f61e7b23b6fb08f1d14bcf47b7d0a7b46a3a8e97e

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