Idea2Post Agent Mode — a new autonomous "Agent" tab inside an already-shipped content SaaS (idea2post.app). The existing product is a one-shot generator: paste an idea, get hooks/blog/social posts. Useful, but it's still a stateless AI wrapper — the user has to decide what to generate.
Agent Mode flips that. The user types a goal — "What should I post on Facebook this week?" — and a Hermes Agent autonomously:
Crucially, none of the existing flows were touched. Quick Mode (one-shot generation), auto-pipelines (cron-driven crawl→generate→publish loops), and the 7 background workers all keep running unchanged. Agent Mode is a parallel route that orchestrates the same building blocks in a different sequence.
The whole layer is roughly:
Browser ──SSE──▶ PHP proxy ──HTTP──▶ Hermes Agent
(gateway @ :8642)
│
├─ web search (built-in)
└─ idea2post MCP server (stdio)
│
└─▶ PHP CLI ─▶ MySQL + content engine
Live agent run inside the dashboard. Notice:
🔧 status_report, 🔧 recent_competitor_posts) appear as Hermes calls them, pulsing while running, turning green when complete[ https://youtu.be/7e4dsX8pd1s — record from cp.idea2post.app/?page=i2p-agent]
Quick prompts the demo runs:
https://github.com/melyx-id/idea2post-agent
Key files:
| Layer | Path | Lines |
|---|---|---|
| MCP server (Python, FastMCP) — exposes idea2post engine as tools | opt/idea2post-mcp/server.py |
~95 |
| PHP CLI bridge — talks to MySQL + existing content engine | engine/i2p_agent_cli.php |
~110 |
| Agent UI (chat, streaming) | pages/i2p-agent.php |
~270 |
| SSE proxy: browser ↔ Hermes Agent | pages/i2p-agent-api-stream.php |
~110 |
openai/gpt-oss-120b:free via OpenRouter (free tier, supports tool calling)mcp Python SDK (FastMCP) over stdioNo new frameworks, no rewrites. The whole agent layer is ~600 lines.
Three Hermes capabilities did the heavy lifting:
1. The agent loop itself. I didn't want to write a tool-calling state machine. Hermes' /v1/chat/completions endpoint already runs the full reasoning→tool→observe→reason loop internally. My PHP backend just POSTs the user's goal and reads the stream. Multi-turn tool calls, retries, compression, all handled.
2. MCP for tool surface. Instead of hard-coding tools into the prompt, I built a small Python MCP server that exposes 7 idea2post operations (status_report, list_competitors, recent_competitor_posts, list_publish_accounts, list_pipelines, generate_content, queue_publish). Each tool internally shells out to a PHP CLI that talks to the real MySQL and the existing content engine. hermes mcp add idea2post --command ... registered it in one line. Adding a new capability later means adding one function in server.py — Hermes picks it up.
3. The streaming protocol. Hermes' SSE stream emits both standard OpenAI chat.completion.chunk frames and custom hermes.tool.progress events with status: running / completed per tool call. This is the difference between "spinner for 30 seconds" and "the agent is visibly thinking" — chip turns from purple-pulsing to green-✓ in real time as each MCP tool returns. Massive UX upgrade for ~30 lines of frontend code.
Why this was the right fit. I had a working SaaS that already did the expensive work — competitor crawlers, content generation, FB/LinkedIn publishing. What I was missing was an orchestration layer that could reason over which subsystem to invoke for a given high-level goal. Hermes provided that layer without forcing a rewrite. The existing one-shot generator at ?page=i2p-generate is now one of many tools the agent can call, instead of being the entire product.
The net result: same SaaS, but the user can ask it open-ended questions and watch it autonomously chain research → analysis → generation. That's the leap from "AI wrapper" to "agent product" — and Hermes did 80% of it.
Link: https://dev.to/mervindublin/idea2post-agent-mode-turning-a-working-content-saas-into-an-autonomous-operator-with-hermes-3g
This article was AI-assisted and edited by Mervin. All facts were verified against primary sources before publishing.