┌─────────────────────────────────────────────────────────────┐
│ ContentFinderAgent │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ AgentRunner │ │ TraceStore │ │ MemoryStore │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
┌─────────────────────┼─────────────────────┐
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ 工具层 │ │ 记忆层 │ │ 技能层 │
├──────────────┤ ├──────────────┤ ├──────────────┤
│ 爬虫工具 │ │ 搜索历史 │ │ content-finder│
│ - douyin │ │ 内容表现 │ │ skill │
│ - kuaishou │ │ 运营偏好 │ └──────────────┘
│ │ └──────────────┘
│ 评估工具 │
│ - evaluate │
│ │
│ 反馈工具 │
│ - feedback │
│ - performance│
│ - query │
└──────────────┘
职责:
关键方法:
search_content(): 执行内容搜索collect_feedback(): 收集运营反馈update_performance(): 更新内容表现optimize_strategy(): 优化搜索策略douyin_search: 抖音内容搜索kuaishou_search: 快手内容搜索特点:
evaluate_content: 内容质量和相关性评估评估维度:
record_operator_feedback: 记录运营反馈update_content_performance: 更新表现数据query_historical_data: 查询历史数据功能:
数据结构:
{
"timestamp": "2026-03-06T10:00:00",
"keywords": ["美食", "探店"],
"platforms": ["douyin", "kuaishou"],
"filters": {"min_views": 10000},
"results_count": 20,
"trace_id": "trace_123"
}
功能:
数据结构:
{
"content_id": "dy_123456",
"timestamp": "2026-03-06T10:00:00",
"platform_views": 150000,
"platform_likes": 8000,
"internal_views": 5000,
"internal_engagement": 0.15,
"conversion_rate": 0.08
}
功能:
数据结构:
{
"content_id": "dy_123456",
"timestamp": "2026-03-06T10:00:00",
"rating": "excellent",
"notes": "内容质量很高",
"operator_id": "operator_001",
"content_features": {
"keywords": ["美食"],
"tags": ["探店"],
"platform": "douyin"
}
}
content-finder skill:
用户需求
↓
1. 构建搜索请求(SearchRequest)
↓
2. 查询相似历史搜索
↓
3. 基于历史数据优化参数
↓
4. 并行调用爬虫工具
│
├─→ douyin_search
└─→ kuaishou_search
↓
5. 合并搜索结果
↓
6. 评估内容质量(evaluate_content)
↓
7. 排序并返回结果
↓
8. 保存搜索历史
运营人员反馈
↓
1. 记录反馈(record_operator_feedback)
↓
2. 保存到运营偏好数据
↓
3. 提取内容特征
↓
4. 更新偏好模型
触发优化
↓
1. 获取历史数据
│
├─→ 搜索历史
├─→ 运营反馈
└─→ 内容表现
↓
2. 分析高表现内容特征
│
├─→ 关键词分析
├─→ 标签分析
├─→ 平台权重分析
└─→ 筛选条件分析
↓
3. 生成优化策略
↓
4. 应用到下次搜索
@tool(description="从新平台搜索视频内容")
async def new_platform_search(
keywords: str,
max_results: int = 20,
ctx: ToolContext = None,
) -> ToolResult:
# 实现新平台的搜索逻辑
pass
def _calculate_custom_score(item: Dict[str, Any]) -> float:
# 添加自定义评估逻辑
pass
class CustomMemoryManager:
"""自定义记忆管理器"""
def __init__(self, storage_path: str):
# 初始化存储
pass