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.
- 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
├── 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
- Python 3.12+
- Poetry
- Docker (optional, for containerized deployment)
- Azure OpenAI API credentials
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.pydocker build -t linkedin-article-generator .
docker run --env-file .env linkedin-article-generator- 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()- Prompts: Customize post structure and tone in Configuration/Prompts.py
- API Keys: Set Azure OpenAI credentials in your
.envfile
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- Author: Elie Eldebs (elie.eldebs@outlook.fr)
- For issues, open a GitHub issue or contact the author directly.
Q: How do I add new summarization prompts?
A: Edit Configuration/Prompts.py.
Q: Where are processed articles stored?
A: In Database/articles.json.