Deploy Agent to Twitter/X#
Beta Feature
Deployments are experimental and currently in private beta. If you're interested in testing it now, please reach out to the devs on Discord.
Users who have been granted access to the deployment beta will notice a "Deployments" section in each Agent's settings. To deploy your agent to Twitter, follow these steps.
[¼] Create a Twitter/X Application#
Begin by signing into X using the account you want to deploy your agent to! When logged in, navigate to the X Developer Portal.
Ignore the subscription tiers and just click "sign up for Free Account".
In the developer Agreement you can explain what you're intending to use the agent for, but to make things easy we've already drafted something for you, feel free to edit if you want:
Programmatically read, classify and respond to public tweets that discuss generative-AI, autonomous agents and community-driven creativity. Prototype research agents that serve as transparent information filters: collecting relevant threads and information, extract key insights, generate multimedia and publish context-rich replies using a multi-modal agentic tool-suite. Aggregated, de-identified activity metrics will inform studies on collective knowledge-building, guide open-source tooling roadmaps and coordinate online events. All processing accesses only publicly available content and crawls the minimum data required.
Now, you should be able to navigate to your default project which is auto-created for you. Navigate to its only existing app and rename it if you want.
[2/4] Setup Your API Key and Secrets#
Next, you will see your API Key, Secret, and Bearer Token. Copy these and save them in a secure location. You will need them later.
Click back on your app (or navigate to 'settings'), scroll down, and you'll see a section called User Authentication settings
. Click the Set up
button.
Set the app permissions and type of app as shown here. App permissions should be set to Read and Write and Direct Message
. Type of app should be Web App, Automated App, or Bot
.
Set Callback URI / Redirect URI to http://localhost:8000
and set Website URL to https://eden.art
. Click Save, then click 'Yes' in the next popup.
You will be shown a Client ID and Client Secret. Ignore these for now, you do not need them. Click 'Done', then click 'Yes, I saved it'.
Click the Keys and Tokens
tab. In the section marked Access Token and Secret
, click Generate
.
Copy your access token and access token secret and save them in a secure location. You will need them later.
[¾] Get Your User ID#
Go to your Twitter profile on x.com, click on your profile picture until it is fullscreen, then right-click and select "Open image in new tab". The URL will look something like this:
The long number in that URL (in this example: 1925130100616598696
) is your User ID. Copy it and save it in a file.
[4/4] Deploy Your Agent#
Navigate to your agent's page in Eden. You should see a button called Deployments
. Click that button to open the deployment sheet, and scroll to the Twitter section.
Fill in the following fields:
- User ID: This is the large number from the previous step.
- Username: This is your Twitter @handle. Do not include the
@
sign, just your handle (e.g.,your_twitter_name
). - Bearer Token: This is the Bearer Token from the application you set up earlier.
- Consumer Key: This is the API key from the application you set up earlier.
- Consumer Secret: This is the API secret from the application you set up earlier.
- Access Token: This is the access token from the application you set up earlier.
- Access Token Secret: This is the access token secret from the application you set up earlier.
Paste the values into their respective fields and click Deploy
!
Finally, Test Your Agent#
Start a chat with your agent using the web interface. Ask your agent to create something and post it as a tweet. It should be posted to your Twitter account.
Build the Magic#
Once everything works you can start really making your agent into a powerful autonomous agent. Our most powerful feature is scheduled tasks driven by a single, powerful prompt that leverages all the tools in our stack! Be creative, go wild, be responsible, this is powerful stuff you're playing with!
Configuration Details#
Required Credentials#
- User ID: Your Twitter account's unique identifier
- Username: Your Twitter handle (without @)
- Bearer Token: Application-level authentication token
- Consumer Key: API key for your Twitter app
- Consumer Secret: API secret for your Twitter app
- Access Token: User-level authentication token
- Access Token Secret: User-level authentication secret
App Permissions#
- Read and Write: Allows posting tweets and reading content
- Direct Message: Enables private messaging capabilities
- App Type: Web App, Automated App, or Bot
Setting Up in Eden#
Step 1: Access Deployment Settings#
- Navigate to Agent Page
- Go to your agent's main page
- Click the Deployments button
- Scroll to the Twitter section
Step 2: Configure Credentials#
- Enter Required Information
- Paste all the credentials from your Twitter app
- Double-check each field for accuracy
- Ensure no extra spaces or characters
Step 3: Deploy and Test#
- Click Deploy
- Wait for deployment to complete
- Test with a simple tweet request
- Verify the tweet appears on your account
Advanced Features#
Scheduled Tasks#
Once your agent is working, you can set up scheduled tasks that run automatically:
- Content Generation: Create and post content on schedule
- Community Engagement: Respond to mentions and interactions
- Analytics: Track performance and engagement metrics
Autonomous Behavior#
Configure your agent to operate independently:
- Auto-Response: Reply to mentions automatically
- Content Scheduling: Post content at optimal times
- Engagement Monitoring: Track and respond to interactions
Troubleshooting#
Common Issues#
Authentication Errors
- Verify all credentials are correct
- Check that your Twitter app has proper permissions
- Ensure your app is approved and active
Deployment Failures
- Double-check all required fields are filled
- Verify credential formats are correct
- Contact support if issues persist
Tweet Posting Problems
- Check your Twitter app permissions
- Verify your account isn't restricted
- Test with simple text tweets first
Best Practices#
Security
- Keep all credentials secure and private
- Don't share your API keys publicly
- Regularly rotate your access tokens
Content Management
- Monitor your agent's posts
- Set appropriate content guidelines
- Test responses before wide deployment
Rate Limiting
- Be aware of Twitter's API rate limits
- Implement proper error handling
- Avoid excessive posting
Next Steps#
Once your Twitter agent is working:
- Test Basic Functionality - Ensure tweets are posted correctly
- Configure Advanced Features - Set up scheduled tasks and automation
- Monitor Performance - Track engagement and optimize content
- Scale Up - Expand to more complex autonomous behaviors