Skip to content

OpenAgentHQ/linkedin-ai-comment-copilot

Repository files navigation

LinkedIn AI Comment Copilot

AI-Powered Chrome Extension for Intelligent LinkedIn Engagement

LinkedIn AI Comment Copilot Banner

License: MIT Python 3.11+ pytest LangGraph FastAPI LangSmith Manifest V3

Generate context-aware, human-like LinkedIn comments in real time using a LangGraph multi-agent workflow with Groq Llama 3.3 and Gemini fallback.

Features | Architecture | Quick Start | Testing | API Reference | Extension Setup


Overview

LinkedIn AI Comment Copilot is a full-stack application consisting of a Chrome Extension and a FastAPI backend that work together to analyze LinkedIn posts and generate high-quality, context-aware comments. The system uses a LangGraph multi-agent workflow with four specialized agents β€” each powered by the optimal LLM for its task β€” to ensure every comment is relevant, professional, and human-sounding.

Key highlights:

  • No database required
  • No user authentication
  • No data storage β€” everything runs in real time
  • ChatLiteLLMRouter for automatic model fallback (Groq primary, Gemini fallback)
  • LangSmith observability for full trace visibility
  • Multiple comment tones to match your style
  • Comment card with Copy, Insert, and Dismiss actions
  • One-click deploy to Render

Demo

LinkedIn AI Comment Copilot Demo

Click the image above to watch the demo on YouTube


Features

Feature Description
Post Detection Automatically detects all visible LinkedIn posts using action-bar-first strategy
AI Comment Button Injects exactly one "Generate AI Comment" button per post (no duplicates)
Comment Card Displays generated comment in a prominent card with Copy, Insert, and Dismiss buttons
Insert to LinkedIn Automatically opens LinkedIn's comment box and fills it with the generated comment
Tone Selector Choose from 10 comment tones: Professional, Technical, Supportive, Networking, Thoughtful, Friendly, Encouraging, Curious, Founder, Recruiter
Per-Agent Model Routing Each agent uses the optimal LLM β€” Groq Llama 3.3 70B primary, Gemini 2.5 Flash fallback via ChatLiteLLMRouter
LangSmith Observability Full trace visibility for every request through the multi-agent pipeline
One-Click Copy Copy generated comments to clipboard instantly
Regenerate Generate alternative variations with a single click
Quality Review Built-in reviewer agent scores and approves comments before delivery
LLM Cost Tracking Built-in cost measurement β€” test single-call cost via /test-cost endpoint

Architecture

System Flow

graph TD
    A[LinkedIn Page] -->|Detects Posts| B[Chrome Extension]
    B -->|Extracts Content| C[Content Script]
    C -->|"Click 'Generate AI Comment'"| D[Background Service Worker]
    D -->|"POST /generate-comment"| E[FastAPI Backend]
    E -->|Configures| LS[LangSmith Tracing]
    E -->|Invokes| F[LangGraph Workflow]
    
    F --> G["1. Analyzer Agent<br/><i>Groq Llama 3.3 70B</i><br/><small>Gemini fallback</small>"]
    G -->|post_type, category, sentiment| H["2. Planner Agent<br/><i>Groq Llama 3.3 70B</i><br/><small>Gemini fallback</small>"]
    H -->|strategy| I["3. Writer Agent<br/><i>Groq Llama 3.3 70B</i><br/><small>Gemini fallback</small>"]
    I -->|generated_comment| J["4. Reviewer Agent<br/><i>Groq Llama 3.3 70B</i><br/><small>Gemini fallback</small>"]
    
    J -->|Approved| K[Return Comment]
    J -->|Rejected| I
    
    K --> E
    E -->|Response| D
    D -->|Broadcast| L[Comment Card]
    L -->|Copy / Insert| M[User Action]
    
    style A fill:#0A66C2,color:#fff
    style F fill:#FF6B35,color:#fff
    style G fill:#F55036,color:#fff
    style H fill:#F55036,color:#fff
    style I fill:#F55036,color:#fff
    style J fill:#F55036,color:#fff
    style LS fill:#6C47FF,color:#fff
