Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ between this live metadata and control-plane information without exposing prompt
or credentials. The same metadata advertises mounted smart-search sources, so
Studio can disable unavailable sources up front and query the Agent's web-search
tool, KnowledgeBase, or long-term memory without exposing component credentials.
Studio also provides an isolated Insight Sandbox for temporary Codex
conversations. It reuses a dedicated AgentKit CodeEnv tool, creates a fresh
user-owned Sandbox session, and deletes that session on exit without adding the
conversation to normal Studio history. Reloading may create another temporary
session; AgentKit reclaims abandoned sessions automatically when their TTL ends.
When configuring skills, Studio can also browse account-scoped AgentKit Skill
Spaces and their paginated skill lists by region and project. These requests are
signed on the server, so browser clients never receive Volcengine credentials.

The Studio deployment flow lists Feishu, knowledge-base, short-/long-term
memory, and observability settings in their feature sections. Values entered
Expand Down Expand Up @@ -198,13 +206,17 @@ VeADK provides several useful command line tools for faster deployment and optim
`--region`, automatically locate the Identity user pool across Beijing and
Shanghai, and select the VeFaaS project with `--project` (default `default`);
custom local or remote logo images are bundled into the deployment; the
deployed client skips the second OAuth consent confirmation after login
deployed client skips the second OAuth consent confirmation after login;
two dedicated AgentKit CodeEnv Tools are created automatically for temporary
chats and Skill creation unless their IDs are supplied with
`--sandbox-chat-codex-tool-id` and `--sandbox-skill-creator-tool-id`
- `veadk studio update --vefaas-app-name <app-name>`: build the frontend from a
local VeADK source checkout and release it through the existing VeFaaS
Application and Function. Omit `--region` and `--project` to search Beijing,
Shanghai, and all visible projects. Existing URL, SSO, IAM, gateway,
environment variables, title, and logo are preserved; pass `--site-title` or
`--site-logo` only when those branding values should be replaced
`--site-logo` only when those branding values should be replaced. Sandbox Tool
IDs are also preserved unless the corresponding deploy option is supplied

