copilotkit 4.25.1 → 4.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +286 -35
  2. package/cli-build-info.json +8 -8
  3. package/index.js +7469 -3899
  4. package/onboarding/index.json +2 -2
  5. package/onboarding/prompts/authenticate/start.md +28 -23
  6. package/onboarding/prompts/conversion/plan.md +3 -3
  7. package/onboarding/prompts/credentials/finalize-plan.md +35 -26
  8. package/onboarding/prompts/credentials/plan.md +46 -33
  9. package/onboarding/prompts/credentials/settle-credentials.md +41 -16
  10. package/onboarding/prompts/credentials/write-plan.md +104 -47
  11. package/onboarding/prompts/deployment/choose-local.md +17 -20
  12. package/onboarding/prompts/deployment/local-evaluation.md +45 -21
  13. package/onboarding/prompts/fallback/best-effort.md +11 -9
  14. package/onboarding/prompts/feature/a2ui/implement.md +4 -4
  15. package/onboarding/prompts/feature/a2ui/plan.md +3 -3
  16. package/onboarding/prompts/feature/a2ui/proof.md +5 -5
  17. package/onboarding/prompts/feature/a2ui/start.md +10 -8
  18. package/onboarding/prompts/feature/channels/implement.md +11 -8
  19. package/onboarding/prompts/feature/channels/plan.md +15 -7
  20. package/onboarding/prompts/feature/channels/proof.md +5 -5
  21. package/onboarding/prompts/feature/channels/start.md +11 -10
  22. package/onboarding/prompts/feature/chat-suggestions/implement.md +4 -4
  23. package/onboarding/prompts/feature/chat-suggestions/plan.md +3 -3
  24. package/onboarding/prompts/feature/chat-suggestions/proof.md +5 -5
  25. package/onboarding/prompts/feature/chat-suggestions/start.md +10 -8
  26. package/onboarding/prompts/feature/complete.md +2 -2
  27. package/onboarding/prompts/feature/learning/implement.md +14 -12
  28. package/onboarding/prompts/feature/learning/plan.md +4 -4
  29. package/onboarding/prompts/feature/learning/proof.md +24 -14
  30. package/onboarding/prompts/feature/learning/start.md +8 -8
  31. package/onboarding/prompts/feature/open-generative-ui/implement.md +4 -4
  32. package/onboarding/prompts/feature/open-generative-ui/plan.md +3 -3
  33. package/onboarding/prompts/feature/open-generative-ui/proof.md +5 -5
  34. package/onboarding/prompts/feature/open-generative-ui/start.md +10 -8
  35. package/onboarding/prompts/feature/realtime-sync/implement.md +7 -5
  36. package/onboarding/prompts/feature/realtime-sync/plan.md +3 -3
  37. package/onboarding/prompts/feature/realtime-sync/proof.md +5 -5
  38. package/onboarding/prompts/feature/realtime-sync/start.md +7 -7
  39. package/onboarding/prompts/feature/rich-threads/implement.md +8 -6
  40. package/onboarding/prompts/feature/rich-threads/plan.md +3 -3
  41. package/onboarding/prompts/feature/rich-threads/proof.md +5 -5
  42. package/onboarding/prompts/feature/rich-threads/start.md +7 -7
  43. package/onboarding/prompts/feature/stop.md +4 -4
  44. package/onboarding/prompts/feature/voice/implement.md +4 -4
  45. package/onboarding/prompts/feature/voice/plan.md +4 -4
  46. package/onboarding/prompts/feature/voice/proof.md +5 -5
  47. package/onboarding/prompts/feature/voice/start.md +10 -8
  48. package/onboarding/prompts/framework/ag2.md +20 -5
  49. package/onboarding/prompts/framework/agno.md +25 -9
  50. package/onboarding/prompts/framework/built-in.md +21 -6
  51. package/onboarding/prompts/framework/claude-sdk-python.md +11 -5
  52. package/onboarding/prompts/framework/claude-sdk-typescript.md +13 -6
  53. package/onboarding/prompts/framework/crewai-flows.md +24 -10
  54. package/onboarding/prompts/framework/custom-ag-ui.md +62 -28
  55. package/onboarding/prompts/framework/deep-agents.md +26 -9
  56. package/onboarding/prompts/framework/google-adk.md +18 -5
  57. package/onboarding/prompts/framework/langgraph-fastapi.md +20 -5
  58. package/onboarding/prompts/framework/langgraph-python.md +20 -5
  59. package/onboarding/prompts/framework/langgraph-typescript.md +27 -7
  60. package/onboarding/prompts/framework/llamaindex.md +24 -8
  61. package/onboarding/prompts/framework/mastra.md +21 -8
  62. package/onboarding/prompts/framework/ms-agent-dotnet.md +24 -6
  63. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +24 -5
  64. package/onboarding/prompts/framework/ms-agent-python.md +21 -5
  65. package/onboarding/prompts/framework/pydantic-ai.md +20 -5
  66. package/onboarding/prompts/framework/strands-python.md +27 -12
  67. package/onboarding/prompts/framework/strands-typescript.md +27 -12
  68. package/onboarding/prompts/frontend/angular.md +4 -4
  69. package/onboarding/prompts/frontend/nextjs.md +4 -4
  70. package/onboarding/prompts/frontend/plan.md +21 -13
  71. package/onboarding/prompts/frontend/react-native.md +3 -3
  72. package/onboarding/prompts/frontend/react-spa.md +3 -3
  73. package/onboarding/prompts/frontend/vue.md +3 -3
  74. package/onboarding/prompts/implementation/build-and-validate.md +25 -20
  75. package/onboarding/prompts/proof/complete.md +10 -7
  76. package/onboarding/prompts/proof/oss-baseline.md +6 -6
  77. package/onboarding/prompts/proof/round-trip.md +10 -10
  78. package/onboarding/prompts/research/gather.md +8 -8
  79. package/onboarding/prompts/research/merge.md +3 -3
  80. package/onboarding/prompts/research/preflight.md +2 -2
  81. package/onboarding/prompts/research/route.md +4 -4
  82. package/onboarding/prompts/setup/questions.md +193 -158
  83. package/onboarding/prompts/starter/clone.md +129 -54
  84. package/onboarding/prompts/stopped/run-failed.md +5 -3
  85. package/onboarding/prompts/subagent/create-plan.md +80 -23
  86. package/onboarding/prompts/subagent/implement-and-validate.md +33 -14
  87. package/onboarding/prompts/subagent/inspect-repository.md +3 -2
  88. package/onboarding/prompts/subagent/prove-oss-baseline.md +10 -5
  89. package/onboarding/prompts/subagent/prove-round-trip.md +23 -14
  90. package/onboarding/prompts/unsupported/no-validated-path.md +5 -4
  91. package/package.json +1 -1
  92. package/release/release-tool.js +12 -2
