{"slug": "show-hn-linkedin-ops-zero-dependency-cdp-automation-built-for-ai-agents", "title": "Show HN: LinkedIn-ops – Zero-dependency CDP automation built for AI agents", "summary": "An independent open-source project called linkedin-ops released a zero-dependency LinkedIn automation engine and CLI that drives a local Google Chrome instance over the Chrome DevTools Protocol (CDP) on port 9222, aimed at AI agents and multi-agent workflows. The tool ships an npm-installable setup wizard that locates the Chrome binary and existing profiles, a doctor command that checks CDP reachability and session authentication, and a cross-process mutex lock (linkedin.lock) plus isolated ephemeral tabs with auto-cleanup to serialize concurrent agents and prevent session collisions. Commands cover connection invites, direct messages, post comments and company people search, with dry-run defaults and a --send flag for live submission; the project states it is not affiliated with LinkedIn and warns users to respect platform terms and rate limits.", "body_md": "High-reliability, multi-agent-safe LinkedIn automation engine and CLI built on Chrome DevTools Protocol (CDP).\n\n**Disclaimer & Responsible Use**: `linkedin-ops` is an independent open-source tool built for developer automation research, testing, and workflow automation via local Chrome DevTools Protocol (CDP). This project is not affiliated with, endorsed by, or sponsored by LinkedIn Corporation. Automated interaction with LinkedIn must comply with applicable platform terms and policies. Always maintain realistic human delays and respect LinkedIn rate limits to safeguard account health.\n\n```\nnpm install\nnode index.mjs setup\n```\n\nThe setup wizard automatically:\n\n1. Locates your Google Chrome binary (macOS, Linux, Windows).\n2. Discovers your existing Chrome profiles from system User Data so you can pick your logged-in account (or create a dedicated project session).\n3. Saves settings to `.linkedin-opsrc` (no manual path pasting required).\n4. Generates a one-click launcher (`start-chrome.command` /`start-chrome.bat` ).\n\n```\nnpm run doctor\n# or: node index.mjs doctor\n```\n\n*Checks CDP port 9222 reachability, browser version, user agent, and verifies an authenticated LinkedIn session.*\n\n```\nnode index.mjs connect --profile=\"https://www.linkedin.com/in/username\" --note=\"Hi, loved your post on distributed systems...\"\n```\n\n*(Dry-run mode navigates and fills the note without submitting. Add `--send` only when ready to live submit).*\n\n1. **Automated Runtime Fallback** : Daily commands ping port 9222. If Chrome is closed,`linkedin-ops` automatically launches it using your configured profile. If Chrome is already running without remote debugging enabled, it detects the profile lock and prompts to restart cleanly.\n2. **Cross-Process Mutex Locking** : Serializes execution across concurrent agents and processes (`linkedin.lock` ). Prevents session collisions, focus-stealing, and rate-limiting.\n3. **Isolated Ephemeral Tabs** : Each operation spawns its own dedicated Chrome tab via`PUT /json/new` and connects directly via target ID.\n4. **Auto-Cleanup** : Guarantees tab destruction (`/json/close/<targetId>` ) in a`finally` block on success or failure, eliminating zombie tab leaks.\n\n```\n# Automated setup wizard\nnode index.mjs setup\n\n# Pre-flight health check\nnode index.mjs doctor\n\n# Connection invitation with personalized note (dry-run)\nnode index.mjs connect --profile=\"https://www.linkedin.com/in/username\" --note=\"Hi, loved your post...\"\n\n# Live connection invitation\nnode index.mjs connect --profile=\"https://www.linkedin.com/in/username\" --note=\"Hi, loved your post...\" --send\n\n# Direct message to 1st-degree connection\nnode index.mjs dm --profile=\"https://www.linkedin.com/in/username\" --message=\"Checking in on our conversation.\" --send\n\n# Comment on a LinkedIn post\nnode index.mjs comment --url=\"https://www.linkedin.com/posts/...\" --text=\"Great insights on distributed systems!\" --send\n\n# Company people search (e.g. recruiters)\nnode index.mjs search --company=\"Google\" --keywords=\"recruiter\" --limit=10 --json\n\n# Inspect or force-release active mutex lock\nnode index.mjs lock\nnode index.mjs lock release\njs\nimport { withLock, withDedicatedTab, sendConnectionInvite } from 'linkedin-ops';\n\nawait withLock('outreach-task', async () => {\n  await withDedicatedTab({ port: 9222 }, async (cdp) => {\n    const result = await sendConnectionInvite(cdp, {\n      linkedinUrl: 'https://www.linkedin.com/in/username',\n      note: 'Hi, loved your work on distributed systems.',\n      send: true\n    });\n    console.log(result);\n  });\n});\n```\n\nFor multi-profile outreach and candidate sweeps, see [`campaigns/batch-connect.example.mjs`](https://github.com/shashtag-ventures/linkedin-ops/blob/main/campaigns/batch-connect.example.mjs):\n\n```\n# Copy template to your personal user campaigns folder\ncp campaigns/batch-connect.example.mjs campaigns/my-outreach.mjs\n\n# Run the campaign safely with mutex locking and isolated tab lifecycles\nnode campaigns/my-outreach.mjs\n```\n\n*(User campaigns and harvested datasets in `data/` and `campaigns/` are gitignored and never committed to source control).*\n\n- **[DATA_CONTRACT.md](https://github.com/shashtag-ventures/linkedin-ops/blob/main/DATA_CONTRACT.md)** : Strict definition of the System Layer vs User Layer boundaries.\n- **[Architecture Blueprint](https://github.com/shashtag-ventures/linkedin-ops/blob/main/docs/ARCHITECTURE.md)** : Deep dive into CDP socket lifecycle, locking mechanisms, and tab management.", "url": "https://wpnews.pro/news/show-hn-linkedin-ops-zero-dependency-cdp-automation-built-for-ai-agents", "canonical_source": "https://github.com/shashtag-ventures/linkedin-ops", "published_at": "2026-11-01 01:46:21+00:00", "updated_at": "2026-11-01 02:20:59.721690+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["linkedin-ops", "LinkedIn", "Google Chrome", "Chrome DevTools Protocol", "npm"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-linkedin-ops-zero-dependency-cdp-automation-built-for-ai-agents", "markdown": "https://wpnews.pro/news/show-hn-linkedin-ops-zero-dependency-cdp-automation-built-for-ai-agents.md", "text": "https://wpnews.pro/news/show-hn-linkedin-ops-zero-dependency-cdp-automation-built-for-ai-agents.txt", "jsonld": "https://wpnews.pro/news/show-hn-linkedin-ops-zero-dependency-cdp-automation-built-for-ai-agents.jsonld"}}