---
title: Idea2Post Agent Mode: turning a working content SaaS into an autonomous operator with Hermes
url: https://mentor.work/builds/idea2post-agent-mode-turning-a-working-content-saas-into-an-autonomous-operator
category: builds
published: 2026-05-20T20:27:14+01:00
updated: 2026-05-20T20:27:14+01:00
author: Mervin
words: 721
read_minutes: 4
source: manual://idea2post-agent-mode-turning-a-working-content-saas-into-an-autonomous-operator
---

# Idea2Post Agent Mode: turning a working content SaaS into an autonomous operator with Hermes

> What I Built
Idea2Post Agent Mode&nbsp;&mdash; 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

## What I Built

**Idea2Post Agent Mode** — a new autonomous "Agent" tab inside an already-shipped content SaaS ([idea2post.app](https://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:

1.  Pulls the system's own state (queued jobs, recent content) via MCP tools
2.  Reads the most recent posts from the user's tracked competitors (real crawler signal, not made up)
3.  Analyzes the engagement and identifies underserved themes
4.  Optionally calls the existing in-house content generator for concrete drafts
5.  Reports back with citations to the actual data it used

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
```

## [](https://dev.to/mervindublin/idea2post-agent-mode-turning-a-working-content-saas-into-an-autonomous-operator-with-hermes-3g#demo)Demo

Live agent run inside the dashboard. Notice:

*   Tool chips (`🔧 status_report`, `🔧 recent_competitor_posts`) appear as **Hermes calls them**, pulsing while running, turning green when complete
*   Content streams in token-by-token after research finishes
*   Numbers and competitor names in the reply come from the **real database**, not the LLM's imagination

_\[ [https://youtu.be/7e4dsX8pd1s](https://youtu.be/7e4dsX8pd1s) — record from cp.idea2post.app/?page=i2p-agent\]_

Quick prompts the demo runs:

*   _"What should I post on Facebook this week? Check my competitor signal and propose 3 angles."_
*   _"Give me a status report — queued jobs, content last 7 days, active pipelines, recent competitor activity."_
*   _"Generate a full content plan: research recent competitor posts, pick the most engaging theme, draft 1 blog + 3 FB posts."_

## [](https://dev.to/mervindublin/idea2post-agent-mode-turning-a-working-content-saas-into-an-autonomous-operator-with-hermes-3g#code)Code

[https://github.com/melyx-id/idea2post-agent](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

### [](https://dev.to/mervindublin/idea2post-agent-mode-turning-a-working-content-saas-into-an-autonomous-operator-with-hermes-3g#my-tech-stack)My Tech Stack

*   **Hermes Agent** v0.14.0 — running as a systemd user service on a Ubuntu 22.04 VPS
*   **LLM**: `openai/gpt-oss-120b:free` via OpenRouter (free tier, supports tool calling)
*   **MCP**: official `mcp` Python SDK (`FastMCP`) over stdio
*   **Backend**: existing SaaS — PHP 8.3, MySQL 10.6 (MariaDB), Apache → Caddy
*   **Frontend**: vanilla JS + Tailwind CDN, Server-Sent Events for live tool/token streaming
*   **Infra**: Caddy reverse proxy, idea2post's existing 7-worker cron stack

No new frameworks, no rewrites. The whole agent layer is ~600 lines.

## [](https://dev.to/mervindublin/idea2post-agent-mode-turning-a-working-content-saas-into-an-autonomous-operator-with-hermes-3g#how-i-used-hermes-agent)How I Used Hermes Agent

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.*
