@cursor/bdk 0.2.17 → 0.2.20

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 (254) hide show
  1. package/AGENTS.md +16 -6
  2. package/dist/bin/agent-serve.js +7 -0
  3. package/dist/channels/runs/index.d.ts +4 -0
  4. package/dist/channels/runs/index.d.ts.map +1 -0
  5. package/dist/channels/runs/index.js +2 -0
  6. package/dist/channels/runs/runs-channel.d.ts +5 -0
  7. package/dist/channels/runs/runs-channel.d.ts.map +1 -0
  8. package/dist/channels/runs/runs-channel.js +34 -0
  9. package/dist/channels/runs/types.d.ts +34 -0
  10. package/dist/channels/runs/types.d.ts.map +1 -0
  11. package/dist/channels/runs/types.js +1 -0
  12. package/dist/channels/slack/slack-channel.d.ts +3 -2
  13. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  14. package/dist/channels/slack/slack-channel.js +9 -2
  15. package/dist/docs/404.html +2 -2
  16. package/dist/docs/assets/{app.CUNuFTSm.js → app.BzgJFr_T.js} +4 -4
  17. package/dist/docs/assets/chunks/@localSearchIndexroot.gGwBYU3d.js +1 -0
  18. package/dist/docs/assets/chunks/{VPLocalSearchBox.Dez74k0W.js → VPLocalSearchBox.Bn5QyUDM.js} +1 -1
  19. package/dist/docs/assets/chunks/{arc.CJ3FhK7H.js → arc.D734Gm5d.js} +1 -1
  20. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CfUdbHsa.js → architectureDiagram-Q4EWVU46.NX1jj-YX.js} +1 -1
  21. package/dist/docs/assets/chunks/{baseUniq.D93LawU9.js → baseUniq.nd8dxdeO.js} +1 -1
  22. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.Zvsd6UHP.js → blockDiagram-DXYQGD6D.DG8faTim.js} +1 -1
  23. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.CGX5xZ9d.js → c4Diagram-AHTNJAMY.zD31AJ3b.js} +1 -1
  24. package/dist/docs/assets/chunks/channel.DQLJQMi3.js +1 -0
  25. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CCIf0QCo.js → chunk-4BX2VUAB.BHQj6Rko.js} +1 -1
  26. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.D_N1RPyi.js → chunk-4TB4RGXK.Cs38Yh16.js} +1 -1
  27. package/dist/docs/assets/chunks/{chunk-55IACEB6.B1oecjzx.js → chunk-55IACEB6.CFUR21JO.js} +1 -1
  28. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.BzUNVPGX.js → chunk-EDXVE4YY.C80-Sneg.js} +1 -1
  29. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DheI8WSO.js → chunk-FMBD7UC4.CdT1MGza.js} +1 -1
  30. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.Bg4iL0sM.js → chunk-OYMX7WX6.BctEzab0.js} +1 -1
  31. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.CSQjDhAD.js → chunk-QZHKN3VN.DTneeX3k.js} +1 -1
  32. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.BDdxnPU4.js → chunk-YZCP3GAM.Cz47F_-o.js} +1 -1
  33. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.j55aerUT.js +1 -0
  34. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.j55aerUT.js +1 -0
  35. package/dist/docs/assets/chunks/clone.XimRS84I.js +1 -0
  36. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.AT0weO8r.js → cose-bilkent-S5V4N54A.BPYgB-_O.js} +1 -1
  37. package/dist/docs/assets/chunks/{dagre-KV5264BT.CJ30TxV0.js → dagre-KV5264BT.Cu6hECod.js} +1 -1
  38. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.KtE--1fW.js → diagram-5BDNPKRD.BMgp95Tz.js} +1 -1
  39. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.BFGygSUQ.js → diagram-G4DWMVQ6.towWdhDi.js} +1 -1
  40. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BLU-79eb.js → diagram-MMDJMWI5.D9IfOvE9.js} +1 -1
  41. package/dist/docs/assets/chunks/{diagram-TYMM5635.CdjfJdVG.js → diagram-TYMM5635.NTX57RPu.js} +1 -1
  42. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.Dj1Iwypl.js → erDiagram-SMLLAGMA.DIQLqDqu.js} +1 -1
  43. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BXqj_Su2.js → flowDiagram-DWJPFMVM.DhqpItRe.js} +1 -1
  44. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.CNfgGSst.js → ganttDiagram-T4ZO3ILL.B998R3Ps.js} +1 -1
  45. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.2tgvFDBr.js → gitGraphDiagram-UUTBAWPF.B45nTn8-.js} +1 -1
  46. package/dist/docs/assets/chunks/{graph.CWHZMxx6.js → graph.DPseWzzM.js} +1 -1
  47. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.DhLIK8m1.js → infoDiagram-42DDH7IO._GhhBBai.js} +1 -1
  48. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.BIN11n1G.js → ishikawaDiagram-UXIWVN3A.CTUMcaMM.js} +1 -1
  49. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BARmNJ0n.js → journeyDiagram-VCZTEJTY.DkJBUddC.js} +1 -1
  50. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.BrTJYFyF.js → kanban-definition-6JOO6SKY.B5Q3uwhy.js} +1 -1
  51. package/dist/docs/assets/chunks/{layout.CPZIIywK.js → layout.CDY13IKh.js} +1 -1
  52. package/dist/docs/assets/chunks/{linear.DTpmzI5S.js → linear.BPd1ql9p.js} +1 -1
  53. package/dist/docs/assets/chunks/{min.BBLQmXwZ.js → min.dlGuqIBP.js} +1 -1
  54. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.5qkWJvdl.js → mindmap-definition-QFDTVHPH.Cp7zCtmb.js} +1 -1
  55. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.-4wufv_f.js → pieDiagram-DEJITSTG.CRH034nu.js} +1 -1
  56. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.C0jrp1-8.js → quadrantDiagram-34T5L4WZ.BspgZ-pX.js} +1 -1
  57. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.DUDpANfe.js → requirementDiagram-MS252O5E.CQZqZ0nZ.js} +1 -1
  58. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.74Lvg6Gu.js → sankeyDiagram-XADWPNL6.DllwFU3k.js} +1 -1
  59. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BHDIH286.js → sequenceDiagram-FGHM5R23.B5fTXycf.js} +1 -1
  60. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.Dr-HIuLb.js → stateDiagram-FHFEXIEX.12GQjmbD.js} +1 -1
  61. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.Ctv5WEMu.js +1 -0
  62. package/dist/docs/assets/chunks/{theme.H8zSBhlM.js → theme.BgocqONV.js} +2 -2
  63. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.GtyCaSiL.js → timeline-definition-GMOUNBTQ.DXKUL5rH.js} +1 -1
  64. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DLId0rxH.js → vennDiagram-DHZGUBPP.BrsjYCjp.js} +1 -1
  65. package/dist/docs/assets/chunks/wardley-RL74JXVD.DZDndEXQ.js +162 -0
  66. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.CI6mGYNG.js → wardleyDiagram-NUSXRM2D.C4oM69gv.js} +1 -1
  67. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.CG1n865F.js → xychartDiagram-5P7HB3ND.qzHH9efW.js} +1 -1
  68. package/dist/docs/assets/{deployment.md.ajc3VM0m.js → deployment.md.D0uprX2p.js} +3 -3
  69. package/dist/docs/assets/{deployment.md.ajc3VM0m.lean.js → deployment.md.D0uprX2p.lean.js} +1 -1
  70. package/dist/docs/assets/{guides_agent-to-agent.md.Cps5NiCV.js → guides_agent-to-agent.md.CwL5cwuE.js} +6 -5
  71. package/dist/docs/assets/{guides_agent-to-agent.md.Cps5NiCV.lean.js → guides_agent-to-agent.md.CwL5cwuE.lean.js} +1 -1
  72. package/dist/docs/assets/guides_export-grokbot.md.qo5bxi4h.js +55 -0
  73. package/dist/docs/assets/guides_export-grokbot.md.qo5bxi4h.lean.js +1 -0
  74. package/dist/docs/assets/{guides_opentelemetry.md.jcPNrQbH.js → guides_opentelemetry.md.BHPm32OR.js} +3 -3
  75. package/dist/docs/assets/{guides_opentelemetry.md.jcPNrQbH.lean.js → guides_opentelemetry.md.BHPm32OR.lean.js} +1 -1
  76. package/dist/docs/assets/{index.md.CHAFTf6m.js → index.md.CAnsLl8D.js} +2 -2
  77. package/dist/docs/assets/{index.md.CHAFTf6m.lean.js → index.md.CAnsLl8D.lean.js} +1 -1
  78. package/dist/docs/assets/{reference_cli.md.Bt3sAfat.js → reference_cli.md.Bkrsce22.js} +7 -4
  79. package/dist/docs/assets/{reference_cli.md.Bt3sAfat.lean.js → reference_cli.md.Bkrsce22.lean.js} +1 -1
  80. package/dist/docs/assets/{reference_connections.md.CxbLpaaP.js → reference_connections.md.BJE2Zllp.js} +4 -4
  81. package/dist/docs/assets/{reference_connections.md.CxbLpaaP.lean.js → reference_connections.md.BJE2Zllp.lean.js} +1 -1
  82. package/dist/docs/assets/{reference_hooks.md.DbJC8mcZ.js → reference_hooks.md.CP3FENFJ.js} +1 -1
  83. package/dist/docs/assets/reference_memory.md.BwyJXYZe.js +4 -0
  84. package/dist/docs/assets/reference_memory.md.BwyJXYZe.lean.js +1 -0
  85. package/dist/docs/assets/{reference_skills.md.Ckddg6KX.js → reference_skills.md.C2GWh7g8.js} +3 -3
  86. package/dist/docs/building-with-agents.html +35 -35
  87. package/dist/docs/deployment.html +38 -38
  88. package/dist/docs/deployment.md +17 -0
  89. package/dist/docs/evals.html +35 -35
  90. package/dist/docs/guides/agent-to-agent.html +41 -40
  91. package/dist/docs/guides/agent-to-agent.md +34 -21
  92. package/dist/docs/guides/bitbucket.html +35 -35
  93. package/dist/docs/guides/cloud-agents.html +35 -35
  94. package/dist/docs/guides/convert-automation.html +35 -35
  95. package/dist/docs/guides/export-grokbot.html +114 -0
  96. package/dist/docs/guides/export-grokbot.md +239 -0
  97. package/dist/docs/guides/github.html +35 -35
  98. package/dist/docs/guides/gitlab.html +35 -35
  99. package/dist/docs/guides/grokbot-agents.html +35 -35
  100. package/dist/docs/guides/hooks.html +35 -35
  101. package/dist/docs/guides/improve.html +35 -35
  102. package/dist/docs/guides/jev.html +35 -35
  103. package/dist/docs/guides/mcp-oauth.html +35 -35
  104. package/dist/docs/guides/migrate.html +36 -36
  105. package/dist/docs/guides/opentelemetry.html +37 -37
  106. package/dist/docs/guides/opentelemetry.md +19 -0
  107. package/dist/docs/guides/slack.html +35 -35
  108. package/dist/docs/guides/webhooks.html +35 -35
  109. package/dist/docs/hashmap.json +1 -1
  110. package/dist/docs/hillclimbing.html +35 -35
  111. package/dist/docs/index.html +37 -37
  112. package/dist/docs/index.md +3 -0
  113. package/dist/docs/llms-full.txt +493 -29
  114. package/dist/docs/llms.txt +2 -0
  115. package/dist/docs/quickstart.html +35 -35
  116. package/dist/docs/reference/agent-config.html +35 -35
  117. package/dist/docs/reference/artifacts.html +35 -35
  118. package/dist/docs/reference/channels.html +35 -35
  119. package/dist/docs/reference/cli.html +41 -38
  120. package/dist/docs/reference/cli.md +39 -1
  121. package/dist/docs/reference/connections.html +38 -38
  122. package/dist/docs/reference/connections.md +16 -6
  123. package/dist/docs/reference/evals.html +36 -36
  124. package/dist/docs/reference/extensions.html +35 -35
  125. package/dist/docs/reference/hooks.html +38 -38
  126. package/dist/docs/reference/hooks.md +2 -1
  127. package/dist/docs/reference/http-api.html +35 -35
  128. package/dist/docs/reference/instructions.html +35 -35
  129. package/dist/docs/reference/memory.html +63 -0
  130. package/dist/docs/reference/memory.md +114 -0
  131. package/dist/docs/reference/playground.html +35 -35
  132. package/dist/docs/reference/project-layout.html +35 -35
  133. package/dist/docs/reference/prompt.html +35 -35
  134. package/dist/docs/reference/schedules.html +35 -35
  135. package/dist/docs/reference/sessions.html +35 -35
  136. package/dist/docs/reference/skills.html +38 -38
  137. package/dist/docs/reference/subagents.html +35 -35
  138. package/dist/docs/reference/tools.html +35 -35
  139. package/dist/docs/templates/agentic-owners.html +35 -35
  140. package/dist/docs/templates/grokbot-agents.html +35 -35
  141. package/dist/docs/templates/security-reviewer.html +35 -35
  142. package/dist/docs/templates/thermo-quality-review.html +35 -35
  143. package/dist/docs/templates/thermo-review.html +35 -35
  144. package/dist/docs/templates/triage.html +35 -35
  145. package/dist/docs/troubleshooting.html +35 -35
  146. package/dist/evals.d.ts +1 -1
  147. package/dist/evals.js +1 -1
  148. package/dist/extensions/cursor-cloud-agents/extension.d.ts +2 -2
  149. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  150. package/dist/extensions/cursor-cloud-agents/extension.js +1 -1
  151. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +8 -1
  152. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -1
  153. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +10 -1
  154. package/dist/internal/cli-ax.d.ts +7 -7
  155. package/dist/internal/cli-ax.d.ts.map +1 -1
  156. package/dist/internal/cli-ax.js +36 -15
  157. package/dist/internal/cli-deploy.d.ts.map +1 -1
  158. package/dist/internal/cli-deploy.js +0 -14
  159. package/dist/internal/cloud-turn-usage.d.ts +34 -0
  160. package/dist/internal/cloud-turn-usage.d.ts.map +1 -0
  161. package/dist/internal/cloud-turn-usage.js +94 -0
  162. package/dist/internal/continuation-channel.d.ts.map +1 -1
  163. package/dist/internal/continuation-channel.js +6 -0
  164. package/dist/internal/continuation-identity.d.ts +6 -3
  165. package/dist/internal/continuation-identity.d.ts.map +1 -1
  166. package/dist/internal/continuation-identity.js +43 -0
  167. package/dist/internal/estimate-cost.d.ts +55 -0
  168. package/dist/internal/estimate-cost.d.ts.map +1 -0
  169. package/dist/internal/{turn-cost.js → estimate-cost.js} +18 -26
  170. package/dist/internal/event-log.d.ts +2 -2
  171. package/dist/internal/event-log.js +2 -2
  172. package/dist/internal/http-channel.d.ts.map +1 -1
  173. package/dist/internal/http-channel.js +21 -2
  174. package/dist/internal/http-control-plane-session.d.ts +5 -2
  175. package/dist/internal/http-control-plane-session.d.ts.map +1 -1
  176. package/dist/internal/http-control-plane-session.js +38 -2
  177. package/dist/internal/init-scaffold.d.ts.map +1 -1
  178. package/dist/internal/init-scaffold.js +3 -4
  179. package/dist/internal/model-config.d.ts +7 -0
  180. package/dist/internal/model-config.d.ts.map +1 -0
  181. package/dist/internal/model-config.js +67 -0
  182. package/dist/internal/otel/collector.d.ts +3 -3
  183. package/dist/internal/otel/collector.d.ts.map +1 -1
  184. package/dist/internal/otel/collector.js +8 -21
  185. package/dist/internal/otel/computer-use-attrs.d.ts +13 -0
  186. package/dist/internal/otel/computer-use-attrs.d.ts.map +1 -0
  187. package/dist/internal/otel/computer-use-attrs.js +29 -0
  188. package/dist/internal/peer-connections.d.ts +17 -8
  189. package/dist/internal/peer-connections.d.ts.map +1 -1
  190. package/dist/internal/peer-connections.js +41 -10
  191. package/dist/internal/request-error-status.d.ts.map +1 -1
  192. package/dist/internal/request-error-status.js +4 -1
  193. package/dist/internal/resolved-connections.d.ts +4 -1
  194. package/dist/internal/resolved-connections.d.ts.map +1 -1
  195. package/dist/internal/resolved-connections.js +9 -4
  196. package/dist/internal/sdk-runner.d.ts.map +1 -1
  197. package/dist/internal/sdk-runner.js +16 -14
  198. package/dist/internal/server.d.ts.map +1 -1
  199. package/dist/internal/server.js +2 -1
  200. package/dist/internal/session-cost.d.ts +21 -22
  201. package/dist/internal/session-cost.d.ts.map +1 -1
  202. package/dist/internal/session-cost.js +38 -46
  203. package/dist/internal/session-engine.d.ts +25 -41
  204. package/dist/internal/session-engine.d.ts.map +1 -1
  205. package/dist/internal/session-engine.js +130 -122
  206. package/dist/internal/sessions-client.d.ts +13 -1
  207. package/dist/internal/sessions-client.d.ts.map +1 -1
  208. package/dist/internal/sessions-client.js +24 -0
  209. package/dist/internal/storage-coordinator.d.ts +9 -9
  210. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  211. package/dist/internal/storage-coordinator.js +116 -36
  212. package/dist/internal/testing/factory-resource-fixtures.d.ts +16 -0
  213. package/dist/internal/testing/factory-resource-fixtures.d.ts.map +1 -1
  214. package/dist/internal/testing/factory-resource-fixtures.js +14 -0
  215. package/dist/internal/trajectory.d.ts +5 -6
  216. package/dist/internal/trajectory.d.ts.map +1 -1
  217. package/dist/internal/trajectory.js +1 -13
  218. package/dist/memory.d.ts +5 -2
  219. package/dist/memory.d.ts.map +1 -1
  220. package/dist/memory.js +1 -1
  221. package/dist/playground/assets/cursor-icons-16-gwXtdAvu.woff2 +0 -0
  222. package/dist/playground/assets/index-C77_FdOx.css +1 -0
  223. package/dist/playground/assets/index-CvzI2lhj.js +71 -0
  224. package/dist/playground/index.html +2 -2
  225. package/dist/types.d.ts +57 -22
  226. package/dist/types.d.ts.map +1 -1
  227. package/docs/README.md +3 -0
  228. package/docs/deployment.md +17 -0
  229. package/docs/guides/agent-to-agent.md +34 -21
  230. package/docs/guides/export-grokbot.md +244 -0
  231. package/docs/guides/opentelemetry.md +19 -0
  232. package/docs/reference/cli.md +39 -1
  233. package/docs/reference/connections.md +16 -6
  234. package/docs/reference/hooks.md +2 -1
  235. package/docs/reference/memory.md +119 -0
  236. package/package.json +13 -5
  237. package/templates/agentic-owners/bot/lib/owners/matching.ts +57 -2
  238. package/dist/docs/assets/chunks/@localSearchIndexroot.3c56VHUt.js +0 -1
  239. package/dist/docs/assets/chunks/channel.S8-FFjmE.js +0 -1
  240. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BB98tFjZ.js +0 -1
  241. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BB98tFjZ.js +0 -1
  242. package/dist/docs/assets/chunks/clone.B98w8OEv.js +0 -1
  243. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DW_lwpZY.js +0 -1
  244. package/dist/docs/assets/chunks/wardley-RL74JXVD.CSlECTHi.js +0 -162
  245. package/dist/internal/cloud-turn-cost.d.ts +0 -42
  246. package/dist/internal/cloud-turn-cost.d.ts.map +0 -1
  247. package/dist/internal/cloud-turn-cost.js +0 -120
  248. package/dist/internal/turn-cost.d.ts +0 -41
  249. package/dist/internal/turn-cost.d.ts.map +0 -1
  250. package/dist/playground/assets/cursor-icons-16-4RnoYH3n.woff2 +0 -0
  251. package/dist/playground/assets/index-7fVUOA5l.css +0 -1
  252. package/dist/playground/assets/index-U3TRnwAP.js +0 -71
  253. /package/dist/docs/assets/{reference_hooks.md.DbJC8mcZ.lean.js → reference_hooks.md.CP3FENFJ.lean.js} +0 -0
  254. /package/dist/docs/assets/{reference_skills.md.Ckddg6KX.lean.js → reference_skills.md.C2GWh7g8.lean.js} +0 -0
