Your AI-powered companion that lives in the corner of your browser
A Chrome extension featuring an always-on agent that spawns delightful brainrot: YouTube Shorts feeds, AI-generated jokes, mini-games, and stress-relief fidgets—all without leaving your current page.
- TikTok-style vertical scrolling video feed
- Personalized content based on custom keywords
- Swipe or arrow keys to navigate
- Auto-plays videos as you scroll
- Powered by YouTube Data API v3
- Context-aware jokes generated from the current page content
- Powered by Google Gemini AI
- Text-to-speech voice delivery (optional)
- Smart personality system with dynamic facial expressions
- Tic-Tac-Toe: Classic game vs AI opponent with witty taunts
- Memory Match: Card matching game to test your memory
- Quick entertainment without leaving your page
- Bubble Pop: Satisfying bubble-wrap popping experience
- Fidget Spinner: Drag-to-spin with realistic physics and inertia
- Optional sound effects for tactile feedback
- Agent speaks using ElevenLabs TTS API
- Customizable voice and personality
- Greets you, tells jokes, and makes contextual remarks
- Toggle personality system on/off
- Agent randomly changes facial expressions (idle, smile, grin, pout, sad)
- Makes contextual remarks about the page you're viewing
- Procedural sound effects for each emotion
- Smart face-locking during interactions
- Clone or Download this repository
- Open Chrome → ⋮ More tools → Extensions
- Enable Developer mode (top-right toggle)
- Click Load unpacked and select the
agent_brainrotfolder - Pin the extension to your toolbar for easy access
- Click the Agent Brainrot icon in your toolbar
- Toggle the agent ON (or press
Alt+Shift+B) - A friendly bubble appears in the bottom-right corner! 👋
- Click the bubble to open the menu and explore features
Click the Agent Brainrot toolbar icon to access settings:
| Service | Purpose | Get Your Key |
|---|---|---|
| YouTube Data API v3 | Power the Shorts feed with real videos | Google Cloud Console |
| Google Gemini API | Generate contextual jokes | Google AI Studio |
| ElevenLabs API | Text-to-speech voice (optional) | ElevenLabs |
Note: The extension works without API keys! It uses fallback videos for the Shorts feed and disables AI features gracefully.
- Keywords: Comma-separated topics for personalized content (e.g.,
cats, gaming, cooking) - Shorts Only: Toggle to allow regular YouTube videos or restrict to Shorts only
- ElevenLabs Voice ID: Customize the agent's voice (find voice IDs in your ElevenLabs dashboard)
- Personality Toggle: Enable/disable AI remarks and voice
- Toggle Agent: Click toolbar icon or press
Alt+Shift+B - Open Menu: Click the agent bubble
- Close Agent: Click the
×button on the bubble
- Click bubble → YouTube Shorts
- Swipe or use
↑/↓arrow keys to navigate - Press
Escto close the overlay
- Click bubble → Jokes
- Agent analyzes the current page and generates a contextual joke
- Listens to the joke via text-to-speech (if enabled)
- Click bubble → Games
- Select Tic-Tac-Toe or Memory Match from the dropdown
- Play and have fun! The agent reacts to your wins/losses
- Click bubble → Fidgit
- Choose Bubble Pop or Spinner
- Optional: Enable sound effects with the sound button
agent_brainrot/
├── manifest.json # Chrome MV3 configuration
├── background.js # Service worker (toolbar, commands)
├── content.js # Main content script (injects agent)
├── popup.html/js # Extension settings popup
├── agent/
│ ├── agent.html # Agent bubble UI
│ ├── agent.js # Menu logic, personality system
│ └── agent.css # Agent styles
├── features/
│ ├── video/ # YouTube Shorts feed
│ ├── jokes/ # AI joke generator
│ ├── games/ # Mini-games (tictactoe, match)
│ ├── fidgit/ # Stress-relief tools
│ └── tts/ # ElevenLabs TTS integration
├── assets/ # SVG faces and icons
└── common/ # Shared styles
- Service Worker (
background.js): Listens for toolbar clicks and keyboard commands, sends messages to active tabs - Content Script (
content.js): Injects the agent iframe into web pages, manages overlays - Agent UI (
agent/): Renders the bubble, menu, and handles feature launches - Feature Modules (
features/): Self-contained overlays for video, jokes, games, fidgit - Cross-Frame Messaging: All components communicate via
postMessageAPI
- Vanilla JavaScript (no frameworks)
- Chrome Manifest V3
- Web Audio API (procedural sound effects)
- YouTube iframe API (video player)
- Google Gemini API (AI jokes)
- ElevenLabs API (text-to-speech)
| Permission | Why We Need It |
|---|---|
activeTab |
To inject the agent into the current tab on demand |
scripting |
To dynamically inject the content script if not present |
storage |
To save API keys, preferences, and keywords |
host_permissions |
To function on all http/https websites |
Privacy: All data stays local. API keys are stored in
chrome.storage.localand never leave your browser except to call the respective APIs (YouTube, Gemini, ElevenLabs).
Chrome blocks extensions on internal pages:
chrome://,edge://,about://- Chrome Web Store
- New Tab page (by default)
The agent works on all regular websites (http:// and https://).
- Check the page: Ensure you're on a regular website (not
chrome://) - Reload: Refresh the page after installing/updating the extension
- Re-inject: Go to
chrome://extensionsand reload the extension - Console: Check DevTools Console (F12) for errors
- API Key: Ensure you've added a YouTube Data API v3 key in settings
- Fallback: Without an API key, the extension uses 3 fallback videos
- Autoplay: Some sites block autoplay; click the video to start
- API Key: Add a Google Gemini API key in the settings popup
- Quota: Check your API quota in Google Cloud Console
- Error Message: Agent will pout and show "Couldn't fetch a joke"
- API Key: Add ElevenLabs API key and voice ID in settings
- Personality: Ensure personality is enabled in settings
- User Gesture: First TTS call requires a user interaction (click toggle)
- Go to
chrome://extensions/shortcuts - Find "Agent Brainrot"
- Change the keyboard shortcut from
Alt+Shift+Bto your preference
Set a default topic for the YouTube Shorts feed:
// Open DevTools Console (F12) on any page
chrome.storage.local.set({ ab_default_topic: 'funny cats' })Add your interests in the settings popup (comma-separated):
gaming, technology, cooking, travel, music
The agent will search for videos matching these topics!
Toggle off "Personality & Voice" in settings to stop the agent from:
- Making random remarks
- Speaking out loud
- Changing facial expressions automatically
It will still respond to your menu interactions.
# Exclude development files
zip -r agent_brainrot.zip . -x "*.git*" "*node_modules*" "*.DS_Store" "*.txt"- Go to Chrome Web Store Developer Dashboard
- Click New Item
- Upload
agent_brainrot.zip - Fill in store listing details
- Submit for review
This extension uses vanilla JS/CSS with no build tools. Just edit and reload!
- Make changes to any file
- Go to
chrome://extensions - Click the reload icon on Agent Brainrot
- Refresh the test page to see changes
- Create a new folder in
features/(e.g.,features/myfeature/) - Add
myfeature.html,myfeature.js,myfeature.css - Register resources in
manifest.json→web_accessible_resources - Add menu button in
agent/agent.html - Handle the module launch in
agent/agent.js
- Test on various websites (http/https)
- Check restricted pages behavior
- Test keyboard shortcuts
- Verify API integrations with valid keys
- Test without API keys (fallback behavior)
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Add more mini-games (Snake, 2048, etc.)
- Support more video platforms (Vimeo, Twitch clips)
- Add more AI features (chat, image generation)
- Improve accessibility (screen reader support)
- Add themes/skins for the agent
- Internationalization (i18n)
MIT License - feel free to use, modify, and distribute!
- YouTube Data API for video content
- Google Gemini for AI-powered jokes
- ElevenLabs for realistic text-to-speech
- Web Audio API for procedural sound effects
- Built with ❤️ using vanilla JS and Chrome MV3
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
- 📧 Email: [email protected]
Made with vanilla MV3 for clarity and easy hacking.
Have fun spawning brainrot! 🧠✨