Loading
System Design

Message Flow (Extension)

sequenceDiagram
    participant User as LinkedIn User
    participant CS as Content Script
    participant BG as Background Worker
    participant API as FastAPI Backend
    participant Card as Comment Card

    User->>CS: Click "Generate AI Comment"
    CS->>CS: Extract post content
    CS->>BG: sendMessage(GENERATE_COMMENT)
    BG->>API: POST /generate-comment
    API-->>BG: {comment: "..."}
    BG->>BG: Persist to chrome.storage.local
    BG-->>CS: {success: true, comment}
    CS->>Card: showCommentNotification(comment)
    Card-->>User: Display comment card with Copy/Insert
    User->>Card: Click "Insert Comment"
    Card->>CS: insertCommentIntoLinkedIn(comment)
    CS->>CS: Poll for comment box, insert text
Loading
Messageflow

Project Structure

linkedin-ai-comment-copilot/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py                    # FastAPI application entry point
β”‚   β”œβ”€β”€ agents/
β”‚   β”‚   β”œβ”€β”€ analyzer.py            # Post classification agent
β”‚   β”‚   β”œβ”€β”€ planner.py             # Comment strategy planner
β”‚   β”‚   β”œβ”€β”€ writer.py              # Comment generation agent
β”‚   β”‚   └── reviewer.py            # Quality assurance agent
β”‚   β”œβ”€β”€ graph/
β”‚   β”‚   └── comment_graph.py       # LangGraph workflow definition
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ llm.py                 # LLM configs + cost tracking + ChatLiteLLMRouter
β”‚   β”‚   └── model_router.py        # Model selection utilities
β”‚   β”œβ”€β”€ prompts/
β”‚   β”‚   β”œβ”€β”€ analyzer_prompt.py     # Analyzer system prompt
β”‚   β”‚   β”œβ”€β”€ planner_prompt.py      # Planner system prompt
β”‚   β”‚   β”œβ”€β”€ writer_prompt.py       # Writer system prompt
β”‚   β”‚   └── reviewer_prompt.py     # Reviewer system prompt
β”‚   β”œβ”€β”€ schemas/
β”‚   β”‚   β”œβ”€β”€ request.py             # Pydantic request models
β”‚   β”‚   └── response.py            # Pydantic response models
β”‚   β”œβ”€β”€ tests/                     # pytest test suite (126 tests)
β”‚   β”‚   β”œβ”€β”€ conftest.py            # Shared fixtures & test config
β”‚   β”‚   β”œβ”€β”€ test_schemas.py        # Pydantic schema validation tests
β”‚   β”‚   β”œβ”€β”€ test_model_router.py   # Model routing & keyword detection
β”‚   β”‚   β”œβ”€β”€ test_llm.py            # LLM config, pricing & cost calculation
β”‚   β”‚   β”œβ”€β”€ test_prompts.py        # Prompt template validation
β”‚   β”‚   β”œβ”€β”€ test_analyzer.py       # Analyzer agent tests
β”‚   β”‚   β”œβ”€β”€ test_planner.py        # Planner agent tests
β”‚   β”‚   β”œβ”€β”€ test_writer.py         # Writer agent tests
β”‚   β”‚   β”œβ”€β”€ test_reviewer.py       # Reviewer agent tests
β”‚   β”‚   β”œβ”€β”€ test_comment_graph.py  # LangGraph workflow tests
β”‚   β”‚   └── test_api.py            # FastAPI endpoint tests
β”‚   β”œβ”€β”€ test_models.py             # Model connectivity test script
β”‚   β”œβ”€β”€ requirements.txt           # Python dependencies
β”‚   └── .env.example               # Environment variable template
β”‚
β”œβ”€β”€ doc/
β”‚   β”œβ”€β”€ ARCHITECTURE.md            # System architecture & mermaid diagrams
β”‚   β”œβ”€β”€ LANGGRAPH_WORKFLOW.md      # Detailed agent pipeline documentation
β”‚   β”œβ”€β”€ MODEL_AND_LLM_INTEGRATION.md  # LLM configuration & model docs
β”‚   β”œβ”€β”€ ENVIRONMENT_SETUP.md       # Environment setup guide
β”‚   └── API_REFERENCE.md           # Complete API documentation
β”‚
β”œβ”€β”€ extension/
β”‚   β”œβ”€β”€ manifest.json              # Chrome Extension Manifest V3
β”‚   β”œβ”€β”€ content.js                 # LinkedIn page injection script
β”‚   β”œβ”€β”€ content.css                # Injected button styles
β”‚   β”œβ”€β”€ popup.html                 # Extension popup UI
β”‚   β”œβ”€β”€ popup.js                   # Popup logic & API calls
β”‚   β”œβ”€β”€ popup.css                  # Popup styles
β”‚   β”œβ”€β”€ background.js              # Service worker for API calls
β”‚   └── icons/                     # Extension icons (16/32/48/128px)
β”‚
└── README.md

