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/91_tools/x_tools.py
Check out the Tweet Analysis Agent
for a more advanced example.
Toolkit Params
Toolkit Functions
You can use
include_tools or exclude_tools to modify the list of tools the agent has access to. Learn more about selecting tools.