@@ -194,6 +194,18 @@ The source repository must be available through the team's repository
194
194
  integration, and a nested `--path` must contain an installable BDK
195
195
  project.
196
196
 
197
+ ### Connect deployed peers
198
+
199
+ A team-owned deployment can call another agent deployed by the same team with
200
+ `defineConnection({ agent: "weather-agent" })`. Deploy the specialist and the
201
+ caller; Cursor-managed hosting resolves the slug and authenticates the call,
202
+ so you don't configure a peer URL, header, or secret.
203
+
204
+ Redeploy the caller after adding or changing a peer connection. An agent last
205
+ deployed before hosted peer connections became available also needs one
206
+ redeploy. See [Peer agents](/docs/guides/agent-to-agent.md) for delegation,
207
+ session affinity, and local development.
208
+
197
209
  ### Privacy Mode
198
210
 
199
211
  A hosted deployment stores a snapshot of its source repository, along
@@ -206,6 +218,11 @@ you, which is your team's setting when the team enforces one:
206
218
  | Privacy Mode | Available. Cursor stores deployment data the same way it does without Privacy Mode, and the agent's model requests get the same Privacy Mode handling as your other Cursor requests. |
207
219
  | Privacy Mode (Legacy) | Not available. `deploy` fails, because this setting doesn't let Cursor store code. |