Tech Stack

Backend

Component Technology Purpose
Framework FastAPI Async API server
AI Orchestration LangGraph Multi-agent workflow
LLM Integration LangChain + LiteLLM + ChatLiteLLMRouter Prompt management, LLM calls & automatic fallback
Primary LLM Llama 3.3 70B (Groq) Fast, reliable comment generation & analysis
Fallback LLM Gemini 2.5 Flash (Google AI) Automatic fallback when Groq is unavailable
Observability LangSmith Tracing, monitoring & debugging
Validation Pydantic Request/response schemas
Server Uvicorn ASGI server

Chrome Extension

Component Technology Purpose
Manifest V3 Chrome Extension standard
Frontend Vanilla JS + HTML/CSS Lightweight, no dependencies
API Chrome Extension APIs Tab management, storage, messaging
Permissions activeTab, storage, clipboardWrite Minimal required permissions

LLM Models

All agents use Groq Llama 3.3 70B as primary with Gemini 2.5 Flash as automatic fallback via ChatLiteLLMRouter.

Agent Primary Model Fallback Model Temperature Purpose
Analyzer groq/llama-3.3-70b-versatile gemini/gemini-2.5-flash 0.3 Post classification, sentiment analysis
Planner groq/llama-3.3-70b-versatile gemini/gemini-2.5-flash 0.5 Comment strategy determination
Writer groq/llama-3.3-70b-versatile gemini/gemini-2.5-flash 0.7 Comment generation
Reviewer groq/llama-3.3-70b-versatile gemini/gemini-2.5-flash 0.3 Quality scoring & approval

Quick Start

Prerequisites

1. Clone the Repository

git clone https://github.com/himanshu231204/linkedin-ai-comment-copilot.git
cd linkedin-ai-comment-copilot

2. Set Up the Backend

# Navigate to backend
cd backend

# Create virtual environment
python -m venv venv

# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Create environment file
cp .env.example .env

# Add your API keys to .env

3. Configure Environment Variables

Edit backend/.env with your API keys:

# Required β€” Groq (all agents primary)
GROQ_API_KEY=your_groq_api_key_here

# Optional β€” Google AI (Gemini fallback when Groq fails)
GOOGLE_API_KEY=your_google_api_key_here

# Optional β€” LangSmith tracing
LANGSMITH_API_KEY=your_langsmith_api_key_here
LANGSMITH_PROJECT=linkedin-ai-comment-copilot

4. Run Tests

cd backend
python -m pytest tests/ -v

All 126 tests should pass. No API keys are needed β€” all LLM calls are mocked.

5. Test Model Connectivity (Optional)

