githubinferredactive
Blog-writer-crewai
provenance:github:supritR21/Blog-writer-crewai
WHAT THIS AGENT DOES
This agent automatically creates blog posts on technical topics. It finds relevant videos from a specific YouTube channel, analyzes the video content, and then writes a blog post summarizing the key information. Businesses or individuals who want to consistently share informative content about technology but lack the time to research and write can use this tool to streamline their content creation process.
README
# Blog-writer-crewai
Multi-agent blog generation project built with CrewAI. It researches a topic from a target YouTube channel, extracts transcript-based insights, and writes a blog post in Markdown.
## Overview
This project uses two agents in sequence:
- `blog_researcher`: finds relevant YouTube content and transcript context
- `blog_writer`: turns research into a readable technical blog post
The default flow is defined in `exwc.py` and runs with CrewAI `Process.sequential`.
## Features
- Agent-based research and writing workflow
- YouTube channel search via `YoutubeChannelSearchTool`
- Transcript retrieval through `youtube_transcript_api`
- Topic-driven generation (`crew.kickoff(inputs={"topic": ...})`)
- Markdown output file generation (`new-blog-post.md`)
## Tech Stack
- Python
- CrewAI
- crewai-tools
- YouTube Transcript API
- python-dotenv
- OpenAI API
## Project Structure
```text
Blog-writer-crewai/
agents.py # Agent definitions (researcher, writer)
tasks.py # Task definitions and output config
tools.py # YouTube search + transcript tools
exwc.py # Main runnable crew pipeline
try.py # Alternative single-file experimental pipeline
requirements.txt # Dependencies
.gitignore
```
## Prerequisites
- Python 3.10+
- OpenAI API key
- Internet access (YouTube + API calls)
## Setup
1. Clone the repository
```bash
git clone <your-repo-url>
cd Blog-writer-crewai
```
2. Create and activate a virtual environment
Windows PowerShell:
```powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
```
macOS/Linux:
```bash
python -m venv .venv
source .venv/bin/activate
```
3. Install dependencies
```bash
pip install -r requirements.txt
```
4. Create a `.env` file in the project root
```env
OPENAI_API_KEY=your_openai_api_key_here
```
## Run
Primary pipeline:
```bash
python exwc.py
```
Alternative experimental script:
```bash
python try.py
```
## How It Works
1. `blog_researcher` searches the configured YouTube channel (`@krishnaik06`) for topic-relevant content.
2. Transcript text is fetched using the custom `YoutubeTranscriptTool`.
3. `research_task` summarizes key ideas.
4. `write_task` creates a blog article and saves it to `new-blog-post.md`.
## Configuration Notes
- Topic is currently hardcoded in `exwc.py`:
```python
result = crew.kickoff(inputs={'topic': 'AI VS ML VS DL vs Data Science'})
```
- To generate for other topics, update that input string.
- Model settings are configured in `agents.py` via environment variables:
- `OPENAI_API_KEY`
- `OPENAI_MODEL_NAME` (currently set to `gpt-4-0125-preview` in code)
## Output
- Main generated file:
- `new-blog-post.md`
- Optional files from experimental script (`try.py`):
- `research.txt`
- `blog_post.md`
## Known Limitations
- Depends on transcript availability for the selected video.
- Channel is fixed in `tools.py` unless you modify the handle.
- API/model compatibility depends on your installed CrewAI version and active OpenAI models.
## Suggested Improvements
- Add CLI arguments for topic and channel.
- Add retries/fallback when transcripts are unavailable.
- Add logging and structured error handling.
- Add tests for tools and task orchestration.
- Make output folder configurable.
## Disclaimer
Generated content may require fact-checking and editorial review before publication.
PUBLIC HISTORY
First discoveredMar 28, 2026
IDENTITY
inferred
Identity inferred from code signals. No PROVENANCE.yml found.
Is this yours? Claim it →METADATA
platformgithub
first seenJun 12, 2025
last updatedMar 27, 2026
last crawled2 days ago
version—
README BADGE
Add to your README:
