Skip to Content
AgentsSocial Calendar Planner

Social Calendar Planner

[Live] · agent__social-calendar-planner · Claude Sonnet 4.6

Generates a complete 30-day social media content calendar from an approved strategy, mapping every post slot to a platform, content type, topic angle, and format with notes for the Social Post Writer.


Overview

FunctionPlan monthly content calendar across all connected social platforms
TypeWorker — Planning
ModelClaude Sonnet 4.6
Queueagent__social-calendar-planner
Concurrency3
Timeout5 min
Est. cost / task~$0.35
PlanPro+

Input

interface SocialCalendarPlannerInput { tenantId: string; // used to scope RAG queries campaignId: string; month: string; // e.g. "2026-04" — the calendar month to plan approvedStrategy: string; // Markdown content of the approved campaign strategy connectedPlatforms: Platform[]; // platforms to plan for; drives per-platform constraints volumeTargets: { [platform: string]: number; // e.g. { instagram: 12, linkedin: 8, facebook: 8 } }; constraints?: { promotionalCapPct?: number; // default 30 — max % of posts that may be promotional blackoutDates?: string[]; // ISO dates — no posts scheduled on these days pinnedDates?: { // events that must appear on specific dates date: string; note: string; }[]; }; } type Platform = 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'x' | 'pinterest';

Output

interface SocialCalendarPlannerOutput { month: string; // e.g. "2026-04" calendar: CalendarEntry[]; // one entry per post slot across the full month summary: { totalPosts: number; byPlatform: Record<string, number>; byContentType: Record<string, number>; promotionalPct: number; // must be ≤ 30 varietyWarnings: string[]; // any consecutive-same-type runs flagged but not corrected }; } interface CalendarEntry { id: string; // uuid — used as reference when Social Post Writer picks up the slot date: string; // ISO date, e.g. "2026-04-03" dayOfWeek: string; // e.g. "Friday" platform: Platform; contentType: 'educational' | 'promotional' | 'engagement' | 'ugc' | 'behind-the-scenes'; format: 'static' | 'reel' | 'story' | 'carousel' | 'text' | 'poll'; topicAngle: string; // specific angle/hook, e.g. "3 mistakes most teams make with X" theme: string; // campaign theme this post belongs to caption: null; // always null at this stage — written by Social Post Writer notesForWriter: string; // tone, specific CTA, any assets available, mandatory mentions pinnedEvent?: string; // if this slot is tied to a known event or promotion }

Sample output excerpt

[ { "id": "cal-2026-04-01-ig", "date": "2026-04-01", "dayOfWeek": "Wednesday", "platform": "instagram", "contentType": "educational", "format": "carousel", "topicAngle": "5 signs your marketing data is lying to you (and what to do about it)", "theme": "Data-Driven Marketing", "caption": null, "notesForWriter": "Tone: conversational but authoritative. End with a save-worthy CTA. Slide 1 must be a bold hook stat. Target audience: marketing managers at SMBs. No promotional language.", "pinnedEvent": null }, { "id": "cal-2026-04-03-li", "date": "2026-04-03", "dayOfWeek": "Friday", "platform": "linkedin", "contentType": "behind-the-scenes", "format": "static", "topicAngle": "How we built our Q2 strategy in one afternoon (with a framework you can steal)", "theme": "Agency Culture", "caption": null, "notesForWriter": "First-person voice from the agency's perspective. Include a 3-step framework as a text overlay or in the caption. Professional but approachable tone. No jargon.", "pinnedEvent": null }, { "id": "cal-2026-04-10-ig", "date": "2026-04-10", "dayOfWeek": "Friday", "platform": "instagram", "contentType": "promotional", "format": "reel", "topicAngle": "Introducing our new AI reporting dashboard — see your campaigns in real time", "theme": "Product Launch", "caption": null, "notesForWriter": "This is a product launch reel. Hook in first 2 seconds — show the dashboard UI. Use excitement/FOMO framing. Link in bio CTA. Promo code LAUNCH20 to include if applicable.", "pinnedEvent": "Product Launch — AI Dashboard" } ]

How It Works

  1. Load client context. The Client Context File and campaign strategy are injected into the system prompt, giving the agent full awareness of brand voice, audience, products, and campaign objectives.

  2. RAG: what has already been published. Query Published Content to retrieve the last 60 days of post topics. This prevents the agent from scheduling topics that were recently covered and identifies content gaps.

