Twitter Agent
Here's an example showing you how to setup the .env, config, and run the Twitter client.
Environment
Set these .env
variables by visiting your Twitter developer dashboard. Haven't set this up? Learn more here.
Name
TWITTER_API_KEY
TWITTER_API_SECRET
TWITTER_ACCESS_TOKEN
TWITTER_ACCESS_TOKEN_SECRET

You MUST regen tokens after changing this setting.
Config
Completion provider can be ANY provider you'd like, and "embedding_provider"
"db"
ARE REQUIRED.
{
"clients": {
"twitter": {
// Set the min/max range for delay between posts in MINUTES
"post_delay": [
10,
20
],
// Set the min/max range for delay between replies in MINUTES
"reply_delay": [
10,
20
],
// Set delay in MINUTES after searching twitter for relevant posts when creating post response
"search_delay": 1,
// Set HARD delay in MINUTES between actions
"delay": 0,
// If TRUE agent wont post/reply live but will print its responses in the console
"debug": true
}
},
"completion_provider": "anthropic",
"embedding_provider": "local",
"db": "local"
}
Interaction
No interaction is needed on your end once its running. The agent will print logs related to actions taken, posts fetched, and sleep durations between actions.
Last updated