You can connect your X (Twitter) account to Orqestr and let AI agents post tweets, reply to conversations, search for mentions, like posts, send DMs, and more - all as part of automated workflows. See the full X integration changelog for a complete summary of what shipped.
This guide walks through the full setup: creating an X developer app, getting your API credentials, connecting to Orqestr, and assigning the integration to an agent.
What you will need
- An X (Twitter) account
- Access to the X Developer Portal (free tier works)
- An Orqestr project with at least one agent
Step 1: Create an X Developer App
If you do not already have a developer app on X, go to the X Developer Portal and create a new project and app.
Give your app a name that makes sense for your use case — something like "Orqestr Agent" or your company name.
Step 2: Configure app permissions
By default, new X apps only have read access. Your agents need read and write to post tweets, like, retweet, and send DMs.
- In the Developer Portal, go to your app's Settings
- Scroll to User authentication settings and click Set up
- X will ask you to fill in app information:
| Field | What to enter |
|---|---|
| App permissions | Read and write |
| Type of App | Web App, Automated App or Bot |
| Callback URI | Your app URL (e.g. https://app.orqestr.ai) — this is not used, but required by X |
| Website URL | Your website or app URL |
- Save the settings
Step 3: Generate your API credentials
You need four credentials to connect. All four are found in the Developer Portal under your app's Keys and Tokens section.
API Key and API Secret
These are your app-level credentials. They were generated when you created the app.
- Go to your app → Keys and Tokens
- Under Consumer Keys, find your API Key and API Key Secret
- If you need to regenerate them, click Regenerate (this invalidates the old ones)
Access Token and Access Token Secret
These are your user-level credentials that grant the agent permission to act as your X account.
- On the same Keys and Tokens page, scroll to Authentication Tokens
- Click Generate under Access Token and Secret
- Make sure the access level shows Read and Write — if it shows Read Only, go back to Step 2 and update your app permissions first, then regenerate
Warning
Copy all four values immediately. X only shows the secrets once. If you lose them, you will need to regenerate.
Step 4: Connect X in Orqestr
- Open your Orqestr project
- Go to Integrations in the sidebar
- Find X (Twitter) in the grid and click it
- Enter the four credentials:
- API Key (Consumer Key)
- API Secret (Consumer Secret)
- Access Token
- Access Token Secret
- The Bearer Token field is optional — only needed if you want to receive real-time webhook events (for event triggers)
- Click Connect X (Twitter)
Orqestr encrypts your credentials at rest and never exposes them in the UI after saving.
Step 5: Assign to an agent
The connection exists in your project, but agents do not have access until you explicitly grant it.
- Go to Agents in the sidebar
- Edit the agent you want to use X with (or create a new one)
- In the agent form, scroll to the Integrations section
- Check the X (Twitter) connection
- Optionally configure per-tool permissions (allow, require approval, or disable specific tools)
- Save the agent
Available tools
Once connected, your agent has access to 14 X tools:
| Tool | What it does |
|---|---|
post_tweet | Post a new tweet (up to 280 characters), with optional reply-to or quote |
delete_tweet | Delete a tweet by ID |
get_tweet | Get a tweet with author info and engagement metrics |
search_tweets | Search recent tweets (last 7 days) using X search syntax |
like_tweet | Like a tweet |
unlike_tweet | Remove a like |
retweet | Retweet a tweet |
unretweet | Undo a retweet |
get_user | Look up a user by username |
get_user_tweets | Get recent tweets from a specific user |
send_dm | Send a direct message |
follow_user | Follow a user |
unfollow_user | Unfollow a user |
get_me | Get the authenticated account's profile |
These tools appear namespaced as x_post_tweet, x_search_tweets, etc. in the agent's tool list.
Example workflows
Automated social presence
Create a content agent with a system prompt like:
You are a social media manager for a B2B SaaS startup. You post 3-5 tweets per week about product updates, industry insights, and useful tips. Your tone is professional but approachable. Never use hashtags excessively. Always be authentic.
Set up a recurring schedule (e.g. every Monday, Wednesday, Friday) with input like "Write and post a tweet about [topic]." The agent drafts and posts directly.
Competitor monitoring
Pair the X integration with web_search and resolve_link:
- A research agent searches X for mentions of your competitors using
search_tweets - It compiles a summary of what people are saying
- A response agent drafts thoughtful replies to relevant conversations
Community engagement
A support agent monitors mentions and replies to common questions:
- Use
search_tweetswith a query liketo:yourhandleor@yourhandle - Agent reads the tweets, checks your knowledge base for answers
- Posts replies using
post_tweetwithreply_to_tweet_id
Optional: Webhook events for triggers
If you also want to receive real-time events from X (new mentions, DMs, follows), provide the Bearer Token when connecting. This registers a webhook with X and lets you create event triggers that automatically spawn tasks when specific events occur. The X webhook integration changelog covers the details.
This is optional — you can use all 14 API tools without a webhook.
Troubleshooting
"Read Only" access token — Go to your app settings in the X Developer Portal, update User Authentication Settings to Read and Write, then regenerate your Access Token and Secret.
401 errors — Double-check that you copied all four credentials correctly. API Key and Access Token are different values.
Rate limits — X enforces rate limits per endpoint. The free tier allows around 50 tweets per 24 hours. If your agent hits limits, it will receive an error and can retry later.
Connection test fails — Use the "Test" button on the connection detail panel in Orqestr. It calls get_me to verify your API credentials are valid.
Connect X and automate your social presence
No credit card required. Free plan included.
Start building for free →