python -m backend.test_models

You should see all models pass (requires API keys in .env):

[+] Direct: Analyzer  (Groq Llama 3.3 70B): PASS
[+] Direct: Planner   (Groq Llama 3.3 70B): PASS
[+] Direct: Writer    (Groq Llama 3.3 70B): PASS
[+] Direct: Reviewer  (Groq Llama 3.3 70B): PASS
[+] Router: Groq to Gemini: PASS
[+] Router Fallback: PASS
[+] Agent: Analyzer: PASS
[+] Agent: Planner: PASS
[+] Agent: Writer: PASS
[+] Agent: Reviewer: PASS

6. Start the Backend Server

# Option 1 β€” From the backend directory:
cd backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000

# Option 2 β€” From the project root:
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000

The API will be available at http://localhost:8000. Verify it's running:

curl http://localhost:8000/health
# {"status": "healthy"}

7. Install the Chrome Extension

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable Developer mode (toggle in top-right corner)
  3. Click Load unpacked
  4. Select the extension/ folder from this project
  5. The extension icon will appear in your Chrome toolbar

8. Start Using

  1. Navigate to linkedin.com/feed
  2. Open the extension popup by clicking the icon in your toolbar
  3. Select your preferred comment tone
  4. Click "Generate AI Comment" on any post
  5. A comment card appears with the generated comment
  6. Click Copy to copy to clipboard, or Insert Comment to paste into LinkedIn's comment box

API Reference

POST /generate-comment

Generate a LinkedIn comment using the multi-agent workflow.

Request Body:

{
  "post_content": "Just started my new role as Software Engineer at Google! Excited for this new chapter.",
  "tone": "professional"
}

Parameters:

Field Type Required Description
post_content string Yes LinkedIn post content (1-5000 chars)
tone string Yes Comment tone/style

Available Tones:

Tone Description
professional Business-appropriate, formal
technical Technical depth and expertise
supportive Encouraging and empathetic
networking Relationship-building focused
thoughtful Deep, reflective insights
friendly Warm and approachable
encouraging Motivating and uplifting
curious Question-driven engagement
founder Entrepreneurial perspective
recruiter Talent-focused messaging

Response:

{
  "comment": "Congratulations on the new role! Wishing you an exciting and impactful journey at Google."
}

GET /health

Check API health status.

Response:

{
  "status": "healthy"
}

POST /test-cost

Measure the cost of a single LLM call.

Parameters:

Param Values Model Tested
agent analyzer, planner Gemini 2.5 Flash
agent writer, reviewer Groq Llama 3.3 70B

Example:

curl -X POST http://localhost:8000/test-cost?agent=analyzer

Response:

{
  "model": "gemini/gemini-2.5-flash",
  "prompt_tokens": 150,
  "completion_tokens": 50,
  "total_tokens": 200,
  "input_cost_usd": 0.000045,
  "output_cost_usd": 0.000125,
  "total_cost_usd": 0.00017
}

Cost Tracking

The backend includes built-in LLM cost measurement. Every LLM call can be tracked for token usage and USD cost.

Cost Flow

sequenceDiagram
    participant Client
    participant API as FastAPI
    participant LLM as LLM Provider
    participant Cost as Cost Tracker

    Client->>API: POST /test-cost?agent=analyzer
    API->>LLM: Send sample prompt to Gemini 2.5 Flash
    LLM-->>API: Response + token usage
    API->>Cost: get_llm_cost(response, model_name)
    Cost-->>API: LLMCostResult (tokens + USD cost)
    API-->>Client: {model, tokens, cost_usd}
Loading

Quick Test

# Test Gemini Flash (analyzer/planner)
curl -X POST http://localhost:8000/test-cost?agent=analyzer

# Test Groq Llama (writer/reviewer)
curl -X POST http://localhost:8000/test-cost?agent=writer

Use in Code