Studio can assign comma-separated local usernames or OAuth emails to the
`admin` and `developer` roles:
Expand Down
91 changes: 90 additions & 1 deletion docs/content/docs/framework/frontend.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,28 @@ VeADK ships a React frontend that renders [A2UI](/en/docs/framework/a2ui) (agent
and replay both user and model media from history. Chat images use compact
thumbnails and open in a zoomable full-screen viewer.
- **Skill and sub-agent invocation**: type `/` to select a mounted skill or `@` to route the turn to an eligible sub-agent.
- **New-chat modes**: retain the Agent conversation path, start a temporary
Codex Agent conversation in an AgentKit Sandbox, or generate two real Skill
candidates in isolated AgentKit CodeEnv sessions for comparison, ZIP
download, and AgentKit publishing.
- **Agent picker**: switch agents from the top-left; long lists scroll within
the viewport, and hovering an agent shows its model and mounted tools.
- **Session history**: auto-saved, time-sorted, reopen or delete.
- **Temporary session**: start an isolated temporary AgentKit Sandbox from the
new-chat composer. Studio reuses its dedicated CodeEnv tool,
creates a fresh user-owned Sandbox session, and runs multi-turn Codex chat
with live public reasoning summaries, commands, file changes, MCP calls, and
final replies.
Exiting deletes the cloud session without writing it to normal chat history;
after a reload, users can start another session and AgentKit reclaims the
abandoned session automatically when its TTL ends.
- **Smart search**: the *Session* source full-text-searches the current agent's history; the *Web* source calls the agent's mounted web-search tool live (using credentials from the server's environment variables).
- **Add an AgentKit agent**: paste a URL + API key to connect a remote agent over the ADK protocol; it then appears in the picker.
- **Custom-agent workbench**: author system prompts in a rich Markdown editor
with heading and list shortcuts. Local skills accept a dropped folder or ZIP
and detect the format automatically. Then debug the agent beside its configuration.
and detect the format automatically. You can also browse account-scoped
AgentKit Skill Spaces and their skills by region and project. Then debug the
agent beside its configuration.
Initialization, session, and conversation failures show credential-redacted
error details and Runner logs that can be expanded and copied. The deployment
page shows the Agent topology on the left, with hover details, configuration
Expand All @@ -45,6 +59,14 @@ credentials to local debug runs and deployed AgentKit runtimes, allowing VeADK
to resolve Ark, embedding, media, speech, VeSearch, and APMPlus keys without
asking for them again.

Insight Sandbox requires server-side `VOLCENGINE_ACCESS_KEY`,
`VOLCENGINE_SECRET_KEY`, `MODEL_AGENT_API_KEY`, and `MODEL_AGENT_NAME` values.
Volcengine credentials, model credentials, and the authorized Sandbox endpoint
remain on the Studio server and are never returned to the browser.
Temporary Sandbox state is process-local. Run Studio with one server process,
or configure session affinity so create, message, and exit requests from one
browser reach the same instance.

When the Feishu channel is enabled or disabled on the deployment page, Studio
regenerates the project so `app.py`, the `extensions` dependency, and runtime
environment variables stay aligned before deployment.
Expand Down Expand Up @@ -146,6 +168,70 @@ 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
hosting keeps the real Ark API key; Studio and Sandbox receive only its
revocable gateway ticket. Per-job Session variables cannot override that
hosted ticket, and Studio accepts only Volcengine HTTPS credential relay URLs.
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` CodeEnv Tools for
temporary chats and Skill creation:

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

For local Studio, run the AgentKit `credential-hosting` command and choose to
write its result into 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.

| Environment variable | Default | Description |
| :-- | :-- | :-- |
| `SANDBOX_CHAT_CODEX` | — | AgentKit CodeEnv Tool ID dedicated to temporary chats. |
| `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 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`. AgentKit credential hosting stores the Ark
credential in KMS and binds only the relay URL and revocable ticket to both
Tools. The VeFaaS Function receives only Tool IDs, never model credentials:

```bash
veadk studio deploy \
--user-pool-id <pool-id> \
--allowed-client-id <client-id> \
--vefaas-app-name <app-name>
```

### Custom Studio branding

Use `--site-title` for a system name of up to six characters and `--site-logo`
Expand Down Expand Up @@ -199,6 +285,9 @@ and `--site-logo` replace cloud branding only when explicitly provided;
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` and `--sandbox-skill-creator-tool-id` likewise
replace only the explicitly supplied environment value. Omitting either option
keeps that Tool ID from the deployed Function instead of clearing it.

When deployment registers the callback URL, it keeps the VeIdentity login page
enabled and enables skip-consent for that client. This avoids showing a second
Expand Down
71 changes: 70 additions & 1 deletion docs/content/docs/framework/frontend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@ VeADK 自带一个 React 前端,用于渲染智能体经由 Google ADK API Ser
- **多模态消息**:上传图片、TXT/Markdown、PDF 与视频;用户附件和模型返回的媒体均支持预览与历史回放。
对话中的图片默认以紧凑尺寸展示,点击后可全屏缩放预览。
- **技能与子 Agent 调用**:在输入框输入 `/` 选择挂载技能,输入 `@` 将本轮交给可选的子 Agent。
- **新会话模式**:保留 Agent 对话模式;临时会话会在 AgentKit Sandbox 中启动 Codex Agent;Skill 创建模式会在两个独立的 AgentKit CodeEnv Session 中使用固定模型做真实 A/B 生成,完成后可对比、下载 ZIP 或添加到 AgentKit。
- **Agent 选择器**:左上角切换 agent;长列表在视口内独立滚动,悬停可查看该 agent 的模型与挂载的工具。
- **历史会话**:自动保存、按时间排序,可重新打开或删除。
- **临时会话**:从新会话输入框启动独立的 AgentKit 沙箱临时会话。
Studio 会复用专属 CodeEnv Tool、为当前用户创建全新的 Sandbox Session,并通过
Codex 进行多轮对话,实时展示公开思考摘要、命令、文件修改、MCP 调用和最终回复。
退出后云端 Session 会被删除,内容不会写入普通历史会话;
页面刷新后可直接新建,遗留 Session 由 AgentKit 在 TTL 到期后自动回收。
- **智能搜索**:「会话」源在当前 agent 的历史消息中做全文检索;「网页」源调用该 agent 挂载的联网搜索工具实时检索(使用服务端环境变量里的凭据)。
- **添加 AgentKit 智能体**:填入访问地址 + API Key,按 ADK 协议接入远程 agent,接入后出现在选择器中。
- **自定义 Agent 工作台**:系统提示词支持所见即所得的 Markdown
编辑与标题、列表等快捷输入;本地技能可直接拖入文件夹或 ZIP,格式会自动识别。
编辑与标题、列表等快捷输入;本地技能可直接拖入文件夹或 ZIP,格式会自动识别,
也可按地域和项目浏览账号下的 AgentKit Skill Space 及其中的技能。
完成配置后可在同页调试。调试初始化、
会话或对话失败时会展示经过凭据脱敏的具体错误和 Runner 日志,
并支持展开与复制。部署页左侧展示 Agent 拓扑,悬停可核对节点信息与配置,
Expand All @@ -39,6 +46,13 @@ VeADK 自带一个 React 前端,用于渲染智能体经由 Google ADK API Ser
VeADK 会据此获取 Ark、Embedding、图像、视频、语音、VeSearch 和 APMPlus 的
API Key,挂载组件时无需重复填写。

“灵光一现”需要 Studio 服务端配置 `VOLCENGINE_ACCESS_KEY`、
`VOLCENGINE_SECRET_KEY`、`MODEL_AGENT_API_KEY` 和 `MODEL_AGENT_NAME`。
火山引擎凭证、模型凭证以及带授权信息的 Sandbox Endpoint 始终保留在服务端,
不会返回浏览器。
临时沙箱状态保存在 Studio 进程内;部署时应使用单个服务进程,或配置会话亲和,
确保同一浏览器的创建、对话和退出请求到达同一个实例。

在部署页打开或关闭飞书渠道时,Studio 会重新生成项目,确保 `app.py`、
`extensions` 依赖和运行时环境变量在部署前保持一致。

Expand Down Expand Up @@ -134,6 +148,59 @@ 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 使用。

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

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

```bash
export SANDBOX_CHAT_CODEX=<chat-code-env-tool-id>
export SANDBOX_SKILL_CREATOR=<skill-code-env-tool-id>
veadk frontend --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 请求命中不同实例时仍可继续轮询和下载。

云上首次部署时,若没有指定 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,不接收模型凭据:

```bash
veadk studio deploy \
--user-pool-id <pool-id> \
--allowed-client-id <client-id> \
--vefaas-app-name <app-name>
```

### 自定义 Studio 品牌

使用 `--site-title` 设置不超过 6 个字符的系统名称,使用
Expand Down Expand Up @@ -179,6 +246,8 @@ 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 保留云上已有值,不会被清空。

部署注册回调地址时会保留 VeIdentity 登录页,并为该客户端开启跳过授权确认,
避免用户登录后再次确认授权。
Expand Down
Loading
Loading