  3. RAG: upcoming events and promotions. Query Client Documents for any planned launches, promotions, seasonal campaigns, or events in the target month. These become pinned date anchors in the calendar.

  4. RAG: competitor content trends. Query Competitor Research for trending topics and content formats the niche is engaging with. Informs topic selection without copying competitor angles.

  5. Distribute slots across the month. For each platform, spread posts evenly across the 30 days, preferring historically high-engagement days (platform-specific defaults: Instagram Wed/Fri, LinkedIn Tue/Thu, TikTok Mon/Wed/Fri). Apply blackout dates and pin anchored events first, then fill remaining slots.

  6. Assign content type mix. For each platform, apply the variety rule — no more than 3 consecutive posts of the same content type, and promotional posts capped at 30% of the platform’s total. Educational: ~40%, Engagement: ~20%, Behind-the-scenes: ~15%, UGC: ~15%, Promotional: ≤30%.

  7. Write topic angles and writer notes. For each slot, generate a specific angle (not just a theme) and detailed notes for the Social Post Writer — including tone guidance, required mentions, CTA intent, and any available creative assets.

  8. Validate and return. Run guardrail checks against the completed calendar: all 30 days covered, volume targets met per platform, variety rules satisfied, promotional cap respected. If any check fails, self-correct before returning output.


System Prompt

You are the Social Calendar Planner for a digital marketing agency. Your job is to produce a complete, publication-ready 30-day social media content calendar for a client. CLIENT CONTEXT: {{CLIENT_CONTEXT}} KNOWLEDGE BASE CONTEXT: {{RAG_CONTEXT}} You have been given: - An approved marketing strategy outlining campaign themes, goals, and audience - A list of connected platforms with monthly post volume targets - Any blackout dates and pinned events Your calendar must: 1. Cover every post slot across the full month — one CalendarEntry per slot 2. Hit the exact post count target for each platform (±0) 3. Distribute posts on high-engagement days for each platform by default 4. Assign a specific, compelling topic angle to every slot — not a vague theme 5. Mix content types strategically: educational (~40%), engagement (~20%), behind-the-scenes (~15%), UGC prompts (~15%), promotional (≤30%) 6. Never schedule the same content type more than 3 times consecutively on any platform 7. Anchor any known events, promotions, or launches to their correct dates 8. Avoid repeating topics published in the last 60 days 9. Write detailed notesForWriter for each slot — the Social Post Writer will only see this entry, not the full strategy Format your output as a valid JSON object matching the SocialCalendarPlannerOutput schema. After the JSON, append a brief planning rationale (3-5 sentences) explaining your content mix decisions. Be specific. "5 reasons why X" beats "educational post about X". Angles should be scroll-stopping.

Skills Injected

Skill filePurpose
client-context-file.mdCompany, brand, audience — always injected
platform-posting-guide.mdPer-platform best practices: optimal days/times, format preferences, character limits, hashtag strategy
content-mix-framework.mdThe 40/20/15/15 content type ratio, variety rules, and how to balance educational vs. promotional

platform-posting-guide.md — content

# Platform Posting Guide ## Instagram - **Optimal days:** Wednesday, Friday, Sunday - **Optimal times:** 8–10 AM, 6–8 PM (client's local timezone) - **Format hierarchy:** Reels > Carousel > Static > Story - **Caption length:** Hook in first line (< 125 chars before "more" truncation). Max 2,200 chars. - **Hashtags:** 3–5 niche hashtags per post. Avoid banned or overly broad tags (>10M posts). - **Content notes:** Reels receive 30–50% more reach than static. Carousels drive highest saves. ## LinkedIn - **Optimal days:** Tuesday, Wednesday, Thursday - **Optimal times:** 7–9 AM, 12 PM, 5–6 PM - **Format hierarchy:** Native document/PDF carousel > Text post with image > Static image > Video - **Caption length:** Posts that expand (> 210 chars before "see more") perform best when the hook is a bold statement or question. - **Hashtags:** 3 hashtags maximum. Use industry-level tags. - **Content notes:** Personal perspective and first-person narrative outperforms brand-voice broadcasts. B2B audiences engage with frameworks, lessons learned, and contrarian takes. ## Facebook - **Optimal days:** Wednesday, Thursday, Friday - **Optimal times:** 9 AM–1 PM - **Format hierarchy:** Video > Carousel > Static image > Text-only - **Content notes:** Organic reach is low; prioritise high-engagement formats. Questions and polls outperform announcements. ## TikTok - **Optimal days:** Monday, Wednesday, Friday, Saturday - **Optimal times:** 6–10 PM - **Format:** Video only (15–60 sec for engagement; 1–3 min for educational) - **Content notes:** Hook must land in first 2 seconds. Native captions should include keyword-rich descriptions for search. Trending audio increases discovery. ## X (Twitter) - **Optimal days:** Weekdays - **Optimal times:** 8 AM, 12 PM, 5 PM - **Format:** Text threads > Single image > Video - **Character limit:** 280 characters per tweet; use threads for longer content. ## Content Type × Format Matrix | Content Type | Best Formats | |--------------------|----------------------------------| | Educational | Carousel, Reel, Thread, Document | | Promotional | Reel, Static, Story | | Engagement | Poll, Question post, Story | | UGC | Repost, Static with quote | | Behind-the-scenes | Reel, Story, Static |

RAG Usage

DatasetQueryWhen
Published Content"social posts published last 60 days topics formats"Step 2 — before planning begins, to avoid repeat topics
Client Documents"upcoming promotions events product launches seasonal campaigns [month]"Step 3 — to identify date-anchored content requirements
Competitor Research"trending topics content formats [industry] social media"Step 4 — to surface high-engagement angles in the niche
Website Content"blog posts landing pages [month or campaign theme]"If referencing owned content in post notes (e.g. “link to this blog in bio”)

RAG query strategy: Run all four queries in parallel before the generation call. Published Content is the highest-priority query — topic avoidance prevents the most common calendar failure mode (repeating last month’s content). Competitor Research informs angles, not topics — the goal is to find what’s resonating, then create a differentiated take.


Tools Required

ToolMethodPurposeRequired?
rag_searchsearchQuery tenant knowledge base for published content, events, competitor trendsYes

HITL Gates

The completed calendar is submitted for human review before any individual post jobs are dispatched to the Social Post Writer queue.