from backend.models.llm import get_llm_cost, create_llm, get_analyzer_llm_config

config = get_analyzer_llm_config()
llm = create_llm(config)
response = await llm.ainvoke(messages)

cost = get_llm_cost(response, config.model_name)
print(f"Model: {cost.model}")
print(f"Tokens: {cost.prompt_tokens} in / {cost.completion_tokens} out")
print(f"Cost: ${cost.total_cost_usd}")

Pricing Reference

Model Input (per 1M tokens) Output (per 1M tokens)
gemini/gemini-2.5-flash $0.15 $0.60
groq/llama-3.3-70b-versatile $0.59 $0.79

How It Works

1. Post Detection (Content Script)

The content script uses an action-bar-first strategy to detect LinkedIn posts:

  1. Finds all social buttons (Like, Comment, Share) by text content
  2. Walks up the DOM to find the action bar container
  3. Walks further up to find the post container using heuristics
  4. Injects exactly one button per post using a WeakSet to track processed action bars

This approach works with LinkedIn's obfuscated CSS-in-JS DOM because it relies on button text content (which never changes) rather than class names (which change every deploy).

2. Comment Generation (Backend)

When the button is clicked:

  1. Content Script sends GENERATE_COMMENT message to Background Worker
  2. Background Worker calls the FastAPI API
  3. LangGraph Pipeline executes 4 agents sequentially (each with automatic Groq→Gemini fallback via ChatLiteLLMRouter):
    • Analyzer (Groq Llama 3.3 70B): Classifies post type, category, sentiment
    • Planner (Groq Llama 3.3 70B): Determines comment strategy
    • Writer (Groq Llama 3.3 70B): Generates the comment
    • Reviewer (Groq Llama 3.3 70B): Scores and approves/rejects
  4. Background Worker persists the comment and broadcasts to Content Script
  5. Content Script displays the comment in a card

3. Comment Card (UI)

The comment card provides:

  • Copy: One-click copy to clipboard
  • Insert Comment: Opens LinkedIn's comment box and fills it with the generated comment using polling to wait for the dynamic comment box
  • Dismiss: Close the card (auto-dismisses after 60 seconds)

4. Quality Review (Reviewer Agent)

The Reviewer agent evaluates the generated comment on:

  • Relevance to the post content
  • Human-likeness and natural flow
  • Spam score (low is better)
  • Generic score (low is better)
  • Professionalism and appropriateness

If the comment doesn't meet quality standards (score < 80), the workflow loops back to the Writer for regeneration.


Observability

LangSmith Integration

All requests are automatically traced through LangSmith when configured. Each agent call, LLM invocation, and graph transition is logged.

Trace flow per request:

sequenceDiagram
    participant Client
    participant API as FastAPI
    participant Graph as LangGraph
    participant A as Analyzer
    participant P as Planner
    participant W as Writer
    participant R as Reviewer
    participant LS as LangSmith

    Client->>API: POST /generate-comment
    API->>Graph: ainvoke(state)
    Graph->>A: analyze_post()
    A->>A: Groq Llama 3.3 70B (or Gemini fallback)
    A-->>LS: Trace: Analyzer
    A-->>Graph: post_type, category, sentiment
    Graph->>P: plan_strategy()
    P->>P: Groq Llama 3.3 70B (or Gemini fallback)
    P-->>LS: Trace: Planner
    P-->>Graph: strategy
    Graph->>W: write_comment()
    W->>W: Groq Llama 3.3 70B (or Gemini fallback)
    W-->>LS: Trace: Writer
    W-->>Graph: generated_comment
    Graph->>R: review_comment()
    R->>R: Groq Llama 3.3 70B (or Gemini fallback)
    R-->>LS: Trace: Reviewer
    R-->>Graph: approved/score
    Graph-->>API: final_comment
    API-->>Client: {comment: "..."}
Loading

View traces at: https://smith.langchain.com

