You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/protocol/draft/agent-plan.mdx
+92Lines changed: 92 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ Plans are execution strategies for complex tasks that require multiple steps.
7
7
8
8
Agents may share plans with Clients through [`session/update`](./prompt-turn#3-agent-reports-output) notifications, providing real-time visibility into their thinking and progress.
9
9
10
+
The existing `plan` update is the baseline format. Clients that advertise `planCapabilities` during [initialization](./initialization#client-capabilities) can also receive identified plan operations through `plan_update` and `plan_removed`.
11
+
10
12
## Creating Plans
11
13
12
14
When the language model creates an execution plan, the Agent **SHOULD** report it to the Client:
@@ -46,6 +48,96 @@ When the language model creates an execution plan, the Agent **SHOULD** report i
46
48
accomplished
47
49
</ParamField>
48
50
51
+
## Plan Operations
52
+
53
+
Agents **MUST NOT** send `plan_update` or `plan_removed` unless the Client advertised `planCapabilities`. If the Client omits `planCapabilities`, the Agent **MUST** fall back to the existing `plan` update.
54
+
55
+
`plan_update` carries a `plan` object with a `type` discriminator. Every plan format includes a required `id` so Clients can track multiple plans independently.
56
+
57
+
### Item-Based Plans
58
+
59
+
```json
60
+
{
61
+
"jsonrpc": "2.0",
62
+
"method": "session/update",
63
+
"params": {
64
+
"sessionId": "sess_abc123def456",
65
+
"update": {
66
+
"sessionUpdate": "plan_update",
67
+
"plan": {
68
+
"type": "items",
69
+
"id": "plan-1",
70
+
"entries": [
71
+
{
72
+
"content": "Analyze the existing codebase structure",
0 commit comments