Skip to content

Commit e8f760b

Browse files
authored
feat(studio): unify dev sandbox and add system info (#849)
1 parent d36504a commit e8f760b

39 files changed

Lines changed: 1942 additions & 3061 deletions

‎docs/content/docs/framework/frontend.en.mdx‎

Lines changed: 17 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -187,71 +187,27 @@ After selecting a sub-agent, the `/` menu shows skills mounted on that target. C
187187

188188
The frontend sends structured `veadkInvocation` metadata instead of inferring invocation intent from the message string. The backend plugin directs ADK to call the skill tool or invoke `transfer_to_agent` one tree edge at a time until it reaches the target. The same metadata is written to the first Google GenAI `Part`, so reopening session history restores the `/skill` and `@agent` chips.
189189

190-
### Skill creation mode
191-
192-
The new-chat **Skill creation** mode runs
193-
`doubao-seed-2-0-pro-260215` and `deepseek-v4-flash-260425` in parallel through
194-
Ark Responses. Each candidate gets an independent AgentKit CodeEnv session.
195-
The server validates the generated directory name, `SKILL.md` frontmatter,
196-
file count, size, and safe paths before packaging a ZIP. AgentKit credential
197-
configuration resolves the Ark API key with the deployer's AK/SK and writes it
198-
directly to each dedicated CodeEnv Tool. Per-job Session variables cannot
199-
override the Tool's model credential. Model credentials are never returned to
200-
the browser, and the Skill creation APIs require the Studio developer or admin
201-
role.
202-
203-
After submission, both candidate conversations appear immediately and
204-
independently render public reasoning summaries, tool calls, and assistant
205-
messages returned by the generator. Private chain-of-thought and credentials
206-
never enter the page. Completed candidates still support preview, ZIP download,
207-
and AgentKit publishing. Once the real job ID is available, the frontend resumes
208-
polling directly from Sandbox state. An interrupted creation stream or a brief
209-
AgentKit control-plane delay no longer turns an intermediate state into an
210-
expired job.
211-
212-
Before starting a local server, configure separate `Ready` AgentKit Tools for
213-
Codex, OpenClaw, Hermes, and Skill creation:
190+
### Skill Center
191+
192+
Studio developers and admins create and optimize Skills from the Skill Center.
193+
Each candidate runs in an isolated DevEnv session on the shared Dev Sandbox
194+
Tool, streams public activity, and validates the generated files. Valid results
195+
can be previewed, downloaded, or published to AgentKit. Model credentials remain
196+
on the Tool and are never returned to the browser.
197+
198+
Local Studio reads the DevEnv Tool ID from `SANDBOX_DEV`:
214199

215200
```bash
216-
export SANDBOX_CHAT_CODEX=<chat-code-env-tool-id>
217-
export SANDBOX_CHAT_OPENCLAW=<openclaw-env-tool-id>
218-
export SANDBOX_CHAT_HERMES=<hermes-env-tool-id>
219-
export SANDBOX_SKILL_CREATOR=<skill-code-env-tool-id>
220-
veadk frontend --agents-dir examples
201+
export SANDBOX_DEV=<dev-env-tool-id>
202+
veadk studio --agents-dir examples
221203
```
222204

223-
For local Studio, configure the Ark model variables on both dedicated CodeEnv
224-
Tools. Adding a candidate to AgentKit uploads its ZIP to TOS, then creates or
225-
updates the Skill through the Skills API. It is published to a SkillSpace only
226-
when the user provides SkillSpace IDs.
205+
Each task has a one-hour DevEnv session. Leaving a running task stops and
206+
releases that session; task state remains in Sandbox so polling can continue
207+
across frontend instances.
227208

228-
| Environment variable | Default | Description |
229-
| :-- | :-- | :-- |
230-
| `SANDBOX_CHAT_CODEX` | — | AgentKit CodeEnv Tool ID dedicated to temporary chats. |
231-
| `SANDBOX_CHAT_OPENCLAW` | — | AgentKit ArkClawEnv Tool ID used by OpenClaw agents. |
232-
| `SANDBOX_CHAT_HERMES` | — | AgentKit HermesEnv Tool ID used by Hermes agents. |
233-
| `SANDBOX_SKILL_CREATOR` | — | AgentKit CodeEnv Tool ID dedicated to Skill creation. |
234-
| `VEADK_SKILL_CREATOR_TOS_BUCKET` | AgentKit account default | TOS bucket used for published artifacts. |
235-
| `VEADK_SKILL_CREATOR_TOS_PREFIX` | `agentkit/skills` | TOS object-key prefix. |
236-
| `VEADK_SKILL_CREATOR_PROJECT_NAME` | — | Project name used when creating a Skill. |
237-
238-
Candidate sessions have a 30-minute TTL and are deleted immediately when the
239-
user starts over or leaves the job. Job state is stored in Sandbox rather than
240-
frontend-process memory, so polling and downloads continue to work when FaaS
241-
requests reach different instances.
242-
243-
On the first cloud deployment, the command creates two independent CodeEnv
244-
Tools in parallel with the deployer's AK/SK when Tool IDs are omitted. Existing
245-
Tools can be selected with `--sandbox-chat-codex-tool-id` and
246-
`--sandbox-skill-creator-tool-id`. The Ark credential is resolved with the
247-
deployer's AK/SK and written directly to both Tools as model environment
248-
variables. Sandbox sessions inherit those Tool variables. The browser and
249-
VeFaaS Function receive only Tool IDs, never model credentials.
250-
251-
If Tool or model-credential provisioning fails, the CLI prints the underlying
252-
error verbatim, including its original line breaks, after redacting credential
253-
values. Use the service action, error code, request ID, and request details to
254-
identify the missing permission or account resource.
209+
A Volcengine cloud deployment creates the Dev Sandbox when no Tool ID is
210+
provided, or uses an existing Tool selected with `--sandbox-dev-tool-id`.
255211

256212
```bash
257213
veadk studio deploy \
@@ -323,7 +279,7 @@ otherwise the current values are retained. Use `--path` to select a source
323279
checkout; it defaults to the current directory. Node.js and npm must be
324280
installed locally.
325281
`--sandbox-chat-codex-tool-id`, `--sandbox-chat-openclaw-tool-id`,
326-
`--sandbox-chat-hermes-tool-id`, and `--sandbox-skill-creator-tool-id` likewise
282+
`--sandbox-chat-hermes-tool-id`, and `--sandbox-dev-tool-id` likewise
327283
replace only the explicitly supplied environment value. Omitting an option
328284
keeps that Tool ID from the deployed Function instead of clearing it.
329285

‎docs/content/docs/framework/frontend.mdx‎

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -160,51 +160,25 @@ veadk frontend --agents-dir examples
160160

161161
前端不会从消息字符串中猜测调用意图,而是发送结构化的 `veadkInvocation` metadata。后端插件据此要求 ADK 调用技能工具,或沿 Agent 树逐级调用 `transfer_to_agent`,直到到达目标节点。同一份 metadata 也会写入首个 Google GenAI `Part`,因此重新加载历史会话后仍能恢复 `/skill` 与 `@agent` chip。
162162

163-
### Skill 创建模式
163+
### 技能中心
164164

165-
新会话输入框中的「Skill 创建」会固定使用
166-
`doubao-seed-2-0-pro-260215` 和 `deepseek-v4-flash-260425`,通过 Ark
167-
Responses API 并行生成两个候选方案。每个候选使用独立的 AgentKit CodeEnv
168-
Session,生成结果会校验目录名、`SKILL.md` frontmatter、文件数量、大小和路径安全,
169-
再打包为 ZIP。真实 Ark API Key 由 AgentKit 凭据托管保存,Studio 和 Sandbox
170-
只使用可撤销的网关票据;每个任务的 Session 环境变量不会覆盖托管票据,且服务端
171-
只接受 Volcengine HTTPS 凭据中继地址。浏览器不会收到模型凭据。Skill 创建接口仅允许
172-
Studio developer 和 admin 使用。
165+
Studio developer 和 admin 可在技能中心创建或优化 Skill。每个候选方案都会在共享
166+
Dev Sandbox Tool 上创建独立的 DevEnv Session,持续显示公开活动,并在完成后校验
167+
生成文件。通过校验的结果可预览、下载或发布到 AgentKit;模型凭据只保存在 Tool
168+
中,不会返回浏览器。
173169

174-
提交需求后会立即显示两个候选对话流,各自持续渲染生成器返回的公开思考摘要、工具
175-
调用和助手回复。私有思维链和凭据不会进入页面。候选完成后仍可预览、下载 ZIP 或
176-
添加到 AgentKit。前端拿到真实任务 ID 后会直接从 Sandbox 状态恢复轮询;创建流中断
177-
或 AgentKit 控制面短暂未发现新 Session 时,不会把中间状态误判为任务过期。
178-
179-
本地启动前需要分别配置临时会话和 Skill 创建使用的两个 `Ready` CodeEnv Tool:
170+
本地 Studio 从 `SANDBOX_DEV` 读取 DevEnv Tool ID:
180171

181172
```bash
182-
export SANDBOX_CHAT_CODEX=<chat-code-env-tool-id>
183-
export SANDBOX_SKILL_CREATOR=<skill-code-env-tool-id>
184-
veadk frontend --agents-dir examples
173+
export SANDBOX_DEV=<dev-env-tool-id>
174+
veadk studio --agents-dir examples
185175
```
186176

187-
本地运行前使用 AgentKit 的 `credential-hosting` 命令,并将结果分别写入上述 CodeEnv
188-
Tool。添加到 AgentKit 时,服务端会先将
189-
ZIP 上传到 TOS,再调用 Skills API 创建或更新 Skill;只有用户填写 SkillSpace ID
190-
时才发布到对应空间。以下变量均为可选覆盖项:
191-
192-
| 环境变量 | 默认值 | 说明 |
193-
| :-- | :-- | :-- |
194-
| `SANDBOX_CHAT_CODEX` | — | 临时会话专用 AgentKit CodeEnv Tool ID。 |
195-
| `SANDBOX_SKILL_CREATOR` | — | Skill 创建专用 AgentKit CodeEnv Tool ID。 |
196-
| `VEADK_SKILL_CREATOR_TOS_BUCKET` | AgentKit 账户默认 Bucket | 发布产物使用的 TOS Bucket。 |
197-
| `VEADK_SKILL_CREATOR_TOS_PREFIX` | `agentkit/skills` | TOS 对象 Key 前缀。 |
198-
| `VEADK_SKILL_CREATOR_PROJECT_NAME` | — | 创建 Skill 时使用的项目名称。 |
199-
200-
候选 Session 的 TTL 为 30 分钟,用户重新创建或离开任务时会立即清理。任务状态保存
201-
在 Sandbox 而非 Frontend 进程内存,因此 FaaS 请求命中不同实例时仍可继续轮询和下载。
177+
每个任务的 DevEnv Session 最长保留 1 小时。离开仍在运行的任务时,Studio 会停止并
178+
释放对应 Session;任务状态保存在 Sandbox 中,因此前端实例切换后仍可继续轮询。
202179

203-
云上首次部署时,若没有指定 Tool ID,部署命令会使用部署 AK/SK 并行创建两个独立
204-
CodeEnv Tool。也可以分别使用 `--sandbox-chat-codex-tool-id` 和
205-
`--sandbox-skill-creator-tool-id` 指定已有 Tool。部署命令会通过 AgentKit 凭据托管
206-
将 Ark 凭据保存到 KMS,并把代理地址和可撤销票据绑定到两个 Tool;VeFaaS Function
207-
只接收 Tool ID,不接收模型凭据:
180+
Volcengine 云上部署未指定 Tool ID 时会自动创建 Dev Sandbox,也可通过
181+
`--sandbox-dev-tool-id` 使用已有 Tool:
208182

209183
```bash
210184
veadk studio deploy \
@@ -263,8 +237,10 @@ Application。未指定 `--region` 和 `--project` 时,会在北京、上海
263237
更新不会改变 Application/Function ID、访问 URL、SSO、IAM、网关或已有环境
264238
变量。`--site-title` 和 `--site-logo` 仅在显式传入时覆盖,省略时保留云上品牌
265239
设置。可用 `--path` 指定源码目录,默认为当前目录;本地需安装 Node.js 与 npm。
266-
`--sandbox-chat-codex-tool-id` 和 `--sandbox-skill-creator-tool-id` 也只在显式传入时
267-
更新对应环境变量;未传的 Tool ID 保留云上已有值,不会被清空。
240+
Sandbox Tool ID 参数也只在显式传入时更新对应环境变量,包括
241+
`--sandbox-chat-codex-tool-id`、`--sandbox-chat-openclaw-tool-id`、
242+
`--sandbox-chat-hermes-tool-id` 和 `--sandbox-dev-tool-id`;未传的 Tool ID 保留
243+
云上已有值,不会被清空。
268244

269245
### Studio 一键更新
270246

‎frontend/README.md‎

Lines changed: 20 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ server that `veadk frontend` launches — no separate backend.
4242
the normal conversation renderer; leaving the conversation only disconnects
4343
it, so the Agent remains available until the user deletes it. OpenClaw and
4444
Hermes expose their main interface and Terminal through Studio.
45+
- **System information**: open a full page from the account menu to inspect the
46+
Studio version, configured Sandbox Tool IDs, and available Identity user
47+
pools. Resource identifiers remain read-only and require Agent-management
48+
access.
4549
- **AgentKit Skill center**: browse Skill Spaces and their skills with
4650
server-side pagination by region, then inspect the selected Skill content.
4751
- **Automation directory**: browse development and message-channel integrations
@@ -381,50 +385,28 @@ tool or transfer one tree edge at a time until it reaches the selected agent.
381385
The same metadata is attached to the first Google GenAI `Part`, so session
382386
history restores the `/skill` and `@agent` chips after a reload.
383387

384-
### Skill creation mode
388+
### Skill Center
385389

386-
Skill creation uses `doubao-seed-2-0-pro-260215` and
387-
`deepseek-v4-flash-260425` through Ark Responses. The real Ark API key is kept
388-
by AgentKit credential hosting; Studio and the two isolated Sandbox sessions
389-
receive only its revocable gateway ticket. Credentials are never returned to
390-
the browser or copied into per-job Session variables. Studio also rejects
391-
non-HTTPS or non-Volcengine credential relay URLs. Skill creation is limited
392-
to Studio developers and admins.
390+
Studio developers and admins create and optimize Skills from the Skill Center.
391+
Each candidate runs in an isolated session on the shared AgentKit Dev Sandbox,
392+
streams its public activity, validates the generated files, and can then be
393+
previewed, downloaded, or published to AgentKit. Model credentials remain on
394+
the Tool and are never returned to the browser.
393395

394-
After submission, Studio opens both candidate conversations immediately. Each
395-
conversation independently renders public reasoning summaries, tool calls, and
396-
assistant messages returned by the generator. Private chain-of-thought and
397-
credentials never enter the UI. Completed candidates still support preview,
398-
ZIP download, and AgentKit publish.
399-
400-
Configure separate ready AgentKit Tools for Codex, OpenClaw, Hermes, and Skill
401-
creation before starting the server. The Tool IDs are intentionally server-only
402-
and cannot be supplied by the browser:
396+
Local Studio reads the DevEnv Tool ID from `SANDBOX_DEV`. A Volcengine cloud
397+
deployment creates the Dev Sandbox automatically when the ID is omitted, or
398+
uses the Tool supplied through `--sandbox-dev-tool-id`:
403399

404400
```bash
405-
export SANDBOX_CHAT_CODEX=<chat-code-env-tool-id>
406-
export SANDBOX_CHAT_OPENCLAW=<openclaw-env-tool-id>
407-
export SANDBOX_CHAT_HERMES=<hermes-env-tool-id>
408-
export SANDBOX_SKILL_CREATOR=<skill-code-env-tool-id>
409-
veadk frontend --agents-dir examples
401+
export SANDBOX_DEV=<dev-env-tool-id>
402+
veadk studio --agents-dir examples
410403
```
411404

412-
Publishing a generated Skill uses TOS and the AgentKit Skills API. Set
413-
`VEADK_SKILL_CREATOR_TOS_BUCKET`, `VEADK_SKILL_CREATOR_TOS_PREFIX`, and
414-
`VEADK_SKILL_CREATOR_PROJECT_NAME` only when their defaults are unsuitable.
415-
Each candidate session expires after 30 minutes and is deleted immediately when
416-
a job is discarded. Job state lives in Sandbox rather than frontend-process
417-
memory, so polling and downloads continue to work when FaaS requests reach a
418-
different instance.
419-
420-
For local Studio, run the AgentKit `credential-hosting` command and bind its
421-
result to both CodeEnv Tools. A cloud deployment creates both Tools in parallel
422-
when their IDs are omitted. Alternatively, select existing Tools with
423-
`--sandbox-chat-codex-tool-id`, `--sandbox-chat-openclaw-tool-id`,
424-
`--sandbox-chat-hermes-tool-id`, and `--sandbox-skill-creator-tool-id`. The
425-
deploy command obtains the Ark key with the deployer's Volcengine credentials,
426-
stores it through AgentKit credential hosting, and binds only the returned
427-
ticket and relay URL to the Tools:
405+
Each task has its own one-hour DevEnv session. Leaving a running task stops and
406+
releases its session; task state remains in Sandbox so polling can continue
407+
across frontend instances.
408+
409+
Deploy Studio with:
428410

429411
```bash
430412
veadk studio deploy \

‎frontend/SPEC.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ export function ExampleIcon(props: SVGProps<SVGSVGElement>) {
343343
| Agent 选择 | `AgentSelector`、`AgentIdentityIcon` | Sidebar 与输入框可以有独立作用域样式 |
344344
| 会话输入 | `Composer`、`NewChatModeSelector` | 保留 IME、键盘、附件和发送状态行为 |
345345
| 临时会话 | `SandboxLaunchDialog`、`SandboxSession` | 不得复用普通 ADK Session 流程 |
346-
| Skill A/B 创建 | `SkillCreateWorkspace`、`SkillCandidatePane` | 保持双流输出、模型名和预览切换 |
346+
| Skill 创建与优化 | `SkillCenter`、`SkillGenerationWorkspace` | 保持 Dev Sandbox 任务状态、候选切换和发布流程 |
347347
| 工具调用 | `BuiltinToolHeader` 和 `ui/builtin-tools/` | 新内置工具通过 Registry 扩展 |
348348
| 加载文字 | `TextShimmer` | 不得新增独立 Shimmer 实现 |
349349
| Markdown | `Markdown`、`MarkdownPromptEditor` | 外部 Markdown 禁止启用原始 HTML |

‎frontend/server/skills/devenv.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
"""DevEnv-backed Skill creation and optimization workbench for Studio.
1616
17-
This is intentionally additive to the legacy A/B Skill creator. A Skill task
18-
creates its own Session on Studio's shared Dev Sandbox Tool, backed by the
19-
provider-specific development image and kept type-isolated from CodeEnv Tools.
17+
A Skill task creates its own Session on Studio's shared Dev Sandbox Tool,
18+
backed by the provider-specific development image and kept type-isolated from
19+
CodeEnv Tools.
2020
"""
2121

2222
from __future__ import annotations

0 commit comments

Comments
 (0)