LangSmith Observability
---

Configuration

Environment Variables

Variable Required Description
GROQ_API_KEY Yes Groq API key (primary LLM for all agents)
GOOGLE_API_KEY No Google AI API key (Gemini fallback when Groq fails)
LANGSMITH_API_KEY No LangSmith API key for tracing
LANGSMITH_PROJECT No LangSmith project name (default: linkedin-ai-comment-copilot)
HOST No Server host (default: 0.0.0.0)
PORT No Server port (default: 8000)

CORS Configuration

The backend is pre-configured to accept requests from all origins (Chrome Extension, localhost, LinkedIn). For production, you may want to restrict allow_origins in main.py.


Development

Backend Development

# Option 1 β€” Run from the backend directory:
cd backend
uvicorn main:app --reload

# Option 2 β€” Run from the project root:
uvicorn backend.main:app --reload

# API docs available at
# http://localhost:8000/docs (Swagger UI)
# http://localhost:8000/redoc (ReDoc)

Note: Both run options work. All Python modules use dual imports (try/except) so they work whether imported as a package (backend.main) or run directly (main from inside backend/).

Extension Development

After making changes to the extension:

  1. Go to chrome://extensions/
  2. Click the refresh icon on your extension
  3. Hard refresh the LinkedIn page (Ctrl+Shift+R)

Debug Utilities

The content script exposes debug utilities in the browser console (select the content script context from the DevTools dropdown):

// Check current state (posts found, buttons, login status)
AICopilotDebug()

// Test the full message flow (content β†’ background β†’ API)
AICopilotTestFlow()

// Inspect DOM structure around social buttons
AICopilotInspectButtons()

Testing

The backend includes a comprehensive pytest test suite with 126 tests covering schemas, LLM configuration, model routing, prompts, all 4 agents, the LangGraph workflow, and FastAPI endpoints.

Test Overview

Test File Tests Coverage
test_schemas.py 12 Pydantic request/response validation
test_model_router.py 15 Technical keyword detection & routing logic
test_llm.py 20 LLMConfig, create_llm, pricing, cost calculation
test_prompts.py 15 Prompt template variables & formatting
test_analyzer.py 6 Post classification agent
test_planner.py 6 Comment strategy planner
test_writer.py 5 Comment generation agent
test_reviewer.py 5 Quality review & approval
test_comment_graph.py 8 LangGraph workflow & conditional routing
test_api.py 12 FastAPI endpoints (health, generate, cost)
Total 126

Run Tests

# Run all tests
cd backend
python -m pytest tests/ -v

# Run a specific test file
python -m pytest tests/test_llm.py -v

# Run a specific test class
python -m pytest tests/test_api.py::TestHealthEndpoint -v

# Run with coverage report
python -m pytest tests/ -v --cov=backend --cov-report=term-missing

Test Design

  • No real API calls: All LLM and agent calls are mocked β€” no API keys required to run tests
  • Deterministic: Tests use fixed mock responses, not random LLM output
  • Fast: Full suite runs in ~30 seconds
  • Isolated: Each test is independent with clean state

Key Testing Patterns

# Agent tests mock at the create_{agent}_agent_with_router level
with patch("backend.agents.analyzer.create_analyzer_agent_with_router", return_value=mock_agent):
    result = await analyze_post("Excited to start my new role!")

# API tests mock the comment_graph to prevent real LLM calls
with patch("backend.main.comment_graph") as mock_graph:
    mock_graph.ainvoke = AsyncMock(return_value={...})

# LLM pricing tests patch model_cost to use deterministic fallback pricing
with patch("backend.models.llm.model_cost", {}):
    cost = get_llm_cost(response, "gemini/gemini-2.5-flash")

Documentation

Document Description
Architecture System architecture with mermaid diagrams
LangGraph Workflow Detailed agent pipeline & state management
Model & LLM Integration LLM configuration, models & routing
Environment Setup Environment variables & setup guide
API Reference Complete API documentation

