Multi-Platform Social Content Agent
Three LLM agents on three providers write social posts from a brand policy in Markdown. Gemini researches, Groq writes, a GPT-4o-mini critic scores. A person approves before anything goes to Facebook, Threads, X or Bluesky.
- Role
- AI Engineer intern — AI/LLM layer owner (team of 3)
- Year
- 2026
- Company
- FANTEK
- Source code
- GitHub
- Agents / LLM providers
- 3 / 3
- Unit tests
- 151
- Critic score on the smoke test
- 85/100
- API cost of a full run (free tiers)
- $0
Context
Built during my AI Engineer internship at FANTEK (May–October 2026), in a team of three. The goal: a Python agent system that drafts on-brand posts for several social platforms, with a person always in control of what gets published.
Problem
- Each account has its own voice and rules, and posts must follow them.
- Every step has to return data the next step can use directly, not free text.
- Free LLM tiers are generous but flaky, so the system cannot depend on one provider.
- Nothing may go live by accident.
Solution & architecture
Each agent runs on a different provider, chosen for what it does best:
- Markdown account policy + topic
- Research — Gemini (JSON brief)
- Copywriter — Groq
- Rule critic (zero tokens) → LLM critic — GPT-4o-mini via GitHub Models
- Pass, rewrite (max 2) or send to human review
- Human approves → guarded publisher
- Provider adapter: one interface over Gemini, Groq and GitHub Models, with routing and retries, so an agent never calls a model directly.
- Two-stage critic: cheap local rules first (length, banned words, policy checks, no tokens spent), then the LLM critic scores the draft. Weak drafts get at most two rewrites; after that a person decides.
- Structured JSON output between every step.
- Guarded publishing: mock, dry-run or live. Live needs an explicit go-ahead. Publishers for Facebook Page, Threads, X and Bluesky; Threads and X use OAuth (X with PKCE and token rotation), tokens stored encrypted.
- Traceability: every run, score, review decision, token count and publish receipt is stored in SQLite.
- Three ways to run: CLI, a Streamlit studio, and a GitHub Actions schedule twice a day.
My role
I owned the AI/LLM layer: the multi-provider foundation, the full Research → Copywriter → Critic pipeline, the Streamlit studio, and the X and Bluesky publishers.
Results
- Works end to end: one run produces one post, filled from a ready-made Markdown template for the brand and platform. On the first live run, Gemini research took 2.4 s and Groq drafting 1.2 s, about 1,900 tokens in total.
- Smoke evaluation: critic score 85/100, 3 requests, 0 retries, $0 on free tiers.
- 151 unit tests.
Tech stack
Python · Gemini · Groq · GitHub Models (GPT-4o-mini) · SQLite · Streamlit · OAuth 2.0 PKCE · GitHub Actions
- Multi-agent
- Multi-provider
- Prompt Engineering
- Structured Output
- Python
