Ghost Browser — AI-Powered Browser Automation
The browser moves on its own. No human needed.
GitHub: https://github.com/aiagentwithdhruv/ghost-browser
Path: Social-Media-Agent-1.0/browser-automation/
Stack: Python 3, Playwright, OpenAI API
What It Does
Automates any browser action with human-like behavior — LinkedIn posting, engagement, job applications, web scraping, stats tracking, and visual demos.
Schema
Inputs
| Name |
Type |
Required |
Description |
LINKEDIN_LI_AT |
string |
For LinkedIn |
LinkedIn li_at cookie from DevTools |
TWITTER_AUTH_TOKEN |
string |
For Twitter |
Twitter auth_token cookie |
TWITTER_CT0 |
string |
For Twitter |
Twitter ct0 cookie |
YOUTUBE_API_KEY |
string |
For YouTube |
Google Cloud API key (free) |
OPENAI_API_KEY |
string |
For AI comments |
GPT-4o-mini for comment/cover letter generation |
Outputs
| Name |
Type |
Description |
| LinkedIn post |
Action |
Published post with optional image |
| Feed data |
JSON |
Posts from LinkedIn feed with author, content, URN |
| Job listings |
JSON |
Jobs from LinkedIn/Indeed with title, company, description |
| Scraped data |
JSON/CSV |
Data from any website (smart/full/selector modes) |
| Stats |
JSON + MD |
Followers, views, connections across all platforms |
| Screenshots |
PNG |
Any URL, full page or element |
Credentials
| Service |
How to Get |
| LinkedIn li_at |
DevTools → Application → Cookies → linkedin.com |
| Twitter auth_token + ct0 |
DevTools → Application → Cookies → x.com |
| YouTube API |
Google Cloud Console → YouTube Data API v3 (FREE) |
| OpenAI |
platform.openai.com → API Keys |
Cost
| Component |
Cost |
| Playwright/Chromium |
Free |
| YouTube API |
Free (10K units/day) |
| OpenAI (comments) |
~$0.01 per comment |
| LinkedIn/Twitter |
Free (cookie auth) |
Scripts Reference
| Script |
What It Does |
Example Command |
orchestrator.py |
Multi-agent orchestrator (8 agents, 5 combos) |
python3 orchestrator.py --demo --visible |
ghost_mcp.py |
MCP server (10 tools for any AI agent) |
python3 ghost_mcp.py (stdio transport) |
multi_context.py |
Isolated browser session manager |
Used by orchestrator |
linkedin_engage.py |
LinkedIn CLI — post, feed, engage, apply, connect |
python3 linkedin_engage.py post --text "Hello" --image photo.jpg --visible |
universal_scraper.py |
Scrape any website with 6 presets |
python3 universal_scraper.py indeed --query "AI engineer" --output jobs.json |
stats_tracker.py |
Pull stats from all platforms |
python3 stats_tracker.py --notify |
demo_wow.py |
6-stage visual demo (viral) |
python3 demo_wow.py |
monkeytype_flex.py |
Speed typing demo (412 WPM) |
python3 monkeytype_flex.py |
job_research.py |
Browse AI jobs on LinkedIn + Indeed |
python3 job_research.py |
screenshot_tool.py |
Screenshot any URL |
python3 screenshot_tool.py --url "https://example.com" |
Architecture (v2.0)
human_behavior.py ← Anti-detection layer (mouse drift, idle, warmup)
↓
base_browser.py ← Playwright wrapper (cookie auth, context manager)
multi_context.py ← Isolated browser sessions (multiple contexts, 1 process)
↓
orchestrator.py ← 8 agents, 5 combos, CLI
├── agent_linkedin_feed / agent_linkedin_engage
├── agent_scrape_indeed / agent_scrape_gmaps
├── agent_twitter_trending (cookie auth: TWITTER_AUTH_TOKEN + TWITTER_CT0)
├── agent_monkeytype / agent_github_trending / agent_hacker_news
└── run_orchestrator() → parallel execution in isolated contexts
↓
ghost_mcp.py ← MCP server (10 tools) for Claude/Cursor/Codex
↓
├── linkedin_browser.py ← LinkedIn: post, like, comment, apply, connect
├── linkedin_scraper.py ← LinkedIn: followers, connections, analytics
├── twitter_scraper.py ← Twitter: followers, impressions
├── youtube_stats.py ← YouTube API (no browser)
├── universal_scraper.py ← Any website (6 presets)
└── screenshot_tool.py ← Screenshots
↓
├── linkedin_engage.py ← CLI for LinkedIn
├── stats_tracker.py ← Stats + Telegram notifications
├── demo_wow.py ← Viral demo
└── job_research.py ← Job market research
Agents & Combos (v2.0)
| Agent |
Description |
linkedin-feed |
Scroll feed, extract posts |
linkedin-engage |
Like posts with human behavior |
indeed |
Scrape Indeed job listings |
gmaps |
Scrape Google Maps businesses |
monkeytype |
Speed typing demo (~400 WPM) |
github |
Browse GitHub trending repos |
hackernews |
Read top Hacker News stories |
twitter |
Scrape X.com trending/search (cookie auth) |
| Combo |
Agents |
demo |
monkeytype, github, hackernews |
research |
linkedin-feed, indeed, github, twitter |
lead-gen |
linkedin-feed, gmaps, indeed |
social |
linkedin-feed, twitter, hackernews |
full |
all 6 non-demo agents |
MCP Server (10 tools)
{
"mcpServers": {
"ghost-browser": {
"command": "python3",
"args": ["/path/to/ghost_mcp.py"],
"env": { "LINKEDIN_LI_AT": "...", "OPENAI_API_KEY": "sk-..." }
}
}
}
Tools: linkedin_feed, linkedin_post, linkedin_engage, scrape_url, scrape_indeed, scrape_gmaps, scrape_twitter, typing_demo, screenshot, multi_run
Human-Like Behavior Rules
| Behavior |
Implementation |
| Typing |
40-55 WPM, char-by-char, 3-5% typo rate with backspace correction |
| Delays |
Gaussian distribution (not uniform) — clusters around midpoint |
| Scrolling |
Sinusoidal speed curve — slow start, fast middle, slow end |
| Clicking |
Random offset from center (not dead-center like bots) |
| Reading |
Wait time proportional to word count |
| Breaks |
30-120 sec pause every 15-25 actions |
| Viewport |
Random from pool: 1440x900, 1920x1080, 1536x864, etc. |
LinkedIn Post Flow
1. Navigate to feed
2. Click "Start a post"
3. Find Quill editor (contenteditable div)
4. Short posts (<200 chars) → human_type with typos
Long posts (>200 chars) → insert_text (paste)
5. Attach image → file input upload
6. Click "Next" (LinkedIn image editor step)
7. Click "Post" → confirmed
Composable With
| Skill |
How |
scrape-leads |
Scrape → enrich with ghost-browser LinkedIn data |
instantly-campaigns |
Scrape leads → cold email |
gmaps-leads |
Google Maps preset in universal_scraper |
cross-niche-outliers |
Research content → auto-post to LinkedIn |
upwork-apply |
Job research data feeds Upwork proposals |
send-telegram |
Stats tracker sends notifications |
Revenue Use Cases
| Use Case |
Revenue |
| LinkedIn automation service |
$500-2000/mo per client |
| Web scraping gigs (Fiverr/Upwork) |
$200-1000 per project |
| LinkedIn ghostwriting + auto-post |
$500-1500/mo per client |
| AI job application bot |
$50-200 per person |
| Lead generation (scrape → email) |
$500-2000/mo per client |
Quick Start
cd Social-Media-Agent-1.0/browser-automation
pip install -r requirements.txt
playwright install chromium
cp .env.example .env # Add your cookies
# Run the viral demo
python3 demo_wow.py
# Post to LinkedIn
python3 linkedin_engage.py post --text "Hello world" --visible
# Scrape Indeed jobs
python3 universal_scraper.py indeed --query "AI engineer" --output jobs.json
1---2name: ghost-browser-23description: AI-powered browser automation with human-like behavior — LinkedIn, Twitter, Indeed, GMaps, GitHub, HackerNews, MonkeyType4---56# Ghost Browser — AI-Powered Browser Automation78> The browser moves on its own. No human needed.910**GitHub:** https://github.com/aiagentwithdhruv/ghost-browser11**Path:** `Social-Media-Agent-1.0/browser-automation/`12**Stack:** Python 3, Playwright, OpenAI API1314---1516## What It Does1718Automates any browser action with human-like behavior — LinkedIn posting, engagement, job applications, web scraping, stats tracking, and visual demos.1920---2122## Schema2324### Inputs2526| Name | Type | Required | Description |27|------|------|----------|-------------|28| `LINKEDIN_LI_AT` | string | For LinkedIn | LinkedIn `li_at` cookie from DevTools |29| `TWITTER_AUTH_TOKEN` | string | For Twitter | Twitter auth_token cookie |30| `TWITTER_CT0` | string | For Twitter | Twitter ct0 cookie |31| `YOUTUBE_API_KEY` | string | For YouTube | Google Cloud API key (free) |32| `OPENAI_API_KEY` | string | For AI comments | GPT-4o-mini for comment/cover letter generation |3334### Outputs3536| Name | Type | Description |37|------|------|-------------|38| LinkedIn post | Action | Published post with optional image |39| Feed data | JSON | Posts from LinkedIn feed with author, content, URN |40| Job listings | JSON | Jobs from LinkedIn/Indeed with title, company, description |41| Scraped data | JSON/CSV | Data from any website (smart/full/selector modes) |42| Stats | JSON + MD | Followers, views, connections across all platforms |43| Screenshots | PNG | Any URL, full page or element |4445### Credentials4647| Service | How to Get |48|---------|-----------|49| LinkedIn li_at | DevTools → Application → Cookies → linkedin.com |50| Twitter auth_token + ct0 | DevTools → Application → Cookies → x.com |51| YouTube API | Google Cloud Console → YouTube Data API v3 (FREE) |52| OpenAI | platform.openai.com → API Keys |5354### Cost5556| Component | Cost |57|-----------|------|58| Playwright/Chromium | Free |59| YouTube API | Free (10K units/day) |60| OpenAI (comments) | ~$0.01 per comment |61| LinkedIn/Twitter | Free (cookie auth) |6263---6465## Scripts Reference6667| Script | What It Does | Example Command |68|--------|-------------|----------------|69| `orchestrator.py` | Multi-agent orchestrator (8 agents, 5 combos) | `python3 orchestrator.py --demo --visible` |70| `ghost_mcp.py` | MCP server (10 tools for any AI agent) | `python3 ghost_mcp.py` (stdio transport) |71| `multi_context.py` | Isolated browser session manager | Used by orchestrator |72| `linkedin_engage.py` | LinkedIn CLI — post, feed, engage, apply, connect | `python3 linkedin_engage.py post --text "Hello" --image photo.jpg --visible` |73| `universal_scraper.py` | Scrape any website with 6 presets | `python3 universal_scraper.py indeed --query "AI engineer" --output jobs.json` |74| `stats_tracker.py` | Pull stats from all platforms | `python3 stats_tracker.py --notify` |75| `demo_wow.py` | 6-stage visual demo (viral) | `python3 demo_wow.py` |76| `monkeytype_flex.py` | Speed typing demo (412 WPM) | `python3 monkeytype_flex.py` |77| `job_research.py` | Browse AI jobs on LinkedIn + Indeed | `python3 job_research.py` |78| `screenshot_tool.py` | Screenshot any URL | `python3 screenshot_tool.py --url "https://example.com"` |7980---8182## Architecture (v2.0)8384```85human_behavior.py ← Anti-detection layer (mouse drift, idle, warmup)86 ↓87base_browser.py ← Playwright wrapper (cookie auth, context manager)88multi_context.py ← Isolated browser sessions (multiple contexts, 1 process)89 ↓90orchestrator.py ← 8 agents, 5 combos, CLI91 ├── agent_linkedin_feed / agent_linkedin_engage92 ├── agent_scrape_indeed / agent_scrape_gmaps93 ├── agent_twitter_trending (cookie auth: TWITTER_AUTH_TOKEN + TWITTER_CT0)94 ├── agent_monkeytype / agent_github_trending / agent_hacker_news95 └── run_orchestrator() → parallel execution in isolated contexts96 ↓97ghost_mcp.py ← MCP server (10 tools) for Claude/Cursor/Codex98 ↓99├── linkedin_browser.py ← LinkedIn: post, like, comment, apply, connect100├── linkedin_scraper.py ← LinkedIn: followers, connections, analytics101├── twitter_scraper.py ← Twitter: followers, impressions102├── youtube_stats.py ← YouTube API (no browser)103├── universal_scraper.py ← Any website (6 presets)104└── screenshot_tool.py ← Screenshots105 ↓106├── linkedin_engage.py ← CLI for LinkedIn107├── stats_tracker.py ← Stats + Telegram notifications108├── demo_wow.py ← Viral demo109└── job_research.py ← Job market research110```111112### Agents & Combos (v2.0)113114| Agent | Description |115|-------|-------------|116| `linkedin-feed` | Scroll feed, extract posts |117| `linkedin-engage` | Like posts with human behavior |118| `indeed` | Scrape Indeed job listings |119| `gmaps` | Scrape Google Maps businesses |120| `monkeytype` | Speed typing demo (~400 WPM) |121| `github` | Browse GitHub trending repos |122| `hackernews` | Read top Hacker News stories |123| `twitter` | Scrape X.com trending/search (cookie auth) |124125| Combo | Agents |126|-------|--------|127| `demo` | monkeytype, github, hackernews |128| `research` | linkedin-feed, indeed, github, twitter |129| `lead-gen` | linkedin-feed, gmaps, indeed |130| `social` | linkedin-feed, twitter, hackernews |131| `full` | all 6 non-demo agents |132133### MCP Server (10 tools)134135```json136{137 "mcpServers": {138 "ghost-browser": {139 "command": "python3",140 "args": ["/path/to/ghost_mcp.py"],141 "env": { "LINKEDIN_LI_AT": "...", "OPENAI_API_KEY": "sk-..." }142 }143 }144}145```146147Tools: linkedin_feed, linkedin_post, linkedin_engage, scrape_url, scrape_indeed, scrape_gmaps, scrape_twitter, typing_demo, screenshot, multi_run148149---150151## Human-Like Behavior Rules152153| Behavior | Implementation |154|----------|---------------|155| Typing | 40-55 WPM, char-by-char, 3-5% typo rate with backspace correction |156| Delays | Gaussian distribution (not uniform) — clusters around midpoint |157| Scrolling | Sinusoidal speed curve — slow start, fast middle, slow end |158| Clicking | Random offset from center (not dead-center like bots) |159| Reading | Wait time proportional to word count |160| Breaks | 30-120 sec pause every 15-25 actions |161| Viewport | Random from pool: 1440x900, 1920x1080, 1536x864, etc. |162163---164165## LinkedIn Post Flow166167```1681. Navigate to feed1692. Click "Start a post"1703. Find Quill editor (contenteditable div)1714. Short posts (<200 chars) → human_type with typos172 Long posts (>200 chars) → insert_text (paste)1735. Attach image → file input upload1746. Click "Next" (LinkedIn image editor step)1757. Click "Post" → confirmed176```177178---179180## Composable With181182| Skill | How |183|-------|-----|184| `scrape-leads` | Scrape → enrich with ghost-browser LinkedIn data |185| `instantly-campaigns` | Scrape leads → cold email |186| `gmaps-leads` | Google Maps preset in universal_scraper |187| `cross-niche-outliers` | Research content → auto-post to LinkedIn |188| `upwork-apply` | Job research data feeds Upwork proposals |189| `send-telegram` | Stats tracker sends notifications |190191---192193## Revenue Use Cases194195| Use Case | Revenue |196|----------|---------|197| LinkedIn automation service | $500-2000/mo per client |198| Web scraping gigs (Fiverr/Upwork) | $200-1000 per project |199| LinkedIn ghostwriting + auto-post | $500-1500/mo per client |200| AI job application bot | $50-200 per person |201| Lead generation (scrape → email) | $500-2000/mo per client |202203---204205## Quick Start206207```bash208cd Social-Media-Agent-1.0/browser-automation209pip install -r requirements.txt210playwright install chromium211cp .env.example .env # Add your cookies212213# Run the viral demo214python3 demo_wow.py215216# Post to LinkedIn217python3 linkedin_engage.py post --text "Hello world" --visible218219# Scrape Indeed jobs220python3 universal_scraper.py indeed --query "AI engineer" --output jobs.json221```