An agentic AI workflow that automatically generates realistic DevOps production scenarios, validates their technical correctness, converts them into LinkedIn posts, and delivers the final content via email.
The project is built using LangGraph and LangChain with structured outputs to ensure each stage produces consistent and validated data before moving to the next step.
- Random topic and subtopic selection from a configurable YAML file
- AI-generated production-inspired DevOps scenarios
- Technical validation of generated scenarios using a separate LLM step
- Automatic retry loop for invalid scenarios
- Structured LinkedIn post generation
- HTML email delivery of the generated content
- Daily automated execution using GitHub Actions
- Modular LangGraph workflow
GitHub Actions (Daily Cron)
│
▼
Pick Topic
│
▼
Generate Scenario
│
▼
Technical Validator
│
├─────┴─────┐
│ │
Invalid Valid
│ │
▼ ▼
Regenerate Generate LinkedIn Post
│ │
└─────────────────┘
│
▼
Send Email
- Python
- LangGraph
- LangChain
- OpenAI GPT-5 Nano
- GitHub Actions
- Pydantic
- YAML
.
├── config/
│ └── topics.yaml
│
├── graph/
│ ├── generate_linkedin_post.py
│ ├── models.py
│ ├── scenario_generator_agent.py
│ ├── send_email.py
│ ├── state.py
│ ├── technical_validator.py
│ ├── topic_picker.py
│ └── workflow.py
│
├── env.py
├── main.py
└── README.md
Create a .env file containing:
OPENAI_API_KEY=
MAX_RETRIES_VALIDATOR=3
SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
SMTP_PASSWORD=
SMTP_FROM=
RECIPIENT_EMAIL=The project includes a GitHub Actions workflow that executes the pipeline automatically every day using a cron schedule.
The workflow:
- Checks out the repository
- Sets up Python
- Installs project dependencies
- Loads secrets from GitHub Actions
- Executes
python main.py - Sends the generated LinkedIn post via email