# How to Build a Self-Improving AI Lead Gen Agent on Hermes
**作者**: Michel Lieben
**日期**: 2026-05-05T16:55:18.000Z
**来源**: [https://x.com/MichLieben/status/2051707320699396454](https://x.com/MichLieben/status/2051707320699396454)
---

By the end of this article you'll know how to build an AI lead gen agent that writes your content, runs your prospecting, books your meetings, and updates its own skills based on what works.
It runs from one terminal. It remembers everything across sessions. It gets smarter the more you use it.
Max Mitcham (@max_trigify), founder of Trigify.io, just deployed this system. In two weeks his last YouTube video did 26x his usual reach. His Substack subscribers started growing consistently for the first time, with roughly 80 net adds in the same window. The AI SDR he's building runs on the same architecture.
Max and I just recorded a 56-minute breakdown of his setup, layer by layer. This article is the written playbook from that recording.
Here's exactly how to build it.
# The brain: memory as a Wikipedia graph

The Brain: Memory as a Wikipedia graph
Most teams structure agent memory as a folder tree. One folder for sales, one for marketing, one for product. The folder structure breaks the moment a concept needs to live in two places at once.
Andrej Karpathy posted recently about a different model:
Markdown files inside Obsidian, linked to each other like a Wikipedia graph.
- Each concept becomes a file.
- Each link between concepts becomes an edge.
- The agent walks the graph before answering anything, picking up related context that a folder structure would have hidden underneath itself.
Max's agent memory looks like this in practice:
- "Founder-led content" links to Kieran Flanagan from HubSpot as a reference, signal-based selling as a content lane, Trigify-the-product, brand intelligence systems, and the Claude Code skills that drive his marketing.
- "Brand intelligence systems" links to competitor landscape mapping, the agent skills that perform that mapping, and the products being analyzed.
- Click "founder content" and the agent surfaces Kieran's frameworks. Click "signal-based selling" and you see how it shows up across product copy and content simultaneously.
The graph makes the agent's reasoning more like yours. Concepts have multiple anchors. Context pulls from every direction at once.
Hermes adds an active layer on top of the static graph.
As you work with it, it auto-creates new skill files for recurring tasks, auto-creates new memory files for things you keep referencing, and auto-updates both based on how you actually use them. After two weeks of working with you, the graph reflects how you run your business, not the generic version some YouTube tutorial seeded.
This is the layer everything else compounds on top of. Build it first. Spend an afternoon seeding the vault with your ICP, your content pillars, your product features, your sales motions, the patterns you see in customer success, and the actual jargon your top customers use. Start linking concepts the moment a relationship exists between them.
# The content engine

The Content Engine
The content engine has three input layers and one output layer.
- Signal layer. Trigify monitors X, LinkedIn, YouTube, and Substack for two things: trends gaining steam (potential content topics) and patterns in what's working at the format level (hooks, length, post structure, thumbnail patterns, opening lines). Both feed back into the brain.
- Understanding layer. Once a signal lands, the agent moves to longer-form content to build depth. Substack articles, podcast transcripts, YouTube videos. Trends are surface.
Long-form is where the substance is. Without this layer the agent writes shallow because the source material is shallow.
- Internal context layer. Hermes is connected to Fireflies for sales calls, Granola for internal team calls, Slack channels, the email system, and Stripe. When it drafts a post for you, it pulls from your actual conversations, customer base, and product behavior, not just the trend feed.
The output layer assembles all three:
1. A draft Substack post that quotes a customer call from three weeks ago you'd forgotten about.
2. A LinkedIn post built on a trend that landed yesterday plus an internal data point you mentioned offhand in Slack.
3. A YouTube script structured around the patterns the agent saw working in the last 50 videos in your category.
Max wired this specifically into his YouTube content. The agent monitors top creators in his category (Alex Finn, Nate Herk, and others in the AI space), analyzes their thumbnails, hooks, descriptions, and chapter structure, and stores the patterns in the brain.
It doesn't act on a single data point. It needs the same pattern to repeat enough times to become a belief.
Once a pattern crosses the threshold, the agent sends a Slack message: "I think it's time to update these titles to these. Try these new descriptions. Update the thumbnails on these three videos."
Max replies "approved."
The harness makes the changes via the YouTube API.
His most recent video did 26x his usual reach. The harness wrote the script, generated the thumbnail (in Gemini's banana 2 model), and chose the description and chapter structure. Max just filmed.
# The self-learning loop
Every other layer compounds because of this one.

The Self-Learning Loop
The harness runs a cron over your performance data: reply rates, content engagement, meeting bookings, whatever you instrument. It generates hypotheses based on what it sees ("hooks containing a specific number outperform hooks without one"). It runs experiments against those hypotheses. It logs the results. It updates its own beliefs based on what worked.
Two design rules matter here.
1. Patterns, not points. A single post going viral doesn't trigger a belief update. The same pattern has to repeat enough times to clear a threshold. Otherwise you're chasing flukes.
2. Beliefs are version-controlled. When a new experiment contradicts an old belief, the belief updates. The system isn't locked into one playbook. It rewrites its own playbook as it learns.
The output is a Slack message asking for approval before applying any change. You're not handing over the controls. You're approving the changes the system has already validated against your own data.
The compounding effect is what most operators miss. After two months of running this loop, the agent has dozens of validated beliefs about your audience, your formats, your market, and your customer base. Those beliefs inform every new piece of content, every new outbound campaign, every new product decision the agent assists on.
The longer it runs, the harder the system is for anyone else to copy.
# The AI SDR

The AI SDR Workflow
The same architecture runs a sales motion. Max is building this live right now, and the structure is what makes it different from any off-the-shelf AI SDR.
Two signal sources feed it.
- External signals through Trigify, monitoring Substack, X, Hacker News, and LinkedIn for engagement on relevant topics, competitor mentions, funding rounds, role changes, company changes, headcount increases, hiring spikes, and new initiatives that match what your product helps with. Funding rounds in particular leak on X earlier than anywhere else, often before they hit Crunchbase.
- Internal signals built directly into your own systems: onboarding drop-off when someone signed up but never activated, spend thresholds when an account crosses a usage limit, upsell candidates, churn risks, and hiring signals from inside your existing customer base.
Hermes treats both feeds the same way. It runs a cron over each signal source, validates whether the signal is relevant against the ICP definition stored in the brain, and either routes the lead or drops it before any further work happens.
The ICP definition itself was built by Hermes, not by Max.
The agent listened to every sales call (Fireflies), every internal team call (Granola), every customer conversation in Slack, and every Stripe transaction, and produced an ICP with three core segments and sub-personas under each. The kind of ICP definition that takes a sales team six months to write down formally. The agent surfaced it the first time Max asked.
Once a lead clears qualification, the workflow runs:
1. Query the API. Whichever data source the signal came from gets called for additional context on the company and the person.
2. Enrich. Lead Magic, Surfe, or whichever provider you've wired in. Two providers in the email layer matters because each has different strengths at scale.
3. Compose. This is where the brain layer pays off. Hermes pulls customer pain points from past calls, product context from internal documents, and copywriting patterns from a skill it has accumulated by studying examples Max fed it. The output is a message specific to that lead's signal trigger.
4. Route or send. Hot leads (enterprise-scale spend signal, returning website visitor, big-account engagement) route to Max for human approval. Everything else goes through Instantly programmatically.
5. Feed results back. Reply, no reply, meeting booked, deal closed. Each outcome updates the agent's beliefs about which signals, which copy, and which sequences are actually producing pipeline.
Most AI SDRs stop at step three. The compounding starts at step five.
# The stack Max runs end-to-end

The Stack Max Runs End-to-End
- Harness: Hermes (orchestrator, ~90% of the work). OpenClaw kept around for the specific tasks that need heavy tool calling (~10%).
- Models: Codex 5.4 on the $200/month plan for heavy reasoning and coding work. Claude Code for front-end and lighter tasks.
- Memory: Obsidian for the Wikipedia-graph brain. Free.
- Automation runtime: Hermes for crons and sequences. Trigger.dev as an alternative if you need a sequential workflow engine outside the harness.
- Signal data: Trigify for social and intent monitoring across X, LinkedIn, Substack, Hacker News, and YouTube.
- Email enrichment: Lead Magic and Surfe (run two providers in parallel).
- Outreach: Instantly for cold email at scale.
- Database and analytics: Supabase for product data, PostHog for product analytics.
- CRM: Any CRM with full API access to objects, lists, and fields. We run Attio at ColdIQ for exactly this reason.
- Call recordings: Fireflies for sales calls, Granola for internal team calls. Granola is where the gold lives, because the internal conversations are what teach the agent how your team actually thinks about the business.
- Interface: Warp browser/terminal for working with the agent. Slack and Discord wired in for chat-based interaction.
Note: You don't have to read this stack as a buyer's guide. Read it as proof that the architecture works with substitutions too.
Swap CompanyEnrich for one of the enrichment tools. Swap Lemlist for Instantly. Swap Codex for whichever model is currently winning. The pattern remains the same because substitutions don't really break the workflow.
Full breakdown of the build, including the live AI SDR walkthrough, is in the video Quote Retweeted to this article.
## 相关链接
- [Michel Lieben](https://x.com/MichLieben)
- [@MichLieben](https://x.com/MichLieben)
- [21K](https://x.com/MichLieben/status/2051707320699396454/analytics)
- [@max_trigify](https://x.com/@max_trigify)
- [Trigify.io](http://trigify.io/)
- [Trigger.dev](http://trigger.dev/)
- [Upgrade to Premium](https://x.com/i/premium_sign_up)
- [12:55 AM · May 6, 2026](https://x.com/MichLieben/status/2051707320699396454)
- [21.5K Views](https://x.com/MichLieben/status/2051707320699396454/analytics)
---
*导出时间: 2026/5/6 13:31:46*
---
## 中文翻译
# 如何在 Hermes 上构建一个自我进化的 AI 线索生成代理
**作者**: Michel Lieben
**日期**: 2026-05-05T16:55:18.000Z
**来源**: [https://x.com/MichLieben/status/2051707320699396454](https://x.com/MichLieben/status/2051707320699396454)
---

读完这篇文章,你将知道如何构建一个 AI 线索生成代理,它能为你撰写内容、执行开发、预订会议,并根据什么最有效来更新其自身的技能。
它在一个终端中运行。它会跨会话记住一切。你用得越多,它就越聪明。
Trigify.io 的创始人 Max Mitcham (@max_trigify) 刚刚部署了这个系统。两周内,他上一条 YouTube 视频的覆盖率达到平时的 26 倍。他的 Substack 订阅者首次开始持续增长,在同一时期净增约 80 人。他正在构建的 AI SDR(AI 销售开发代表)也运行在相同的架构上。
Max 和我刚刚录制了一段 56 分钟的视频,逐层拆解了他的设置。这篇文章就是那次录音的文字版操作手册。
下面是具体的构建方法。
# 大脑:记忆即维基百科图谱

大脑:记忆即维基百科图谱
大多数团队将代理的记忆结构化为文件夹树。一个文件夹用于销售,一个用于营销,一个用于产品。当一个概念需要同时存在于两个地方时,这种文件夹结构就会崩溃。
Andrej Karpathy 最近发布了一个关于不同模型的帖子:
Obsidian 内部的 Markdown 文件,像维基百科图谱一样相互链接。
- 每个概念成为一个文件。
- 概念之间的每条链接成为一条边。
- 代理在回答任何问题之前会遍历图谱,获取文件夹结构原本会隐藏的相关上下文。
Max 的代理记忆在实践中看起来是这样的:
- “创始人主导的内容”链接到 HubSpot 的 Kieran Flanagan 作为参考,将基于信号的推销作为一个内容赛道,链接到 Trigify 产品本身、品牌智能系统,以及驱动其营销的 Claude Code 技能。
- “品牌智能系统”链接到竞争格局映射、执行该映射的代理技能,以及正在被分析的产品。
- 点击“创始人内容”,代理就会调出 Kieran 的框架。点击“基于信号的推销”,你会看到它如何同时出现在产品文案和内容中。
图谱使代理的推理更像你的推理。概念有多个锚点。上下文从各个方向同时拉取。
Hermes 在静态图谱之上添加了一个主动层。
当你与它协作时,它会为重复性任务自动创建新的技能文件,为你不断引用的事物自动创建新的记忆文件,并根据你的实际使用方式自动更新这两者。在和你协作两周后,这个图谱反映的是你经营业务的方式,而不是某个 YouTube 教程植入的通用版本。
这是其他所有层级叠加的基础层。先构建它。花一个下午的时间,将你的 ICP(理想客户画像)、内容支柱、产品功能、销售动作、你在客户成功中看到的模式以及顶级客户实际使用的行话植入到仓库中。一旦概念之间存在关系,立即开始链接它们。
# 内容引擎

内容引擎
内容引擎有三个输入层和一个输出层。
- **信号层**。Trigify 监控 X、LinkedIn、YouTube 和 Substack,寻找两样东西:获得动力的趋势(潜在的内容话题)以及在格式层面上行之有效的模式(钩子、长度、帖子结构、缩略图模式、开头语)。这两者都会反馈回大脑。
- **理解层**。一旦信号落地,代理就会转向长篇内容以建立深度。Substack 文章、播客逐字稿、YouTube 视频。趋势是表面的。长篇内容才有实质。没有这一层,代理写出来的东西会很肤浅,因为原始材料很肤浅。
- **内部上下文层**。Hermes 连接到用于销售通话的 Fireflies、用于内部团队会议的 Granola、Slack 频道、电子邮件系统和 Stripe。当它为你起草帖子时,它从你实际的对话、客户群和产品行为中提取素材,而不仅仅是趋势信息流。
输出层将这三者组装在一起:
1. 一份 Substack 草稿,引用了三周前你已经忘记的一次客户通话。
2. 一篇 LinkedIn 帖子,基于昨天刚落地的趋势加上你在 Slack 中随口提到的一个内部数据点。
3. 一个 YouTube 脚本,其结构围绕代理在你所在类别过去 50 个视频中看到的有效模式构建。
Max 特别将其接入了他的 YouTube 内容。代理监控他所在领域的顶级创作者(Alex Finn、Nate Herk 以及 AI 领域的其他人),分析他们的缩略图、钩子、描述和章节结构,并将这些模式存储在大脑中。
它不会基于单一数据点采取行动。它需要相同的模式重复足够多次,从而形成一种信念。
一旦某个模式越过阈值,代理就会发送一条 Slack 消息:“我认为是时候把这些标题更新成这些了。试试这些新描述。更新这三个视频的缩略图。”
Max 回复“批准”。
Harnes(控制系统)通过 YouTube API 进行更改。
他最近的视频覆盖率达到平时的 26 倍。控制系统撰写了脚本,生成了缩略图(使用 Gemini 的 banana 2 模型),并选择了描述和章节结构。Max 只是负责拍摄。
# 自我学习循环
正是因为这一层,其他所有层级才能产生复利效应。

自我学习循环
控制系统对你的表现数据运行 cron(定时任务):回复率、内容互动、会议预订,以及任何你设置了指标的内容。它基于所见内容生成假设(“包含特定数字的钩子表现优于不含数字的钩子”)。它针对这些假设运行实验。它记录结果。它基于有效的方法更新自己的信念。
这里有两个设计规则很重要。
1. **模式,而非单点**。单篇帖子爆火不会触发信念更新。相同的模式必须重复足够多次以清除阈值。否则你只是在追逐偶然的运气。
2. **信念受版本控制**。当新实验与旧信念相矛盾时,信念会更新。系统不会锁定在一种打法上。它会随着学习重写自己的打法。
输出是一条 Slack 消息,在应用任何更改之前请求批准。你不是在交出控制权。你是在批准系统已经根据你自己的数据验证过的更改。
复利效应是大多数运营者容易忽略的地方。在运行这个循环两个月后,代理拥有了关于你的受众、你的格式、你的市场和你的客户群的数十个经过验证的信念。这些信念会为代理协助的每一个新内容、每一个新的外拓活动、每一个新产品决策提供信息。
它运行的时间越长,其他人就越难复制这个系统。
# AI SDR

AI SDR 工作流
同样的架构驱动销售动作。Max 现正在实时构建这个,其结构正是它区别于任何现成 AI SDR 的地方。
两个信号源为其提供数据。
- **通过 Trigify 获取的外部信号**,监控 Substack、X、Hacker News 和 LinkedIn 上的相关话题互动、竞争对手提及、融资轮次、角色变更、公司变更、人数增加、招聘激增,以及与你的产品能解决的问题相匹配的新举措。融资轮次特别会在 X 上比其他任何地方更早泄露,往往早于 Crunchbase。
- **直接内置在你自己的系统中的内部信号**:当有人注册但从未激活时的入门流失、当账户超过使用限额时的支出阈值、追加销售候选对象、流失风险,以及来自现有客户群内部的招聘信号。
Hermes 以同样的方式处理这两种信息源。它对每个信号源运行 cron,对照存储在大脑中的 ICP 定义验证信号是否相关,然后在进行任何进一步工作之前分配线索或丢弃线索。
ICP 定义本身是由 Hermes 构建的,而不是由 Max 构建的。
代理听取了每一次销售通话、每一次内部团队会议、Slack 中的每一次客户对话以及每一次 Stripe 交易,并生成了一个包含三个核心细分领域以及每个细分领域下子角色的 ICP。那种销售团队需要六个月才能正式写下来的 ICP 定义。代理在 Max 第一次询问时就呈现了出来。
一旦线索通过资格审查,工作流就会运行:
1. **查询 API**。无论信号来自哪个数据源,都会调用它以获取有关公司和人员的额外上下文。
2. **数据补充**。Lead Magic、Surfe 或你接入的任何提供商。在电子邮件层运行两个提供商很重要,因为它们在规模化时有各自不同的优势。
3. **撰写**。这是大脑层发挥作用的地方。Hermes 从过去的通话中提取客户痛点,从内部文档中提取产品上下文,并从通过研究 Max 喂入的示例而积累的技能中提取文案模式。输出是针对该线索的信号触发器定制的消息。
4. **路由或发送**。热门线索(企业级支出信号、回访网站访客、大客户互动)会路由给 Max 进行人工批准。其他所有内容都通过 Instantly 以编程方式发送。
5. **反馈结果**。回复、未回复、会议预订、成交。每个结果都会更新代理关于哪些信号、哪些文案和哪些序列实际产生了管道的信念。
大多数 AI SDR 停留在第三步。复利效应始于第五步。
# Max 端到端运行的系统栈

Max 端到端运行的系统栈
- **控制系统**:Hermes(编排器,约 90% 的工作量)。OpenClaw 保留用于需要大量工具调用的特定任务(约 10%)。
- **模型**:$200/月套餐上的 Codex 5.4,用于重度推理和编码工作。Claude Code 用于前端和较轻量的任务。
- **记忆**:Obsidian 用于维基百科图谱大脑。免费。
- **自动化运行时**:Hermes 用于 cron 和序列。如果你需要在控制系统之外使用顺序工作流引擎,Trigger.dev 是一个替代方案。
- **信号数据**:Trigify 用于跨 X、LinkedIn、Substack、Hacker News 和 YouTube 的社交和意图监控。
- **邮件补充**:Lead Magic 和 Surfe(并行运行两个提供商)。
- **外拓**:Instantly 用于规模化冷邮件。
- **数据库和分析**:Supabase 用于产品数据,PostHog 用于产品分析。
- **CRM**:任何对对象、列表和字段具有完全 API 访问权限的 CRM。我们在 ColdIQ 运行 Attio 正是因为这个原因。
- **通话录音**:Fireflies 用于销售通话,Granola 用于内部团队会议。Granola 是金矿所在之处,因为内部对话教会了代理你的团队实际上是如何思考业务的。
- **界面**:Warp 浏览器/终端用于与代理协作。Slack 和 Discord 接入用于基于聊天的交互。
注意:你不必把这个栈当作购买指南来读。把它当作架构也适用于替代品的证明。
用其他补充工具之一替换 CompanyEnrich。用 Lemlist 替换 Instantly。用目前 whichever 模型获胜的模型替换 Codex。模式保持不变,因为替换并不会真正破坏工作流。
关于构建的完整拆解,包括 AI SDR 的实时演示,都在转推这篇文章的视频中。