@@ -1,5 +1,11 @@
1
1
  # Clone a starter
2
2
 
3
+ First run `npx --prefer-offline --yes copilotkit@4.27.0 onboard setup-answers`. It prints the answers that
4
+ `setup/questions` recorded, even after this conversation lost them: `framework`, `frontend`,
5
+ `vendor`, `project`, `key`, and on the local route `learning`. Take every "recorded" answer
6
+ below from the record, or this conversation when the record lacks it. Do not ask a question
7
+ that either one answers.
8
+
3
9
  Use this shortcut only when the repository findings prove that the target project
4
10
  directory holds no project yet: no source directory such as `src/`, `app/`, `agent/` or
5
11
  `web/`, no dependency manifest such as `package.json` or `pyproject.toml`, and no `.env`.
@@ -16,7 +22,7 @@ project to use, or to open the coding agent in a new empty folder.
16
22
  Before you end your turn to wait for the developer, report the pause:
17
23
 
18
24
  ```text
19
- npx --prefer-offline --yes copilotkit@4.25.1 onboard checkpoint --phase awaiting-developer
25
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-developer
20
26
  ```
21
27
 
22
28
  Match the selected agent framework and frontend to this table:
@@ -50,28 +56,27 @@ directory as it is, so a name such as `MyApp` is valid. Do not rename the direct
50
56
  the shortcut in each of these cases:
51
57
 
52
58
  - The selected pair is not in the table.
53
- - The developer chose a model vendor whose key is not the Model key of the matched row.
54
- Each starter runs on the vendor in that column only.
55
59
  - The directory name is not valid.
56
60
 
57
61
  Do not run `init`. No command ran, so this is not a failed shortcut. Go back to the
58
62
  `## Documentation` section of the frontend prompt you read before this one, and build the
59
63
  project from its pages.
60
64
 
61
- Use the project answer that `setup/questions` recorded. A new project takes the recorded
62
- name. A project the developer already has takes `--project` in the command below. Do not ask
65
+ Use the recorded `project` answer. A new project (`project.create`) takes the recorded
66
+ name. A project the developer already has (`project.project`) takes `--project` in the command below. Do not ask
63
67
  again.
64
68
 
65
- If `setup/questions` recorded no project answer, ask here. If the developer did not name a
69
+ If neither the record nor this conversation holds a project answer, ask here. If the developer did not name a
66
70
  project, create one for the app being cloned. This directory is new, so no existing project is already its own: take the project
67
- name from the target directory name derived above, and ask the developer to confirm it or
68
- give another. Do not list the projects in the organization. If no developer answers, use
71
+ name from the target directory name derived above, and ask as the setup message does:
72
+ "Project: **new project "<name>"**", then "Other: another name · a project you already
73
+ have". Do not list the projects in the organization. If no developer answers, use
69
74
  the derived name.
70
75
 
71
76
  Only if the developer asks for an existing project, or asks to see the projects they have,
72
77
  read the choices:
73
78
 
74
- `npx --prefer-offline --yes copilotkit@4.25.1 project list --json`
79
+ `npx --prefer-offline --yes copilotkit@4.27.0 project list --json`
75
80
 
76
81
  Then ask which one to use. Do not order the projects by creation time. If the developer
77
82
  already gave this answer, do not ask again. Do not read a secret value. Do not show or
@@ -80,19 +85,26 @@ store a secret value.
80
85
  Before you end your turn to wait for the developer, report the pause:
81
86
 
82
87
  ```text
83
- npx --prefer-offline --yes copilotkit@4.25.1 onboard checkpoint --phase awaiting-developer
88
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-developer
84
89
  ```
85
90
 
86
91
  ## Ask where the model credential lives
87
92
 
88
93
  The starter reads a model credential, and the `init` command below does not ask for one.
89
- Use the key file answer that `setup/questions` recorded. A named file goes to
90
- `--model-key-file`. An answer of "later" clones without one: the step after the clone pauses
94
+ Use the recorded `key` answer. A named file (`key.file`) goes to
95
+ `--model-key-file`. An answer of "later" (`key.later`) clones without one: the step after the clone pauses
91
96
  for the key. Do not ask again.
92
97
 
93
- If `setup/questions` recorded no key answer, ask for it now, while the developer is still
94
- here, and not after the clone. The variable
95
- is the Model key column of the row you matched. Do not guess it from the framework name.
98
+ When the recorded vendor is not the vendor of the Model key column, `init` copies the
99
+ wrong variable from a key file. An OpenAI-compatible provider counts as another vendor,
100
+ although its key is `OPENAI_API_KEY`. So clone without `--model-key-file` in that case, and
101
+ follow `## Switch the starter to the recorded vendor` after the clone.
102
+
103
+ If neither the record nor this conversation holds a key answer, ask for it now, while the developer is still
104
+ here, and not after the clone. The variable is the Model key column of the row you
105
+ matched. When the recorded vendor is another one, the variable is that vendor's:
106
+ `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, `OPENAI_API_KEY` for OpenAI, or `OPENAI_API_KEY`
107
+ for an OpenAI-compatible provider. Do not guess it from the framework name.
96
108
 
97
109
  Ask the developer one question: which file holds that key, or whether they will add it
98
110
  themselves after the clone. Asking where a credential lives is not requesting a secret
@@ -100,14 +112,14 @@ value. Never ask for the value itself. If no answer comes, clone anyway. The ste
100
112
  the clone pauses for the key.
101
113
 
102
114
  If the developer has no key file yet and wants to create one, ask them to put it outside the
103
- target directory, such as in its parent folder. `init` refuses a target that holds a `.env`
104
- file, so a new `.env` in the target stops the clone. Pass the new file with
105
- `--model-key-file`, as for any other key file.
115
+ target directory, such as in its parent folder. Tell them only where it goes. The reason is
116
+ for you: `init` refuses a target that holds a `.env` file, so a new `.env` in the target
117
+ stops the clone. Pass the new file with `--model-key-file`, as for any other key file.
106
118
 
107
119
  Before you end your turn to wait for the developer, report the pause:
108
120
 
109
121
  ```text
110
- npx --prefer-offline --yes copilotkit@4.25.1 onboard checkpoint --phase awaiting-model-credential
122
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-model-credential
111
123
  ```
112
124
 
113
125
  A path the developer names is theirs to give, including one outside the project. A path
@@ -120,7 +132,7 @@ This route skips the plan step that records the path, so record it here, once, b
120
132
  the clone:
121
133
 
122
134
  ```text
123
- npx --prefer-offline --yes copilotkit@4.25.1 onboard classify --starting-state <starting-state> --agent-framework <agent-framework> --frontend <frontend> --model-vendor <model-vendor> --model-vendor-choice <model-vendor-choice>
135
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard classify --starting-state <starting-state> --agent-framework <agent-framework> --frontend <frontend> --model-vendor <model-vendor> --model-vendor-choice <model-vendor-choice>
124
136
  ```
125
137
 
126
138
  - `<starting-state>`: the starting state the research recorded, usually `empty`.
@@ -128,7 +140,7 @@ npx --prefer-offline --yes copilotkit@4.25.1 onboard classify --starting-state <
128
140
  `langgraph-typescript` for `framework/langgraph-typescript`. It is not the Framework ID
129
141
  in the table.
130
142
  - `<frontend>`: the Frontend column of the matched row, `nextjs` or `angular`.
131
- - `<model-vendor>`: `openai`, `anthropic`, `google`, or `other`.
143
+ - `<model-vendor>`: `openai`, `anthropic`, `google`, `openai-compatible`, or `other`.
132
144
  - `<model-vendor-choice>`: if the developer chose the provider, `developer`. Otherwise,
133
145
  `default`.
134
146
 
@@ -143,7 +155,7 @@ Do not inspect another entry in the parent directory. Replace each placeholder w
143
155
  recorded value. Do not run a placeholder as a shell argument. If the path holds a space,
144
156
  put it in double quotes.
145
157
 
146
- `npx --prefer-offline --yes copilotkit@4.25.1 init --dir <absolute-target-directory> --framework <framework-id> --channel none --no-banner --no-key-prompt --create <name> --install`
158
+ `npx --prefer-offline --yes copilotkit@4.27.0 init --dir <absolute-target-directory> --framework <framework-id> --channel none --no-banner --no-key-prompt --create <name> --install`
147
159
 
148
160
  `--dir` is always the absolute path of the target directory. `init` builds the app in that
149
161
  directory and gives the app the directory's name. Do not add `--name`: `init` refuses
@@ -164,23 +176,23 @@ the developer for the right path, or run the command again without the flag.
164
176
  Before you end your turn to wait for the developer, report the pause:
165
177
 
166
178
  ```text
167
- npx --prefer-offline --yes copilotkit@4.25.1 onboard checkpoint --phase awaiting-model-credential
179
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-model-credential
168
180
  ```
169
181
 
170
182
  If you cannot pass the key file to `init`, for example because a sandbox refuses the path,
171
183
  clone without `--model-key-file`. Then copy the key from `<target>` with one command:
172
- `cd <target> && npx --prefer-offline --yes copilotkit@4.25.1 onboard credentials --model-key <VARIABLE> --env-path <key-file> --copy-to <env file> --json`.
184
+ `cd <target> && npx --prefer-offline --yes copilotkit@4.27.0 onboard credentials --model-key <VARIABLE> --env-path <key-file> --copy-to <env file> --json`.
173
185
  `<env file>` is `.env`, or `agent/.env` for the Microsoft Agent Framework Python starter.
174
186
  The command writes the key into that file without printing it. If the
175
187
  command is refused too, ask the developer to run it. Give them exactly this one line:
176
- `! cd <target> && npx --prefer-offline --yes copilotkit@4.25.1 onboard credentials --model-key <VARIABLE> --env-path <key-file> --copy-to <env file>`.
188
+ `! cd <target> && npx --prefer-offline --yes copilotkit@4.27.0 onboard credentials --model-key <VARIABLE> --env-path <key-file> --copy-to <env file>`.
177
189
  The command needs no input. Without `!`, they run the same command in a terminal.
178
190
  Do not write a `sed`, `grep`, or `cat` command to copy the key.
179
191
 
180
192
  Before you end your turn to wait for the developer, report the pause:
181
193
 
182
194
  ```text
183
- npx --prefer-offline --yes copilotkit@4.25.1 onboard checkpoint --phase awaiting-model-credential
195
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-model-credential
184
196
  ```
185
197
 
186
198
  ### For a recorded local choice
@@ -190,22 +202,31 @@ command instead of the hosted command above. Do not ask the project questions ab
190
202
  Local evaluation creates its own empty project, and `init --local` refuses `--create` and
191
203
  `--project`.
192
204
 
193
- `npx --prefer-offline --yes copilotkit@4.25.1 init --dir <absolute-target-directory> --framework <framework-id> --channel none --no-banner --no-key-prompt --local --defer-model --install`
194
-
195
- Use the model choice from `deployment/choose-local`. If the developer deferred it, keep
196
- `--defer-model`. If the developer gave model settings, replace `--defer-model` with
197
- `--model-config <private-file>`. Do not read or print that file. The CLI selects the latest
198
- stable release. If the developer gave a candidate manifest for release testing, add
199
- `--candidate <manifest.json>`. Otherwise, do not add it. The `--dir`, `--no-install` and `--model-key-file` rules
200
- above apply here too.
201
-
202
- If the developer chose guided model setup in `deployment/choose-local`, keep `--defer-model`.
205
+ `npx --prefer-offline --yes copilotkit@4.27.0 init --dir <absolute-target-directory> --framework <framework-id> --channel none --no-banner --no-key-prompt --local --defer-model --install`
206
+
207
+ Use the `learning` answer from the record, or this conversation. Use the default only when
208
+ neither holds one.
209
+ For `learning.later`, keep `--defer-model`. For `learning.file`, replace
210
+ `--defer-model` with `--model-config <learning.file>`. Do not read or print that
211
+ file. The CLI selects the latest stable release. If the developer gave a candidate
212
+ manifest for release testing, add `--candidate <manifest.json>`. Otherwise, do not add it.
213
+ The `--dir`, `--no-install` and `--model-key-file` rules above apply here too.
214
+
215
+ Before `init`, run `npx --prefer-offline --yes copilotkit@4.27.0 onboard local-terms --json`. If `accepted`
216
+ is false, pause here. Give the developer this exact command to run in their own terminal:
217
+ `npx --prefer-offline --yes copilotkit@4.27.0 local accept-terms`. Never accept the agreement yourself.
218
+ Report the pause with
219
+ `npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-developer`, end your turn,
220
+ and wait for "done". Then run `local-terms` again, and continue only when `accepted` is
221
+ true. A local command that fails with `eula_acceptance_required` comes back to this step.
222
+
223
+ For `learning.guided`, keep `--defer-model`.
203
224
  After `init` reports the stack ready:
204
225
 
205
226
  Ask the developer to run this command in their own terminal window, in `<target>`:
206
227
 
207
228
  ```text
208
- npx --prefer-offline --yes copilotkit@4.25.1 local setup
229
+ npx --prefer-offline --yes copilotkit@4.27.0 local setup
209
230
  ```
210
231
 
211
232
  Do not give it as a `!` line, and do not run it yourself. Its guided model prompt needs a
@@ -214,9 +235,9 @@ changes nothing. The prompt asks for the model and its key, and it saves them pr
214
235
  On a running stack, it restarts only Learning. Do not ask for a model file.
215
236
 
216
237
  Say that the run continues when they reply or resume this session. Report the pause with
217
- `npx --prefer-offline --yes copilotkit@4.25.1 onboard checkpoint --phase awaiting-model-credential`, end your
238
+ `npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-model-credential`, end your
218
239
  turn, and wait. When the developer replies, run
219
- `npx --prefer-offline --yes copilotkit@4.25.1 local status --json` from `<target>` and read `learning.configuration`.
240
+ `npx --prefer-offline --yes copilotkit@4.27.0 local status --json` from `<target>` and read `learning.configuration`.
220
241
 
221
242
  The command installs the local stack, then connects the starter to it. It writes the
222
243
  gitignored `.copilotkit/local.json` stack reference and `.copilotkit/project.json` with the
@@ -236,11 +257,37 @@ Do not rebuild the starter by hand. Then inspect only the generated
236
257
  paths inside the target directory. Record the files, install result, project connection,
237
258
  and validation commands.
238
259
 
260
+ ## Switch the starter to the recorded vendor
261
+
262
+ Each starter reads its model from `COPILOTKIT_AGENT_MODEL`, and `init` sets it to the
263
+ starter's default in the starter's env file. When the recorded `vendor.vendor` is another
264
+ vendor, the clone ran without `--model-key-file`. Switch the starter before you settle its
265
+ key. The Claude Agent SDK starters run only Anthropic, so never switch them. Switch an ADK
266
+ starter only to OpenAI or an OpenAI-compatible provider, and every other starter only to an
267
+ OpenAI-compatible provider: this release does not run them on Anthropic or Google. If the
268
+ recorded vendor is Anthropic or Google on such a starter, do not switch: say that this
269
+ release supports the row's vendors on that framework, that Anthropic and Google come in a
270
+ later release, and offer the Built-in CopilotKit agent if they need them now.
271
+
272
+ 1. Set `COPILOTKIT_AGENT_MODEL` in the starter's env file to the recorded vendor and a
273
+ model that the vendor serves to a new key today: `openai:<model>` on an ADK starter.
274
+ Do not change the starter's code.
275
+ 2. For an OpenAI-compatible provider, set `COPILOTKIT_AGENT_MODEL` to
276
+ `openai:<vendor.modelId>`, and `OPENAI_BASE_URL` to `vendor.baseUrl`.
277
+ 3. If the developer named a key file, copy the key with the `onboard credentials
278
+ --model-key <VARIABLE> --env-path <key-file> --copy-to <env file> --json` command above,
279
+ with the recorded vendor's variable. Otherwise the next section pauses for it.
280
+
281
+ For the Microsoft Agent Framework .NET starter, set these values with
282
+ `dotnet user-secrets set` from the agent directory, because .NET does not read the env
283
+ file. In the next section, check the recorded vendor's variable in place of the Model key
284
+ column's.
285
+
239
286
  ## Settle the model credential
240
287
 
241
288
  The `init` output names each key it copied from a key file as
242
- `Copied <VARIABLE> from the model key file into <file>`. A copied key is in place, so do
243
- not check it. If the key file did not hold a variable, the output warns by name.
289
+ `Copied <VARIABLE> from the model key file into <file>`. A copied key is in place, so it
290
+ needs no `grep` check. If the key file did not hold a variable, the output warns by name.
244
291
 
245
292
  The `init` output names each missing credential as `Set <VARIABLE> in .env`. For each
246
293
  one, check the starter's own `.env` without reading the value:
@@ -254,6 +301,13 @@ a count and never the value.
254
301
 
255
302
  If a variable is empty, ask the developer to add it to `<target>/.env` themselves.
256
303
 
304
+ A local server needs no key. That is a server such as Ollama or LM Studio, with
305
+ `OPENAI_BASE_URL` on `localhost`, `127.0.0.1` or `::1` in `<target>/.env`. A local base
306
+ URL that only your shell sets does not count, because it can be your own proxy. When
307
+ `<target>/.env` sets that base URL and the developer said it needs no key, do not ask for
308
+ one. Write `OPENAI_API_KEY=not-needed` to the file that the key goes in. The OpenAI SDKs
309
+ refuse an empty key, and a local server ignores the value. Write no other stand-in value.
310
+
257
311
  The two Microsoft Agent Framework starters keep their key outside `<target>/.env`, so
258
312
  `init` prints no `Set` line for them. Settle the key from the Model key column instead:
259
313
 
@@ -270,36 +324,56 @@ When you ask, name each variable and the file it goes in, and say that the run c
270
324
  when they reply or resume this session. Then report the pause and end your turn:
271
325
 
272
326
  ```text
273
- npx --prefer-offline --yes copilotkit@4.25.1 onboard checkpoint --phase awaiting-model-credential
327
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-model-credential
274
328
  ```
275
329
 
276
330
  This is a pause, not a stop. Do not send a stop report, and do not take a stop route.
277
331
  When the developer says the credential is in place, run the check again, and continue
278
332
  when every variable holds a value. For the .NET starter, continue on the developer's word. Do not write a placeholder or an empty value to get
279
333
  past this step. A starter with a dummy key looks finished and fails at the first model
280
- call.
334
+ call. The one exception is the `not-needed` value for a local server above.
281
335
 
282
336
  If no credential is missing, report no pause and continue.
283
337
 
284
- Then run `npx --prefer-offline --yes copilotkit@4.25.1 onboard read proof/round-trip`.
338
+ When every variable holds a value, ask its vendor whether the key can pay for a model call.
339
+ Run this from `<target>`, with one `--model-key` for each variable. For the Microsoft Agent
340
+ Framework Python starter, add `--env-path agent/.env`. Skip it for the .NET starter.
341
+
342
+ ```text
343
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard credentials --model-key <VARIABLE> --json
344
+ ```
285
345
 
286
- If the local command fails, `init` keeps the cloned starter in `<target>`. Do not run
287
- `init` again, because the target is no longer empty. Do not delete the starter or the stack.
288
- Report the exact error, and do not claim that the starter is ready. A failure that names
289
- Docker is an environment blocker, not a broken run. For example, Docker is stopped or
290
- missing, or `Docker available resources` or `Docker memory` is below 4 CPUs, 12 GiB of
346
+ The command never prints a value. If `status` is `ready`, continue. Otherwise do what
347
+ `next` says. When it says to ask `question.ask`, end your turn. The command already
348
+ reported the pause. When the developer replies, run the command again. If they choose
349
+ another provider that the framework can use, set `COPILOTKIT_AGENT_MODEL` to it, as the
350
+ previous section describes, and check that provider's variable instead. With the cause `model_unavailable`, the key
351
+ works and the app's model does not: the vendor does not serve the model that
352
+ `COPILOTKIT_AGENT_MODEL` names. When the developer agrees to the model that `question.ask`
353
+ names, or names another, change `COPILOTKIT_AGENT_MODEL` where `question.ask` says, and
354
+ run the command again.
355
+
356
+ Then run `npx --prefer-offline --yes copilotkit@4.27.0 onboard read proof/round-trip`.
357
+
358
+ If the local command fails, `init` keeps the cloned starter in `<target>`, and its error
359
+ says whether it installed the starter's dependencies, or names the command that does. Do
360
+ not run `init` again, because the target is no longer empty. Do not delete the starter or
361
+ the stack. Report the exact error, and do not claim that the starter is ready. A failure
362
+ with `eula_acceptance_required` goes back to the agreement step above, then resumes with
363
+ the `local setup` command below. A failure that names Docker is an environment blocker, not a broken run. For example, Docker is stopped or
364
+ missing, or `Docker available resources` or `Docker memory` is below 4 CPUs, 4 GiB of
291
365
  available memory, or 40 GiB storage. Tell the developer what to change in Docker. For
292
366
  memory, pass on the amount the message names. Then report the pause and end your turn:
293
367
 
294
368
  ```text
295
- npx --prefer-offline --yes copilotkit@4.25.1 onboard checkpoint --phase awaiting-developer
369
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-developer
296
370
  ```
297
371
 
298
372
  When the developer says that Docker is ready, resume from `<target>` with the same model
299
373
  choice. If the run used a `--candidate`, add the same one:
300
374
 
301
375
  ```text
302
- npx --prefer-offline --yes copilotkit@4.25.1 local setup --defer-model --json
376
+ npx --prefer-offline --yes copilotkit@4.27.0 local setup --defer-model --json
303
377
  ```
304
378
 
305
379
  If the run used model settings, replace `--defer-model` with `--model-config <private-file>`.
@@ -307,15 +381,16 @@ Read blockers and the recorded failed step. Do not delete or recreate a failed s
307
381
  setup reports the stack ready, connect the starter from `<target>`:
308
382
 
309
383
  ```text
310
- npx --prefer-offline --yes copilotkit@4.25.1 local connect --approve-connection --json
384
+ npx --prefer-offline --yes copilotkit@4.27.0 local connect --approve-connection --json
311
385
  ```
312
386
 
313
387
  The connection writes `.copilotkit/local.json`, `.copilotkit/project.json`, and the local
314
388
  keys in `<target>/.env`. Then continue with the credential check above. If the resumed
315
- setup fails again with an error that does not name Docker, take the route below.
389
+ setup fails again with an error that names neither Docker nor `eula_acceptance_required`,
390
+ take the route below.
316
391
 
317
392
  If the command fails, report its exact error and do not claim that the starter is ready.
318
393
  Then run
319
- `npx --prefer-offline --yes copilotkit@4.25.1 onboard read stopped/run-failed`. The starter is one this
394
+ `npx --prefer-offline --yes copilotkit@4.27.0 onboard read stopped/run-failed`. The starter is one this
320
395
  graph ships and the stack was chosen from its own supported list, so a command that
321
396
  returned an error is a run that broke, not a setup this release does not support.
@@ -21,6 +21,8 @@ Say what the developer has now. Name the processes still running and the files t
21
21
  changed, so they can carry on by hand or start again from a known state. A run that stops
22
22
  without saying what it left behind leaves the developer to discover it. This step prints
23
23
  `## The developer's files` below: relay that report as printed, with its restore command.
24
+ When the report says the run started in an empty folder, relay that one line alone in
25
+ place of the files: list no files and offer no restore.
24
26
 
25
27
  A step can fail on a network error: `EAI_AGAIN`, `ECONNRESET`, `ETIMEDOUT`, a timeout,
26
28
  or a message that names a proxy. The CLI has already tried that step again. Ask the
@@ -40,13 +42,13 @@ put to them, stop here and send the report below.
40
42
  Before you end your turn to wait for the developer, report the pause:
41
43
 
42
44
  ```text
43
- npx --prefer-offline --yes copilotkit@4.25.1 onboard checkpoint --phase awaiting-developer
45
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-developer
44
46
  ```
45
47
 
46
48
  If they approve it, make that one fix and nothing else. Then come back into this run:
47
49
 
48
50
  ```text
49
- npx --prefer-offline --yes copilotkit@4.25.1 onboard resume --message "<approval>"
51
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard resume --message "<approval>"
50
52
  ```
51
53
 
52
54
  Put the developer's approval in `--message`, in one or two sentences: the fix they
@@ -69,7 +71,7 @@ Send one short report. The friction command follows the telemetry setting the de
69
71
  already chose, so it needs no separate question.
70
72
 
71
73
  ```text
72
- npx --prefer-offline --yes copilotkit@4.25.1 onboard friction --phase stop --category <slug> --message "<sentences>"
74
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard friction --phase stop --category <slug> --message "<sentences>"
73
75
  ```
74
76
 
75
77
  `--message` takes one or two sentences: the step you stopped at and what stopped
@@ -32,13 +32,16 @@ Wiring is not behavior. The CopilotKit SDK dependency, the middleware the agent
32
32
  in, the runtime mount, the AG-UI connection, and a frontend that renders what the agent
33
33
  already returns are wiring. Plan them as ordinary steps.
34
34
 
35
- Every item on the behavior list is a change the developer has to approve. Where a step
36
- needs one, plan it as its own item, name the file and the exact change, and state that it
35
+ Every item on the behavior list is a change the developer has to approve, so it is a risky
36
+ change. Where a step needs one, plan it as its own item, name the file and the exact change, and state that it
37
37
  changes how the agent answers everywhere, not only in CopilotKit. A system prompt the
38
38
  developer wrote is the agent's behavior rather than a setting this run tunes until a
39
39
  component renders. Where the plan cannot be written without such a change and you cannot
40
40
  state it that way, return `Status: blocked`.
41
41
 
42
+ A run whose `environmentPath` ends in `.env.local` hosts the CopilotKit runtime in that
43
+ Next.js app, never in a separate server: no other process reads the key from that file.
44
+
42
45
  Plan the runtime to consume the Intelligence credential. The runtime takes an
