Sync: add productivity workflow notes

This commit is contained in:
2026-04-27 15:29:47 +08:00
parent 83c6e24e7c
commit 4422c0eac8
39 changed files with 1396 additions and 757 deletions

View File

@@ -1,50 +1,53 @@
---
title: "Dynamic Dashboard with Sub-agent Spawning"
type: source
tags: [dashboard, monitoring, OpenClaw, automation]
date: 2026-04-17
---
## Source File
- [[Agent/usecases/dynamic-dashboard]]
## Summary用中文描述
- 核心主题:基于子代理并行执行的多数据源实时监控仪表盘
- 问题域:静态仪表盘数据过时、手动更新繁琐、轮询多 API 效率低且易触发限流
- 方法/机制:主 Agent 生成子代理并行抓取多个数据源,定时更新,聚合结果推送 Discord支持告警阈值和历史趋势存储
- 结论/价值:用对话式描述替代数周的前端开发,立即获得实时洞察
## Key Claims用中文描述
-代理并行执行可避免阻塞并分散 API 负载,避免顺序轮询导致的限流问题
- 主 Agent 通过对话式指令调度子代理,无需编写前端代码即可获得实时仪表盘
- 定时任务Cron Job与告警机制结合实现"主动通知"而非"被动查询"
- 历史指标存储在 PostgreSQL 数据库,支持趋势分析和历史数据回溯
## Key Quotes
> "Static dashboards show stale data and require constant manual updates. You want real-time visibility across multiple data sources without building a custom frontend or hitting API rate limits." — 痛点描述
> "OpenClaw spawns sub-agents to fetch each data source in parallel, aggregates the results, and delivers a formatted dashboard to Discord or as an HTML file." — 核心机制
> "Updates run automatically on a cron schedule." — 自动化更新
## Key Concepts
- [[Dynamic-Dashboard]]:基于子代理并行执行的多数据源实时监控仪表盘
- [[Parallel-Agent-Execution]]:子代理并行抓取避免阻塞和分散 API 负载
- [[Scheduled-Task-Flywheel]]Cron Job 驱动的定时更新机制
- [[Alerting]]:基于阈值的主动告警推送机制
- [[Metrics-Database]]PostgreSQL 存储历史指标供趋势分析
## Key Entities
- [[OpenClaw]]:多代理框架,支撑子代理调度和定时任务编排
- [[Discord]]:仪表盘结果推送渠道之一
- [[PostgreSQL]]指标历史数据库metrics 表 + alerts 表)
## Connections
- [[multi-agent-team]] ← depends_on ← [[dynamic-dashboard]](共享子代理编排模式)
- [[self-healing-home-server]] ← extends ← [[dynamic-dashboard]](系统健康监控场景)
- [[earnings-tracker]] ← extends ← [[dynamic-dashboard]](市场数据监控场景)
- [[content-factory]] ← depends_on ← [[dynamic-dashboard]](社交媒体监控场景)
## Contradictions
- 与 [[content-factory]] 冲突:
- 冲突点:内容工厂也有并行执行模式,但侧重内容创作流水线
- 当前观点:[[dynamic-dashboard]] 侧重数据监控和告警,聚合多数据源
- 对方观点:[[content-factory]] 侧重内容创作的多 Agent 链式协作
---
title: "Dynamic Dashboard with Sub-agent Spawning"
type: source
tags: [dashboard, sub-agent, monitoring]
date: 2026-04-27
---
## Source File
- [[Agent/usecases/dynamic-dashboard.md]]
## Summary用中文描述
- 核心主题:AI Agent 驱动的实时动态仪表盘——通过子 Agent 并行抓取多数据源,自动聚合为统一仪表盘并定时推送到 Discord 或生成 HTML 文件
- 问题域:静态仪表盘数据过时、需要自定义前端、API 速率限制、无法实时获取多源数据
- 方法/机制:主 Agent 以对话方式定义监控目标 → 并行生成多个子 Agent 分别抓取各数据源 → 聚合结果写入 PostgreSQL → 格式化仪表盘内容 → 通过 Discord 或 Canvas 推送 → Cron 定时更新 + 阈值告警
- 结论/价值:无需构建自定义前端AI 接管全部编排工作;子 Agent 并行执行避免阻塞和速率限制;历史数据持久化支持趋势分析
## Key Claims用中文描述
- Agent 并行执行可避免 API 速率限制OpenClaw spawns sub-agents to fetch each data source in parallel
- AI 驱动的仪表盘可以在分钟级粒度自动更新无需人工干预Updates run automatically on a cron schedule
- 历史指标存储在数据库中支持任意时间范围的趋势查询Query historical data: "Show me GitHub star growth over the past 30 days."
- 告警阈值检测使系统具备主动通知能力alerts when metrics cross thresholds
## Key Quotes
> "Monitors multiple data sources simultaneously (APIs, databases, GitHub, social media)" — 核心能力:多数据源并行监控
> "Spawns sub-agents for each data source to avoid blocking and distribute API load" — 技术实现:子 Agent 分载模式
> "You define what you want to monitor conversationally" — 用户体验:以自然语言定义监控需求
## Key Concepts
- [[SubAgent]]:并行子 Agent 用于分布式数据抓取,每个数据源对应一个独立 Agent 进程
- [[CronJobs]]:定时任务驱动仪表盘周期性更新,支持分钟级粒度
- [[AlertThreshold]]:告警阈值机制,当指标超过设定值时主动通知用户
- [[MetricsDatabase]]PostgreSQL 指标存储,表结构包含 source/metric_name/metric_value/timestamp支持历史趋势分析
## Key Entities
- [[OpenClaw]]:主编排引擎,负责对话式目标定义、子 Agent 调度和结果聚合
- [[Discord]]:仪表盘输出渠道,支持 #dashboard 频道推送格式化内容
- [[GitHub]]:数据源之一,提供 stars/forks/issues/commits 等项目指标
- [[Polymarket]]:预测市场数据源,提供交易量和趋势信息
## Connections
- [[AutonomousProjectManagement]] ← extends ← [[DynamicDashboard]]
- 两者都依赖子 Agent 并行执行模式,但前者聚焦项目协调,后者聚焦数据监控
- [[CustomMorningBrief]] ← similar_pattern ← [[DynamicDashboard]]
- 都是定时运行的数据聚合工作流,但早间简报聚焦内容推荐,仪表盘聚焦实时指标
- [[MultiChannelAssistant]] ← uses ← [[Discord]]
- 多渠道助手使用 Discord 作为输出通道,与本工作流共享同一推送基础设施
## Contradictions
- 与 [[AutonomousProjectManagement]] 冲突:
- 冲突点:子 Agent 的协调机制
- 当前观点:[[DynamicDashboard]] 采用数据聚合模式(各 Agent 写入共享数据库,主 Agent 读取聚合),适合统计类任务
- 对方观点:[[AutonomousProjectManagement]] 采用文件协调模式(共享 STATE.yamlCEO 模式),适合项目执行类任务
- 注:两者可互补使用,数据聚合模式适用于监控场景,文件协调模式适用于任务执行场景