Troubleshooting

Buttons Not Appearing

  1. Reload the extension: Go to chrome://extensions/ β†’ click refresh
  2. Hard refresh LinkedIn: Press Ctrl+Shift+R
  3. Check console logs: Open DevTools β†’ Console β†’ look for [AI Copilot] logs
  4. Verify login: The extension only works on the LinkedIn feed when logged in

Comment Not Generated

  1. Check backend is running: curl http://localhost:8000/health
  2. Check API keys: Run python -m backend.test_models
  3. Check background script logs: Go to chrome://extensions/ β†’ click "Service Worker" link under your extension
  4. Test API directly:
    curl -X POST http://localhost:8000/generate-comment \
      -H "Content-Type: application/json" \
      -d '{"post_content": "Hello world", "tone": "professional"}'

Insert Comment Not Working

  1. Click the Comment button first: The Insert feature needs the comment box to be open
  2. Wait for the comment box: LinkedIn loads it dynamically (the extension polls for 2 seconds)
  3. Check for errors: Look for red error notifications from the extension

LangSmith Tracing Not Working

If you see WARNING: LANGSMITH_API_KEY not set, ensure your .env file uses the new LangSmith environment variable names:

# Old (deprecated) β€” do NOT use
# LANGCHAIN_API_KEY=...
# LANGCHAIN_PROJECT=...

# New β€” use these
LANGSMITH_API_KEY=your_key_here
LANGSMITH_PROJECT=linkedin-ai-comment-copilot

Windows Async DNS Issue

If you encounter Cannot connect to host ... Could not contact DNS servers errors, this is a known Windows issue with aiodns (used by aiohttp/litellm for async DNS resolution).

Fix: Uninstall aiodns and pycares:

pip uninstall aiodns pycares -y

This forces aiohttp to fall back to the system DNS resolver, which works correctly on Windows.

Extension Context Invalidated

If you see "Extension context invalidated" errors:

  1. Reload the extension from chrome://extensions/
  2. Hard refresh the LinkedIn page (Ctrl+Shift+R)
  3. This happens when the extension is reloaded but the LinkedIn tab still has the old content script

Security

  • API Key Safety: API keys are stored only on the backend server β€” never exposed to the extension
  • No Data Storage: No posts, comments, or user data are stored anywhere
  • Minimal Permissions: The extension only requests activeTab, storage, and clipboardWrite
  • CORS Protection: Backend only accepts requests from allowed origins
  • Message Passing: Content script communicates with background service worker via Chrome's secure message passing

Roadmap

V1.0 (Current)

  • Multi-agent comment generation with per-agent model routing
  • Gemini 2.5 Flash for analysis & planning
  • Llama 3.3 70B via Groq for writing & review
  • 10 comment tones
  • LangSmith observability
  • LLM cost tracking with /test-cost endpoint
  • Comment card with Copy/Insert/Dismiss
  • Insert into LinkedIn comment box with polling
  • Quality review system
  • Action-bar-first post detection with WeakSet deduplication
  • Comprehensive test suite (126 tests, all mocked)

V2.0 (Planned)

  • Comment scoring & analytics
  • Personal writing style learning
  • RAG for domain-specific comments
  • Team workspace
  • LinkedIn engagement analytics
  • Auto-comment suggestions
  • Multi-language support
  • Local Ollama integration
  • Feedback-based learning

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Author

Himanshu β€” LinkedIn | GitHub


Built with LangGraph, FastAPI, Gemini, Llama 3.3, and Chrome Extension APIs

No database. No auth. Just intelligent comments.

About

πŸš€ AI-powered Chrome Extension that generates context-aware LinkedIn comments using LangGraph multi-agent workflows, FastAPI, LangChain, and LLMGateway. Supports multiple comment tones, intelligent post analysis, and one-click comment insertion directly on LinkedIn.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors