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
5 changes: 5 additions & 0 deletions .changeset/bailian-native-deployments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openagentpack/sdk": minor
---

Bailian: implement native Deployment support against the Agent Studio `/deployments` API (create, get, list, update, archive, run, pause/unpause), replacing the previous emulated session expansion. Deployment schedules now run server-side; `user.define_outcome` events and `github_repository` resources are dropped from the deployment payload and surface a warning on plan.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Beta testers can install `@openagentpack/cli@beta`; see the [release guide](./do
| MCP Server | native | native | native | native |
| Memory Store | unsupported | native | native | native |
| Multi-Agent | unsupported | unsupported | native | native |
| Deployment | emulated | native | native | emulated |
| Deployment | native | native | native | emulated |
| Session | native | native | native | native |

The full capability matrix and per-provider differences live in the [Provider reference](./docs/reference/providers.md).
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Beta 用户可以安装 `@openagentpack/cli@beta`;固定版本及切回稳定
| MCP Server | native | native | native | native |
| Memory Store | unsupported | native | native | native |
| Multi-Agent | unsupported | unsupported | native | native |
| Deployment | emulated | native | native | emulated |
| Deployment | native | native | native | emulated |
| Session | native | native | native | native |

完整能力矩阵与各 Provider 差异见 [Provider 参考](./docs/reference/providers.zh-CN.md)。
Expand Down
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/architecture/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ agents state import <address> <remote-id>

Resources (agents, environments, skills…) are **infrastructure** — long-lived, managed by `plan`/`apply`. A **session** is a **runtime** conversation started from an agent. Sessions are managed separately with `agents session` and are not part of the plan/apply lifecycle.

Deployments sit between the two: they are declared as resources but produce runs. On Qoder and Claude they schedule server-side; on Bailian and Volcengine Ark a `deployment run` expands into a session.
Deployments sit between the two: they are declared as resources but produce runs. On Bailian, Qoder, and Claude they schedule server-side; on Volcengine Ark a `deployment run` expands into a session.
2 changes: 1 addition & 1 deletion docs/concepts/agents-as-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Because the declaration is a file, it gets everything a file gets: code review,
- The **agent harness** is the provider-managed layer that wraps a model into an agent: knowledge base, skills, MCP wiring, prompt/instructions, vault, deployment, multi-agent orchestration. These are the customer's portable assets.
- The **agent infra** is the interchangeable execution substrate beneath the harness — the specific provider (Bailian, Qoder, Claude, Volcengine Ark) that runs the agent.

OpenAgentPack's portability claim is that the same harness declaration can target different agent infra. Portability means the *core declaration* is portable and the per-provider **capability contract** is explicit — unsupported facets degrade gracefully (for example, an emulated `Deployment` on Bailian/Volcengine Ark) — not that every feature is identical on every provider.
OpenAgentPack's portability claim is that the same harness declaration can target different agent infra. Portability means the _core declaration_ is portable and the per-provider **capability contract** is explicit — unsupported facets degrade gracefully (for example, an emulated `Deployment` on Volcengine Ark) — not that every feature is identical on every provider.

## What this enables

Expand Down
7 changes: 4 additions & 3 deletions docs/concepts/sessions-and-deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@ How a deployment *runs* depends on the provider's capability tier:
|----------|:--------------:|------------------------------------|
| Claude | native | schedules server-side through the deployments API |
| Qoder | native | creates a deployment run and associated session |
| Bailian, Ark | emulated | expands into a one-shot session at run time |
| Bailian | native | triggers a server-side run through the deployments API |
| Ark | emulated | expands into a one-shot session at run time |

On the emulated providers, scheduling and outcome rubrics are **not** enforced server-side — use external cron/CI for always-on or scheduled runs.
On Ark (the emulated provider), scheduling and outcome rubrics are **not** enforced server-side — use external cron/CI for always-on or scheduled runs.

## The lifecycle in one picture

```text
agents.yaml ──plan/apply──▶ managed resources (agent, environment, …)
└─session create/run──▶ runtime session
└─deployment run──────▶ runtime session (emulated) or scheduled run (native)
└─deployment run──────▶ scheduled run (native) or runtime session (emulated on Ark)
```

Next: [Run sessions](../guides/run-sessions.md) and [Manage deployments](../guides/manage-deployments.md).
2 changes: 1 addition & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ agents destroy
| MCP Server | native | native | native | native |
| Memory Store | unsupported | native | native | native |
| Multi-Agent | unsupported | unsupported | native | native |
| Deployment | emulated | native | native | emulated |
| Deployment | native | native | native | emulated |
| Session | native | native | native | native |

See [Provider reference](./reference/providers.md) for per-provider configuration and notes.
2 changes: 1 addition & 1 deletion docs/guides/configure-an-agent.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ Deployment 是介于「定义」与「运行」之间的声明式中间层。它
- **部署层**(Deployment):声明「用哪个 Agent、带哪些绑定、以什么初始事件和调度运行」。
- **运行层**(Session):一次具体的执行实例。

> Provider 差异:Qoder 和 Claude 原生支持 Deployment(对应平台的 deployments API,可服务端调度);百炼、火山方舟为**模拟**实现——`apply` 只写本地状态(`remote_id` 为 `null`),`agents deployment run` 时展开为一个 Session。详见 [Provider 参考](../reference/providers.zh-CN.md#模拟emulated资源的能力降级)。
> Provider 差异:百炼、Qoder 和 Claude 原生支持 Deployment(对应平台的 deployments API,可服务端调度);火山方舟为**模拟**实现——`apply` 只写本地状态(`remote_id` 为 `null`),`agents deployment run` 时展开为一个 Session。百炼上 `user.define_outcome` 事件和 `github_repository` 资源不在部署 payload 内,plan 时会输出警告。详见 [Provider 参考](../reference/providers.zh-CN.md#原生-deployment-的-payload-裁剪)。

### 定义 Deployment

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/deploy-to-bailian.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ providers:
| Environment, Vault, Skill, Agent, MCP Server, Session | native |
| Memory Store | unsupported |
| Multi-Agent | unsupported |
| Deployment | emulated |
| Deployment | native |

- Skills upload as a zip via the Files API (two-step).
- MCP servers are **official managed servers** referenced by `name` (no vault needed for them).
- `deployment run` expands into a one-shot session; scheduling/outcome rubrics are not enforced server-side.
- Deployments are native: `apply` creates the remote deployment, `schedule` runs server-side (cron + timezone), and `deployment run` triggers a server-side run. `user.define_outcome` events and `github_repository` resources are not part of the deployment payload and surface a warning on plan.

## Minimal agent

Expand Down
8 changes: 5 additions & 3 deletions docs/guides/manage-deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ Qoder deployments may also declare `environment_variables` as a semicolon- or ne
|----------|:--------------:|----------------------------|
| Claude | native | schedules server-side through the deployments API |
| Qoder | native | creates a deployment run and associated session |
| Bailian, Ark | emulated | expands into a one-shot session at run time |
| Bailian | native | triggers a server-side run through the deployments API |
| Ark | emulated | expands into a one-shot session at run time |

On the emulated providers, scheduling and outcome rubrics are **not** enforced server-side — use external cron/CI for always-on or scheduled runs.
On Ark (the emulated provider), scheduling and outcome rubrics are **not** enforced server-side — use external cron/CI for always-on or scheduled runs. On Bailian, `user.define_outcome` events and `github_repository` resources are dropped from the deployment payload and surface a warning on plan.

## Examples

- Native deployment + outcome rubric: [`examples/claude/deployment/`](../../examples/claude/deployment/)
- Native deployment + memory store: [`examples/qoder/deployment/`](../../examples/qoder/deployment/)
- Emulated deployment + file resources: [`examples/bailian/deployment/`](../../examples/bailian/deployment/) and [`examples/ark/deployment/`](../../examples/ark/deployment/)
- Native deployment + file resources: [`examples/bailian/deployment/`](../../examples/bailian/deployment/)
- Emulated deployment + file resources: [`examples/ark/deployment/`](../../examples/ark/deployment/)
2 changes: 1 addition & 1 deletion docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Manage scheduled / triggered deployments.
| `deployment get <name>` | Show a deployment's status and resolved bindings. |
| `deployment pause <name>` | Pause scheduled runs for a native deployment. |
| `deployment unpause <name>` | Resume a paused native deployment. |
| `deployment run <name>` | Trigger a deployment run (native on Qoder/Claude, emulated as a session on Bailian/Volcengine Ark). |
| `deployment run <name>` | Trigger a deployment run (native on Bailian/Qoder/Claude, emulated as a session on Volcengine Ark). |

## `agents memory-store`

Expand Down
6 changes: 3 additions & 3 deletions docs/reference/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ OpenAgentPack targets multiple agent platforms behind one declarative config. Ea
| MCP Server | native | native | native | native | Bailian uses official managed servers referenced by name. |
| Memory Store | unsupported | native | native | native | Qoder, Claude (beta), and Ark adapters implement the complete upstream lifecycle. |
| Multi-Agent | unsupported | unsupported | native | native | Coordinator topology is available on Claude and Volcengine Ark. |
| Deployment | emulated | native | native | emulated | Qoder and Claude use native deployments; Bailian and Ark expand a deployment into a session at `run` time. |
| Deployment | native | native | native | emulated | Bailian, Qoder, and Claude use native deployments; Ark expands a deployment into a session at `run` time. |
| Session | native | native | native | native | Runtime sessions are native on every provider. |

- **native** — the provider supports the feature directly.
Expand All @@ -32,7 +32,7 @@ The resource matrix above answers whether a declaration can be applied. The tabl
|------------------|:-------:|:-----:|:------:|:--------------:|----------------------|
| List agents, environments, and vaults | yes | yes | yes | yes | Powers resource discovery in the Web UI. |
| Export resources to YAML (`sync`) | yes | yes | yes | limited | Ark cannot enumerate skills, so skill export is skipped. |
| Full drift comparison | Environment, Agent | Environment, Agent | no | no | Other supported resources degrade to existence checks; emulated deployments are local state. |
| Full drift comparison | Environment, Agent | Environment, Agent | no | no | Other supported resources degrade to existence checks; deployment content is never compared. |
| List uploaded files | yes | yes | yes | yes | File upload, metadata lookup, and deletion are also implemented by all adapters. |
| Resolve artifact download URL | no | yes | no | no | Qoder exposes a short-lived file content URL. |
| List skills | yes | yes | yes | no | Ark supports lookup by ID, but its adapter cannot enumerate skills. |
Expand All @@ -46,7 +46,7 @@ The resource matrix above answers whether a declaration can be applied. The tabl

### Notable provider-specific behavior

- **Bailian:** skill upload uses the Files API and supports scan-status polling; agent updates create provider-side versions. Official MCP servers are referenced by name.
- **Bailian:** skill upload uses the Files API and supports scan-status polling; agent updates create provider-side versions. Official MCP servers are referenced by name. Deployments are native, with server-side cron schedules, manual runs, and pause/unpause.
- **Qoder:** tool names are translated from the lowercase config vocabulary to PascalCase. Session sends return a cursor, enabling resumable event consumption. Deployments are native and support manual or scheduled runs.
- **Claude:** deployments are native, including their server-side lifecycle. It is currently the only adapter that downloads remote skill packages during `sync`.
- **Volcengine Ark:** skills are create + get + attach only in the API behavior verified by this project. Updates re-upload a new skill; list and in-place update are unavailable; deletion is best-effort. Deployment is emulated as a session.
Expand Down
33 changes: 25 additions & 8 deletions docs/reference/providers.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ OpenAgentPack 通过 Provider 适配器与不同的 AI Agent 平台交互。每
| MCP Server | native | native | native | native | 通过 Agent 的 MCP 配置挂载 |
| Memory Store | unsupported | native | native | native | Qoder、Claude(beta)、方舟均已接入 |
| Multi-Agent | unsupported | unsupported | native | native | Claude 与 火山方舟 支持 coordinator |
| Deployment | emulated | native | native | emulated | Qoder 和 Claude 使用原生 Deployment;百炼和火山方舟在 `run` 时展开为 Session |
| Deployment | native | native | native | emulated | 百炼、Qoder 和 Claude 使用原生 Deployment;火山方舟在 `run` 时展开为 Session |
| Session | native | native | native | native | 四者均原生支持 |

### Adapter 实现能力对照表
Expand All @@ -45,7 +45,7 @@ OpenAgentPack 通过 Provider 适配器与不同的 AI Agent 平台交互。每
|----------------|:----:|:-----:|:------:|:--------:|----------|
| 枚举 Agent、Environment、Vault | yes | yes | yes | yes | 用于 Web UI 的云端资源发现 |
| 导出资源到 YAML(`sync`) | yes | yes | yes | limited | 方舟无法枚举 Skill,因此会跳过 Skill 导出 |
| 完整 Drift 内容比较 | Environment、Agent | Environment、Agent | no | no | 其他已支持资源降级为存在性检查;模拟 Deployment 仅有本地状态 |
| 完整 Drift 内容比较 | Environment、Agent | Environment、Agent | no | no | 其他已支持资源降级为存在性检查;Deployment 不比较内容 |
| 枚举已上传文件 | yes | yes | yes | yes | 四个 Adapter 也都实现上传、元数据查询和删除 |
| 获取产物下载 URL | no | yes | no | no | Qoder 可返回短期有效的文件内容 URL |
| 枚举 Skill | yes | yes | yes | no | 方舟可按 ID 查询,但当前无法枚举 |
Expand All @@ -59,7 +59,7 @@ OpenAgentPack 通过 Provider 适配器与不同的 AI Agent 平台交互。每

#### Provider 特有实现与限制

- **百炼**:Skill 通过 Files API 上传并支持扫描状态轮询;Agent 更新会生成平台侧版本;官方 MCP Server 按名称引用。
- **百炼**:Skill 通过 Files API 上传并支持扫描状态轮询;Agent 更新会生成平台侧版本;官方 MCP Server 按名称引用;Deployment 为原生资源,支持服务端 cron 调度、手动触发和暂停/恢复
- **Qoder**:配置中的小写工具名会转换为 PascalCase;Session 发送返回游标,可恢复事件消费;Deployment 为原生资源,支持手动或定时运行。
- **Claude**:Deployment 是原生资源,具有服务端生命周期;当前只有 Claude Adapter 会在 `sync` 时下载远端 Skill 包。
- **火山方舟**:经本项目验证的 Skill API 行为仅支持创建、按 ID 查询和挂载。更新会重新上传,无法枚举和原地更新,删除为 best-effort;Deployment 由 Session 模拟。
Expand Down Expand Up @@ -113,7 +113,7 @@ OpenAgentPack 通过 Provider 适配器与不同的 AI Agent 平台交互。每
| Skill | existence | existence | existence | existence | 可发现缺失/删除,不比较包内容 |
| Vault | existence | existence | existence | existence | 凭证内容通常不可读回,不比较内容 |
| Memory Store | unsupported | existence | existence | existence | 可发现资源缺失 |
| Deployment | unsupported | native | native 路径待验证 | unsupported | 百炼和火山方舟的 emulated Deployment 为本地记录 |
| Deployment | unsupported | native | native 路径待验证 | unsupported | 百炼 Deployment 为原生资源但不比较内容;火山方舟的 emulated Deployment 仅为本地记录 |

Claude 的 drift detection 接口路径已预留;本仓库中的 live baseline 因 Anthropic API 账号余额不足未完成 Agent 创建验证。

Expand All @@ -139,7 +139,7 @@ qoder.multiagent.unsupported:

### 模拟(emulated)资源的能力降级

`emulated` 等级表示 Provider 没有对应的原生原语,OpenAgentPack 通过其他原语间接实现。Deployment 在百炼和火山方舟上为模拟实现:`apply` 时**不调用**部署 API(状态记录的 `remote_id` 为 `null`),而是在 `agents deployment run` 时展开为一个 Session 并回放 `initial_events`。
`emulated` 等级表示 Provider 没有对应的原生原语,OpenAgentPack 通过其他原语间接实现。Deployment 在火山方舟上为模拟实现:`apply` 时**不调用**部署 API(状态记录的 `remote_id` 为 `null`),而是在 `agents deployment run` 时展开为一个 Session 并回放 `initial_events`。

部分子特性在 emulated Provider 上无法在服务端执行。`plan`/`apply` 阶段会输出**警告**(不阻断部署),`run` 时尽力降级:

Expand All @@ -153,13 +153,30 @@ qoder.multiagent.unsupported:
示例诊断输出:

```
bailian.deployment.schedule_unsupported
Resource: deployment.daily-report (bailian)
ark.deployment.schedule_unsupported
Resource: deployment.daily-report (ark)
Schedules are not enforced server-side on this provider; trigger runs via external cron/CI.

⚠ ark.deployment.define_outcome_unsupported
Resource: deployment.daily-report (ark)
Outcome rubrics (user.define_outcome) are not enforced server-side on this provider; the run executes without rubric grading.
```

### 原生 Deployment 的 payload 裁剪

百炼 Deployment 是原生资源,但其 payload 比 OpenAgentPack 的中立声明更窄:`initial_events` 只承载消息,`resources` 只接受文件。被丢弃的字段会在 `plan`/`apply` 阶段输出**警告**:

| 子特性 | 百炼行为 | 替代建议 |
|--------|----------|---------|
| `initial_events` 中的 `user.define_outcome` | 从 payload 中丢弃,不做结果评分 | 将要求写入 `user.message` / `system.message` |
| `resources` 中的 `github_repository` | 从 payload 中丢弃 | 在 Session 内克隆仓库 |

示例诊断输出:

```
⚠ bailian.deployment.define_outcome_unsupported
Resource: deployment.daily-report (bailian)
Outcome rubrics (user.define_outcome) are not enforced server-side on this provider; the run executes without rubric grading.
Outcome rubrics (user.define_outcome) are dropped from the Bailian deployment payload; the run executes without rubric grading.
```

## Provider 配置
Expand Down
Loading