Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 17 additions & 61 deletions docs/content/docs/framework/frontend.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -187,71 +187,27 @@ After selecting a sub-agent, the `/` menu shows skills mounted on that target. C

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.

### Skill creation mode

The new-chat **Skill creation** mode runs
`doubao-seed-2-0-pro-260215` and `deepseek-v4-flash-260425` in parallel through
Ark Responses. Each candidate gets an independent AgentKit CodeEnv session.
The server validates the generated directory name, `SKILL.md` frontmatter,
file count, size, and safe paths before packaging a ZIP. AgentKit credential
configuration resolves the Ark API key with the deployer's AK/SK and writes it
directly to each dedicated CodeEnv Tool. Per-job Session variables cannot
override the Tool's model credential. Model credentials are never returned to
the browser, and the Skill creation APIs require the Studio developer or admin
role.

After submission, both candidate conversations appear immediately and
independently render public reasoning summaries, tool calls, and assistant
messages returned by the generator. Private chain-of-thought and credentials
never enter the page. Completed candidates still support preview, ZIP download,
and AgentKit publishing. Once the real job ID is available, the frontend resumes
polling directly from Sandbox state. An interrupted creation stream or a brief
AgentKit control-plane delay no longer turns an intermediate state into an
expired job.

Before starting a local server, configure separate `Ready` AgentKit Tools for
Codex, OpenClaw, Hermes, and Skill creation:
### Skill Center

Studio developers and admins create and optimize Skills from the Skill Center.
Each candidate runs in an isolated DevEnv session on the shared Dev Sandbox
Tool, streams public activity, and validates the generated files. Valid results
can be previewed, downloaded, or published to AgentKit. Model credentials remain
on the Tool and are never returned to the browser.

Local Studio reads the DevEnv Tool ID from `SANDBOX_DEV`:

```bash
export SANDBOX_CHAT_CODEX=<chat-code-env-tool-id>
export SANDBOX_CHAT_OPENCLAW=<openclaw-env-tool-id>
export SANDBOX_CHAT_HERMES=<hermes-env-tool-id>
export SANDBOX_SKILL_CREATOR=<skill-code-env-tool-id>
veadk frontend --agents-dir examples
export SANDBOX_DEV=<dev-env-tool-id>
veadk studio --agents-dir examples
```

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

| Environment variable | Default | Description |
| :-- | :-- | :-- |
| `SANDBOX_CHAT_CODEX` | — | AgentKit CodeEnv Tool ID dedicated to temporary chats. |
| `SANDBOX_CHAT_OPENCLAW` | — | AgentKit ArkClawEnv Tool ID used by OpenClaw agents. |
| `SANDBOX_CHAT_HERMES` | — | AgentKit HermesEnv Tool ID used by Hermes agents. |
| `SANDBOX_SKILL_CREATOR` | — | AgentKit CodeEnv Tool ID dedicated to Skill creation. |
| `VEADK_SKILL_CREATOR_TOS_BUCKET` | AgentKit account default | TOS bucket used for published artifacts. |
| `VEADK_SKILL_CREATOR_TOS_PREFIX` | `agentkit/skills` | TOS object-key prefix. |
| `VEADK_SKILL_CREATOR_PROJECT_NAME` | — | Project name used when creating a Skill. |

Candidate sessions have a 30-minute TTL and are deleted immediately when the
user starts over or leaves the job. Job state is stored in Sandbox rather than
frontend-process memory, so polling and downloads continue to work when FaaS
requests reach different instances.

On the first cloud deployment, the command creates two independent CodeEnv
Tools in parallel with the deployer's AK/SK when Tool IDs are omitted. Existing
Tools can be selected with `--sandbox-chat-codex-tool-id` and
`--sandbox-skill-creator-tool-id`. The Ark credential is resolved with the
deployer's AK/SK and written directly to both Tools as model environment
variables. Sandbox sessions inherit those Tool variables. The browser and
VeFaaS Function receive only Tool IDs, never model credentials.

If Tool or model-credential provisioning fails, the CLI prints the underlying
error verbatim, including its original line breaks, after redacting credential
values. Use the service action, error code, request ID, and request details to
identify the missing permission or account resource.
A Volcengine cloud deployment creates the Dev Sandbox when no Tool ID is
provided, or uses an existing Tool selected with `--sandbox-dev-tool-id`.

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

Expand Down
56 changes: 16 additions & 40 deletions docs/content/docs/framework/frontend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -160,51 +160,25 @@ veadk frontend --agents-dir examples

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

### Skill 创建模式
### 技能中心

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

提交需求后会立即显示两个候选对话流,各自持续渲染生成器返回的公开思考摘要、工具
调用和助手回复。私有思维链和凭据不会进入页面。候选完成后仍可预览、下载 ZIP 或
添加到 AgentKit。前端拿到真实任务 ID 后会直接从 Sandbox 状态恢复轮询;创建流中断
或 AgentKit 控制面短暂未发现新 Session 时,不会把中间状态误判为任务过期。

本地启动前需要分别配置临时会话和 Skill 创建使用的两个 `Ready` CodeEnv Tool:
本地 Studio 从 `SANDBOX_DEV` 读取 DevEnv Tool ID:

```bash
export SANDBOX_CHAT_CODEX=<chat-code-env-tool-id>
export SANDBOX_SKILL_CREATOR=<skill-code-env-tool-id>
veadk frontend --agents-dir examples
export SANDBOX_DEV=<dev-env-tool-id>
veadk studio --agents-dir examples
```

本地运行前使用 AgentKit 的 `credential-hosting` 命令,并将结果分别写入上述 CodeEnv
Tool。添加到 AgentKit 时,服务端会先将
ZIP 上传到 TOS,再调用 Skills API 创建或更新 Skill;只有用户填写 SkillSpace ID
时才发布到对应空间。以下变量均为可选覆盖项:

