Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Reddit Content AI Agent

A modular, configurable system that scrapes content from Reddit, analyzes it using AI, and generates social media content optimized for different platforms.

Overview

This tool helps you discover trending topics and discussions on Reddit, extract valuable content ideas, and transform them into polished social media posts tailored for platforms like LinkedIn, Twitter, and Instagram.

Features

  • Reddit Content Scraping: Automatically collect posts from configurable subreddits with filtering by score and engagement.
  • AI-Powered Analysis: Extract valuable content ideas and themes using advanced LLM models.
  • Multi-Platform Content Generation: Create platform-optimized content for LinkedIn, Twitter, and Instagram.
  • Multiple LLM Providers: Support for OpenAI, Anthropic, and Deepseek models with easy switching.
  • Configurable Settings: Customize subreddits, content preferences, and LLM parameters.
  • Command-Line Interface: Simple commands for running the entire pipeline or individual components.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/reddit-content-agent.git
    cd reddit-content-agent
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Set up environment variables in a .env file:

    # LLM API keys
    OPENAI_API_KEY=your_openai_key
    ANTHROPIC_API_KEY=your_anthropic_key
    DEEPSEEK_API_KEY=your_deepseek_key
    

Usage

Running the Full Pipeline

To run the entire content generation pipeline (scrape, analyze, generate):

python main.py --run-pipeline

Running Individual Components

The components should be run in the following order:

  1. First, scrape Reddit content:
python main.py --scrape
  1. Then, analyze content to generate ideas:
python main.py --analyze

You can specify the target platform and content type during analysis:

python main.py --analyze --platform twitter --content-type thread
python main.py --analyze --platform linkedin --content-type article
python main.py --analyze --platform instagram --content-type post
  1. Finally, generate social media content:
python main.py --generate

Note: Each step depends on the previous step's data files. If you try to run the analyze step without first running the scrape step, you'll see a message: "No unanalyzed content found. Run scraping first." Similarly, if you try to run the generate step without first running the analyze step, you'll see: "No content ideas available. Run analysis first."

Running the Full Pipeline with Platform Specification

You can run the entire pipeline with a specific platform and content type:

python main.py --run-pipeline --platform twitter --content-type thread
python main.py --run-pipeline --platform linkedin --content-type article
python main.py --run-pipeline --platform instagram --content-type post

Selecting LLM Provider

You can specify which LLM provider to use:

python main.py --provider openai --run-pipeline
python main.py --provider anthropic --run-pipeline
python main.py --provider deepseek --run-pipeline

Viewing Statistics

Display statistics about collected content and generated ideas:

python main.py --stats

Configuration

The system is highly configurable through settings in config/settings.py:

  • LLM Providers: Configure models, temperature, and token limits for each provider
  • Reddit Settings: Customize subreddits, time filters, and minimum engagement thresholds
  • Content Preferences: Set default platforms, content types, tone, and hashtag preferences

Project Structure

reddit-content-agent/
├── .env                        # Environment variables and API keys
├── README.md                   # Project documentation
├── requirements.txt            # Python dependencies
├── main.py                     # Entry point script
├── data/                       # Data storage directory
│   ├── reddit_content.json     # Scraped Reddit content
│   ├── content_ideas.json      # Generated content ideas
│   └── generated_content.json  # Final social media content
├── src/                        # Source code
│   ├── reddit/                 # Reddit interaction module
│   ├── analysis/               # Content analysis module
│   ├── generation/             # Content generation module
│   ├── llm/                    # LLM provider integrations
│   └── utils/                  # Utility functions
└── config/                     # Configuration files
    ├── prompts/                # LLM prompt templates
    └── settings.py             # Default configuration settings

Requirements

  • Python 3.8+
  • At least one LLM provider API key (OpenAI, Anthropic, or Deepseek)

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages