Agent0 exists because I wanted a better Discord bot than what I experienced in the Latent Space server. That bot could spin up threads from tweets with summaries and an xcancel link. Vera does that too, and also remembers people in chat so you can ask about prior conversations or users.
Vera is more than just a chatbot (not really). She is an AI agent capable of:
- Summarizing Links: Automatically provides summaries for shared URLs.
- Unrolling Tweets: Fetches and displays full threads from X/Twitter links.
- Remembering Context: Keeps track of conversations and learns facts about the server and users.
- Engaging Conversation: Offers friendly and context-aware chat.
- Bun: Version 1.2.4 or higher
- Discord Bot Token: You need a bot application created in the Discord Developer Portal
- Create Application: Go to the Discord Developer Portal and click "New Application". Name it "Vera" (or whatever you like).
- Get Credentials:
- Copy the Application ID from the "General Information" page.
- Go to the Bot tab, click "Reset Token", and copy the Token.
- Enable Intents:
- On the Bot tab, scroll down to "Privileged Gateway Intents".
- Enable Message Content Intent, Server Members Intent, and Presence Intent.
- Save changes.
- Invite Bot:
- Go to the OAuth2 > URL Generator tab.
- Select
botandapplications.commandsscopes. - Select
Send Messages,Read Messages/View Channels,Embed Links, andAttach Filespermissions. - Copy the generated URL and open it in your browser to invite the bot to your test server.
Create a .env file in the root directory:
DISCORD_TOKEN=your_discord_bot_token_here
DISCORD_APPLICATION_ID=your_discord_application_id_here
GOOGLE_API_KEY=your_google_api_key_hereNote: You can get a Google API Key from Google AI Studio.
Install dependencies:
bun installStart the bot locally:
bun run devYou should see: Ready! Logged in as Vera#1234
Once the bot is running and in your server:
- Direct Message: Send a DM to the bot saying "Hello!". It should reply.
- Server Chat: In a channel where the bot is present, mention it:
@Vera what do you think of this project?. - Link Summary: Paste a link to a news article or documentation page. Vera should automatically reply with a summary.
- Slash Command: Type
/vera message: tell me a joke. (Note: Slash commands may take up to an hour to propagate globally, but are instant in the guild if you updated the code correctly).
When you're ready to deploy to Agentuity Cloud:
agentuity deploy- AGENTS.md: Detailed breakdown of Vera's capabilities and architecture.
- skills/discord_bot_conversion.md: Notes on how this project was converted from a webhook agent to a Discord bot.
- Agentuity docs: https://agentuity.dev/SDKs/javascript
- Discord docs: https://discord.com/developers/docs/intro
The project is configured via agentuity.yaml and package.json.
src/bot.ts: The main entry point for the Discord bot.src/agents/vera/: Contains the core logic for the agent.
This project is licensed under the terms specified in the LICENSE file.
