Skip to content

ElieElDebs/Linkedin_Article_Generator

Repository files navigation

LinkedIn Article Generator

Python Version License Build Status Coverage Status


Description

LinkedIn Article Generator is an open-source, multi-agent Python system that reads scientific articles (from arXiv), summarizes them, and generates high-quality, business-oriented LinkedIn posts. It leverages advanced LLMs (Azure OpenAI, LangChain, LangGraph) to bridge the gap between scientific research and business communication, automating the process from article retrieval to post generation.


Features

  • Automated retrieval of scientific articles from arXiv
  • Intelligent summarization using LLMs (Azure OpenAI, LangChain)
  • Business-focused LinkedIn post generation with customizable prompts
  • Persistent tracking of processed articles (JSON database)
  • Modular, extensible agent-based architecture
  • Dockerized for easy deployment
  • Unit-tested core components

Folder Structure


├── app.py                  # Main entry point
├── dockerfile              # Docker build instructions
├── pyproject.toml          # Poetry project config & dependencies
├── App/
│   ├── Agents/
│   │   └── Graph.py        # Main agent graph logic (LinkBotGraph)
│   └── Utils/
│       ├── LinkedInSummarizer.py  # LLM-based summarization
│       ├── SystemTracker.py       # Article tracking (JSON DB)
│       └── Arxiv/
│           └── Arxiv.py    # arXiv API integration
├── Configuration/
│   └── Prompts.py          # Custom prompt templates
|
├── Database/
│   └── articles.json       # Persistent article metadata
|
├── Tests/
│   ├── test_Arxiv.py       # Unit tests for arXiv agent
│   └── test_SystemTracker.py # Unit tests for tracker

Quick Start

Prerequisites

  • Python 3.12+
  • Poetry
  • Docker (optional, for containerized deployment)
  • Azure OpenAI API credentials

Installation

Local (Poetry)

git clone https://github.com/yourusername/linkedin-article-generator.git
cd linkedin-article-generator
poetry install
cp .env.example .env  # Set your Azure OpenAI credentials
poetry run python app.py

Docker

docker build -t linkedin-article-generator .
docker run --env-file .env linkedin-article-generator

Usage Example

  • On startup, the system loads environment variables and initializes the agent graph.
  • The agent fetches relevant scientific articles from arXiv, summarizes them, and generates a LinkedIn post using a business-focused prompt.
  • All processed articles are tracked in Database/articles.json.

Example:

from App.Agents.Graph import LinkBotGraph
from App.Utils.SystemTracker import SystemTracker

st = SystemTracker(database_path="./Database/articles.json")
bot = LinkBotGraph(system_tracker=st)
bot.run()

Configuration

  • Prompts: Customize post structure and tone in Configuration/Prompts.py
  • API Keys: Set Azure OpenAI credentials in your .env file

Contribution Guidelines

We welcome contributions!

  • Fork the repo and create your branch (git checkout -b feature/your-feature)
  • Write clear, tested code and add/modify unit tests in Tests/
  • Submit a pull request with a clear description

Please follow the PEP8 style guide. Run tests with:

poetry run pytest

Contact & Support

  • Author: Elie Eldebs (elie.eldebs@outlook.fr)
  • For issues, open a GitHub issue or contact the author directly.

Acknowledgements


FAQ

Q: How do I add new summarization prompts?
A: Edit Configuration/Prompts.py.

Q: Where are processed articles stored?
A: In Database/articles.json.


About

LinkedIn Article Generator: Open-source multi-agent Python system that fetches scientific articles from arXiv, summarizes them, and creates business-focused LinkedIn posts using advanced LLMs (Azure OpenAI, LangChain, LangGraph)

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages