An intelligent browser agent that analyzes user browsing history to discover patterns, generate insights, and suggest actionable goals.
Agentic Browser is designed to help users accomplish tasks by understanding their browsing patterns and intentions. The application follows this workflow:
- History Collection - Gathers user browsing history from Chrome
- Clustering - Creates clusters of URLs using rich embedding representations
- Analysis - Analyzes clusters to give them meaningful names and descriptions
- Goal Generation - Creates actionable goals from these clusters
- Task Accomplishment - Presents goals to users and offers tools to accomplish them
When a user clicks the "magic button," the agent can automatically accomplish the selected goal!
graph TD
A[User Browser History] -->|Collect history data| B[History Collection]
B -->|Process URLs| C[Embedding Generation]
C -->|Create vector representations| D[URL Clustering]
D -->|Group similar URLs| E[Cluster Analysis]
E -->|Name & describe clusters| F[Goal Generation]
F -->|Create actionable tasks| G[Present to User]
G -->|User selects goal| H[Agent Execution]
H -->|Complete task| I[Goal Accomplished]
style A fill:#f9f,stroke:#333,stroke-width:2px
style I fill:#9f9,stroke:#333,stroke-width:2px
The application exposes several API endpoints:
| Route | Method | Description |
|---|---|---|
/api/history |
GET | Fetches user's Chrome browsing history |
/api/cluster |
POST | Creates clusters from URLs using embedding-based clustering |
/api/cluster-goals |
POST | Generates actionable goals from clusters |
/api/agent |
POST | Executes actions to accomplish selected goals |
- Next.js - React framework for the user interface
- Tailwind CSS - Utility-first CSS framework for styling
- Next.js API Routes - Server-side API endpoints
- better-sqlite3 - SQLite database access for Chrome history
- OpenAI API - Used for:
- Text embeddings (text-embedding-3-small model)
- Content analysis and clustering (GPT-4o model)
- Goal generation (GPT-4o model)
- DBScan - Density-based clustering algorithm
- Euclidean Distance - Vector similarity measurement
- Composio-core - Tool creation framework
- Firecrawl - Web crawling capabilities (when needed)
- Node.js (v18 or higher)
- pnpm package manager
- Chrome browser installed (for history access)
- OpenAI API key
- Clone the repository:
git clone https://github.com/yourusername/agentic-browser.git
cd agentic-browser- Install dependencies:
pnpm install- Create an
.env.localfile with your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
- Start the development server:
pnpm dev- Open your browser and navigate to:
http://localhost:3000
- Visit the main page to see a dashboard of your browsing patterns
- The application will automatically cluster your browsing history
- Review the generated goals for each cluster
- Select a goal you'd like to accomplish
- Click the "magic button" to let the agent complete the task for you
To use this new caching implementation, you'll need a PostgreSQL database:
- Check your PostgreSQL installation and user:
# List your databases and check your username
psql -U postgres -d agentic_browser_dev
\lYour username will be shown as the "Owner" of the databases.
- Create a PostgreSQL database:
createdb agentic_browser_dev- Copy .env.example to .env and configure your DATABASE_URL:
cp .env.example .env- Update your DATABASE_URL in .env:
# If you have a password set:
DATABASE_URL=postgres://username:password@localhost:5432/agentic_browser_dev
# If using trust authentication (no password):
DATABASE_URL=postgres://username@localhost:5432/agentic_browser_dev
Replace 'username' with your PostgreSQL username (found in step 1).
- Run migrations:
psql -f app/db/migrations/001_create_clusters_tables.sql
If you encounter authentication issues:
- Check if you're using the correct username from
psql \l - If using a password, verify it's correct
- For local development, you might need to edit pg_hba.conf to use "trust" authentication
This project is licensed under the MIT License - see the LICENSE file for details.