This example demonstrates an agent setup as a terminal style chatbot with access to Twitter (X) API actions.
- "What are my account details?"
- "Please post a message for me to Twitter"
- "Please get my mentions"
- "Please post responses to my mentions"
- Python 3.10+
- Poetry for package management and tooling
- OpenAI API Key
- Twitter (X) API Key's
- Visit the Twitter (X) Developer Portal
- Navigate to your project
- Navigate to your application
- Edit "User authentication settings"
- Set "App permissions" to "Read and write and Direct message"
- Set "Type of App" to "Web App, Automated app or Bot"
- Set "App info" urls
- Save
- Navigate to "Keys and tokens"
- Regenerate all keys and tokens
python --version
poetry --versionEnsure the following vars are set in .env-local:
- "OPENAI_API_KEY"
- "TWITTER_ACCESS_TOKEN"
- "TWITTER_ACCESS_TOKEN_SECRET"
- "TWITTER_API_KEY"
- "TWITTER_API_SECRET"
- "TWITTER_BEARER_TOKEN"
Rename .env-local to .env
make run