Skip to content

Paper-Guided Member C Runtime Execution and Visualization#9

Open
Panxiangzhenshuai wants to merge 17 commits into
mainfrom
runtime-dev
Open

Paper-Guided Member C Runtime Execution and Visualization#9
Panxiangzhenshuai wants to merge 17 commits into
mainfrom
runtime-dev

Conversation

@Panxiangzhenshuai

Copy link
Copy Markdown
Collaborator

概述

本 PR 完成了 Member C(Skill Runtime & Task Execution Agents)的论文导向优化,并在前端 Agent Execution 页面新增了执行过程图谱展示。同时修复了 Agent Execution 历史日志在后端重启后丢失的问题。

主要内容:

  • /execution/plan 接入 SkillRetrieverSkillGroup
  • 在真实执行路径中使用 Support -> Start -> Check 的结构化 Skill 分组
  • 支持 DAG 输出到下游 Step 输入的自动映射
  • 在执行结果中加入 Verifier / Reflection 反馈
  • 暴露 Runtime Memory 诊断信息
  • 新增 execution_graph 字段,用于前端展示执行图
  • 前端新增 Execution RAG Tree,展示任务、检索 Skill 和执行步骤关系
  • 扩展 runtime benchmark v2,加入论文导向评分维度
  • 更新 Member C 文档,记录从上一个 session 到当前版本的全部改动
  • 新增本地 JSONL 执行历史持久化 fallback,避免后端重启后历史日志丢失

论文对应关系

本 PR 将 Member C 的实现进一步对齐以下论文思想:

  • AgentSkillOS:支持可执行 DAG、依赖顺序、并行分组和执行图展示
  • Group of Skills:支持 Support / Start / Check / Avoid 结构化 Skill 分组
  • Skill-RAG:支持失败类型识别和恢复路径推荐
  • M*:支持 task-local runtime memory,记录执行证据和诊断信息

后端改动

  • /execution/plan 现在优先通过 SkillRetriever 获取结构化运行时 Skill 结果。
  • ExecutionResult 新增可选字段:
    • verification
    • reflection
    • failure_type
    • recovery_route
    • runtime_memory
    • execution_graph
  • SkillExecutor 现在会在执行下游 Step 前解析类似 ${step_id.output_field} 的 DAG 映射。
  • Runtime Memory summary 现在会包含 verification 和 reflection 摘要。
  • execution_graph 会返回:
    • 用户目标节点
    • 检索到的 Skill 节点
    • 实际执行 Step 节点
    • 检索边、规划边、依赖边
    • composition source 和 parallel groups 元数据

前端改动

  • 补充 ExecutionGraph、graph node、graph edge 等 TypeScript 类型。
  • 在 Agent Execution 执行结果区域新增 Execution RAG Tree
  • 树形图可以展示:
    • 用户任务目标
    • 被检索和选择的 Skill
    • 实际执行的 Step
    • Step 之间的依赖路径
    • Step 状态、耗时和错误信息

执行历史持久化修复

本 PR 还修复了 Agent Execution 页面在前后端重启后历史日志消失的问题。

问题原因

之前代码中虽然有执行历史持久化入口,但它依赖 PostgreSQL:

  • 如果 PostgreSQL 可用,则写入 ExecutionHistoryRepository
  • 如果 PostgreSQL 不可用,则退回进程内存 _execution_history

因此在本地开发或 demo 环境中,如果 PostgreSQL 没有启动、连接失败或配置不匹配,执行历史只会存在内存里。后端一重启,前端 Agent Execution 页面中的历史日志就会消失。

修复方案

新增本地 JSONL 文件持久化 fallback:

skillos/skillos/api/history_store.py
当 PostgreSQL 不可用时,后端现在会自动使用本地文件保存执行历史:

skillos/skillos/storage/execution_history.jsonl
这样即使重启后端,/execution/history 仍然可以读回之前的执行历史,前端 Agent Execution 页面刷新或重启后仍能看到历史日志。

兼容性说明
PostgreSQL 可用时仍优先使用 PostgreSQL。
PostgreSQL 不可用时自动降级到本地 JSONL 文件。
本地历史文件已加入 .gitignore,不会把用户本地运行日志提交到仓库。
API 接口不变,前端无需额外改动。
Benchmark 改动
扩展 runtime benchmark v2,使其不再只评估任务是否成功,而是评估完整 Member C runtime 架构。

新增评分维度:

skill_group
planning
composition
execution
verification
recovery
memory
新增 benchmark case:

support_start_check_flow
missing_skill_recovery_route
文档改动
更新了:

docs/modules/03-skill-runtime.md
新增版本说明:

Version 2026-05-14: Paper-Guided Runtime Path and Execution Graph Update
该部分记录了从上一个 session 到当前版本的 Member C 全部关键改动,包括:

SkillRetriever / SkillGroup 接入真实执行路径
DAG data mapping 驱动运行时输入
Verifier / Reflection 接入执行结果
Runtime Memory diagnostics 暴露
Benchmark v2 论文导向评分
前端 Execution RAG Tree 展示
本地执行历史持久化 fallback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant