Skip to content

Commit 1bebae3

Browse files
authored
Merge pull request #49 from desirecore/docs/agent-permission-boundary
docs(concepts): 新增「智能体权限边界」——谁动手按谁的权限算
2 parents 827c9eb + cbeb784 commit 1bebae3

6 files changed

Lines changed: 194 additions & 0 deletions

File tree

‎docs/04-concepts/02-delegation-model.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,13 @@ DesireCore 采用的是**委派模式(Delegation)**:你把事情"交代"
107107
3. **能力可成长**:同伴的能力是累积的。今天教了合同审查,明天教了邮件写作,后天它就能处理更复杂的综合任务
108108
4. **风险可控**:通过固化步骤、灵活步骤和人闸门的组合,你可以精确控制同伴的自主程度
109109

110+
## 同伴之间也能互相委派
111+
112+
委派不只发生在"你 → 同伴"之间,同伴与同伴之间同样可以互相委派、发消息、插话甚至打断。此时权限按一条固定规则界定:**谁动手,就按谁的权限算**——被请求的同伴仍然完整地按它自己被授予的权限行事,不会因为请求来自另一个同伴而放宽或收紧。详见 [智能体权限边界](./agent-permission-boundary)。
113+
110114
## 下一步
111115

116+
- 想了解同伴之间协作时的权限归属?请阅读 [智能体权限边界](./agent-permission-boundary)
112117
- 想了解同伴如何控制风险?请阅读 [固化/灵活/人闸门](./step-types)
113118
- 想了解同伴做完事后的"工作报告"?请阅读 [回执系统](./receipt-system)
114119
- 想了解同伴怎么越来越聪明?请阅读 [自我进化](./self-evolution)
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
title: 智能体权限边界
3+
description: 多个智能体协作时,权限如何界定 -- 每个智能体只按自己的权限上限行事,越权责任在执行方
4+
keywords: [权限, 边界, 委派, 协作, 安全, 责任, Permission, Boundary]
5+
---
6+
7+
# 智能体权限边界
8+
9+
## 一句话规则
10+
11+
**每个智能体做事时,只受它自己的权限上限约束;如果发生越权,责任在执行操作的那个智能体,而不是发起请求的那一方。**
12+
13+
## 为什么需要这条规则
14+
15+
当同伴之间开始互相协作 -- 一个同伴请另一个同伴帮忙、给正在忙的同伴补一句话、或者打断它 -- 就出现一个必须回答的问题:
16+
17+
> 甲同伴让乙同伴去做一件事,这件事按谁的权限算?
18+
19+
有两种可能的答案,DesireCore 选择了第二种。
20+
21+
### 方案一:按发起方的权限算(未采用)
22+
23+
发起请求的同伴权限有多大,被请求的同伴就只能做多大范围的事 -- 相当于"权限只能越传越小"。
24+
25+
听起来更安全,但它在真实场景里会立刻崩溃:
26+
27+
- **专业分工失效**:你的"日程助理"权限很小,它只能读日历。当它需要请"文书同伴"起草一份会议纪要时,如果按它的权限算,文书同伴连写文件都做不了 -- 而写文件正是你当初赋予文书同伴的职责。
28+
- **责任变得模糊**:一个操作到底该不该做,取决于"是谁让它做的",而不是"做这件事的是谁"。同一个操作,A 请它做就允许、B 请它做就拒绝 -- 你没办法通过看一个同伴的配置来判断它到底能做什么。
29+
- **权限只减不增,最终归零**:多层协作下(甲请乙、乙请丙),权限一路收窄,链条稍长就什么都做不了。你会被迫给每个同伴都开更大的权限来"抵消"这种收窄 -- 结果是整体权限反而变大了。
30+
31+
### 方案二:按执行方自己的权限算(DesireCore 采用)
32+
33+
**谁动手,就按谁的权限算。**
34+
35+
- 乙同伴收到甲同伴的请求后,仍然完整地按**它自己**被授予的权限行事:它能读什么、能写什么、能调用哪些工具,只看它自己的配置。
36+
- 甲同伴无法通过"请乙帮忙"这个动作,让乙做出超越乙自身权限的事 -- 因为乙的权限本来就是它的天花板。
37+
- 反过来,甲也无法通过"请乙帮忙"给自己扩权 -- 乙做的事记在乙的账上,产出回到甲手里,但**执行发生在乙的边界内**。
38+
39+
## 越权责任在执行方
40+
41+
这条规则的另一半同样重要:**如果一个同伴做出了不该做的事,责任记在它自己头上。**
42+
43+
- 每个同伴的能力边界写在它自己的配置里(工具授权、文件读写范围、风险等级),这份配置是你亲手定的。
44+
- 它做的每一次操作都进入**它自己的**回执与审计记录 -- 你看一个同伴的回执,看到的就是它真实做过的全部事情,不需要再去追"这是谁指使的"。
45+
- 因此排查问题时的路径是确定的:**先看是哪个同伴动的手,再看它的权限配置为什么允许了这件事。**
46+
47+
换句话说,权限配置是一份**关于这个同伴的承诺**,而不是一份"关于谁能指使它"的规则。你调整一个同伴的权限,就调整了它在任何情况下的行为上限 -- 无论请求来自你、来自另一个同伴、还是来自定时任务。
48+
49+
## 这条规则覆盖哪些情况
50+
51+
只要是"一个同伴让另一个同伴做事",都适用:
52+
53+
| 场景 | 说明 |
54+
|------|------|
55+
| **委派任务** | 甲把一件事交给乙去做 |
56+
| **发消息** | 甲给乙发一条消息,乙据此起一轮工作 |
57+
| **插话** | 乙正在忙,甲往它当前这轮里补一句话 |
58+
| **打断** | 甲中止乙正在进行的工作 |
59+
| **团队分发** | 甲把同一件事同时发给多个同伴 |
60+
61+
以上每一种,执行的那一方都按它自己的权限行事。
62+
63+
## 这不会削弱可控性
64+
65+
这条规则**不是**在放宽限制,它只是把限制放在了正确的位置:
66+
67+
- **你的授权仍然是唯一的来源。** 同伴的权限从来只由你配置,同伴之间不能互相授予权限,也不能通过协作绕开你的设置。
68+
- **[三层可控性](./three-layer-control) 完整生效。** 不管这一轮是你发起的还是别的同伴发起的,高风险操作照样触发人闸门、照样有回执、照样可回滚。
69+
- **边界更容易检查。** 你只需要回答"我给这个同伴开了什么权限",而不需要在脑子里模拟"如果它被某个别的同伴调用,权限会变成什么样"。
70+
71+
如果你不希望某个同伴具备某种能力,正确的做法是**收紧它自己的权限配置** -- 而不是指望别的同伴在调用它时替你把关。
72+
73+
## 一个具体例子
74+
75+
假设你有两个同伴:
76+
77+
- **日程助理**:只能读日历,不能写文件
78+
- **文书同伴**:可以在 `~/文档/` 下读写
79+
80+
当日程助理请文书同伴"把今天的会议整理成纪要"时:
81+
82+
1. 文书同伴按**自己**的权限执行 -- 它可以在 `~/文档/` 下写入纪要文件;
83+
2. 但它同样**不能**越过自己的边界 -- 比如它无法去改 `~/系统配置/` 下的东西,即使日程助理这么要求;
84+
3. 纪要写入这件事记在**文书同伴**的回执里;
85+
4. 如果你认为"文书同伴不该有写文件的权限",你要改的是**文书同伴的配置**,而不是限制日程助理去请它帮忙。
86+
87+
## 下一步
88+
89+
- 想了解整体的安全保障?请阅读 [三层可控性](./three-layer-control)
90+
- 想理解同伴之间如何协作?请阅读 [委派式交互模型](./delegation-model)
91+
- 想了解任务如何被分配给合适的同伴?请阅读 [智能任务编排](./task-orchestration)

‎docs/04-concepts/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ DesireCore 围绕"培养并托管数字同伴"这一核心理念,构建了一
2828
| [算力模型](./compute-model) | 自带钥匙,自选引擎 | 想理解 AI 模型配置 |
2929
| [智能任务编排](./task-orchestration) | 自动拆解任务、匹配最佳智能体的"项目经理" | 想理解任务分配机制 |
3030
| [Auto Dream](./auto-dream) | 无损遗忘,在压缩中保留价值 | 想理解记忆整合机制 |
31+
| [智能体权限边界](./agent-permission-boundary) | 谁动手就按谁的权限算,越权责任在执行方 | 想理解多同伴协作时的权限归属 |
3132

3233
## 阅读建议
3334

‎i18n/en/docusaurus-plugin-content-docs/current/04-concepts/02-delegation-model.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,13 @@ Example conversations:
107107
3. **Capability Growth**: The companion's capabilities are cumulative. Today you taught contract review, tomorrow email writing, the day after it can handle more complex integrated tasks
108108
4. **Risk Controllability**: Through combinations of hardened steps, flexible steps, and human gates, you can precisely control the companion's autonomy
109109

110+
## Companions Delegate to Each Other Too
111+
112+
Delegation is not limited to "you → companion." Companions can delegate to, message, interject into, and even interrupt one another. Permissions in those cases follow one fixed rule: **whoever acts is bound by their own ceiling** — the requested companion still acts entirely within the permissions you granted it, neither widened nor narrowed by the fact that the request came from another companion. See [Agent Permission Boundaries](./agent-permission-boundary).
113+
110114
## Next Steps
111115

116+
- Want to understand permissions across collaborating companions? Read [Agent Permission Boundaries](./agent-permission-boundary)
112117
- Want to understand how companions control risk? Read [Hardened/Flexible/Human Gate](./step-types)
113118
- Want to understand the "work report" after companions finish tasks? Read [Receipt System](./receipt-system)
114119
- Want to understand how companions get smarter? Read [Self-Evolution](./self-evolution)
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
title: Agent Permission Boundaries
3+
description: How permissions work when agents collaborate -- every agent acts within its own ceiling, and accountability for overreach lies with the agent that acted
4+
keywords: [permission, boundary, delegation, collaboration, security, accountability]
5+
---
6+
7+
# Agent Permission Boundaries
8+
9+
## The rule in one sentence
10+
11+
**Every agent acts within its own permission ceiling. If something is done that shouldn't have been, accountability lies with the agent that performed the action -- not with whoever asked for it.**
12+
13+
## Why this rule is needed
14+
15+
Once companions start collaborating -- one asking another for help, adding a remark to a companion that is mid-task, or interrupting it -- an unavoidable question appears:
16+
17+
> Companion A asks companion B to do something. Whose permissions apply?
18+
19+
There are two possible answers. DesireCore chose the second.
20+
21+
### Option 1: the requester's permissions apply (not adopted)
22+
23+
The requested companion would be capped by whatever the requester is allowed to do -- permissions could only ever shrink as they are passed along.
24+
25+
It sounds safer, but it falls apart immediately in real use:
26+
27+
- **Specialization stops working.** Your "calendar assistant" has narrow permissions -- it can only read your calendar. When it asks the "writing companion" to draft meeting notes, capping the writer at the assistant's level means the writer cannot write files at all -- which is precisely the job you gave it.
28+
- **Accountability becomes ambiguous.** Whether an operation is allowed would depend on *who asked*, not *who is doing it*. The same operation would be permitted when A asks and refused when B asks -- so you could no longer tell what a companion can do by looking at its configuration.
29+
- **Permissions only shrink, eventually to nothing.** Across multiple hops (A asks B, B asks C), the ceiling narrows at every step until nothing is possible. You would be forced to over-provision every companion to compensate -- making the overall permission surface *larger*, not smaller.
30+
31+
### Option 2: the executor's own permissions apply (DesireCore's choice)
32+
33+
**Whoever acts is bound by their own ceiling.**
34+
35+
- When companion B receives a request from companion A, it still acts entirely within the permissions **you** granted **B**: what it can read, what it can write, which tools it may call -- determined solely by B's own configuration.
36+
- A cannot make B exceed B's own ceiling by asking, because that ceiling is absolute.
37+
- Conversely, A cannot expand its own reach by asking B. Whatever B does is recorded against B, and the results come back to A -- but **the execution happened inside B's boundary**.
38+
39+
## Accountability for overreach lies with the executor
40+
41+
The other half of the rule matters just as much: **if a companion does something it shouldn't have, that is recorded against it.**
42+
43+
- Each companion's capability boundary lives in its own configuration (tool grants, file read/write scope, risk level) -- a configuration you set yourself.
44+
- Every operation it performs enters **its own** receipts and audit trail. Reading one companion's receipts tells you everything it actually did; you never have to trace back "who told it to."
45+
- Investigation therefore has a fixed path: **first identify which companion acted, then look at why its permission configuration allowed it.**
46+
47+
Put differently: a permission configuration is a **promise about that companion**, not a rule about who may command it. Adjusting a companion's permissions adjusts its behavioral ceiling in *every* situation -- whether the request came from you, from another companion, or from a scheduled job.
48+
49+
## Which situations this covers
50+
51+
The rule applies whenever one companion causes another to act:
52+
53+
| Situation | Description |
54+
|-----------|-------------|
55+
| **Delegating a task** | A hands work to B |
56+
| **Sending a message** | A messages B, and B starts a turn to handle it |
57+
| **Interjecting** | B is busy; A adds a remark into B's current turn |
58+
| **Interrupting** | A aborts what B is currently doing |
59+
| **Fan-out** | A sends the same work to several companions at once |
60+
61+
In every one of these, the acting party is bound by its own permissions.
62+
63+
## This does not weaken controllability
64+
65+
The rule is **not** a relaxation of limits -- it puts the limit in the right place:
66+
67+
- **Your grants remain the only source.** Companion permissions are configured only by you. Companions cannot grant permissions to each other, nor collaborate their way around your settings.
68+
- **[Three-layer controllability](./three-layer-control) applies in full.** Regardless of whether a turn was started by you or by another companion, high-risk operations still hit the human gate, still produce receipts, and are still reversible.
69+
- **Boundaries are easier to verify.** You only need to answer "what did I grant this companion," rather than simulating "what would its permissions become if some other companion invoked it."
70+
71+
If you don't want a companion to have a certain capability, the correct move is to **tighten that companion's own configuration** -- not to rely on other companions to gate it for you.
72+
73+
## A concrete example
74+
75+
Suppose you have two companions:
76+
77+
- **Calendar assistant**: can read your calendar; cannot write files
78+
- **Writing companion**: can read and write under `~/Documents/`
79+
80+
When the calendar assistant asks the writing companion to "turn today's meeting into notes":
81+
82+
1. The writing companion acts under **its own** permissions -- it may write the notes file under `~/Documents/`;
83+
2. It equally **cannot** exceed its own boundary -- it cannot touch `~/SystemConfig/`, even if the calendar assistant asks it to;
84+
3. Writing the notes is recorded in the **writing companion's** receipts;
85+
4. If you decide the writing companion shouldn't be able to write files at all, what you change is **the writing companion's configuration** -- not the calendar assistant's ability to ask.
86+
87+
## Next steps
88+
89+
- Want the full picture on safety? Read [Three-Layer Controllability](./three-layer-control)
90+
- Want to understand how companions collaborate? Read [Delegation Model](./delegation-model)
91+
- Want to know how work is routed to the right companion? Read [Task Orchestration](./task-orchestration)

‎i18n/en/docusaurus-plugin-content-docs/current/04-concepts/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ DesireCore is built around the core philosophy of "cultivating and hosting digit
5858
| [Compute Model](./compute-model) | Bring your own keys, choose your own engines | Want to understand AI model configuration |
5959
| [Task Orchestration](./task-orchestration) | Automatic task decomposition and best-agent matching — your "project manager" | Want to understand task distribution |
6060
| [Auto Dream](./auto-dream) | Lossless forgetting — preserving value through compression | Want to understand memory consolidation |
61+
| [Agent Permission Boundaries](./agent-permission-boundary) | Whoever acts is bound by their own ceiling; accountability for overreach lies with the executor | Want to understand permissions across collaborating agents |
6162

6263
## Reading Recommendations
6364

0 commit comments

Comments
 (0)