从FROST到FROST-SOP:如何用家族治理模型打造你的"AI分身"?
作者:神通说
日期:2026-07-22
主题:双项目联动 | 周三轮换
阅读时间:10分钟
开场:一人公司的终极困境
你是否有这样的体验?
每天醒来,脑子里塞满了要做的事:
- 写推广文章
- 回复客户咨询
- 跟进项目进度
- 整理会议纪要
- 复盘昨天数据
一个人做公司,听起来很自由。实际上,自由职业者的时间比上班族更碎片——因为所有事情都堆在你一个人身上,没有任何分工。
我一直在思考一个问题:能不能用AI Agent来"复制"自己?
不是那种"给你一堆提示词让你自己写"的AI工具,而是真正能自主执行任务、自动汇报结果、帮你分担80%重复工作的数字分身。
这个想法最终落地成了两个项目:FROST 和 FROST-SOP。
第一站:FROST的家族治理模型——AI Agent应该像家族一样分工
FROST 的核心理念来自一个观察:自然界最稳定的组织形式不是公司,而是家族。
家族有清晰的分工:
- 祖辈定规矩,不亲自下场
- 父辈协调全局,分配任务
- 子辈执行具体事务
把这个逻辑映射到 AI Agent,就是 FROST 的家族治理模型:
┌─────────────────────────────────────────────────────┐
│ 👑 君主(你) │
│ └── 发布任务、查看结果,不干预执行 │
│ │
│ 👴 祖辈(主Agent) │
│ └── 常驻、全局编排、拆解任务 │
│ ↓ │
│ 🕵️ 斥候(侦查Agent) │
│ └── 外出狩猎、收集情报、快速验证 │
│ ↓ │
│ ⚔️ 府兵(执行Agent) │
│ └── 领命执行、重复劳动、汇报结果 │
│ ↑ │
│ 📜 长老(监督Agent) │
│ └── 记录过程、沉淀教训、审计合规 │
└─────────────────────────────────────────────────────┘
关键洞察: 祖辈是唯一"常驻"的,其他都是动态生成、执行完就解散的临时角色。
这个模型解决了一个核心问题:谁来决定"这件事该派给谁"?
答案是:祖辈。它不需要亲自执行,只需要决定"派谁去"和"怎么汇报"。
第二站:用FROST的四个原子,理解Agent的本质
FROST 只有四个核心概念,却能构建出完整的家族治理系统:
from frost.core import Store, Agent, skill_set, skill_get
# 四个原子:
# 1. Store(记忆)—— Agent的工作空间
store = Store()
# 2. Skill(能力)—— 纯函数,无状态
def collect_daily_tasks(context):
"""收集今日任务"""
tasks = ["写推广文章", "回复客户", "跟进项目"]
context["tasks"] = tasks
return context
def execute_task(context):
"""执行单个任务"""
current_task = context.get("current_task", "")
context["result"] = f"已完成: {current_task}"
return context
# 3. Agent(细胞)—— 包裹记忆和能力
daily_agent = Agent("daily_worker", store, skills={
"collect": collect_daily_tasks,
"execute": execute_task
})
# 4. SOP(宪法)—— 定义执行顺序
result = daily_agent.run(
sop_steps=["collect", "execute"],
initial_context={"current_task": "写推广文章"}
)
print(result["result"]) # 输出:已完成: 写推广文章
这四个原子教会我们什么?
- Store 解决"记忆"问题——Agent需要上下文
- Skill 解决"能力"问题——每个动作必须是可复用的单元
- Agent 解决"封装"问题——把记忆和能力绑定在一起
- SOP 解决"秩序"问题——让执行顺序可控可审计
理解了这四个原子,你就理解了 Agent 的本质——它不是魔法,是结构化的委托系统。
第三站:FROST-SOP——把家族治理变成生产系统
FROST 帮你理解了"Agent 是什么"。但要在真实场景中跑起来,你需要 FROST-SOP 的工程能力。
把Skill变成可复用的组件
在 FROST 中,Skill 是一个 Python 函数。在 FROST-SOP 中,Skill 是一个标准化的类——有 Schema、有版本、有注册机制:
# skills/content_generation/article_writer.py
from skills.base import BaseSkill, SkillResult
from typing import Dict, Any
import asyncio
class ArticleWriterSkill(BaseSkill):
"""文章撰写Skill - 府兵角色"""
@property
def name(self) -> str:
return "article_writer"
@property
def description(self) -> str:
return "根据主题撰写推广文章,支持多平台适配"
@property
def parameters(self) -> Dict[str, Any]:
return {
"type": "object",
"properties": {
"topic": {"type": "string", "description": "文章主题"},
"platform": {"type": "string", "enum": ["devto", "juejin", "zhihu"]},
"style": {"type": "string", "enum": ["technical", "casual", "story"]},
"word_count": {"type": "integer", "default": 1500}
},
"required": ["topic", "platform"]
}
async def execute(self, topic: str, platform: str,
style: str = "technical",
word_count: int = 1500) -> SkillResult:
"""异步执行文章撰写"""
# 调用LLM生成内容
prompt = self._build_prompt(topic, platform, style, word_count)
response = await self.llm_client.chat(prompt)
return SkillResult(
success=True,
data={
"title": self._extract_title(response),
"content": response,
"platform": platform,
"word_count": len(response),
"status": "draft"
}
)
def _build_prompt(self, topic, platform, style, word_count):
"""根据平台调整提示词"""
platform_hints = {
"devto": "Write in a developer-focused, technical tone. Include code examples.",
"juejin": "Write in Chinese. Focus on practical applications and real examples.",
"zhihu": "Write in Chinese. Use a storytelling approach with deep insights."
}
return f"{platform_hints.get(platform)} Topic: {topic}. Style: {style}. ~{word_count} words."
用声明式SOP编排工作流
FROST-SOP 允许你用 YAML 定义完整的工作流:
# sops/daily_promotion.yaml
name: "daily_promotion"
description: "每日推广文章自动撰写与发布"
version: "1.0"
trigger:
type: "schedule"
cron: "0 11 * * *" # 每天11:00执行
context:
author: "神通说"
topics_rotation:
- Mon: "FROST深度"
- Tue: "SOP工程"
- Wed: "双项目联动"
- Thu: "代码教程"
- Fri: "行业趋势"
- Sat: "社区故事"
- Sun: "轻量科普"
steps:
- name: "research_topic"
skill: "topic_researcher"
parameters:
date: "${context.today}"
rotation: "${context.topics_rotation}"
halt_on_error: false
- name: "write_article"
skill: "article_writer"
parameters:
topic: "${research_topic.topic}"
platform: "juejin"
style: "technical"
halt_on_error: true
- name: "create_draft"
skill: "draft_creator"
parameters:
platform: "juejin"
title: "${write_article.title}"
content: "${write_article.content}"
halt_on_error: true
- name: "publish_article"
skill: "content_publisher"
parameters:
platform: "juejin"
draft_id: "${create_draft.draft_id}"
halt_on_error: false
- name: "sync_other_platforms"
skill: "multi_platform_syncer"
parameters:
platforms: ["devto", "zhihu"]
original_content: "${write_article.content}"
original_id: "${create_draft.draft_id}"
halt_on_error: false
error_handling:
on_failure: "alert_author"
retry_count: 2
fallback: "save_to_drafts"
完整的执行监控
FROST-SOP 自带执行审计功能——每一步的执行时间、Token 消耗、状态都记录在案:
# 查看执行报告
result = await engine.execute("daily_promotion", context)
print(f"状态: {result['status']}") # completed
print(f"耗时: {result['duration_ms']}ms") # 12450ms
print(f"Token: {result['token_usage']}") # 3200
print(f"步骤数: {len(result['steps'])}") # 5
这就是 FROST-SOP 的价值——把 FROST 的哲学变成可运行、可监控、可迭代的系统。
实战案例:用FROST家族做"一人公司"
我正在把 FROST 家族治理模型落地到自己的"一人公司"中:
任务进来 → 祖辈(主Agent)拆解 → 派给合适的子Agent执行
每日推广文章 → 斥候收集素材 → 府兵撰写 → 长老审计
客户咨询 → 斥候分类问题 → 府兵回答 → 长老记录
项目跟进 → 斥候检查进度 → 府兵更新 → 长老汇报
预期效果:
- 重复工作减少 80%
- 响应时间从天级 → 分钟级
- 所有执行可审计、可追溯
如何开始:从FROST到FROST-SOP
阶段一:理解(FROST教学框架)
git clone https://gitee.com/liao_liang_7514/frost.git
cd frost
python -m pytest tests/ -v
运行 197 个测试,理解四个原子和家族治理模型。
阶段二:实践(FROST-SOP工程平台)
git clone https://gitee.com/liao_liang_7514/frost-sop.git
cd frost-sop
pip install -r requirements.txt
streamlit run ui/dashboard.py
用已有的 Skill 库搭建你的第一个 SOP。
结语
FROST 告诉我:Agent 不是魔法,是委托系统。
FROST-SOP 告诉我:把委托系统变成生产级,需要结构化的工程。
如果你也在思考"怎么用 AI Agent 提升一人公司的效率",不妨从 FROST 开始——先用 500 行代码理解 Agent 的本质,然后用 FROST-SOP 把理解变成现实。
FROST 是思想源头,FROST-SOP 是思想开花结果。
🔗 项目链接
- FROST(教学框架):https://gitee.com/liao_liang_7514/frost
- FROST-SOP(工程平台):https://gitee.com/liao_liang_7514/frost-sop
本文是 FROST 双项目每日推广系列的第 29 篇。用"一人公司的 AI 分身"案例,展示 FROST 家族治理模型的思想价值与 FROST-SOP 的工程能力。
如果觉得有用,给项目一个 Star ⭐,就是最好的鼓励!
Top comments (0)