mcpField
A
agent-pulse

agent-pulse

github.com/jane-o-o-o-oAgent 工作流147.5k 次安装22 周前更新
代码仓库

关于 agent-pulse

agent-pulse 是一项指导使用 agent-pulse 命令行检查本地 AI Agent 活动、成本和趋势的技能,涵盖命令选择、结果解读及报告流程。

主要功能

  1. 01命令行选项指引
  2. 02会话与用量分析
  3. 03成本和趋势检查
  4. 04平台与时间筛选
  5. 05JSON 报告与导出
  6. 06MCP 工具使用指引

适用场景

  1. 01汇总近期 Agent 会话
  2. 02比较模型成本与用量
  3. 03排查本地活动数据缺失
  4. 04生成监控或导出报告

MCP 相关

该技能说明如何使用 agent-pulse 的 MCP 模式,让其他 AI 客户端查询状态、预测、会话、模型分析、优化、健康检查、搜索和排行榜等工具。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/jane-o-o-o-o/agent-pulse-skill --skill agent-pulse

安装后在 Claude Code 中输入/agent-pulse确认已加载。

附带文件agents/openai.yamlscripts/run_agent_pulse_snapshot.py

详细介绍

Agent Pulse

用途

使用已安装的 agent-pulse CLI 作为本地 AI Agent 活动的权威数据源。PyPI 软件包名为 agentpulse-cli,但命令仍为 agent-pulse。优先运行命令并总结其输出,而不是阅读 Agent Pulse 源代码。

在 Windows 上运行命令前,务必启用 UTF-8,因为 Agent Pulse 的输出包含表情符号和框线字符:

$env:PYTHONUTF8='1'
$env:PYTHONIOENCODING='utf-8'

如果 agent-pulse 不在 PATH 中,请先征求用户同意,再安装依赖。如果用户同意,请安装 PyPI 软件包,或尝试从本地项目检出目录运行:

pip install agentpulse-cli
python -m agent_pulse.cli --version

数据源键

如果用户询问的是某个 Agent 工具,而不是所有本地数据,请使用 -P/--platform:

hermes, claude, codex, deepseek, openclaw, copilot, aider, qwen,
opencode, goose, cursor, antigravity, amp

选择命令

首先使用此命令选择表:

用户需求运行命令
当前状态agent-pulse status --json
完整仪表板agent-pulse --json 或 agent-pulse --no-banner
演示数据agent-pulse demo --json
设置诊断agent-pulse doctor --json
最近的会话agent-pulse --json --hours 24 --limit 20
排名前列的会话agent-pulse top --sort tokens --json
费用最高的会话agent-pulse top --sort cost --json --hours 168
模型费用分析agent-pulse models --json
模型排名agent-pulse leaderboard --json --rank-by efficiency
节省费用agent-pulse optimize --json
预算状态agent-pulse budget --json
费用预测agent-pulse forecast --json
费用异常检查agent-pulse anomaly --json
健康状况/CI 检查agent-pulse health --json
综合评分agent-pulse score --json
搜索会话agent-pulse search "<query>" --json
比较时段agent-pulse compare --json
比较项目agent-pulse compare-projects --json
活动日历agent-pulse heatmap --json
智能建议agent-pulse insights --json
Prometheus 指标agent-pulse metrics --format prometheus
导出报告agent-pulse export -f markdown 或 agent-pulse export-html
Web 仪表板agent-pulse web --port 8765
REST APIagent-pulse api --port 8766
MCP 工具agent-pulse mcp --list-tools

如果已安装的命令不支持某个选项,请运行 agent-pulse <command> --help 并调整用法。

工作流

  1. 仅当用户询问为何缺少数据、请求设置帮助,或普通数据命令未返回任何会话时,才从 agent-pulse doctor --json 开始。
  2. 尽可能使用 JSON 输出。总结重要字段:会话数、令牌数、工具数、搜索调用次数、模型明细、数据源明细、预估费用和警告。
  3. 对范围限定的问题使用时间筛选。“最近”默认使用 24 小时,“本周”默认使用 168 小时:
agent-pulse status --json --hours 24
agent-pulse --json --hours 168 --limit 50
  1. 用户询问特定 Agent 系统时,使用平台筛选:
agent-pulse --json -P codex --hours 24
agent-pulse --json -P claude --hours 24
agent-pulse top --json -P aider --sort cost
agent-pulse status --json -P cursor
  1. 对费用相关问题,结合摘要、模型和会话排名视图:
agent-pulse status --json --hours 24
agent-pulse models --json --hours 24
agent-pulse top --sort cost --json --hours 24
agent-pulse optimize --json --hours 168
  1. 对趋势和风险相关问题,使用预测/历史/比较/异常分析:
agent-pulse forecast --json
agent-pulse history --json
agent-pulse compare --json
agent-pulse anomaly --json
  1. 对设置相关问题,先使用发现命令,再推测路径:
agent-pulse doctor --json
agent-pulse scan --json --details
agent-pulse config show

解读结果

  • 将 total_cost_usd 视为根据 Agent Pulse 本地模型定价表估算的费用。
  • 同时报告费用和令牌量;低费用模型仍可能有很高的令牌用量。
  • 区分 codex、claude、hermes、deepseek、openclaw、aider、cursor、opencode 和 goose 等数据源。
  • 如果 doctor 报告缺少可选数据源、缺少 dev_root 或缺少可选 Web 依赖,请予以说明。
  • 如果没有显示会话,请检查 doctor,然后尝试扩大时间范围,例如使用 --hours 168。
  • 在给出总体总数前,先确认用户是否要求按数据源(-P)筛选、按模型筛选或比较项目。
  • 如果命令输出纯文本而非 JSON,或因已安装版本较旧而失败,请运行 agent-pulse <command> --help 并使用最接近的受支持选项。

报告

如需简短、易读的回答,请运行 JSON 命令并进行总结。

如需生成产物,优先使用:

agent-pulse report --period daily
agent-pulse export -f markdown
agent-pulse export-html

不要编造具体的节省金额或成本。请使用 CLI 输出。

集成

仅当用户要求浏览器仪表盘或编程式服务时,才使用 Web 和 API 扩展。安装缺失的扩展前请先征求同意:

pip install "agentpulse-cli[web]"
agent-pulse web --port 8765
agent-pulse api --port 8766

对于监控管道:

agent-pulse metrics --format prometheus
agent-pulse health --cost-limit 100 --token-limit 1000000 --json

MCP

当用户希望其他 AI 客户端查询 Agent Pulse 时,请使用 MCP 模式:

agent-pulse mcp --list-tools
agent-pulse mcp

解释 MCP 时,请说明它会公开状态、预测、热门会话、模型分析、优化、健康状况、搜索和排行榜等工具。

本地辅助工具

此技能包含 scripts/run_agent_pulse_snapshot.py,它会运行一组精简、兼容 JSON 的 Agent Pulse 检查,并打印汇总结果:

python scripts/run_agent_pulse_snapshot.py --hours 24 --days 7

评论

支持 Markdown