https://github.com/sujeetgund/linkedin-post-generator-agent
An AI-powered agent-based system to generate engaging LinkedIn posts through an orchestrated multi-phase process.
https://github.com/sujeetgund/linkedin-post-generator-agent
ai-agents cloudinary content-generation gemini-api generative-ai google-adk linkedin-post-generator
Last synced: 3 months ago
JSON representation
An AI-powered agent-based system to generate engaging LinkedIn posts through an orchestrated multi-phase process.
- Host: GitHub
- URL: https://github.com/sujeetgund/linkedin-post-generator-agent
- Owner: sujeetgund
- License: apache-2.0
- Created: 2025-06-06T17:13:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-12T11:00:58.000Z (about 1 year ago)
- Last Synced: 2026-05-05T00:45:49.283Z (3 months ago)
- Topics: ai-agents, cloudinary, content-generation, gemini-api, generative-ai, google-adk, linkedin-post-generator
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 9
- Watchers: 0
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π LinkedIn Post Generator Agent
A modular, agent-based system for crafting engaging LinkedIn posts. This project uses Google ADK (Agent Development Kit) to orchestrate multiple specialized sub-agents, ensuring a polished, professional final post β complete with behind-the-scenes storytelling, optimized hashtags, and an optional image.
## π Project Overview
I launched this project after noticing a clear pattern - While more people are sharing on LinkedIn, many posts end up blending together, often carrying that generic, AI-generated feel.
If AI is already part of the process, why not build a tool that empowers **users to create posts that stand out** and **authentically reflect their unique voice and goals**?
This project implements a multi-phase, agent-based workflow to do just that:
β
**Phase 1:** Gather post intent and additional details
β
**Phase 2:** Generate a compelling behind story
β
**Phase 3:** Suggest relevant hashtags
β
**Phase 4:** Craft a complete post
β
**Phase 5:** (Optional) Generate a prompt-based image
All phases are orchestrated by a manager agent, delegating to sub-agents for each specialized task.
## π Project Structure
```
.
βββ .gitignore
βββ .vscode/settings.json
βββ LICENSE
βββ README.md
βββ requirements.txt
βββ linkedin_post_agent/
βββ .env
βββ agent.py
βββ constants.py
βββ prompt.py
βββ sub_agents/
βββ story_agent/
β βββ agent.py
β βββ prompt.py
βββ hashtag_agent/
β βββ agent.py
β βββ prompt.py
βββ post_agent/
β βββ agent.py
β βββ prompt.py
βββ image_agent/
βββ agent.py
βββ prompt.py
βββ tools/create_image.py
```
## β‘οΈ Installation & Setup
Follow these steps to get the project up and running:
```bash
# Clone this repository
git clone https://github.com/sujeetgund/linkedin-post-generator-agent.git
cd linkedin-post-generator-agent
# Set up a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
```
## π Setting up Application Secrets
Create a `.env` file in the `linkedin_post_agent/` directory based on the provided `.env.example` file:
```bash
cd linkedin_post_agent
cp .env.example .env
```
### Google API
This project uses the Google Gemini API for generating content and images.
1. Visit the [Google AI Studio](https://aistudio.google.com/app/apikey).
2. Sign in with your Google account.
3. Click **"Create API key"** and copy it.
4. Add your Gemini API key to `.env`:
```
GOOGLE_API_KEY=your_gemini_api_key
```
### Cloudinary API
To enable image uploads, you'll need to set up Cloudinary credentials:
1. [Sign up for a free Cloudinary account](https://cloudinary.com/users/register) if you don't have one.
2. After logging in, go to your [Cloudinary Dashboard](https://cloudinary.com/console).
3. Locate your **Cloud name**, **API Key**, and **API Secret** under the "Account Details" section.
4. Add these values to your `.env` file:
```
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
```
These credentials allow the agent to upload and manage images for your LinkedIn posts.
## π Running the Agent
To start the agent system, run:
```bash
python -m linkedin_post_agent
```
This command launches the FastAPI server, allowing you to generate LinkedIn posts through an interactive, agent-driven workflow.
For development and debugging, you can also launch the Google ADK developer UI with:
```bash
adk web
```
## β Example Workflow
Hereβs what you can expect from the interaction:
1. Manager agent asks: **"What is the intention of your post?"**
2. You provide a topic and optional details.
3. **Story Agent** generates an engaging backstory.
4. **Hashtag Agent** suggests relevant hashtags.
5. **Post Agent** crafts the complete LinkedIn post.
6. Optionally, **Image Agent** can create a relevant image for your post.
7. The final post (and image) are presented to you for review.
## π€ Contributing
Contributions, issues, and feature requests are welcome!
Feel free to [open an issue](https://github.com/sujeetgund/linkedin-post-generator-agent/issues) or submit a pull request.
## π License
This project is licensed under the [Apache 2.0 License](LICENSE).
## π Acknowledgements
- Built with the power of Google Gemini API.
- Orchestrated using Google ADK.