SuperAPI AI 工具集

inspect-agent-run-with-prefactor-cli

智能体与模型

查看项目

更新于 10-16 03:48

技能介绍

用途:对特定的 Prefactor 智能体运行进行根因分析,当用户已确定某次运行结果有误或值得调查时使用。需在部署该智能体的代码库中运行,而非 Prefactor SDK 仓库。

主要能力:通过 Prefactor CLI 获取 span、时间线、令牌用量与关联实例,结合本地源码中的提示词、工具实现、schema 与防护措施,定位运行中的问题。分析范围包括用户可见结果的偏离点、反馈信号、决策点、工具与 LLM 失败、令牌与负载异常、状态等。可选跟进关联实例,仅当 span 载荷指向其他可能解释结果的实例时展开。

使用方式:先收集 Agent ID、Agent Instance ID、症状描述、时间窗口等输入。优先导出上下文:prefactor --profile <profile> agent_instances agent_context <agent-instance-id> --output ./tmp/prefactor-agent-context.json;若该 profile 不支持 agent_context,则回退到 span 列表:prefactor --profile <profile> agent_spans list --agent_instance_id <agent-instance-id> --start_time <iso-start> --end_time <iso-end> --include_summaries。随后按执行顺序阅读 span,构建时间线,对照本地源码交叉分析。

输出格式:必须包含 Summary、What we found、Timeline、What's still unknown、Code pointers 五个部分。What we found 以扁平列表列出命名发现,每条含标题、结论、证据与置信度(confirmed/inferred/hypothesis)。

限制:仅做根因分析,不提供修复建议或后续行动计划。span 数据不能替代事后复盘讨论。若工作区与产生该运行的智能体不匹配,需在得出结论前说明。内部使用 five whys 推理但不输出 why 链。