feat: added plugin-twilio this can send message using sms or whatsapp
Relates to
Risks
Background
What does this PR do?
this will add a twilio api implemenation for send SMS or WhatsApp Message
What kind of change is this? this is a new plugin so this will be addition to current repo
this is none breaking, all possible errors are catch
i saw Shaw post this in X with reward so i did this for that reward, i really need money :)
Documentation changes needed?
it need some small changes you need to update Agent package.json to include plugin-twilio, then wire it in agent for plugin initialization and then pnpm install and pnpm build just to make sure
Testing
for testing you just need to tell the AI Agent the exact command format, please check the Usage Sample
Usage Sample
The message that you want to send must be inside a Single Quote or double quotes
Example 1: Please send sms to [phone number], and my message is '[your message here]' Please send whats app message to [phone number], and my message is '[your message here]'
Example 2: Please send sms to [phone number], and my message is "[your message here]" Please send whats app message to [phone number], and my message is "[your message here]"
Where should a reviewer start?
inside the plugin-twilio to make sure i follow the standards
Detailed testing steps
add this to .env file and fill in the details
Twilio Part
TWILIO_ACCOUNT_SID= TWILIO_AUTH_TOKEN= TWILIO_PHONE_NUMBER= TWILIO_WHATSAPP_PHONE_NUMBER=
then follow this steps
How to use
- create your .env file , if you don't have it yet and then populate it with the information above, make sure to fill in all information
- Add this project into your eliza os project under packages
- using terminal go inside plugin-twilio then type pnpm install twilio
- go inside your agent folder update the package.json add this "@elizaos/plugin-twilio": "workspace:*"
- add this inside your Agent index.ts import { twilioPlugin } from "@elizaos/plugin-twilio";
- Add twilioPlugin in Agent Runtime still inside Agent index.ts
- pnpm install
- pnpm build
- pmpn start --character="characters/nameofyouragentcharacterfile.character.json"
#Note: Make sure you have the following:
- Verified Twilio developer account
- Verified Twilio phone number
- Verified Twilio Whatspapp enabled phone number
- have enough credits but they provide free small credits when your account is new
visit twilio: https://www.twilio.com twilio quick start guides: https://www.twilio.com/docs/messaging/quickstart twilio documentation: https://www.twilio.com/docs/messaging Free Trial Account: https://www.twilio.com/docs/messaging/guides/how-to-use-your-free-trial-account
For WhatsApp guides follow the link below you need to have a separate twilio whatsapp enabled phone number
https://www.twilio.com/docs/whatsapp https://www.twilio.com/docs/whatsapp/quickstart/node https://www.twilio.com/docs/whatsapp/getting-started#registering-a-whatsapp-sender https://www.twilio.com/docs/verify/whatsapp
#Some Other Whats App Info that you might need https://www.twilio.com/docs/whatsapp
#Twilio Phone Number guidelines https://www.twilio.com/en-us/guidelines
Clarification this project is intended to be use/place inside elizaos project packages, this can't work alone
Sample implementation can be found here
https://github.com/juanc07/AgentSoulSpark
ph represent, this is nice, salamat juan for this!!!
What do you mean should be gated? hmmm the twilio auth and sid will be loaded via vars in .env but sure i'll check if we do need secret because i think the Auth value is the twilio secret, BTW your twilio account should be verified, you have a verified twilio phone number, subscription and have enough credits if you have this you can send sms and whatsapp messages in any phone number. If you are just using sandbox or free trial then you can only send sms and whatsapp to your self only
On Sun, Jan 5, 2025, 4:46 AM Patrick @.***> wrote:
ph represent, this is nice, salamat juan for this!!!
— Reply to this email directly, view it on GitHub https://github.com/elizaOS/eliza/pull/1822#issuecomment-2571407525, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALIZMEHEQIACG5PPMBYMTVT2JBCDRAVCNFSM6AAAAABUTKUV6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZRGQYDONJSGU . You are receiving this because you were mentioned.Message ID: @.***>
ph represent, this is nice, salamat juan for this!!!
thanks but not approved yet, hahaha!
suddenly i got integration test issue, but the error is not related to plugin-twilio here is the log "packages/plugin-node postinstall: throw new ERR_MODULE_NOT_FOUND( packages/plugin-node postinstall: ^ packages/plugin-node postinstall: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/runner/work/eliza/eliza/packages/plugin-node/node_modules/@elizaos/core/dist/index.js' imported from /home/runner/work/eliza/eliza/packages/plugin-node/scripts/postinstall.js"
BTW my PR is behind the develop branch , should i do the rebase or the moderator or admin only?
i tried all that i can do but it seems some where in the repo the plugin-node is link or pointing to this directory "/home/runner/work/eliza/eliza/packages" so for me it seems like a local machine directory but the weird thing is i can't find it in the project. the whole error is "packages/plugin-node postinstall: throw new ERR_MODULE_NOT_FOUND( packages/plugin-node postinstall: ^ packages/plugin-node postinstall: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/runner/work/eliza/eliza/packages/plugin-node/node_modules/@elizaos/core/dist/index.js' imported from /home/runner/work/eliza/eliza/packages/plugin-node/scripts/postinstall.js"
the issue about the integration test is now fix, thank you @odilitime
after merging with new changes from develop branch i got issues and error in integration test again "Error: ...1816_a2665c1acc2b05267414f68f617d222f npm-install: src/utils/root-ca.ts(4330,14): error TS2742: The inferred type of 'ROOT_CAS' cannot be named without a reference to '.bin/store/v3/tmp/_tmp_1816_a2665c1acc2b05267414f68f617d222f/node_modules/@peculiar/x509'. This is likely not portable. A type annotation is necessary. ...1816_a2665c1acc2b05267414f68f617d222f npm-install: npm error code 1 ...1816_a2665c1acc2b05267414f68f617d222f npm-install: npm error path /home/runner/setup-pnpm/node_modules/.bin/store/v3/tmp/_tmp_1816_a2665c1acc2b05267414f68f617d222f ...1816_a2665c1acc2b05267414f68f617d222f npm-install: npm error command failed ...1816_a2665c1acc2b05267414f68f617d222f npm-install: npm error command sh -c npm run build ...1816_a2665c1acc2b05267414f68f617d222f npm-install: npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2025-01-06T01_18_30_870Z-debug-0.log ...1816_a2665c1acc2b05267414f68f617d222f npm-install: Failed"
We have all the same error, maybe the error is on the develop branch.
integration test is working again after merging with latest develop branch
The workflow should be the end user can text texts or call the number and gets the agent. The voice of the agent should use Elevenlabs, if at all possible
This pull request has been automatically marked as stale due to 30 days of inactivity. If no further activity occurs within 7 days, it will be closed automatically. Please take action if this pull request is still relevant.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR. (Beta)@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Hello,
We are changing our plugin development strategy to be more scalable. We have moved the plugins out into their own repos and we're looking for people to either maintain those or own them on their own Github.
If you'd like to be a maintainer, file an issue in the plugin repo and join our Discord https://discord.gg/elizaos to coordinate.
If you'd like to control the plugin on your own Github, please add an issue to the plugin repo pointing to your repo, and add a modification to the registry. Submit a PR to edit the registry here: https://github.com/elizaos-plugins/registry
Closing this PR for now. Let us know if you have any questions.