
social-post-agent
An AI agent that drafts a brand’s weekly social posts in Google Chat — a human always in the loop.
Most “AI content” tools publish on their own and hope for the best. This one drafts the week’s post inside the team’s chat, renders the image, writes the captions — then stops and waits for a human to say go.
Social content is either a chore or a runaway robot.
Doing it by hand is relentless; handing it to a fully autonomous bot is risky. The useful middle — an agent that proposes and prepares but never publishes alone — barely exists.
An agent loop with a human gate.
- 01Weekly nudge
A Monday trigger drops a fresh post idea into a chat space.
- 02Chat, naturally
The team refines it in plain language — “punchier title”, “other news”, “ok, generate”.
- 03Gemini drafts
An agent loop calls Gemini through Vertex AI with a set of typed tools.
- 04Rendered
A Cloud Run service turns the post into a ready-to-share PNG.
- 05Human approves
The agent posts a draft and waits — it never publishes on its own.


Tools, a queue, and a renderer.
- Chat as I/O
Google Chat is the whole interface — people talk, the agent replies.
- Fast webhook
doPost acks instantly and enqueues; a per-minute worker drains the queue and runs the loop.
- Typed tools
Gemini calls plain, swappable tools (search_news, generate_post_*) — prompts and tools are data, not code.
- Rendered images
A headless-Chromium renderer on Cloud Run turns post data into slides.
- Config, not secrets
Everything brand-specific lives in Script Properties — the repo is a reusable engine.
A vendor-neutral engine, not a one-off.
The model sits behind a thin interface, so swapping it is a config change, not a rewrite — built to be cloned and rebranded.