PostGate

AI agent for social media: what it does and how to build one

A model with tools

An AI agent for social media reads context, decides what to post, drafts it, schedules it through a posting API and checks the result.

Agent, workflow or scheduler?

A workflow follows a fixed path. An agent picks its own next step. Start with a workflow; move to an agent when the job needs judgment.

Let it do these alone

1. Drafting posts
2. Repurposing a blog post or video
3. Choosing times and filling a queue
4. Weekly performance summaries

Keep a person here

Publishing goes out only after approval. For comments and DMs, the agent suggests replies and a person sends them.

Five parts of a working agent

1. Instructions
2. Context
3. Narrow tools
4. An approval gate
5. Ground truth: the real delivery status read back

Give it a draft tool

Hand the model a tool that saves drafts, not one that publishes. With PostGate, draft: true keeps a post out of delivery until someone calls publish.

Stop duplicate posts

Send an Idempotency-Key header. If a run retries after a timeout, the same key returns the original post instead of a second one.

MCP, function calling or n8n

MCP fits agents in Claude or Claude Code. Function calling fits agents inside your product. n8n fits workflows with one model step.

Watch platform limits

Instagram allows 100 API-published posts per account in a rolling 24 hours. An agent in a loop can hit that in minutes.

Tool code and a full checklist

The guide has a copyable draft-only tool definition, the API calls for draft, publish and status, and the failure modes to plan for.

postgate.studio

Read the full guide