Loading...
Loading...
Loading...
This project is an **AI-powered Instagram marketing automation pipeline** built with CrewAI framework that simulates a complete marketing team with 4 specialized AI agents:
# Complete Marketing Team Automation Pipeline Guide
## π Overview
This project is an **AI-powered Instagram marketing automation pipeline** built with CrewAI framework that simulates a complete marketing team with 4 specialized AI agents:
1. **Market Researcher** - Analyzes trends, competitors, and hashtags
2. **Content Strategist** - Creates content calendars and strategies
3. **Visual Creator** - Generates detailed image descriptions
4. **Copywriter** - Crafts engaging captions and copy
## ποΈ Project Structure
```
Automating-a-Marketing-Team-with-agents/
βββ src/
β βββ instagram/
β βββ __init__.py
β βββ crew.py # Main crew orchestration
β βββ main.py # Entry point
β βββ config/
β β βββ agents.yaml # AI agents configuration
β β βββ tasks.yaml # Tasks configuration
β βββ tools/
β βββ __init__.py
β βββ search.py # Search tools for research
βββ .env # Environment variables
βββ pyproject.toml # Poetry dependencies
βββ poetry.lock # Locked dependencies
βββ README.md
```
## π Step-by-Step Manual Setup and Execution
### Step 1: Prerequisites
**Required Software:**
- Python 3.10-3.13
- Poetry (for dependency management)
- OpenAI API key
### Step 2: Environment Setup
#### 2.1 Install Poetry
```bash
pip install poetry
```
#### 2.2 Navigate to Project Directory
```bash
cd C:\Users\abhis\Automating-a-Marketing-Team-with-agents
```
#### 2.3 Lock and Install Dependencies
```bash
python -m poetry lock
python -m poetry install
```
### Step 3: Configuration
#### 3.1 Environment Variables Setup
Create/Edit `.env` file in project root:
```properties
OPENAI_API_KEY=your_actual_openai_api_key_here
# Optional: Add Serper API key for enhanced search
SERPER_API_KEY=your_serper_api_key_here
```
#### 3.2 Agents Configuration (`src/instagram/config/agents.yaml`)
- **Market Researcher**: Analyzes Instagram trends and competitors
- **Content Strategist**: Develops content calendars
- **Visual Creator**: Creates image descriptions
- **Copywriter**: Writes engaging captions with SEO optimization
#### 3.3 Tasks Configuration (`src/instagram/config/tasks.yaml`)
- **market_research**: Research trends and hashtags
- **content_strategy**: Create weekly content calendar
- **visual_content_creation**: Generate image descriptions
- **copywriting**: Write post captions and copy
### Step 4: Pipeline Execution
#### 4.1 Manual Execution Command
```bash
python -m poetry run instagram
```
#### 4.2 Interactive Inputs Required
When you run the pipeline, you'll be prompted for:
1. **Instagram Account Description**:
- Example: "A fitness coaching page focused on home workouts and healthy lifestyle tips"
2. **Topic of the Week**:
- Example: "New Year fitness resolutions and motivation"
### Step 5: Pipeline Flow
#### Phase 1: Market Research
- **Agent**: Market Researcher
- **Action**: Analyzes current trends, hashtags, competitor activities
- **Output**: Research report with trending hashtags and insights
#### Phase 2: Content Strategy
- **Agent**: Content Strategist
- **Action**: Creates 3-5 day content calendar based on research
- **Output**: Structured markdown calendar with themes and keywords
#### Phase 3: Visual Content Creation
- **Agent**: Visual Creator
- **Action**: Generates detailed image descriptions for each post
- **Output**: Detailed visual prompts for AI image generation
#### Phase 4: Copywriting
- **Agent**: Copywriter
- **Action**: Writes engaging captions with hashtags and CTAs
- **Output**: Ready-to-post Instagram captions
### Step 6: Expected Outputs
The pipeline generates several files:
- **Market Research Report** (`market_research.md`)
- **Content Calendar** (integrated in final output)
- **Visual Content Descriptions** (`visual-content.md`)
- **Instagram Copy** (captions with hashtags)
## π§ Manual Customization Options
### Modify Agents (`agents.yaml`)
```yaml
market_researcher:
role: "Your custom role"
goal: "Your specific goal"
backstory: "Agent personality and expertise"
```
### Adjust Tasks (`tasks.yaml`)
```yaml
market_research:
description: "Custom task description with {variables}"
expected_output: "Specific output format requirements"
```
### Add Custom Tools (`tools/search.py`)
- Extend search capabilities
- Add new data sources
- Integrate APIs
## π― Manual Execution Examples
### Example 1: Fitness Coach Account
```bash
python -m poetry run instagram
# Inputs:
# Page description: "Personal trainer specializing in strength training for beginners"
# Topic: "January fitness motivation and goal setting"
```
### Example 2: Food Blog
```bash
python -m poetry run instagram
# Inputs:
# Page description: "Healthy recipe blog with quick meal ideas for busy professionals"
# Topic: "Meal prep Sunday inspiration"
```
## π Pipeline Performance Metrics
- **Processing Time**: 5-10 minutes depending on complexity
- **API Calls**: ~10-15 OpenAI API calls per run
- **Output Quality**: Professional-grade marketing content
- **Customization Level**: Highly configurable through YAML files
## π οΈ Troubleshooting
### Common Issues:
1. **Poetry not recognized**:
```bash
python -m poetry [command]
```
2. **API Key errors**:
- Verify `.env` file location and format
- Check API key validity
3. **Dependency conflicts**:
```bash
python -m poetry lock --no-update
python -m poetry install
```
## π Alternative Execution Methods
### Method 1: Direct Python Execution
```bash
python src/instagram/main.py
```
### Method 2: Poetry Shell
```bash
poetry shell
python -m instagram
```
### Method 3: Custom Script
Create `run_pipeline.py`:
```python
from src.instagram.crew import InstagramCrew
import datetime
inputs = {
'current_date': datetime.datetime.now().strftime("%Y-%m-%d"),
'instagram_description': 'Your page description',
'topic_of_the_week': 'Your weekly topic',
}
InstagramCrew().crew().kickoff(inputs=inputs)
```
## πββοΈ Quick Start Commands
### For Windows PowerShell:
```powershell
# 1. Install Poetry
pip install poetry
# 2. Navigate to project
cd C:\Users\abhis\Automating-a-Marketing-Team-with-agents
# 3. Install dependencies
python -m poetry lock
python -m poetry install
# 4. Run pipeline
python -m poetry run instagram
```
## π File Locations and Purposes
### Configuration Files:
- `.env` - Environment variables (API keys)
- `pyproject.toml` - Project dependencies and metadata
- `src/instagram/config/agents.yaml` - AI agent definitions
- `src/instagram/config/tasks.yaml` - Task descriptions and workflows
### Core Code Files:
- `src/instagram/main.py` - Entry point and user interaction
- `src/instagram/crew.py` - CrewAI orchestration logic
- `src/instagram/tools/search.py` - Search and research tools
### Output Files (Generated):
- `market_research.md` - Research findings and trends
- `visual-content.md` - Image descriptions for posts
- Various markdown files with content strategies and copy
## π Security Notes
- Never commit your `.env` file with real API keys
- Use environment variables for sensitive data
- Consider using `.env.example` for template sharing
## π Advanced Usage
### Batch Processing:
Create multiple input configurations and run them sequentially:
```python
# batch_run.py
from src.instagram.crew import InstagramCrew
import datetime
campaigns = [
{
'current_date': datetime.datetime.now().strftime("%Y-%m-%d"),
'instagram_description': 'Fitness coaching page',
'topic_of_the_week': 'New Year resolutions',
},
{
'current_date': datetime.datetime.now().strftime("%Y-%m-%d"),
'instagram_description': 'Travel photography blog',
'topic_of_the_week': 'Winter destinations',
}
]
for campaign in campaigns:
print(f"Running campaign: {campaign['topic_of_the_week']}")
InstagramCrew().crew().kickoff(inputs=campaign)
```
## π Monitoring and Analytics
### Track Pipeline Performance:
- Monitor API usage and costs
- Log execution times and success rates
- Analyze output quality and engagement metrics
### Integration Possibilities:
- Connect to Instagram Business API
- Integrate with scheduling tools (Buffer, Hootsuite)
- Add analytics dashboards
- Implement A/B testing for content variations
---
**This comprehensive pipeline automates the entire content creation process from research to final copy, simulating a full marketing team's workflow in minutes rather than hours!**
## π― Next Steps After Pipeline Execution
1. **Review Generated Content**: Check all output files for quality and relevance
2. **Customize as Needed**: Edit any generated content to match your specific brand voice
3. **Schedule Posts**: Use the content calendar to plan your posting schedule
4. **Generate Images**: Use the visual descriptions with AI image generators (DALL-E, Midjourney, etc.)
5. **Track Performance**: Monitor engagement metrics and adjust future inputs based on results
μ΄λ ν λ¬Έμλ μ€ν¬λ¦½νΈκ° λ€λ₯Έ **νλ‘ν μ½ / ν¬νΈ / νΈμ€νΈ** μ μλ 리μμ€ μ¬μ©νλ κ²μ μ ννλ μ μ± . μλ₯Ό λ€μ΄, λ€μκ³Ό κ°μ μ¬μ΄νΈμμ 리μμ€λ₯Ό λ€λ₯Έ κ³³μΌλ‘ μμ²νλ€κ³ νμ.
* **Production MDB**: updated monthly.
This document outlines the mandatory procedures for developing and verifying VCR elements (shaders, manifests, and assets) to ensure high-fidelity, centered, and non-clipping renders.
http://localhost:8000