208
220
 
221
+ The stored data includes the [memory](/docs/reference/memory.md) journal,
222
+ which `bdk init` turns on. The journal holds user messages and the
223
+ agent's replies. With Privacy Mode, Cursor stores it only to run your
224
+ agent and doesn't train on it.
225
+
209
226
  ## Add egress and secrets
210
227
 
211
228
  Declare the external hosts and secret names the agent needs. Mounted
@@ -676,10 +693,12 @@ Source: /docs/guides/agent-to-agent.md
676
693
 
677
694
  # Peer agents
678
695
 
679
- A peer connection lets one agent ask another agent on the same host for
680
- help. The specialist keeps its own instructions, tools, and session,
681
- while the caller decides when to delegate and returns the answer to the
682
- user. Co-host both projects under one `bdk` process.
696
+ A peer connection lets one agent ask an independent specialist for help.
697
+ On Cursor-managed hosting, team-owned agents reach peers by deployment
698
+ slug. Deploy both agents and BDK handles routing and authentication; you
699
+ don't configure a URL, header, or secret. The specialist keeps its own
700
+ instructions, tools, and session while the caller decides when to delegate
701
+ and returns the answer to the user.
683
702
 
684
703
  ## Delegate a question to a specialist
685
704
 
@@ -704,14 +723,15 @@ When a request needs current weather, ask the `weather` peer. Return its
704
723
  answer.
