Skip to content

[Studio] Agent Playground & Tool Playground: 交互式调试与测试插件 #1096

@hotlong

Description

@hotlong

背景

当前 Studio 对 AI Agent 和 Tool 的元数据仅支持基础 JSON 结构查看(MetadataInspector),没有交互式的 Playground:

  • 花名册(侧边栏)只能预览 agent/tool,不能直接试用;
  • Chat Panel 虽支持 agent 选择、tool 调用过程可见,但没有直接链接到元数据树的选中上下文。
  • 对于 Tool,没有低门槛参数填报与一键执行(dry-run)能力,难以交互式验证和调试。

目标

实现两个内置插件:

1. Agent Playground

  • 选中任意 agent 元数据后,主内容区自动渲染「Agent Playground」
  • 包含:
    • Agent 配置/说明卡片(JSON Inspector + 型号描述)
    • 内嵌 AI Chat 窗口(useChat/transport 直连该 agent)
    • Conversation log 可展开/下载/清空

2. Tool Playground

  • 选中 tool 元数据后,主内容区自动渲染「Tool Playground」
  • 包含:
    • Tool 结构说明(JSON Inspector)
    • 自动生成参数表单,根据 Tool Schema - type/enum/required
    • [运行] 按��支持 dry-run 执行(调用 tool handler,但不落库)
    • 输出/错误区域可查看/复制,支持多次运行,带历史

设计要点

  • 应作为 Studio 内置插件,优先级高于 fallback inspector(即命中元数据类型 agent/tool 时覆盖)
  • Playground 必须具备本地开发/在线演练一致体验,设计为与 AiChatPanel 行为解耦
  • 支持通过 QA 测试集模拟批量执行、自动化验证

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions