Prerequisites
Install the required library:Tweepy is a Python library for interacting with the X API.
Setup
-
Create X Developer Account
- Visit developer.x.com and apply for developer access
- Create a new project and app in your developer portal
-
Generate API Credentials
- Navigate to your app’s “Keys and tokens” section
- Generate and copy these credentials:
- API Key & Secret
- Bearer Token
- Access Token & Secret
-
Configure Environment
Example
cookbook/tools/x_tools.py
Check out the Tweet Analysis Agent for a more advanced example.
Toolkit Params
Toolkit Functions
Developer Resources
- View Tools
- View Cookbook
- View Tweet Analysis Agent Cookbook