Project: Instagram Autopilot with AI: Hermes Agent + Self-Hosted Postiz
What This Project Does
An AI agent independently creates Instagram posts: writes captions, selects hashtags, prepares images, publishes at optimal times, and notifies you via Telegram about what happened. You provide only topics and images; everything else runs on autopilot.
The stack:
Hermes Agent (Brain, runs on VPS/Mini-PC)
├── Skill: Content Planning (weekly cron)
├── Skill: Captions + Hashtags (Ollama or API model)
├── Postiz Skill (Publishing API)
│ └── Instagram Graph API → Post live
└── Telegram Gateway (Reports + approvals to you)
Requirements: Instagram Business or Creator account, server or Mini-PC (Homelab guide), about 1 hour of setup.
Why This Architecture
- Postiz instead of browser automation: Postiz uses the official Instagram Graph API, no risk from unauthorized automation, no account suspension danger like Selenium bots.
- Hermes as the brain: It remembers what performed well (persistent memory) and improves captions over time, see Hermes Agent.
- Local model optional: Captions can come from a local Ollama model, no per-post API costs.
- Approval loop: The agent sends you a draft via Telegram; you reply “ok” or “change X”. You stay in control.
Step 1: Set Up Postiz
Postiz is the publishing layer, self-hosted or cloud. Details in the Postiz article.
# docker-compose.yml (excerpt)
services:
postiz:
image: ghcr.io/gitroomhq/postiz-app:latest
ports: ["127.0.0.1:3000:5000"]
environment:
- DATABASE_URL=postgresql://postiz:pass@postgres:5432/postiz
- REDIS_URL=redis://redis:6379
- JWT_SECRET=zufaelliger-geheimer-string
depends_on: [postgres, redis]
postgres:
image: postgres:17
environment: [POSTGRES_PASSWORD=pass, POSTGRES_DB=postiz]
volumes: [pg_data:/var/lib/postgresql/data]
redis:
image: redis:7-alpine
volumes:
pg_data:
Then in the Postiz UI: connect your Instagram channel (Business account via Meta login), generate an API key.
Step 2: Install Hermes Agent + Skill
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes model # Choose model: local (Ollama) or API
# Install Postiz skill
npx skills add gitroomhq/postiz-agent
export POSTIZ_API_KEY=your_postiz_api_key
# Get Instagram integration ID
postiz integrations:list | jq '.[] | select(.identifier=="instagram")'
Step 3: The Weekly Cron: Plan Content Automatically
Hermes’ scheduler in natural language:
/message to Hermes:
"Every Sunday at 18:00: Create a content plan for the coming week
(3 posts: Monday/Wednesday/Friday at 18:00 each). Topics: local AI, Homelab,
Self-Hosting. Send me the plan for approval on Telegram."
Hermes sets up a cron job and sends you a draft each week. You reply “ok” → it schedules the posts via Postiz.
Step 4: Post What Actually Happens
# Internally: here's what the Postiz call looks like (the skill does this for you)
RESULT=$(postiz upload ./post-image.jpg)
IMAGE_URL=$(echo "$RESULT" | jq -r '.path')
postiz posts:create \
-c "Homelab day 3: The switch arrived. 10G-SFP+ for the future. #homelab #selfhosted" \
-m "$IMAGE_URL" \
-s "2026-09-22T18:00:00Z" \
--settings '{"post_type":"post"}' \
-i "your-instagram-integration-id"
The key point: Instagram doesn’t allow text-only posts. The agent writes the caption, hook, and hashtags, but you provide the image (photo, screenshot, or generated via image generation skills like FLUX or Imagen). Full automation only works with an image source (your own photo folder or AI-generated graphics).
Step 5: Reports + Learning Loop
"Every Saturday: Send me a report on which posts performed,
reach, what worked, and suggestions for next week."
Hermes’ memory does the rest: it remembers that “behind the scenes” posts perform better than product photos and adjusts the next plan. This is what sets an agent apart from a rigid scheduler, because it learns.
Extensions
- Multi-platform: Same caption → Postiz to LinkedIn, X, Facebook: Postiz supports roughly 15 networks.
- Image pipeline: FLUX/Imagen locally via ComfyUI → Hermes generates graphics itself.
- Comment management: Skill for replying to comments (careful: Meta rate limits).
- Competitor research: Weekly research cron on competitor accounts.
- Alternative without Hermes: Same flow works with n8n + Postiz node, less adaptive, but visual workflow.
What You’ll Learn
- Agent skills system (agentskills.io)
- Instagram Graph API via publishing tools
- Cron automation in natural language
- Approval workflows (Human-in-the-Loop)
- Why API posting is not botting
Further Reading
- IRC-Coding.de: Programming tutorials for building your own skills.
- Hermes Agent: The agent in detail.
- Postiz: The publishing layer.
- Ollama: Local captions.
- Homelab: The hardware foundation.
- ChatGPT Prompts: Caption prompts.
Key Takeaways:
- Instagram autopilot = Hermes Agent (brain) + Postiz (publishing) + image source.
- Postiz uses the official Graph API, safe, no botting risk.
- Text alone won’t work: Instagram needs an image or video; the agent handles the rest.
- Human-in-the-loop: approval via Telegram, agent learns from performance.
- About 1 hour setup on a VPS or Mini-PC; multi-platform extension is trivial.
FAQ
Is Instagram auto-posting allowed?
Completely without me?
What does it cost?
Alternative without Hermes?
Where do the images come from?
Sources and Further Reading
- Hermes Agent: GitHub.
- Postiz: Publishing tool.
- Instagram Graph API: Meta documentation.
- IRC-Coding.de: Programming tutorials.