| 环境变量 | 默认值 | 说明 |
| :-- | :-- | :-- |
| `SANDBOX_CHAT_CODEX` | — | 临时会话专用 AgentKit CodeEnv Tool ID。 |
| `SANDBOX_SKILL_CREATOR` | — | Skill 创建专用 AgentKit CodeEnv Tool ID。 |
| `VEADK_SKILL_CREATOR_TOS_BUCKET` | AgentKit 账户默认 Bucket | 发布产物使用的 TOS Bucket。 |
| `VEADK_SKILL_CREATOR_TOS_PREFIX` | `agentkit/skills` | TOS 对象 Key 前缀。 |
| `VEADK_SKILL_CREATOR_PROJECT_NAME` | — | 创建 Skill 时使用的项目名称。 |

候选 Session 的 TTL 为 30 分钟,用户重新创建或离开任务时会立即清理。任务状态保存
在 Sandbox 而非 Frontend 进程内存,因此 FaaS 请求命中不同实例时仍可继续轮询和下载。
每个任务的 DevEnv Session 最长保留 1 小时。离开仍在运行的任务时,Studio 会停止并
释放对应 Session;任务状态保存在 Sandbox 中,因此前端实例切换后仍可继续轮询。

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

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

### Studio 一键更新

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

### Skill creation mode
### Skill Center

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

After submission, Studio opens both candidate conversations immediately. Each
conversation independently renders public reasoning summaries, tool calls, and
assistant messages returned by the generator. Private chain-of-thought and
credentials never enter the UI. Completed candidates still support preview,
ZIP download, and AgentKit publish.

Configure separate ready AgentKit Tools for Codex, OpenClaw, Hermes, and Skill
creation before starting the server. The Tool IDs are intentionally server-only
and cannot be supplied by the browser:
Local Studio reads the DevEnv Tool ID from `SANDBOX_DEV`. A Volcengine cloud
deployment creates the Dev Sandbox automatically when the ID is omitted, or
uses the Tool supplied through `--sandbox-dev-tool-id`:

```bash
export SANDBOX_CHAT_CODEX=<chat-code-env-tool-id>
export SANDBOX_CHAT_OPENCLAW=<openclaw-env-tool-id>
export SANDBOX_CHAT_HERMES=<hermes-env-tool-id>
export SANDBOX_SKILL_CREATOR=<skill-code-env-tool-id>
veadk frontend --agents-dir examples
export SANDBOX_DEV=<dev-env-tool-id>
veadk studio --agents-dir examples
```

Publishing a generated Skill uses TOS and the AgentKit Skills API. Set
`VEADK_SKILL_CREATOR_TOS_BUCKET`, `VEADK_SKILL_CREATOR_TOS_PREFIX`, and
`VEADK_SKILL_CREATOR_PROJECT_NAME` only when their defaults are unsuitable.
Each candidate session expires after 30 minutes and is deleted immediately when
a job is discarded. Job state lives in Sandbox rather than frontend-process
memory, so polling and downloads continue to work when FaaS requests reach a
different instance.

For local Studio, run the AgentKit `credential-hosting` command and bind its
result to both CodeEnv Tools. A cloud deployment creates both Tools in parallel
when their IDs are omitted. Alternatively, select existing Tools with
`--sandbox-chat-codex-tool-id`, `--sandbox-chat-openclaw-tool-id`,
`--sandbox-chat-hermes-tool-id`, and `--sandbox-skill-creator-tool-id`. The
deploy command obtains the Ark key with the deployer's Volcengine credentials,
stores it through AgentKit credential hosting, and binds only the returned
ticket and relay URL to the Tools:
Each task has its own one-hour DevEnv session. Leaving a running task stops and
releases its session; task state remains in Sandbox so polling can continue
across frontend instances.

Deploy Studio with:

```bash
veadk studio deploy \
Expand Down
2 changes: 1 addition & 1 deletion frontend/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export function ExampleIcon(props: SVGProps<SVGSVGElement>) {
| Agent 选择 | `AgentSelector`、`AgentIdentityIcon` | Sidebar 与输入框可以有独立作用域样式 |
| 会话输入 | `Composer`、`NewChatModeSelector` | 保留 IME、键盘、附件和发送状态行为 |
| 临时会话 | `SandboxLaunchDialog`、`SandboxSession` | 不得复用普通 ADK Session 流程 |
| Skill A/B 创建 | `SkillCreateWorkspace`、`SkillCandidatePane` | 保持双流输出、模型名和预览切换 |
| Skill 创建与优化 | `SkillCenter`、`SkillGenerationWorkspace` | 保持 Dev Sandbox 任务状态、候选切换和发布流程 |
| 工具调用 | `BuiltinToolHeader` 和 `ui/builtin-tools/` | 新内置工具通过 Registry 扩展 |
| 加载文字 | `TextShimmer` | 不得新增独立 Shimmer 实现 |
| Markdown | `Markdown`、`MarkdownPromptEditor` | 外部 Markdown 禁止启用原始 HTML |
Expand Down
6 changes: 3 additions & 3 deletions frontend/server/skills/devenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

"""DevEnv-backed Skill creation and optimization workbench for Studio.

This is intentionally additive to the legacy A/B Skill creator. A Skill task
creates its own Session on Studio's shared Dev Sandbox Tool, backed by the
provider-specific development image and kept type-isolated from CodeEnv Tools.
A Skill task creates its own Session on Studio's shared Dev Sandbox Tool,
backed by the provider-specific development image and kept type-isolated from
CodeEnv Tools.
"""

from __future__ import annotations
Expand Down
Loading
Loading