X Tool
Connect your X (Twitter) account to search and retrieve tweets using OAuth authentication.
Prerequisites
- Active X (Twitter) account
- Project with agent building permissions
Add X Tool to Your Project
- Navigate to Tools Library and search for “X”
- Click Add Tool on the X - Search Tweets listing
- Enter a Tool Name for your library
- Click Save
Configure Authentication
-
In the tool setup page, select X OAuth from the authentication dropdown
-
Click Create a New Credential
-
Click Authorize to connect your X account
-
Grant the required permissions when prompted
-
Save the generated token as a new credential
💡 Note: Your X account credentials are automatically refreshed in the background through OAuth refresh tokens.
Add Tool to Agent
- Open your agent in the Agent Canvas
- Drag the X tool from your library to the agent
- Configure any additional settings as needed
For detailed setup instructions, see the Tools Setup Guide.
Using X Search Tool
The X Search tool queries recent tweets from the last 7 days using the X API.
Search for Tweets by Topic
Ask your agent to search for specific topics:
Search by User Account
Query tweets from specific users:
Paginate Through Results
Request additional results with follow-up queries:
Specify Result Count
Request a specific number of tweets:
Best Practices
💡 Tip: Add a custom prompt to your agent with details about your search use case, specific accounts you monitor, or your industry domain for better results.
⚠️ Limitation: X Search tool is limited to tweets from the last 7 days due to X API restrictions.