43
46
  `intelligence` option holding a client built from the project key. A runtime given a
44
47
  `runner` option instead is the OSS runtime. It never reads the Intelligence key, and the
@@ -53,7 +56,7 @@ shows a `runner` option instead, the Intelligence quickstart wins.
53
56
  The main coding agent gives you a Learning Container id, or tells you the Learning step was
54
57
  skipped for this organization.
55
58
 
56
- Where it gives you an id, plan two things and name both in the plan the developer approves:
59
+ Where it gives you an id, plan two things and name both in the plan:
57
60
  the container id itself, and a `getLearningContainerId` callback returning that id on the
58
61
  `CopilotKitIntelligence` instance. Take the callback from the Learning page, and fetch it
59
62
  here rather than expecting the run to have handed it over:
@@ -94,7 +97,7 @@ against a dead host, and the failure arrives as an empty-body 404 with no cause
94
97
  Ask the CLI for the dependency upgrade, from the target directory:
95
98
 
96
99
  ```text
97
- npx --prefer-offline --yes copilotkit@4.25.1 onboard upgrade-plan --json
100
+ npx --prefer-offline --yes copilotkit@4.27.0 onboard upgrade-plan --json
98
101
  ```
99
102
 
100
103
  It reads the installed tree and the registry. Read `status`:
@@ -115,8 +118,8 @@ It reads the installed tree and the registry. Read `status`:
115
118
 
116
119
  The floor is 1.70.0 because the runtime resolves managed Intelligence entitlement
117
120
  authority from that version. Below it, the Intelligence features stay dark with no error.
118
- An exact pin is usually deliberate, so each move is a step the developer approves, not a
119
- repair the run invents halfway through. Where the developer needs a pin held, return
121
+ An exact pin is usually deliberate, so a move of one is a risky change the developer
122
+ approves, not a repair the run invents halfway through. Where the developer needs a pin held, return
120
123
  `Status: blocked` and name `unsupported/no-validated-path` as the outcome.
121
124
 
122
125
  A package the plan adds that a `@copilotkit/*` or `@ag-ui/*` package also depends on, such
@@ -128,6 +131,10 @@ version the target `@copilotkit/*` release requires, and plan the latest version
128
131
  Where the project already depends on that package, keep its version if that tree accepts
129
132
  it. Otherwise name the move in the plan, with the version it moves to.
130
133
 
134
+ A version the documentation gives as a dist-tag, such as `ai-v6` in `@ai-sdk/openai@ai-v6`,
135
+ is not a version. Resolve it with `npm view <package>@<tag> version`, and plan that exact
136
+ version.
137
+
131
138
  Where the SDK requires an application-level value that the repository cannot supply, such
132
139
  as an end-user identity for threads, use one clearly marked local placeholder and name what
133
140
  production requires instead. Do not stop onboarding to ask the developer for it.
@@ -142,9 +149,10 @@ If the value of the journey depends on data the project already holds, name that
142
149
  name where it lives, and name how it reaches the agent. Rendering a list in the DOM does
143
150
  not give the agent access to it. An agent wired without the page's data answers from
144
151
  entities it invents, and the answer looks correct. Take the frontend-context step from
145
- the selected documentation, and never guess the API. Where no selected page documents it
146
- for this framework or frontend, the data has no documented way to reach the agent: return
147
- `Status: blocked` and name `unsupported/no-validated-path` as the outcome.
152
+ the selected documentation, and never guess a CopilotKit API. Where no selected page shows
153
+ how this framework reads that data, the agent reads it from the AG-UI run input `context`,
154
+ as https://docs.copilotkit.ai/agent-app-context.md shows. Name the agent code that reads
155
+ `context` and passes it to the model.
148
156
 
149
157
  Where that data exists, name the entities the proof compares against: the ids, names, or
150
158
  records the project holds and the answer has to reference. Where the outcome references
@@ -177,23 +185,32 @@ here is work the developer did not ask for.
177
185
  Plan the threads drawer itself: add it from the selected drawer page, where this frontend
178
186
  does not already render one. Where this journey's frontend framework ships no threads
179
187
  drawer -- React Native --, plan that the thread is proved by
180
- `npx --prefer-offline --yes copilotkit@4.25.1 verify --round-trip`, which needs no browser. Do not plan a
188
+ `npx --prefer-offline --yes copilotkit@4.27.0 verify --round-trip`, which needs no browser. Do not plan a
181
189
  step that opens the managed Intelligence dashboard.
182
190
 
183
191
  ## Name the files the run writes itself
184
192
 
185
193
  List these in the plan under `Files the run writes itself`, apart from the implementation
186
- steps. They are not steps, and they need no separate approval. A developer who approved a plan
187
- without them reads each one later as a change they never agreed to.
194
+ steps. They are not steps, and they are not risky changes.
188
195
 
189
- - Each `planChanges` entry from `onboard credentials`: the project key in `.env`, the
190
- project record, and, where it lists `ignore-entries`, the lines `project select` adds to
191
- `.gitignore` so that no `.env` file can be committed.
196
+ - Each `planChanges` entry from `onboard credentials`: the project key in the env file
197
+ `environmentPath` names, the project record, and, where it lists `ignore-entries`, the
198
+ lines `project select` adds to `.gitignore` so that no credential env file can be
199
+ committed.
192
200
  - `.copilotkit/proof/`, where the proof writes its evidence. It holds no source. The
193
201
  developer can delete it after the run.
194
- - The CopilotKit Skills, as a line the developer approves or declines:
195
- `npx skills add CopilotKit/CopilotKit/skills -y`. It writes `.agents/skills/` and links
196
- it into `.claude/skills/`. Both sit in the working tree and show up in `git status`.
202
+
203
+ ## Name the Skills install
204
+
205
+ List the CopilotKit Skills install under `Skills install`, as its own line:
206
+ `npx skills add CopilotKit/CopilotKit/skills -y`. It writes `.agents/skills/` and links it
207
+ into `.claude/skills/`. End the line with "say **no Skills** to skip". Where
208
+ `.agents/skills` already holds the CopilotKit skills, write `in place` instead, and plan no
209
+ install.
210
+
211
+ The Skills install is not a risky change. It adds agent-rule files only, holds no secret,
212
+ changes nothing the app runs, and comes out with one delete. Do not list it under
213
+ `Risky changes`.
197
214
 
198
215
  ## Scaffold an empty project
199
216
 
@@ -226,7 +243,8 @@ the plan under `Uncommitted files`, one line each, with the path and one sentenc
226
243
  what the step changes there and why no other file will do. Keep the step in the plan.
227
244
  Adding a feature to an app the developer already built is the case this exists for: the
228
245
  option lives in a file they wrote, and on an app whose work was never committed that file
229
- has uncommitted changes. The approved plan is the developer's consent. The CLI records none.
246
+ has uncommitted changes. Each of those edits is a risky change, so the developer's answer
247
+ to the plan is their consent. The CLI records none.
230
248
 
231
249
  Installing or upgrading a package changes the manifest that lists it, such as `package.json`
232
250
  or `pyproject.toml`, and its lockfile, such as `package-lock.json` or `uv.lock`. Install
@@ -237,8 +255,8 @@ Do not plan the deletion of a file that has uncommitted changes, and do not plan
237
255
  moves or renames one. If a step cannot be written any other way, return `Status: blocked`
238
256
  and name the path.
239
257
 
240
- Keep final validation and proof outside the implementation steps. The developer approves
241
- one plan.
258
+ Keep final validation and proof outside the implementation steps. The developer sees one
259
+ plan.
242
260
 
243
261
  Keep a production build out of the validation commands. A type check plus the real round
244
262
  trip is the proof, and the round trip runs in development mode. Name the production build
@@ -252,8 +270,8 @@ directory in `nextjsWithoutCopilotKit`, plan it as its own step, before the firs
252
270
  that imports a CopilotKit package in that directory. Name the migration `file` and each
253
271
  change in `changes`, and give its `reason` in one sentence. Under `node` or `node10`
254
272
  resolution, TypeScript ignores a package's `exports` map, so every CopilotKit subpath
255
- import fails the type check while the app still runs. A plan without this step stops after
256
- approval to ask for it. If the file has uncommitted changes, list it under
273
+ import fails the type check while the app still runs. A plan without this step stops partway
274
+ through the build to ask for it. If the file has uncommitted changes, list it under
257
275
  `Uncommitted files`. Where no migration is reported, do not change
258
276
  `moduleResolution` or `module`. This change does not weaken type safety.
259
277
 
@@ -270,6 +288,45 @@ Do not add compiler strictness the project did not have. Nothing later in the ru
270
288
  allowed to weaken type safety, so a stricter gate named here is one the run cannot get
271
289
  back out of.
272
290
 
291
+ ## Name the risky changes
292
+
293
+ The run shows the plan to the developer and goes on to build it without waiting. It stops
294
+ for an answer only when the plan makes a risky change. `onboard start` took a backup, so
295
+ `onboard restore` undoes any other change the backup holds.
296
+
297
+ List each risky change under `Risky changes`, one line each: the path or package, what the
298
+ step does to it, and why the plan needs it. Write `none` when there is no risky change. A
299
+ step makes a risky change when it:
300
+
301
+ - upgrades a dependency by a major version: a move whose `to` has a different major version
302
+ than `from`, or a move of an exact pin
303
+ - removes a dependency the app already uses, or moves one outside the range the app
304
+ declares
305
+ - deletes, moves, or renames a file the developer wrote
306
+ - changes a file that has uncommitted changes, from `Uncommitted files`
307
+ - untracks a file or changes `.gitignore`, other than the lines under
308
+ `Files the run writes itself`
309
+ - writes to an env file the app already uses, other than the key line the developer
310
+ approved in the setup questions
311
+ - changes the existing agent's behavior, as `What the existing agent's behavior is`
312
+ defines it
313
+ - changes more than 10 files in all, the same limit the backup tripwire sets for deleted
314
+ files
315
+ - writes a file outside the project directory
316
+ - changes the version of any CopilotKit dependency: an `@copilotkit/*` package or the
317
+ `copilotkit` Python package, by any amount
318
+
319
+ The plan is also risky when the backup does not hold every file: `backup.status` is
320
+ `partial` or `failed` in the `backup` result the main coding agent gives you. Name it as a
321
+ line of its own. For `partial`, name each path in `backup.notHeld` with its `why`, which
322
+ names the limit for a size skip, and the count in `backup.moreNotHeld` if any. For
323
+ `failed`, name the cause in `backup.detail`, and that `onboard restore` puts nothing back.
324
+ A step that changes one of those paths cannot be undone. `pending` is not risky: the CLI
325
+ takes the backup when the run moves to the chosen project, or at the next step, before any
326
+ change. Say that in the plan.
327
+
328
+ Do not leave a risky change out of the list to keep the run moving.
329
+
273
330
  Gather what you need in as few commands as possible. Combine independent reads into one
274
331
  command rather than running them one at a time. Split a command only when its result decides
275
332
  what you run next.