Skip to content

codewarnab/cognito-ai

Repository files navigation

Cognito Logo

Cognito: Your AI Browser Agent

Super powerful and private AI assistant directly in your browser

License: MIT Version Built with WXT

FeaturesInstallationUsageDevelopmentContributingLicense


Features

Cognito is an intelligent browser agent that brings the power of AI directly into your Chrome browser:

  • AI-Powered Assistance: Integrated with Google's Generative AI (Gemini 2.5) and Vercel AI SDK
  • Privacy-First: Your data stays in your browser with local memory (Dexie.js)
  • Voice Mode: Real-time voice interaction powered by ElevenLabs
  • Research Workflow: Agentic workflow for deep web research and report generation
  • Smart Actions: Automate browser tasks with AI-driven workflows
  • Side Panel Chat: Quick access to AI chat with Ctrl+Shift+H (or Cmd+Shift+H on Mac)
  • Model Context Protocol: Extensible AI capabilities connecting to local and remote tools
  • Beautiful UI: Modern interface with enhanced visuals, glassmorphism, and animations
  • Fast & Efficient: Optimized performance with local caching and split-execution strategies

Installation

For Developers

See SETUP.md for detailed development setup instructions.

Usage

Opening Cognito

  • Keyboard Shortcut: Press Ctrl+Shift+H (Windows/Linux) or Cmd+Shift+H (Mac)
  • Extension Icon: Click the Cognito icon in your Chrome toolbar
  • Side Panel: Open from Chrome's side panel menu

Basic Features

  1. AI Chat: Ask questions and get intelligent responses via text or voice
  2. Web Automation: Automate repetitive browser tasks
  3. Research Agent: Perform deep research on topics with automated browsing and citation
  4. Content Analysis: Analyze web pages and extract information
  5. Memory Management: Save and retrieve important information
  6. Tab Management: Organize and manage your browser tabs efficiently

Development

This is a pnpm monorepo containing the Chrome extension, documentation site, and backend services.

Prerequisites

  • Node.js v18 or higher
  • pnpm v8 or higher
  • Google Chrome

Quick Start

# Install all dependencies
pnpm install

# Start extension development server
pnpm dev

# Start docs development server
pnpm dev:docs

# Start all packages in parallel
pnpm dev:all

# Build all packages
pnpm build

# Build extension only
pnpm build:extension

Development Build

  1. Run pnpm dev
  2. Load the extension from apps/extension/build/chrome-mv3-dev in Chrome
  3. Make changes - the extension will auto-reload

Production Build

pnpm build

The production bundle will be in apps/extension/build/chrome-mv3-prod/.

Package-Specific Commands

# Work with specific packages
pnpm --filter @cognito/extension dev
pnpm --filter @cognito/docs dev

# Add dependencies to specific package
pnpm --filter @cognito/extension add react-query

# Add dev dependencies to root
pnpm add -D -w typescript-eslint

Submit to the Webstores

To submit your extension to the web stores, build your extension and upload it to the store. For automated submission, you can set up GitHub Actions to publish your extension automatically.

Project Structure

cognito-ai/
├── apps/
│   ├── extension/              # @cognito/extension - Chrome Extension (WXT)
│   │   ├── src/
│   │   │   ├── entrypoints/    # WXT entrypoints
│   │   │   │   ├── sidepanel/  # Main side panel React app
│   │   │   │   ├── background/ # Background Service Worker
│   │   │   │   └── contents/   # Content scripts
│   │   │   ├── stores/         # Zustand state management
│   │   │   ├── ai/             # AI integration (Vercel AI SDK v6)
│   │   │   ├── actions/        # Browser automation actions
│   │   │   ├── components/     # React components
│   │   │   ├── mcp/            # Model Context Protocol client
│   │   │   ├── db/             # Local database (Dexie/IndexedDB)
│   │   │   └── workflows/      # Automation workflows
│   │   ├── assets/             # Icons and graphics
│   │   └── build/              # Build output
│   ├── docs/                   # @cognito/docs - Documentation site (Next.js + Fumadocs)
│   └── webapp/                 # @cognito/webapp - Settings & onboarding webapp (Next.js)
├── packages/
│   └── shared/                 # @cognito/shared - Shared types and constants
└── [root config files]         # pnpm-workspace.yaml, turbo.json, etc.

Note: The backend services (backend-cloudflare and backend-vercel) are not open source. If building from source, you must use BYOK mode (Bring Your Own Key) with your own API keys.

Configuration

Permissions

Cognito requires the following permissions:

  • storage, unlimitedStorage - Store data locally
  • tabs, tabGroups - Manage browser tabs
  • sidePanel - Display AI chat in side panel
  • scripting, activeTab - Interact with web pages
  • webNavigation - Track navigation
  • history, bookmarks - Access browsing data
  • notifications - Show notifications

API Keys

For AI features, you need to configure API keys in the extension settings.

  • BYOK Mode: Model-agnostic (supports any model when using your own key)
  • Cloud Mode: Uses fixed gemini-2.5-flash model (no key required, available in official release only)

Building from source? The backend services are not open source, so Cloud Mode will not work. You must use BYOK mode with your own API keys. See Provider Setup for supported providers.

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick Contribution Steps

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Documentation

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Support


Star this repo if you find it useful!

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors