Merge pull request #6208 from deepseek-harness/topic/agent-team-prompt
feat(agent-team): simplify team availability prompt
This commit is contained in:
commit
4e4ac0eae8
9 files changed
+21
-23
No files matched your search
@@ -9,8 +9,8 @@
|
||||
en: bab62798c2dc07b4
|
||||
zh: fe42c5abf9127d37
|
||||
/agent-note-durable-agent-teams-over-continuable-children/decision:
|
||||
en: 95e7d723d6b00930
|
||||
zh: d18fdf9b2bf69bdb
|
||||
en: 35650a30529c01f8
|
||||
zh: 4f9ee01b568d2fed
|
||||
/agent-note-durable-agent-teams-over-continuable-children/profile-delegation:
|
||||
en: 4835fb8c0c0d8a0d
|
||||
zh: 5f9438a0d58104c4
|
||||
|
||||
@@ -16,7 +16,7 @@ Agent Teams needs an explicit opt-in composition while its public contracts rema
|
||||
|
||||
Every ordinary runtime root is the implicit Lead of a Team identified by that root's `SessionId`. The Team has no creation event: its Lead pseudo-row exists by identity, while durable state begins with the first member, message, or task event. A roster is flat and contains at most the configured number of immutable lowercase-kebab-case names. Each teammate is a continuable direct child with a reserved Session id; only the Lead creates or interrupts teammates. Ordinary provider-owned subagents outside the roster are not Team members, and an ordinary fork is a new root whose inherited Team records are excluded by their ancestor `TeamId`.
|
||||
|
||||
The implementation is split into `@deepseek-ai/dsh-experimental-agent-team`, which owns `ctx.agentTeams` and durable semantics, and `@deepseek-ai/dsh-experimental-tool-agent-team`, which owns scoped schemas and model guidance. Every Team tool declares its complete result schema and renders that value as compact JSON, so the compiler checks each `execute` against what the model is promised and no result spends tokens on indentation. Deployments mount both plugins explicitly and may disable legacy continuable controls with the same model-visible names. The explicit delegation policy permits Team creation only when the user asks for Agent Teams or teammates. Both packages are public members of `packages/experimental/`; the [experimental package reference](../../../../packages/experimental/AGENTS.md) owns publication, dependency isolation, and promotion.
|
||||
The implementation is split into `@deepseek-ai/dsh-experimental-agent-team`, which owns `ctx.agentTeams` and durable semantics, and `@deepseek-ai/dsh-experimental-tool-agent-team`, which owns scoped schemas and model guidance. Every Team tool declares its complete result schema and renders that value as compact JSON, so the compiler checks each `execute` against what the model is promised and no result spends tokens on indentation. Deployments mount both plugins explicitly and may disable legacy continuable controls with the same model-visible names. The shared policy announces Team availability and describes coordination responsibilities. Both packages are public members of `packages/experimental/`; the [experimental package reference](../../../../packages/experimental/AGENTS.md) owns publication, dependency isolation, and promotion.
|
||||
|
||||
The Lead must wait for required work before its final answer. Process teardown remains the final lifecycle owner and drains continuation Activations; a Team task owner is durable state and is not automatically released by idle, interruption, or process exit.
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Agent Teams 的公开约定仍处于实验阶段,因此需要显式启用的
|
||||
|
||||
每个普通运行时 Root 都是一个隐式 Team 的 Lead,Team id 等于该 Root 的 `SessionId`。Team 没有 creation event:Lead pseudo-row 由身份直接存在,持久状态从第一条 member、message 或 task event 开始。roster 是扁平结构,最多包含配置数量、不可变且采用小写 kebab-case 的名字。每个 teammate 都是使用预留 Session id 的 continuable 直接 child;只有 Lead 可以创建或 interrupt teammate。roster 外由 provider 管理的普通 subagent 不是 Team member;普通 fork 是新的 Root,继承的 Team 记录会因 ancestor `TeamId` 被排除。
|
||||
|
||||
实现拆分为 `@deepseek-ai/dsh-experimental-agent-team` 与 `@deepseek-ai/dsh-experimental-tool-agent-team`:前者负责 `ctx.agentTeams` 和持久语义,后者负责 scoped schema 与模型指引。每个 Team 工具都声明完整的结果 schema,并把该值渲染为紧凑 JSON,因此编译器会检查每个 `execute` 是否符合对模型的承诺,也没有结果把 token 花在缩进上。部署显式挂载两个插件,并可禁用具有相同模型可见名称的旧 continuable control。显式 delegation 策略只允许在用户要求 Agent Teams 或 teammate 时创建 Team。两个包都是 `packages/experimental/` 的公开成员;[实验性包参考](../../../../packages/experimental/AGENTS.md)负责发布、依赖隔离与 promotion。
|
||||
实现拆分为 `@deepseek-ai/dsh-experimental-agent-team` 与 `@deepseek-ai/dsh-experimental-tool-agent-team`:前者负责 `ctx.agentTeams` 和持久语义,后者负责 scoped schema 与模型指引。每个 Team 工具都声明完整的结果 schema,并把该值渲染为紧凑 JSON,因此编译器会检查每个 `execute` 是否符合对模型的承诺,也没有结果把 token 花在缩进上。部署显式挂载两个插件,并可禁用具有相同模型可见名称的旧 continuable control。共享策略声明 Team 可用,并说明协调责任。两个包都是 `packages/experimental/` 的公开成员;[实验性包参考](../../../../packages/experimental/AGENTS.md)负责发布、依赖隔离与 promotion。
|
||||
|
||||
Lead 必须等待所需工作后才能给出最终答案。进程 teardown 仍是最终生命周期 owner,并会 drain continuation Activation;Team task owner 是持久状态,不会因 idle、interrupt 或进程退出自动释放。
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
en: 0b01a243291821bc
|
||||
zh: 0dadd38d709ae9bd
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/summary:
|
||||
en: 0cce9e5ec6d1946a
|
||||
zh: 6bc76243f494815c
|
||||
en: cb426055b46b381e
|
||||
zh: dc29d823d44f0c5e
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/table-of-contents:
|
||||
en: d152484eb41ac6b4
|
||||
zh: 09388d293f9be9cb
|
||||
@@ -18,8 +18,8 @@
|
||||
en: 5a56781cb7bf4d3b
|
||||
zh: 74df21efd6321afd
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/use-this-package/when-to-choose-it:
|
||||
en: 5261677934ea6e71
|
||||
zh: a8bafd94d2b293ec
|
||||
en: 60ea90ce57cca56f
|
||||
zh: 181e48b7d4dcf755
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/use-this-package/smallest-working-example:
|
||||
en: 9af650a79711b3b3
|
||||
zh: 2930360011b544e0
|
||||
@@ -54,8 +54,8 @@
|
||||
en: 8e1e365ff3b0dfb2
|
||||
zh: c6c91fbf1e1df934
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/model-experience/team-policy-and-tools/what-the-model-sees:
|
||||
en: 8887cc2b9eab8738
|
||||
zh: 892c17ae0613000a
|
||||
en: e8687e69bcdf411d
|
||||
zh: 84480d4dd33cf339
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/model-experience/team-policy-and-tools/token-effect:
|
||||
en: 3f49674f937a8ca3
|
||||
zh: 79d34d605732abb1
|
||||
@@ -63,8 +63,8 @@
|
||||
en: 2ba143e89873e768
|
||||
zh: 4f09446c0fb13cdb
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/known-limitations-and-deferred-work:
|
||||
en: 0fb9ccc715a43f3a
|
||||
zh: baf04d4b1cf2a7f6
|
||||
en: 945184aa77ac76dd
|
||||
zh: 620b07948615a019
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/known-limitations-and-deferred-work/dev-note:
|
||||
en: e67f633dc6fe7773
|
||||
zh: 3bb0c20c93f16f98
|
||||
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
||||
|
||||
## Summary
|
||||
|
||||
This package lets the model create named teammates, send them messages, inspect availability, wait for progress, interrupt stuck work, and coordinate through a shared task board. Every team member receives the same nine tools and guidance for coordinating in a shared workspace. Choose it when the model should operate a team only after you explicitly request one. It replaces legacy subagent controls with the same tool names, so compositions that need both must disable the legacy definitions. The package is published under its experimental name and provides no stability guarantee.
|
||||
This package lets the model create named teammates, send them messages, inspect availability, wait for progress, interrupt stuck work, and coordinate through a shared task board. Every team member receives the same nine tools and guidance for coordinating in a shared workspace. It replaces legacy subagent controls with the same tool names, so compositions that need both must disable the legacy definitions. The package is published under its experimental name and provides no stability guarantee.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -29,7 +29,7 @@ Add this package on top of `@deepseek-ai/dsh-experimental-agent-team` when the m
|
||||
|
||||
### When to choose it
|
||||
|
||||
Choose it when the model should create and coordinate teammates by itself rather than a human driving subagent controls. Avoid it when the legacy global subagent tools with the same names must stay available: the team tools replace them for team members, so a composition that wants both must disable the legacy definitions. The fixed policy creates teammates only when you explicitly ask for a team or teammates, so ordinary tasks never trigger delegation on their own.
|
||||
Choose it when the model should create and coordinate teammates by itself rather than a human driving subagent controls. Avoid it when the legacy global subagent tools with the same names must stay available: the team tools replace them for team members, so a composition that wants both must disable the legacy definitions.
|
||||
|
||||
### Smallest working example
|
||||
|
||||
@@ -124,7 +124,7 @@ Read these pages when the package-level contract is not enough. They move from t
|
||||
|
||||
#### What the model sees
|
||||
|
||||
One shared system policy covers explicit delegation, shared-cwd safety, task coordination, Steer delivery, inbox acceptance, and the Lead’s duty to wait. All nine schemas are identical for Leads and teammates; execution enforces Lead-only operations. Required runtime context states `You are the Team Lead named "lead".` or `You are teammate "<name>".` with `Your Team Lead is named "lead".`, plus roster and messaging instructions. Identity comes from current Team membership, survives optional-context suppression, and is restored when compaction removes its snapshot. An ordinary fork from a teammate receives its current Lead identity.
|
||||
One shared system policy covers Team availability, shared-cwd safety, task coordination, Steer delivery, inbox acceptance, and the Lead’s duty to wait. All nine schemas are identical for Leads and teammates; execution enforces Lead-only operations. Required runtime context states `You are the Team Lead named "lead".` or `You are teammate "<name>".` with `Your Team Lead is named "lead".`, plus roster and messaging instructions. Identity comes from current Team membership, survives optional-context suppression, and is restored when compaction removes its snapshot. An ordinary fork from a teammate receives its current Lead identity.
|
||||
|
||||
#### Token effect
|
||||
|
||||
@@ -141,7 +141,6 @@ With the same provider/model, shared system policy, and tool schemas, a fork ret
|
||||
These limits describe what the policy and tools cannot guarantee for a team. They are current package constraints, not a comparison with other collaboration surfaces.
|
||||
|
||||
- **Prompt policy is coordination, not confinement** — it cannot stop Bash or external processes from writing overlapping files.
|
||||
- **No autonomous team creation** — ordinary tasks do not trigger delegation unless the user explicitly requests it.
|
||||
- **No Web controls** — browser roster and task-board presentation is outside this runtime package.
|
||||
- **Experimental prototype with no stability promise** — the package is public, but its schemas can change freely while it incubates.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ kind: "package-reference"
|
||||
|
||||
## 概述
|
||||
|
||||
本包让模型创建具名 teammate、向它们发送消息、查看可用状态、等待进展、中断卡住的工作,并通过共享任务板协调。每个团队成员都会获得相同的九个工具,以及在共享工作区协调的指引。当模型只应在你明确要求后运行团队时,选择本包。它会取代同名的旧版 subagent 控件,因此同时需要两者的组合必须禁用旧定义。本包以实验性名称公开发布,但不提供稳定性保证。
|
||||
本包让模型创建具名 teammate、向它们发送消息、查看可用状态、等待进展、中断卡住的工作,并通过共享任务板协调。每个团队成员都会获得相同的九个工具,以及在共享工作区协调的指引。它会取代同名的旧版 subagent 控件,因此同时需要两者的组合必须禁用旧定义。本包以实验性名称公开发布,但不提供稳定性保证。
|
||||
|
||||
## 目录
|
||||
|
||||
@@ -29,7 +29,7 @@ kind: "package-reference"
|
||||
|
||||
### 何时选择
|
||||
|
||||
当模型应该自行创建与协调 teammate、而不是由人来操作 subagent 控件时,选择它。当同名的旧全局 subagent 工具必须继续可用时,请不要选择:团队工具会为团队成员取代它们,因此想同时使用两者的组合必须禁用旧定义。固定策略只在明确要求团队或 teammate 时创建成员,因此普通任务永远不会自行触发委派。
|
||||
当模型应该自行创建与协调 teammate、而不是由人来操作 subagent 控件时,选择它。当同名的旧全局 subagent 工具必须继续可用时,请不要选择:团队工具会为团队成员取代它们,因此想同时使用两者的组合必须禁用旧定义。
|
||||
|
||||
### 最小工作示例
|
||||
|
||||
@@ -124,7 +124,7 @@ member scope 上的一个 `team:policy` 段落说明共享的协作规则;固
|
||||
|
||||
#### 模型看到什么
|
||||
|
||||
共享系统 policy 覆盖显式委派、共享 cwd 安全、任务协调、Steer 投递、inbox 接收和 Lead 等待责任。Lead 与 teammate 使用相同的九个 schema;执行时落实 Lead-only 操作。必需的 runtime context 声明 `You are the Team Lead named "lead".`,或 `You are teammate "<name>".` 与 `Your Team Lead is named "lead".`,并提供 roster 和消息操作说明。身份来自当前 Team membership,关闭可选 context 时仍保留,压缩移除快照后会恢复。从 teammate 创建的普通 fork 会收到当前 Lead 身份。
|
||||
共享系统 policy 覆盖 Team 可用性、共享 cwd 安全、任务协调、Steer 投递、inbox 接收和 Lead 等待责任。Lead 与 teammate 使用相同的九个 schema;执行时落实 Lead-only 操作。必需的 runtime context 声明 `You are the Team Lead named "lead".`,或 `You are teammate "<name>".` 与 `Your Team Lead is named "lead".`,并提供 roster 和消息操作说明。身份来自当前 Team membership,关闭可选 context 时仍保留,压缩移除快照后会恢复。从 teammate 创建的普通 fork 会收到当前 Lead 身份。
|
||||
|
||||
#### Token 影响
|
||||
|
||||
@@ -141,7 +141,6 @@ provider/model、共享 system 策略和工具 schema 相同时,fork 保留
|
||||
这些限制说明策略与工具无法为一支团队保证什么。它们是当前包约束,不是与其他协作方式的对比。
|
||||
|
||||
- **提示词策略只负责协调,不负责 confinement**——它无法阻止 Bash 或外部进程写入重叠文件。
|
||||
- **不会自主创建 Team**——除非用户明确要求,普通任务不会触发 delegation。
|
||||
- **没有 Web 控制功能**——浏览器 roster 与任务板呈现不属于该运行时包。
|
||||
- **实验原型,无稳定性承诺**——本包公开发布,但孵化期间 schema 仍可自由变更。
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export const Config: z<Config> = z.object({
|
||||
|
||||
/** Model-facing collaboration guidance shared by Lead and teammates. */
|
||||
function teamPolicy(interrupt: boolean): string {
|
||||
return `Agent Teams is available in this session, but create teammates only when the user explicitly asks to use Agent Teams or teammates.
|
||||
return `Agent Teams is available in this session
|
||||
|
||||
The Team Lead and all teammates share the same working directory and filesystem. Edits are immediately visible to every member. Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock.
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ describe('dsh-tool-team', () => {
|
||||
expect(leadAssembly.tools.map(schema => schema.name).filter(name => TOOL_NAMES.includes(name)).sort())
|
||||
.toEqual(TOOL_NAMES)
|
||||
const leadPrompt = renderPrompt(leadAssembly)
|
||||
expect(leadPrompt).toContain('create teammates only when the user explicitly asks')
|
||||
expect(leadPrompt).toContain('Agent Teams is available in this session\n\n')
|
||||
expect(leadPrompt).toContain('FS_STALE_VERSION')
|
||||
expect(leadPrompt).toContain('Bash, formatters, code generators, and scripts are not fully protected')
|
||||
expect(leadPrompt).toContain('Task readiness never starts an owner')
|
||||
|
||||
@@ -5,7 +5,7 @@ You are a coding assistant powered by the deepseek-v4-flash model. Your bash too
|
||||
Verify your work by running the code or tests. Keep answers brief and factual.
|
||||
|
||||
|
||||
Agent Teams is available in this session, but create teammates only when the user explicitly asks to use Agent Teams or teammates.
|
||||
Agent Teams is available in this session
|
||||
|
||||
The Team Lead and all teammates share the same working directory and filesystem. Edits are immediately visible to every member. Split write work into disjoint scopes, record expected write scopes on shared tasks, and use task dependencies when work must be ordered. Write-scope overlap is advisory, not a lock.
|
||||
|
||||
|
||||
Reference in new issue
Block a user