API ReferenceIntegrations
Integrations
Integrating with other libraries
Discord
Add Discord integration to your agent by following these steps:
-
Create a Discord bot application:
- Go to https://discord.com/developers/applications
- Click "New Application" and give it a name
- Note down the CLIENT_ID (also called "Application ID") from the General Information tab
-
Configure bot settings:
- Go to https://discord.com/developers/applications/CLIENT_ID/bot (replace CLIENT_ID with your actual ID)
- Under "Privileged Gateway Intents", enable:
- Presence Intent
- Server Members Intent
- Message Content Intent
-
Add the bot to your server:
- Visit this URL (replace CLIENT_ID with your actual ID):
- Select the server you want to add the bot to
- Authorize the bot
-
Get your bot token:
- Go back to https://discord.com/developers/applications/CLIENT_ID/bot
- Click "Reset Token" to reveal your bot token
- Copy and save this token securely - you'll need it for configuration
- Note: if you haven't created the agent yet, please follow this Create an Agent first.
-
Configure your agent:
- Add the following component to your agent:
Additional Notes:
- The bot will only respond in the specified channels and to whitelisted users (if configured)
- Voice channel support requires additional Discord permissions (see above)
- Channel names are case-sensitive and should match exactly
- For DMs, users must share a server with the bot
- The bot token should be kept secure and not committed to version control.
- You can use
.env.txt
and the useEnv() hook to load it at runtime.
- You can use
- If you need to reset the token for security reasons, you can do so in the Discord Developer Portal
- The bot requires a stable internet connection to maintain WebSocket connection with Discord
- Rate limits apply to bot actions - see Discord's developer documentation for details
Twitter integration allows your agent to interact with Twitter by responding to mentions.
-
Create a Twitter Developer Account:
- Go to https://developer.twitter.com/
- Sign up for a developer account if you haven't already
- Create a new project and app
- Make sure your "User authentication settings" are set to "Native app" (Public client)
- Copy your OAuth 2.0 application credentials (Client ID and Client Secret)
-
Log in with oauth at https://twitter-auth.upstreet.ai/
- Use the Client ID and Client Secret from step 1
-
Configure your agent:
- Add the following component to your agent:
Additional Notes:
- The bot will automatically listen for and respond to mentions of your Twitter account
- The token should be kept secure and not committed to version control
- You can use
.env.txt
and the useEnv() hook to load it at runtime
- You can use
- The bot polls for new mentions every 10 seconds
- Twitter API rate limits apply - see Twitter's developer documentation for details
- The bot requires a stable internet connection to maintain communication with Twitter
- Note: if you haven't created the agent yet, please follow this Create an Agent first.