packages/docs/plugin-registry/platform/twitter.md
Registry note:
@elizaos/plugin-xis not currently listed in the Eliza plugin registry (plugins.json). The package may be available from npm or a separate elizaOS plugin repository. Verify availability before configuring.
The Twitter plugin connects Eliza agents to Twitter/X, enabling autonomous posting, replying to mentions, monitoring timelines, and engaging with other accounts.
On-demand plugin. This plugin is resolved from the remote elizaOS plugin registry and auto-installs when its credentials are detected. It is not included in Eliza's bundled
plugins.jsonindex.
Package: @elizaos/plugin-x
# Requires the package to be available on npm
eliza plugins install twitter
{
"connectors": {
"twitter": {
"apiKey": "YOUR_API_KEY",
"apiSecretKey": "YOUR_API_SECRET",
"accessToken": "YOUR_ACCESS_TOKEN",
"accessTokenSecret": "YOUR_ACCESS_TOKEN_SECRET"
}
}
}
| Field | Required | Description |
|---|---|---|
apiKey | Yes | Twitter API key (consumer key) |
apiSecretKey | Yes | Twitter API secret key (consumer secret) |
accessToken | Yes | OAuth 1.0a access token |
accessTokenSecret | Yes | OAuth 1.0a access token secret |
enabled | No | Set false to disable (default: true) |
postEnable | No | Enable automated posting (default: true) |
postIntervalMin | No | Minimum minutes between posts (default: 90) |
postIntervalMax | No | Maximum minutes between posts (default: 180) |
searchEnable | No | Enable keyword search monitoring (default: false) |
autoRespondMentions | No | Automatically respond to @mentions (default: true) |
dryRun | No | Generate posts without publishing them (default: false) |
{
"connectors": {
"twitter": {
"apiKey": "...",
"apiSecretKey": "...",
"accessToken": "...",
"accessTokenSecret": "...",
"postIntervalMin": 60,
"postIntervalMax": 120,
"autoRespondMentions": true,
"searchEnable": true
}
}
}
When configured, the agent posts autonomously at random intervals within the configured range. Posts are generated by the LLM using the character's voice and personality.
The posting loop:
postIntervalMin and postIntervalMax minutes@mention or DM received
↓
Plugin fetches conversation context
↓
AgentRuntime processes with full thread context
↓
Response generated
↓
Posted as reply to original tweet
After installation, the plugin loads when connectors.twitter contains apiKey. Unlike bundled connectors, it does not auto-enable from config alone — it must be installed first.
The plugin also reads TWITTER_API_KEY, TWITTER_API_SECRET_KEY, TWITTER_ACCESS_TOKEN, and TWITTER_ACCESS_TOKEN_SECRET as fallbacks when the corresponding config fields are absent. Config fields take precedence.
Twitter enforces strict rate limits on the v2 API. The plugin manages these automatically. Limits change frequently — check the X developer documentation for current numbers before choosing a tier.