ai-social-media-agent

πŸ“± Social Media Automation Agent

Writes platform-native content for Twitter/X, LinkedIn, and Instagram, builds a weekly content calendar, and schedules everything to Buffer β€” automatically.

What It Does

Tell it your brand and niche. It generates posts optimized for each platform’s culture, hooks, and algorithm β€” not generic recycled content. Then schedules everything so you never have to think about posting again.

Pipeline: Topic/Brand Config β†’ Platform-specific Content Generation β†’ SEO/Hook Scoring β†’ Buffer API Scheduling β†’ Weekly Calendar Export

Real-World Impact

Tech Stack

| Tool | Role | |β€”β€”|β€”β€”| | OpenAI GPT-4o | Platform-specific content generation | | Buffer API | Post scheduling | | Python | Content calendar orchestration |

Setup

pip install openai requests
export OPENAI_API_KEY=your_key
export BUFFER_ACCESS_TOKEN=your_token   # optional, for scheduling
export BUFFER_TWITTER_ID=your_id        # optional
export BUFFER_LINKEDIN_ID=your_id       # optional

python agent.py

What Gets Generated

Twitter/X: Hook-first tweets, threads, hot takes, numbered lists β€” under 280 chars, no generic advice.

LinkedIn: Story-driven posts with line breaks, thought leadership, case studies β€” 150–300 words, 3–5 hashtags.

Instagram: Carousel captions, slide titles, hashtag sets (20–30 tags), strong CTAs.

Content Repurposing

# Turn a LinkedIn post into a Twitter thread
repurpose_content(linkedin_post, from_platform="linkedin", to_platform="twitter")

Built by Philip | AI Agents & Automation Specialist