Metadata-Version: 2.4
Name: meshagent-twilio
Version: 0.44.13
Summary: Twilio SMS/MMS channel support for MeshAgent
License-Expression: Apache-2.0
Project-URL: Documentation, https://docs.meshagent.com
Project-URL: Website, https://www.meshagent.com
Project-URL: Source, https://www.meshagent.com
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: meshagent-api==0.44.13
Requires-Dist: meshagent-agents==0.44.13
Requires-Dist: aiohttp<4,>=3.12
Dynamic: license-file

# 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=...)`.

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