705
724
  ```
706
725
 
707
- ```text
708
- bdk dev ./agents
709
- bdk chat --url http://127.0.0.1:3000/concierge \
710
- --message "What's the weather in Paris right now?"
726
+ Deploy the specialist and caller from pushed Git refs:
727
+
728
+ ```bash
729
+ bdk deploy --dir ./agents/weather-agent --slug weather-agent
730
+ bdk deploy --dir ./agents/concierge --slug concierge
711
731
  ```
712
732
 
713
- The connection filename is the MCP server name the concierge calls, and
714
- `agent` is the specialist's mount slug, normally its directory name.
733
+ The connection filename, `weather.ts`, becomes the MCP server name the
734
+ concierge calls. Set `agent` to the specialist's lowercase deployment slug.
715
735
 
716
736
  ## Continue the specialist's session
717
737
 
@@ -779,6 +799,19 @@ return {
779
799
  `call_tool` appears only when the peer declares at least one
780
800
  deterministic server tool.
781
801
 
802
+ ## Try it locally
803
+
804
+ Run both projects under one process to try the same connection locally:
805
+
806
+ ```bash
807
+ bdk dev ./agents
808
+ bdk chat --url http://127.0.0.1:3000/concierge \
809
+ --message "What's the weather in Paris right now?"
810
+ ```
811
+
812
+ In a local multi-agent serve, `agent` is the specialist's mount slug,
813
+ normally its directory name.
814
+
782
815
  ## Peer or subagent?
783
816
 
784
817
  Use a [subagent](/docs/reference/subagents.md) to split one agent's job
@@ -789,12 +822,12 @@ complete agent you would also run, inspect, or expose on its own.
789
822
  | --- | --- | --- |
790
823
  | Context | Child role inside one agent | Independent agent and session |
791
824
  | Tools and connections | Inherits the parent project | Owns its project surface |
792
- | Reachability | Parent only | Other co-hosted agents and MCP clients |
825
+ | Reachability | Parent only | Local co-hosted agents, or declared deployments on the same team |
793
826
 
794
827
  ## Affinity
795
828
 
796
- Those turns show up in the peer's playground. Only the session owner
797
- can continue or check them.
829
+ Peer sessions appear in the specialist's playground. Only the calling
830
+ deployment can continue a hosted peer session.
798
831
 
799
832
  ## Practices
800
833
 
@@ -806,14 +839,11 @@ can continue or check them.
806
839
 
807
840
  ## Other hosts
808
841
 
809
- Peers require the default multi-agent layout; unknown slugs and
810
- self-references fail at startup.
811
-
812
- Local-runtime peers on the same serve host use loopback. Turns that run
813
- elsewhere cannot reach that address, so expose the process separately,
814
- protect it with `--bearer-token`, and pass its external base URL through
815
- `--public-url`. The flag advertises the URL; it does not expose the
816
- process. The [Deployment guide](/docs/deployment.md) owns the hosting setup.
842
+ For self-hosting, run peers under one `bdk` process. If turns run on remote
843
+ workers, protect the process with `--bearer-token` and set its external URL
844
+ with `--public-url`. Hosts that run one agent per process can supply
845
+ `--peers-url`; Cursor-managed hosting configures it automatically. See
846
+ [Deployment](/docs/deployment.md) for the secure hosting setup.
817
847
 
818
848
  ## Related
819
849
 
@@ -1394,6 +1424,250 @@ entirely in managed configuration.
1394
1424
 
1395
1425
  ---
1396
1426
 
1427
+ Source: /docs/guides/export-grokbot.md
1428
+
1429
+ # Export a Grok Bot to a BDK project
1430
+
1431
+ `bdk init --from-grokbot` turns a Grok Bot recipe into a project you can
1432
+ review, run locally, and keep in source control. It carries over the bot's
1433
+ profile, selected skills and routines, memory, and connectors where BDK has a
1434
+ matching project surface.
1435
+
1436
+ ## Preview the export
1437
+
1438
+ Start with `--dry-run`. The command resolves the same defaults as a real
1439
+ export and shows every planned file, warning, secret name, and follow-up
1440
+ without creating the target directory or installing packages.
1441
+
1442
+ ```bash
1443
+ bdk init ./launch-desk \
1444
+ --from-grokbot ./launch-desk.recipe.json \
1445
+ --dry-run
1446
+ ```
1447
+
1448
+ Selected lines from the example recipe's non-interactive preview look like
1449
+ this:
1450
+
1451
+ ```text
1452
+ Dry run: "Launch Desk" → ./launch-desk (nothing written)
1453
+
1454
+ bot/agent.ts profile
1455
+ bot/channels/slack.ts routines/launch-questions, routines/blocker-watch, routines/ship-it
1456
+ bot/instructions.md profile, gettingStarted, routines/launch-questions, routines/blocker-watch, routines/ship-it, memory
1457
+ bot/mcp-connections/linear.ts plugins/linear
1458
+ bot/schedules/morning-launch-brief.md routines/morning-launch-brief
1459
+ bot/skills/release-checklist/SKILL.md skills/release-checklist
1460
+ SECRETS.md answers
1461
+ ...
1462
+
1463
+ Defaulted without asking:
1464
+ - name
1465
+ - description
1466
+ - model
1467
+ ...
1468
+
1469
+ Not carried over:
1470
+ - profile.avatar: BDK agents have no avatar; kept in grokbot-export.json for the Slack app icon.
1471
+
1472
+ Secrets to set (names only; see SECRETS.md):
1473
+ - LAUNCH_DESK_SLACK_APP_TOKEN
1474
+ - LAUNCH_DESK_SLACK_BOT_TOKEN
1475
+ ```
1476
+
1477
+ Each file row names the recipe parts that produced it. The remaining sections
1478
+ list defaults, answers the recipe ignored, excluded items, unmapped behavior,
1479
+ routine placeholders, fresh connector sign-ins, warnings, and setup steps.
1480
+
1481
+ Add `--json` when a script needs the preview:
1482
+
1483
+ ```bash
1484
+ bdk init ./launch-desk \
1485
+ --from-grokbot ./launch-desk.recipe.json \
1486
+ --dry-run \
1487
+ --json
1488
+ ```
1489
+
1490
+ The core JSON shape is:
1491
+
1492
+ ```json
1493
+ {
1494
+ "ok": true,
1495
+ "dryRun": true,
1496
+ "directory": "/work/launch-desk",
1497
+ "preview": {
1498
+ "files": [],
1499
+ "defaulted": [],
1500
+ "ignored": [],
1501
+ "excluded": [],
1502
+ "unmapped": [],
1503
+ "fillIns": [],
1504
+ "secrets": { "names": [], "reauth": [] },
1505
+ "warnings": [],
1506
+ "setupSteps": []
1507
+ }
1508
+ }
1509
+ ```
1510
+
1511
+ See [`bdk init`](/docs/reference/cli.md#init) for the complete preview fields and
1512
+ flag behavior.
1513
+
1514
+ ## Choose an answers file or the terminal interview
1515
+
1516
+ Run the command in a terminal when you want to review each choice once. Press
1517
+ Enter to accept a default.
1518
+
1519
+ ```bash
1520
+ bdk init ./launch-desk \
1521
+ --from-grokbot ./launch-desk.recipe.json
1522
+ ```
1523
+
1524
+ Use `--answers` for a repeatable export or a non-interactive environment. This
1525
+ minimal file validates against the published schema and accepts every recipe
1526
+ default:
1527
+
1528
+ ```json
1529
+ {
1530
+ "$schema": "./node_modules/@cursor/bdk/schemas/grokbot-answers.schema.json",
1531
+ "version": 1
1532
+ }
1533
+ ```
1534
+
1535
+ Save it as `grokbot-answers.json`, then run:
1536
+
1537
+ ```bash
1538
+ bdk init ./launch-desk \
1539
+ --from-grokbot ./launch-desk.recipe.json \
1540
+ --answers ./grokbot-answers.json
1541
+ ```
1542
+
1543
+ The `$schema` property is an optional editor hint. Add only the choices you
1544
+ want to override; any answer present in the file is not asked again. A
1545
+ positional directory such as `./launch-desk` overrides `location` in the
1546
+ answers file.
1547
+
1548
+ When stdin or stdout is not a TTY, the command never prompts. `--json` also
1549
+ uses this non-interactive path. Missing fields take their defaults and appear
1550
+ under **Defaulted without asking** or `preview.defaulted`. If a required
1551
+ conditional answer has no default, such as the time for a scheduled decision,
1552
+ the command stops and names the field to add to the answers file.
1553
+
1554
+ ## Write and check the project
1555
+
1556
+ Remove `--dry-run` after the preview matches your intent. The command writes
1557
+ the project, installs its npm dependencies, and prints the next commands.
1558
+ Export into a fresh directory; a project previously created with
1559
+ `bdk init --template` is rejected.
1560
+
1561
+ ```bash
1562
+ bdk init ./launch-desk \
1563
+ --from-grokbot ./launch-desk.recipe.json \
1564
+ --answers ./grokbot-answers.json
1565
+
1566
+ cd ./launch-desk
1567
+ bdk validate
1568
+ bdk dev
1569
+ ```
1570
+
1571
+ Open the playground from `bdk dev` and try the routines you plan to keep
1572
+ before connecting live channels.
1573
+
1574
+ ## Review what maps where
1575
+
1576
+ | Grok Bot recipe part | BDK project result |
1577
+ | --- | --- |
1578
+ | Profile or persona | The name and description become `bot/agent.ts` and the opening of `bot/instructions.md`. |
1579
+ | Skills | Each selected skill becomes `bot/skills/<slug>/SKILL.md`. An enabled, valid skill schedule also becomes `bot/schedules/<slug>.md` when the schedule channel is on. |
1580
+ | Getting-started skill | `bot/instructions.md` tells the agent to use this skill for a new conversation. |
1581
+ | Cron routines | A selected routine with a valid, enabled cron trigger becomes `bot/schedules/<slug>.md` when the schedule channel is on. |
1582
+ | Slack routines | When the Slack channel is on, the routine text becomes a section in `bot/instructions.md`; mentions, channel watches, keywords, and reactions are wired in `bot/channels/slack.ts`. Missing trigger values remain as warnings or TODOs. |
1583
+ | GitHub or webhook routines | When the corresponding channel is on, the preview adds a setup step to wire the trigger. A routine with no other wired trigger also becomes an on-request skill. |
1584
+ | Other routines | A routine without a wired trigger becomes an on-request skill. The preview explains which trigger still needs work. |
1585
+ | Memory | The default is `bot/skills/knowledge/SKILL.md`. Choose `memory: "kv"` for `bot/lib/memory-seed.json`, or `memory: "drop"` to leave it out. |
1586
+ | Plugins and connectors | Each selected plugin becomes `bot/mcp-connections/<slug>.ts` using Cursor-account auth, OAuth, or a named bearer-token secret. |
1587
+ | Routine placeholders | Values under `fillIns.<routine-slug>` replace placeholders such as `{slack_channel}`. Unfilled placeholders remain visible and produce warnings. |
1588
+ | Export decisions | Resolved answers and recipe metadata are recorded in `grokbot-export.json`. |
1589
+
1590
+ The generated project also includes the standard package, TypeScript, eval,
1591
+ memory-hook, and ignore files needed to run it.
1592
+
1593
+ ## Resolve what does not map
1594
+
1595
+ The preview separates choices you made from behavior the converter could not
1596
+ carry over:
1597
+
1598
+ | Preview result | What it means | What to do |
1599
+ | --- | --- | --- |
1600
+ | **Left out** | An answer excluded a skill, routine, plugin, or memory. | Change the matching `include` or `exclude` answer, or change `memory` from `"drop"`, then rerun; otherwise leave the item behind. |
1601
+ | `BDK agents have no avatar` | The profile avatar is not an agent setting. Its metadata remains in `grokbot-export.json`. | Set an icon separately if the destination needs one. |
1602
+ | `Unknown recipe field; ignored.` | The recipe contains a field this BDK version does not map. | Inspect the field and add its behavior to the generated project when needed. |
1603
+ | `Paused schedule ...` | A paused cron trigger does not produce a schedule file. | Leave it paused, or add a schedule under `bot/schedules/`. |
1604
+ | `trigger dropped: the ... channel is off.` | The answers disabled the channel used by a trigger. | Enable the channel in the answers or add the trigger manually after export. |
1605
+ | `trigger has no BDK channel.` | The trigger type has no direct BDK channel mapping. | Add a supported channel or custom wake; use the generated on-request skill when one is present. |
1606
+ | `is not a five-field cron expression.` | The source cron cannot become a BDK schedule. | Correct the expression and add the schedule before enabling it. |
1607
+ | `placeholders ... are unfilled` | A routine still contains values such as `{slack_channel}`. | Set `fillIns.<routine-slug>` in the answers or edit the generated text. |
1608
+ | `BDK has no built-in KV seed` | `memory: "kv"` writes data but does not load it into hosted KV. | Add your own `ctx.host.kv` seeding code, or use `memory: "skill"`. |
1609
+
1610
+ Treat setup steps and warnings as the checklist for restoring the source
1611
+ behavior. A generated project is ready for review, not automatically ready for
1612
+ live traffic.
1613
+
1614
+ ## Set secrets and reconnect OAuth
1615
+
1616
+ The export carries secret names only, never values. `SECRETS.md` lists each
1617
+ name, where it is read, and every connector that needs a fresh sign-in.
1618
+
1619
+ Set local values in the environment where you run `bdk dev`. For a hosted
1620
+ deployment, let `bdk` prompt for each value:
1621
+
1622
+ ```bash
1623
+ bdk secrets set launch-desk LINEAR_API_KEY
1624
+ ```
1625
+
1626
+ OAuth tokens do not move with the recipe. Sign in to each OAuth connector
1627
+ again:
1628
+
1629
+ ```bash
1630
+ bdk mcp oauth notion
1631
+ ```
1632
+
1633
+ Add `--store` when the sign-in is for a hosted deployment.
1634
+
1635
+ ## Check cron schedules in UTC
1636
+
1637
+ BDK evaluates cron schedules in UTC. A recipe routine that asks for a
1638
+ timezone produces a warning like:
1639
+
1640
+ ```text
1641
+ routines/morning-launch-brief: BDK runs `0 8 * * 1-5` in UTC, not America/Los_Angeles; adjust the cron in bot/schedules/morning-launch-brief.md if the time matters.
1642
+ ```
1643
+
1644
+ The timezone answer documents the source intent; it does not rewrite the cron.
1645
+ Check each generated file under `bot/schedules/` and translate local
1646
+ wall-clock times to UTC. For locations that observe daylight saving time,
1647
+ also decide how you will handle the offset change.
1648
+
1649
+ ## Use the handoff files
1650
+
1651
+ | File | Purpose |
1652
+ | --- | --- |
1653
+ | `AGENTS.md` | Gives a coding agent the project commands and points it to the export handoff. |
1654
+ | `SECRETS.md` | Lists secret names and connector sign-ins, without values. |
1655
+ | `SLACK.md` | When Slack is selected, holds the Slack app setup notes. |
1656
+ | `.cursor/skills/finish-grokbot-export/SKILL.md` | Guides a coding agent through the remaining setup, warnings, validation, and local test. |
1657
+ | `.cursor/environment.json` | Tells a Cursor cloud agent to install the project with `npm install`. |
1658
+
1659
+ Server-side secret transfer, automatic moves of existing Slack apps, and
1660
+ self-deploy are not shipped, so this guide does not cover those flows.
1661
+
1662
+ ## Related
1663
+
1664
+ - [`bdk init`](/docs/reference/cli.md#init): flags, JSON output, and failures
1665
+ - [Project layout](/docs/reference/project-layout.md): generated project files
1666
+ - [Schedules and reminders](/docs/reference/schedules.md): cron behavior
1667
+ - [MCP connections](/docs/reference/connections.md): connector auth choices
1668
+
1669
+ ---
1670
+
1397
1671
  Source: /docs/guides/github.md
1398
1672
 
1399
1673
  # GitHub agents
@@ -3109,6 +3383,25 @@ turn: agent_sdk.turn
3109
3383
  A conversation can produce several turn traces, so use the session ID
3110
3384
  as the join key instead of expecting one long-lived session span.
3111
3385
 
3386
+ ### Computer use
3387
+
3388
+ Each computer use batch is an `agent_sdk.tool` span with
3389
+ `cursor.tool.name` set to `computerUse`. Batches that the computer use
3390
+ subagent runs sit under its `agent_sdk.subagent` span. Four attributes
3391
+ describe each batch without typed text, coordinates, or screenshots:
3392
+
3393
+ | Attribute | Value |
3394
+ | --- | --- |
3395
+ | `agent_sdk.computer.actions` | Action types in order, such as `click,type,screenshot` |
3396
+ | `agent_sdk.computer.action_count` | Number of actions the agent requested |
3397
+ | `agent_sdk.computer.completed_action_count` | Number of actions that ran |
3398
+ | `agent_sdk.computer.executor_duration_ms` | Time the executor spent on the batch |
3399
+
3400
+ To export the full actions, turn on tool content as shown in
3401
+ [Control what leaves the process](#control-what-leaves-the-process).
3402
+ Tool content includes the text the agent typed, which can contain
3403
+ passwords.
3404
+
3112
3405
  ## Add domain telemetry
3113
3406
 
3114
3407
  Use `ctx.host.otel` when your dashboard should answer questions the
@@ -3964,6 +4257,9 @@ Describe your bot or agent in Cursor, or edit the files yourself.
3964
4257
  - [Convert a Cursor Automation](/docs/guides/convert-automation.md): export
3965
4258
  an Automation from the dashboard into a project you own.
3966
4259
 
4260
+ - [Export a Grok Bot](/docs/guides/export-grokbot.md): turn a recipe into a BDK
4261
+ project and review what needs manual setup.
4262
+
3967
4263
  - [Build agents with agents](/docs/building-with-agents.md): hand the build
3968
4264
  to a coding agent with the package's bundled skills.
3969
4265
 
@@ -4966,6 +5262,7 @@ bdk serve [--dir <path>] [--port <n>] [--host <host>]
4966
5262
  [--allow-anonymous-cursor-account-mcp]
4967
5263
  [--allow-anonymous-grokbot]
4968
5264
  [--public-url <url>]
5265
+ [--peers-url <url>]
4969
5266
  [--no-schedules] [--no-playground] [--no-docs]
4970
5267
  [--cursor-events --repo <owner/name>]...
4971
5268
  ```
@@ -4975,7 +5272,7 @@ bdk serve [--dir <path>] [--port <n>] [--host <host>]
4975
5272
  | `--port <n>` | Listen on this port. The default is `3000`; `0` selects an available port. When an omitted default is occupied, the CLI selects the next port. An occupied explicit port fails with a next-port hint. |
4976
5273
  | `--host <host>` | Bind this host. The default is loopback-only `127.0.0.1`. |
4977
5274
  | `--mode multi` | Mount projects at `/<slug>/v1/*` and `/<slug>/playground`, with an index at `/`. This is the default. |
4978
- | `--mode single` | Mount one project at `/v1/*` and `/playground`. |
5275
+ | `--mode single` | Mount one project at `/v1/*` and `/playground`. Declared peers are omitted with a warning unless `--peers-url` is set. |
4979
5276
  | `--dev` | Disable automatic schedule and reminder firing, admit unsigned loopback GitHub deliveries, and enable local playground access. |
4980
5277
  | `--state-root <path>` | Store local sessions, streams, workspaces, and channel state here. Keep durable state outside a repository whose rules shouldn't reach agent workspaces. |
4981
5278
  | `--bearer-token <secret>` | Require this token on routes without authored authentication. Mutually exclusive with `--allow-anonymous`. |
@@ -4984,6 +5281,7 @@ bdk serve [--dir <path>] [--port <n>] [--host <host>]
4984
5281
  | `--allow-anonymous-cursor-account-mcp` | Let anonymous callers use Cursor account MCP connections. Requires an authenticating proxy. |
4985
5282
  | `--allow-anonymous-grokbot` | Let anonymous callers drive hosted Grok Bot runtime agents. Requires an authenticating proxy. |
4986
5283
  | `--public-url <url>` | Set the externally reachable base URL that turns running off the serve host use for peer MCP and host bridges. It does not expose the server; configure the listener or proxy separately. Local-runtime peers use loopback. |
5284
+ | `--peers-url <url>` | Resolve declared peers for a single-agent serve through a hosting-provided peer service. Cursor-managed hosting sets this option automatically; a multi-agent serve rejects it. |
4987
5285
  | `--no-schedules` | Disable schedule firing outside dev mode. |
4988
5286
  | `--no-playground` | Skip the playground. |
4989
5287
  | `--no-docs` | Skip the documentation site at `/docs`. |
@@ -5277,6 +5575,8 @@ requires an ID. The `status` and `cancel` subcommands require `--url`.
5277
5575
 
5278
5576
  ```text
5279
5577
  bdk init [directory] [--template <name>] [--var id=value]... [--json]
5578
+ bdk init [directory] --from-grokbot <recipe.json>
5579
+ [--answers <file>] [--dry-run] [--json]
5280
5580
  ```
5281
5581
 
5282
5582
  Without a directory, `init` prints the setup guide and changes no files. With
@@ -5293,6 +5593,40 @@ On a TTY, templates with questions run their interview before writing files.
5293
5593
  `init` also offers to refresh the bundled coding-agent skills and starts login
5294
5594
  when the host has no Cursor credential.
5295
5595
 
5596
+ #### Export a Grok Bot recipe
5597
+
5598
+ `--from-grokbot` reads a Grok Bot recipe and maps its profile, selected skills
5599
+ and routines, memory, channels, and connectors into a BDK project. The target
5600
+ directory defaults to the resolved `location` answer; a positional directory
5601
+ overrides it. A target previously created with `bdk init --template` is
5602
+ rejected; export into a fresh directory instead.
5603
+
5604
+ | Option | Contract |
5605
+ | --- | --- |
5606
+ | `--from-grokbot <recipe.json>` | Read the recipe to export. |
5607
+ | `--answers <file>` | Read export decisions from a JSON object. Fields present in the file are not asked again. The published schema is `schemas/grokbot-answers.schema.json`. |
5608
+ | `--dry-run` | Print the planned files, defaults, exclusions, unmapped behavior, placeholders, secret names, warnings, and setup steps without writing files or installing dependencies. |
5609
+ | `--json` | Never prompt and print machine-readable output. Combine it with `--dry-run` for a machine-readable preview. |
5610
+
5611
+ On a TTY, the command asks for missing decisions and offers recipe-derived
5612
+ defaults. Off a TTY, it never prompts, takes defaults where possible, and
5613
+ lists the fields it defaulted.
5614
+
5615
+ `--dry-run --json` prints `{ ok, dryRun, directory, preview }`. The preview
5616
+ contains `version`, `name`, resolved `answers`, `defaulted`, `ignored`, `files`
5617
+ as `{ path, from }`, `excluded`, `unmapped` as `{ from, reason }`, `fillIns`,
5618
+ `secrets` as `{ names, reauth }`, `warnings`, and `setupSteps`. A write with
5619
+ `--json` also reports `files`, `installed`, and `installError`. A dependency
5620
+ install failure leaves `ok: true`, sets `installed: false`, reports
5621
+ `installError`, and exits `0`. Other errors print `{ ok: false, error }` and
5622
+ exit nonzero.
5623
+
5624
+ `--answers` and `--dry-run` require `--from-grokbot`. This export mode does
5625
+ not accept `--template` or `--var`.
5626
+
5627
+ See [Export a Grok Bot](/docs/guides/export-grokbot.md) for the preview-first
5628
+ workflow, mapping table, and post-export checklist.
5629
+
5296
5630
  ### Convert an Automation {#convert-automation}
5297
5631
 
5298
5632
  ```text
@@ -5866,8 +6200,8 @@ An MCP connection gives the agent tools from an MCP server. Define one
5866
6200
  file per server under `bot/mcp-connections/`; the filename becomes the
5867
6201
  server name. Default-export `defineConnection` from
5868
6202
  `@cursor/bdk/connections`. The transport is remote HTTP, local stdio,
5869
- the signed-in Cursor account's connectors, or a peer agent on the same
5870
- host.
6203
+ the signed-in Cursor account's connectors, or a peer agent addressed by
6204
+ slug.
5871
6205
 
5872
6206
  Put a server in `bot/host-connections/` when only host tools should
5873
6207
  call it. Host connections use the same `defineConnection` shape and
@@ -6111,9 +6445,14 @@ Use a `{ command }` connection for stdio servers.
6111
6445
 
6112
6446
  ## Peer MCP connection {#peer-mcp-connection}
6113
6447
 
6114
- `{ agent: "<slug>" }` addresses another agent mounted on the same serve
6115
- host. The model gets the peer's `ask` and `check` tools, plus
6116
- `call_tool` when the peer has server tools, and can delegate work to it:
6448
+ `{ agent: "<slug>" }` addresses another agent without configuring a URL,
6449
+ headers, or secrets. On a local multi-agent serve, the target is another
6450
+ mount slug. On Cursor-managed hosting, it is the lowercase deployment slug
6451
+ of another agent on the same team.
6452
+
6453
+ On a local multi-agent serve, the model gets the peer's `ask` and `check`
6454
+ tools, plus `call_tool` when the peer has server tools, and can delegate work
6455
+ to it:
6117
6456
 
6118
6457
  ```ts
6119
6458
  export default defineConnection({
@@ -6122,7 +6461,12 @@ export default defineConnection({
6122
6461
  });
6123
6462
  ```
6124
6463
 
6125
- Unknown slugs and self-references fail `serve` at startup. Walkthrough:
6464
+ Declare the connection only on the caller. The specialist needs no matching
6465
+ configuration.
6466
+
6467
+ In a local multi-agent serve, unknown slugs and self-references fail at
6468
+ startup. A single-agent serve omits peers with a warning unless its hosting
6469
+ platform sets `--peers-url`. Walkthrough:
6126
6470
  [Peer agents](/docs/guides/agent-to-agent.md#delegate-a-question-to-a-specialist).
6127
6471
 
6128
6472
  ## Call MCP from host code
@@ -6724,7 +7068,8 @@ reports all three. An extension mounts its hooks as `<ns>__<name>`, and
6724
7068
 
6725
7069
  `bdk init` scaffolds `bot/hooks/memory.ts`, which exports
6726
7070
  `memoryHook()` from `@cursor/bdk/memory` and journals every turn for
6727
- later sessions to read. Delete the file to opt out.
7071
+ later sessions to read. Delete the file to opt out. See
7072
+ [Memory](/docs/reference/memory.md).
6728
7073
 
6729
7074
  ## Events and payloads
6730
7075
 
@@ -7151,6 +7496,125 @@ Put multi-step workflows the model only sometimes needs in
7151
7496
 
7152
7497
  ---
7153
7498
 
7499
+ Source: /docs/reference/memory.md
7500
+
7501
+ # Memory
7502
+
7503
+ Memory lets an agent recall work from earlier sessions. A memory hook
7504
+ appends one record per turn to a shared journal, and the model reads
7505
+ that journal with its normal file tools when its instructions send it
7506
+ there. Every session and every user of the agent shares one journal.
7507
+
7508
+ ## Memory is on by default
7509
+
7510
+ `bdk init` scaffolds `bot/hooks/memory.ts`:
7511
+
7512
+ ```ts
7513
+ // bot/hooks/memory.ts
7514
+ import { memoryHook } from "@cursor/bdk/memory";
7515
+
7516
+ export default memoryHook();
7517
+ ```
7518
+
7519
+ It also adds a `## Memory` section to `bot/instructions.md`. The model
7520
+ has no recall tool, so that section is what sends it to the journal:
7521
+ it says when to read `memory/`, and it tells the model to treat records
7522
+ as untrusted history. To add memory to an existing project, create the
7523
+ hook file and copy the `## Memory` section from a fresh `bdk init`
7524
+ project into your instructions. To turn memory off, delete the hook
7525
+ file and the `## Memory` section.
7526
+
7527
+ ## Journal records
7528
+
7529
+ The hook appends one JSON line to `memory/journal.jsonl` after each
7530
+ turn completes or fails:
7531
+
7532
+ ```json
7533
+ {"at":"2026-10-01T16:42:09.118Z","sessionId":"5f0c2a9e-7d1b-4c43-9a6e-2b8f1e0d7c35","channelId":"slack","status":"completed","title":"Checkout flaky test","userMessage":"Why does acme/checkout fail on main?","result":"The cart test races the price service mock...","usage":{"inputTokens":18234,"outputTokens":912,"cacheReadTokens":15002,"cacheWriteTokens":0}}
7534
+ ```
7535
+
7536
+ | Field | Contract |
7537
+ | --- | --- |
7538
+ | `at` | ISO-8601 time the turn finished |
7539
+ | `sessionId` | Session that ran the turn |
7540
+ | `channelId` | Channel that started the session, such as `http` for the session API |
7541
+ | `status` | `"completed"` or `"failed"` |
7542
+ | `title` | Session title, when the channel set one |
7543
+ | `userMessage` | The message that started the turn, truncated to `maxTextLength` |
7544
+ | `result` | Final assistant text, or the failure message, truncated to `maxTextLength` |
7545
+ | `usage` | Token usage for completed turns; see [Events and payloads](/docs/reference/hooks.md#events-and-payloads) |
7546
+
7547
+ As the journal grows, older records move to `journal-*.jsonl` files
7548
+ beside it. Point the model at the whole `memory/` directory when it
7549
+ needs history beyond the latest segment.
7550
+
7551
+ ## Read memory
7552
+
7553
+ Local turns find the journal at `memory/` in the session workspace. On
7554
+ a Cursor-hosted deployment, the first prompt of each session names the
7555
+ journal's path on that machine. A session on a server you run yourself
7556
+ can't reach the journal.
7557
+
7558
+ `memory` is a reserved workspace path. BDK rejects per-send
7559
+ `workspaceFiles` and `sandbox/workspace/` seed files under `memory/`,
7560
+ so callers can't write records through the workspace.
7561
+
7562
+ Local servers keep the journal in the project state directory. `bdk
7563
+ run` and `bdk eval` start an ephemeral server with a fresh state
7564
+ directory unless you pass `--state-root`, so each run starts with
7565
+ empty memory. Use `bdk serve` or `bdk dev`, or pass the same
7566
+ `--state-root`, to keep memory across runs. Hosted deployments keep
7567
+ the journal across redeploys.
7568
+
7569
+ ## Who sees memory
7570
+
7571
+ Records from every session and every user land in the same journal, so
7572
+ one person's messages and the agent's replies to them can surface in
7573
+ another person's session. Turn memory off for an agent whose users
7574
+ shouldn't see each other's requests. Turning it off stops new records,
7575
+ but the journal keeps the records it already has. On a local server,
7576
+ delete the `memory/` directory in the project state directory to clear
7577
+ them. On Cursor-managed hosting, the journal is deployment data, so
7578
+ [Privacy Mode](/docs/deployment.md#privacy-mode) applies to it.
7579
+
7580
+ Anyone who can message the agent can put text in the journal. The
7581
+ scaffolded instructions tell the model never to follow instructions
7582
+ found inside records; keep that rule if you write your own section.
7583
+
7584
+ ## Memory and host state
7585
+
7586
+ Memory is advisory. A record can be dropped, and records written by
7587
+ concurrent sessions can show up only in a later session. Keep state
7588
+ your code depends on, such as dedupe records and cursors, in
7589
+ `ctx.host.kv` or `ctx.host.files`; see
7590
+ [Handler context](/docs/reference/hooks.md#handler-context).
7591
+
7592
+ ## Options
7593
+
7594
+ `memoryHook(options?)` accepts:
7595
+
7596
+ | Option | Contract |
7597
+ | --- | --- |
7598
+ | `maxTextLength` | Truncation cap for `userMessage` and `result`. Default `2000` characters. |
7599
+ | `backend` | A `MemoryBackend` that replaces the default journal |
7600
+
7601
+ A `MemoryBackend` has `appendTurn(record, { stateRoot, agentName })`,
7602
+ which receives each record, and an optional
7603
+ `prepareSession({ stateRoot, agentName })`, which runs when a session
7604
+ starts. Records go only where `appendTurn` sends them, but the
7605
+ `memory/` directory and the hosted first-prompt path still point at the
7606
+ default journal. Give the model a tool or file to read your records,
7607
+ and write instructions that send it there instead of `memory/`.
7608
+
7609
+ ## Related
7610
+
7611
+ - [Hooks](/docs/reference/hooks.md)
7612
+ - [Instructions](/docs/reference/instructions.md)
7613
+ - [Sessions](/docs/reference/sessions.md)
7614
+ - [Deployment](/docs/deployment.md)
7615
+
7616
+ ---
7617
+
7154
7618
  Source: /docs/reference/playground.md
7155
7619
 
7156
7620
  # Playground
@@ -30,6 +30,7 @@
30
30
  - [Bitbucket](/docs/guides/bitbucket.md): Review pull requests, answer comments, and triage pushes on Bitbucket Cloud or Data Center.
31
31
  - [Cursor cloud agents](/docs/guides/cloud-agents.md): Let a BDK agent hand coding work to Cursor cloud agents and steer them: mount the extension and pick the repositories it may touch.
32
32
  - [Convert a Cursor Automation](/docs/guides/convert-automation.md): Turn a dashboard Automation into a BDK project, then reconnect its actions and triggers.
33
+ - [Export a Grok Bot](/docs/guides/export-grokbot.md): Turn a Grok Bot recipe into a BDK project, preview what maps, and finish secrets and connector sign-ins.
33
34
  - [GitHub](/docs/guides/github.md): Let your agent read pull requests and CI, then write back reviews, comments, and checks.
34
35
  - [GitLab](/docs/guides/gitlab.md): Review merge requests, answer notes, and triage failed pipelines on GitLab.com or self-managed GitLab.
35
36
  - [Cursor Grok Bot agents](/docs/guides/grokbot-agents.md): Mount an extension that lets your agent consult named Grok Bot agents, wait for long replies, and interrupt work.
@@ -54,6 +55,7 @@
54
55
  - [Hooks](/docs/reference/hooks.md): Observe-only subscribers to the session event stream: audit logs, metrics, transcript mirrors, derived state.
55
56
  - [HTTP API](/docs/reference/http-api.md): Public session, discovery, and channel routes callers use.
56
57
  - [Instructions](/docs/reference/instructions.md): The always-on system prompt: authoring forms, how it reaches the local harness, and what makes instructions hold up.
58
+ - [Memory](/docs/reference/memory.md): Journal every turn so later sessions can read what earlier ones did.
57
59
  - [Playground](/docs/reference/playground.md): The built-in web UI: chat with streaming, Try buttons and slash commands, session replay, and dev-mode dispatch.
58
60
  - [Project layout](/docs/reference/project-layout.md): The canonical bot/ folder layout and its path-derived naming rules.
59
61
  - [Prompt strings](/docs/reference/prompt.md): Write indented multi-line strings without carrying source indentation into their values.