增长案例库 Maxed 归档 社媒与有机增长AI自动化内容营销

如何用 Hermes 智能体自动化 TikTok 幻灯片内容创作(分步指南)

How to Automate TikTok Slideshow Content Creation with Hermes Agent (Step-by-Step Guide)

中文译文 · 19k 字

一句话摘要

用 Hermes 自动化 TikTok 幻灯片创作

如何用 Hermes Agent 自动化制作 TikTok 幻灯片内容(分步指南) 2026年5月13日 · 14 分钟阅读 · 查看来源 ↗ Tiktok Pinterest AI Marketing 目前,TikTok 正在大幅提升幻灯片内容的曝光量和互动量,你可以去看看这些频道。 为什么选这套技术栈 幻灯片是当前 TikTok 上杠杆率最高的内容形式: 算法仍然在大力推送它们(对 TT 来说内容便宜,且存在无限供给的问题) 不需要拍摄、不需要剪辑、不需要露脸 以钩子(hook)驱动 → 你每天可以 A/B 测试 50 个钩子 草稿(draft)上传能绕过大部分针对直发 API 的机器人检测 瓶颈从来都不是创意。瓶颈是流水线。钩子 → 细分领域 → 图片方向 → 8 张幻灯片的构图 → 文案 → 排期。手动做这些 = 每条内容 20 分钟。要运营 30 个账号 = 一份你会痛恨的全职工作。 Hermes Agent 是正确的工具,因为它不是你 npm 安装后再接线搭起来的框架——它是一个自主的 CLI 智能体,待在你放置它的任何地方(我的 5 美元 Hetzner 服务器上),内置了 skills、cron、MCP 和子智能体委派。整条流水线就是智能体加载的 skills + 按计划触发的 cron 任务。没有队列基础设施,没有需要管理的 worker 池。 第 1 步:安装 Hermes Agent 在 VPS 上的一行命令安装: 挑一个供应商: 我用 Anthropic 通过 OAuth(Max 套餐)来跑智能体相关阶段(钩子研究、图片方向、文案),并用一个便宜的 OpenRouter 作为高频率轮询的兜底。你也可以接入 Nous Portal、OpenAI Codex、DeepSeek、Z.AI、Kimi——hermes model 会带你走完全程。 验证它能否工作: 如果能响应,你就已经跨过了最难的部分。完整的快速入门见 https://hermes-agent.nousresearch.com/docs/getting-started/quickstart 。 然后把 gateway 安装为 systemd 服务,这样在你没有登录时 cron 任务才能真正运行: 这就是那个每 60 秒滴答一次调度器、并在全新智能体会话里运行到期任务的守护进程。 第 2 步:心智模型——流水线 = skills + cron,而不是 workers 大多数自动化教程都会去找队列和 worker。Hermes 翻转了这一点。工作的单元是一个 skill(~/.hermes/skills/ 下的 markdown 文件),触发器是一个加载一个或多个 skill 并运行它们的 cron 任务。 TikTok 流水线的映射关系如下: 每个 skill 都是智能体按需加载的一个 markdown 文件。cron 任务通过 context_from 把它们串起来。Hermes 调度器在全新隔离的会话里运行每个任务,因此账号之间不会发生状态污染。 第 3 步:创建 skills skills 位于 ~/.hermes/skills/<category>/<skill-name>/SKILL.md。智能体可以通过 skill_manage 自己创建它们,你也可以手工编写。我是两者混用——我先起草结构,然后在观察它运行后让 Hermes 精修。 Hook Researcher skill bash ~/.hermes/skills/tiktok/hook-researcher/SKILL.md: Image Source Router skill 这个 skill 决定每个槽位用 Pinterest 还是 AI 生成。 ~/.hermes/skills/tiktok/source-router/SKILL.md: Pinterest Scraper skill 这个 skill 需要一个辅助脚本,因为智能体不应该在上下文里做 HTTP 轮换逻辑。 ~/.hermes/skills/tiktok/pinterest-scraper/SKILL.md: ~/.hermes/skills/tiktok/pinterest-scraper/scripts/scrape.py 是一个普通的 Python 脚本。智能体通过 execute_code 或 terminal 调用它并解析 stdout。上面声明的 PROXY_POOL_URL 会自动传入 execute_code 沙箱——这是 Hermes 的一个特性,帮我省掉了大量环境变量配置的麻烦。 Slide Compositor(无智能体模式) 这个阶段完全确定,不需要 LLM。Hermes 正好为此提供了 no_agent 模式: bash ~/.hermes/scripts/compose-slides.py: 然后把它排成一个 no_agent 的 cron 任务——wakeAgent 永远不会触发,这个阶段零 LLM 成本。 Publisher skill ~/.hermes/skills/tiktok/publisher/SKILL.md: 第 4 步:影子封禁杀手——永远使用草稿模式 这是大多数教程跳过、而新账号死亡的最大原因。 如果一个账号年龄不足 30 天,永远以草稿形式发布。没有例外。 TikTok 上的新账号处于观察期。算法的画像机制: 通过 Content Posting API 发布 → 机器人风险分 +1 发布 IP 与账号常用设备 IP 不一致 → +1 可疑的规律性发布间隔 → +1 元数据被剥离或与设备端拍摄不一致 → +1 在新账号上叠加 2-3 条,你就会被悄悄影子封禁。没有通知。视频永远卡在 50-200 次播放。你会以为自己的内容不行。其实不是——是账号已经死了。 上面的 Publisher skill 对任何不足 30 天 / 不足 20 条内容的账号硬编码了草稿模式。Postiz 把它作为草稿上传,然后我的 iPhone 农场接手草稿(通过 WebDriverAgent 自动化),在真实设备上用真实 IP 点击发布。TikTok 看到的是从一个已知设备发起的人为发布——干净。 养号协议: 第 1-7 天:账号什么都不做,只刷、点赞、关注 第 8-14 天:每天发 1 条草稿,在草稿创建 2-4 小时后从设备端发布 第 15-30 天:提升到每天 2-3 条草稿,发布时间在 ±90 分钟内随机化 第 30 天以上:全流水线节奏,仍然保持草稿模式 Hermes cron + Postiz Cloud + iPhone 农场设备发布 = 对 TikTok 的分类器来说与自然行为无法区分。 第 5 步:用 cron + context_from 把一切串起来 这就是 Hermes cron 系统的魔力所在。流水线的每个阶段都是一个独立的 cron 任务。任务 N 通过 context_from 读取任务 N-1 的最新输出。整条链路端到端运行,不需要我做任何编排。 我在与 Hermes 的单个聊天会话里创建这条链路: text hermes --tui > 我需要为账号 acc_42 搭建 TikTok 流水线,niche=fitness。 > 把流水线排成每天 UTC 09:00 运行。 > 链路:钩子研究 → 来源路由 → pinterest 抓取 → 合成 → 文案 → 发布。 > 每个阶段使用对应的 skill,并从前一个阶段接收上下文。 Hermes 内部使用 cronjob 工具并创建这条链路。下面是等价的直接调用长这样(Hermes 会替你完成): 几个关键点: context_from 串联输出。Hermes 从 ~/.hermes/cron/output/{job_id}/ 读取每个上游任务最近保存的输出,并把它作为上下文前置到下一个任务的 prompt 里。没有数据库、没有队列、没有胶水代码。 workdir 在项目目录里运行任务。这意味着 AGENTS.md、.cursorrules 和任何本地上下文文件都会被自动加载。当你把账号配置和 prompt 覆盖项放在项目仓库里时很有用。 合成器上 no_agent=True。纯确定的 Sharp/PIL 工作,没理由为一次 LLM 调用付费。脚本的 stdout 成为任务的输出,并照常串联到下一阶段。 deliver="telegram" 会在发布完成时通知我。我在高价值账号的最后一个阶段用 "all",这样每个已连接渠道都能收到成功通知。 第 6 步:逐阶段工具集控制(省钱手段) 默认情况下,cron 任务会继承你通过 hermes tools 为 cron 平台配置的工具集。但为了在高频阶段控制成本,按任务锁定工具集: 钩子研究不需要 browser、terminal 或 delegation 工具集——这些会在每次 LLM 调用时膨胀 tool-schema prompt。把钩子任务锁定为 ["file"] 让我的钩子生成 token 减少了约 40%。30 个账号 × 每天 1 条 × 30 天 = 真金白银。 Pinterest 抓取任务需要 ["terminal", "file"] 来调用脚本。合成器在 no_agent 模式下不加载任何工具集(没有智能体运行)。发布器需要 ["terminal", "file"] 来跑 postiz-cli。 第 7 步:没变化时就跳过智能体 Hermes 有一个 pre-check 脚本模式,非常适合每日钩子任务。如果细分领域表现数据自昨天以来没有变化,就没理由生成新的钩子——昨天的前三名仍然是前三名。 ~/.hermes/scripts/hook-precheck.py: 在创建 cron 任务时通过 script 参数挂上去。只有当表现数据真的变化时,智能体才会醒来。在那些我没有任何新手工记录的正常日子里,这能完全跳过 LLM。免费。 第 8 步:Postiz 设置——云端(也可以自托管)+ 官方 Hermes skill 我试过在 Docker 里自托管 Postiz 两个月。花在修容器上的时间比做功能还多——OAuth token 刷新失败、媒体磁盘写满、调度 worker 悄悄挂掉。每月 29 美元的 Postiz Cloud 买回了每周约 5 小时的调试时间。 60 秒设置: bash Postiz skill 通过这个 SKILL.md 把自己暴露给 Hermes(安装后位于 ~/.hermes/skills/postiz-agent/SKILL.md): Hermes 在会话启动时读取它,把 postiz 二进制注册为工具,现在任何加载这个 skill 的 cron 任务都能调用它。 值得了解的 API 基础 两层模式系统很容易把人搞晕。Postiz 有自己的 type: "draft",指的是停留在 Postiz UI 里、不发送到任何地方的帖子。那不是我们想要的。我们想要 type: "schedule" 加 content_posting_method: "UPLOAD"——Postiz 排期帖子,在预定时间推到 TikTok,但作为 TikTok 侧的草稿落到账号收件箱里,供 iPhone 农场从真实设备发布。 组合错了 = 结果错了。先在一个账号上测试这个。 只有当你出于合规原因、或者你的发布量足够大才值得自托管。云端有真实成本(每个 key 每小时 30 请求的上限),但自托管吃的是你的时间。我吃过的亏 不要相信你的第一批钩子。我跑了 2 周流水线,狂发钩子原型 #1。平平无奇。改成每个细分领域 A/B 测试 3 种原型,用一个每日评估循环读回 TikTok 的播放量 → 砍掉死掉的原型,加倍投入赢家。一周内 CTR 就上去了。 在真实细分领域,Pinterest 胜过 AI。我花了 3 个月优化健身变身幻灯片的图像生成 prompt。然后对半测试了 Pinterest 抓取的等价物。Pinterest 幻灯片获得了 2.3 倍的收藏。真实照片的冲击力不一样。解决办法:按细分领域路由。 草稿模式对新账号不可商量。我死了 4 个账号才接受这一点。新账号直发 = 一周内被悄悄影子封禁。直到你在一个死账号上浪费了 2 个月内容,你才会知道。 资源: Hermes Agent: https://hermes-agent.nousresearch.com/ Postiz: https://postiz.com/ 祝各位好运 💪 Prompts mkdir -p ~/.hermes/skills/tiktok/pinterest-scraper/scripts #!/usr/bin/env python3 import json, hashlib, pathlib, sys perf_file = pathlib.Path.home() / ".hermes/data/tiktok/hook_performance.jsonl" state_file = pathlib.Path.home() / ".hermes/state/hook-perf-hash.txt" state_file.parent.mkdir(parents=True, exist_ok=True) current_hash = hashlib.sha256(perf_file.read_bytes()).hexdigest() last_hash = state_file.read_text().strip() if state_file.exists() else "" if current_hash == last_hash: # Nothing new since last run. Skip the agent. print(json.dumps({"wakeAgent": False})) sys.exit(0) state_file.write_text(current_hash) print(json.dumps({"wakeAgent": True, "context": {"perf_updated": True}})) curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash source ~/.bashrc #!/usr/bin/env python3 """Composite 8 raw images + hook into TikTok-ready 1080x1920 slides. Reads job spec from stdin (JSON), writes composited file paths to stdout. """ import json, sys from PIL import Image, ImageDraw, ImageFont # ...full Sharp/PIL compositing logic here... if __name__ == "__main__": spec = json.load(sys.stdin) output_paths = compose_all(spec) print(json.dumps({"slides": output_paths})) --- name: tiktok-source-router description: Decide image source (pinterest or ai_gen) per slide for a TikTok carousel version: 1.0.0 metadata: hermes: tags: [tiktok, images, routing] category: tiktok --- # TikTok Image Source Router ## When to Use After a hook is picked, before image gathering. Decides per slide whether to source from Pinterest or generate with AI. ## Procedure 1. Read the niche + hook from context. 2. Apply routing rules: - Fitness, fashion, food, travel, aesthetic → Pinterest (real photos win) - Anime/RPG, fictional characters, abstract concepts → AI gen - Mixed niches: cover slide AI gen, body slides Pinterest 3. Output JSON array of 8 routing decisions: `[{ slot, source, query_or_brief }, ...]` ## Pitfalls - Don't AI-gen fitness transformations. Uncanny valley. Use Pinterest. - Don't Pinterest-search for "anime warrior rank up". Doesn't exist. Use AI gen. mkdir -p ~/.hermes/skills/tiktok/hook-researcher --- name: tiktok-pinterest-scraper description: Source TikTok-ready images from Pinterest with proxy rotation and phash dedup version: 1.0.0 required_environment_variables: - name: PROXY_POOL_URL prompt: Residential proxy pool endpoint help: Bright Data, Smartproxy, or any rotating residential proxy metadata: hermes: tags: [tiktok, pinterest, scraping] category: tiktok --- # TikTok Pinterest Scraper ## When to Use Source router routes a slot to `pinterest`. Need fresh, unique, properly-sized images for that account. ## Procedure 1. Call `scripts/scrape.py` with the search query and account_id: `python scripts/scrape.py --query "{q}" --account {id} --count {n}` 2. The script handles: - Proxy rotation per request - Cookie pool rotation - Perceptual hash dedup against the last 30 days for that account - Aspect ratio filter (min 1080×1350) - S3 upload to MinIO 3. Parse the script's stdout (JSON list of S3 URLs). 4. If count returned < requested, retry with rephrased query (max 2 retries). ## Pitfalls - Pinterest rate-limits per IP. Always go through proxy. - Hamming distance < 5 = duplicate. Don't relax this threshold. - Anything < 1080×1350 will look soft on TikTok. Filter at search, not after download. --- name: tiktok-publisher description: Upload composited slides to TikTok as draft via Postiz Cloud version: 1.0.0 required_environment_variables: - name: POSTIZ_API_KEY prompt: Postiz Cloud API key help: Get from postiz.com → Settings → API Keys metadata: hermes: tags: [tiktok, publishing] category: tiktok --- # TikTok Publisher ## When to Use After slides + caption are ready. Uploads as draft to TikTok via Postiz. ## Procedure 1. Read slides paths + caption + account_id from context. 2. Always check account age. If `< 30 days` or `total_posts < 20` → force draft mode. Honestly even for old accounts I default to draft. There is zero upside to direct-publish. 3. Call `postiz-cli`: postiz-cli schedule --account {account_id} --platform tiktok --mode draft --media {slide_paths} --caption {caption} --time {scheduled_iso} 4. Capture postId from stdout. Write to `~/.hermes/data/tiktok/posts.jsonl`. ## Pitfalls - NEVER direct-publish on a new account. Silent shadow ban inside a week. - Postiz CLI needs POSTIZ_API_KEY in env. Hermes passes it through automatically. - Randomize scheduled time within ±90min jitter to kill robotic interval signal. hermes model --- name: tiktok-hook-researcher description: Generate TikTok slideshow hooks for a given niche, eval, return top 3 version: 1.0.0 metadata: hermes: tags: [tiktok, content, hooks] category: tiktok --- # TikTok Hook Researcher ## When to Use When asked to generate hooks for a TikTok slideshow in a specific niche. ## Procedure 1. Read the last 20 winning hooks for the niche from `~/.hermes/data/tiktok/hook_performance.jsonl`. 2. Generate 10 hook candidates. Constraints: - Under 60 characters - Curiosity gap, not clickbait - Mix of 3 archetypes: contrarian, listicle, transformation 3. Score each candidate 1-10 on "would a 19yo stop scrolling for this", calibrated against the winning hooks. 4. Output JSON to stdout: `{ hooks: [{ text, archetype, score }, ...] }` sorted by score descending. Return the top 3. ## Pitfalls - LLMs default to clickbait. Bias hard against "You won't believe..." patterns. - Don't reuse exact phrasing from the last 20 winners — algorithm penalizes recycled hooks. ## Verification Output is valid JSON. Top hook has score ≥ 7. All hooks ≤ 60 chars. --- name: postiz description: Social media automation CLI for scheduling posts across 30+ platforms including TikTok metadata: hermes-agent: requirements: env: - POSTIZ_API_KEY binaries: - postiz --- # Available Commands - postiz integrations:list - postiz integrations:settings <id> - postiz posts:create - postiz upload <file> - postiz analytics:platform <id> hermes --tui > Summarize what's in this directory. # Stage 1: Hook research, daily at 09:00 cronjob( action="create", name="tt-hook-acc42", schedule="0 9 * * *", skills=["tiktok-hook-researcher"], prompt="Generate hooks for niche=fitness for account acc_42. Output top 3 as JSON.", workdir="/home/alex/tiktok-pipeline", ) # Stage 2: Source routing, 5 minutes later cronjob( action="create", name="tt-route-acc42", schedule="5 9 * * *", skills=["tiktok-source-router"], context_from="tt-hook-acc42", prompt="Route image sources for the top hook. Output 8 routing decisions.", ) # Stage 3: Pinterest scrape (for pinterest-routed slots) cronjob( action="create", name="tt-pinterest-acc42", schedule="10 9 * * *", skills=["tiktok-pinterest-scraper"], context_from="tt-route-acc42", prompt="For each pinterest-routed slot, scrape unique deduped images. Output S3 URLs.", ) # Stage 4: Compositor — no_agent mode, pure script cronjob( action="create", name="tt-compose-acc42", schedule="20 9 * * *", no_agent=True, script="compose-slides.py", context_from=["tt-pinterest-acc42", "tt-hook-acc42"], name="tt-compose-acc42", ) # Stage 5: Caption cronjob( action="create", name="tt-caption-acc42", schedule="25 9 * * *", skills=["tiktok-caption-writer"], context_from=["tt-hook-acc42", "tt-compose-acc42"], prompt="Write caption + 4 hashtags for the slideshow.", ) # Stage 6: Publish cronjob( action="create", name="tt-publish-acc42", schedule="30 9 * * *", skills=["tiktok-publisher"], context_from=["tt-compose-acc42", "tt-caption-acc42"], prompt="Upload slides + caption as draft to TikTok account acc_42 via Postiz.", deliver="telegram", # ping me when done ) mkdir -p ~/.hermes/scripts # 1. Sign up at postiz.com, get an API key from Settings → Developers → Public API # 2. Install the official Postiz × Hermes skill npx skills add gitroomhq/postiz-agent # 3. Add the API key to Hermes env echo "POSTIZ_API_KEY=pos_your_key_here" >> ~/.hermes/.env # 4. Connect your TikTok accounts via the Postiz web UI (OAuth flow) # Each connected account = one "integration" with a unique integration_id # 5. Verify discovery from Hermes hermes tools list | grep postiz # should show postiz commands available postiz integrations:list # lists all connected channels cronjob( action="create", name="tt-hook-acc42", schedule="0 9 * * *", skills=["tiktok-hook-researcher"], enabled_toolsets=["file"], # hook gen only needs file read for past performance prompt="...", ) hermes gateway install Links Z.AI hermes-agent.nousresearch.com/docs/getting-started/quickstart hermes-agent.nousresearch.com/ postiz.com/ 标签:# X # Tiktok # Pinterest # AI # Marketing # Growth # Automation # Design # Guide # Hermes 相关文章 I Built an AI Influencer for $0 and Started Monetizing Her in the First Week. Most AI avatar tutorials stop at one pretty face. That is not a business. I wanted to build a repeatable system: same person, same style, same voice, product videos, lifestyle clips, and a workflow a… AI Tiktok Marketing Pinterest

原文参考:https://maxed.wiki/posts/how-to-automate-tiktok-slideshow-content-creation-with-hermes-agent-step-by-step-guide/ (Maxed.wiki,本页为站内中文整理)