  • Review type: calendar_review
  • Risk level: low
  • Reviewer sees: Full calendar grid view in the dashboard — date, platform, content type, topic angle, format. Reviewer can edit individual slots, add/remove entries, or reject the full calendar.
  • Approval triggers: Social Post Writer jobs are enqueued for each approved slot. If specific slots are rejected but others approved, only approved slots are dispatched.
  • Rejection triggers: Full replanning — the agent is re-run with the reviewer’s feedback appended to the original prompt.

Guardrails

RuleEnforcement
All 30 calendar days must be coveredPost-generation check: count unique dates; if any date in the month has 0 posts for a platform with a volume target, self-correct
Platform volume targets must match exactlyCount entries per platform vs. volumeTargets; mismatch → regenerate affected platform slots
No more than 3 consecutive same-type posts per platformSequential scan of sorted calendar per platform; violations → reassign content type to break the run
Promotional posts ≤ 30% of total per platformCount promotional entries per platform; if cap exceeded, convert lowest-priority promotional slots to educational or engagement
No topic repetition within 60 daysString similarity check against RAG-retrieved recent topics; similarity > 0.8 → reject slot angle and regenerate
notesForWriter must be ≥ 20 wordsEmpty or stub notes fail validation; regenerated before output

Tenant Settings Used

SettingHow it’s used
brandVoiceInjected into notesForWriter for every slot — writer inherits the correct tone
industryScopes competitor research RAG query to the right niche
targetAudienceInforms content type mix — B2B audiences skew more educational/LinkedIn; B2C skews more engagement/Instagram
connectedPlatformsOnly platforms with an active channel connection appear in volumeTargets
timezoneUsed to interpret optimal posting times in the platform guide

Cost Profile

Avg input tokens~8,000 (strategy doc + RAG results + skills)
Avg output tokens~4,500 (30-entry JSON calendar + rationale)
Est. cost / task~$0.35

Error Handling

ErrorResponse
RAG returns no Published Content resultsProceed without topic-avoidance context; log warning “No published content found — all topics are eligible”
RAG returns no Client Documents resultsProceed without pinned events; calendar uses strategy themes only; note in summary
Volume targets sum to 0Fail job with error: “No post volume targets provided — cannot plan calendar”
Generated calendar fails guardrail after 2 self-correction attemptsReturn partial calendar with guardrail failures documented; create HITL record with failure details for manual resolution
Month string is invalid or in the pastFail job with validation error before any LLM call

© 2026 Leadmetrics — Internal use only