@cursor/bdk 0.2.18 → 0.2.21

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 (294) hide show
  1. package/AGENTS.md +16 -6
  2. package/dist/channels/github/defaults.d.ts +1 -1
  3. package/dist/channels/github/defaults.d.ts.map +1 -1
  4. package/dist/channels/github/defaults.js +1 -1
  5. package/dist/channels/github/progress.d.ts +1 -1
  6. package/dist/channels/github/progress.d.ts.map +1 -1
  7. package/dist/channels/slack/slack-channel.d.ts +3 -2
  8. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  9. package/dist/channels/slack/slack-channel.js +9 -2
  10. package/dist/docs/404.html +2 -2
  11. package/dist/docs/assets/{app.CJ-XZTK5.js → app.C0diulDR.js} +4 -4
  12. package/dist/docs/assets/chunks/@localSearchIndexroot._fglLrPa.js +1 -0
  13. package/dist/docs/assets/chunks/{VPLocalSearchBox.CpbYgURZ.js → VPLocalSearchBox.mlUwkfRQ.js} +1 -1
  14. package/dist/docs/assets/chunks/{arc.B081PemO.js → arc.DM5RRfvb.js} +1 -1
  15. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.DPaT_hi-.js → architectureDiagram-Q4EWVU46.CNHCBbQl.js} +1 -1
  16. package/dist/docs/assets/chunks/{baseUniq.Buu61NLg.js → baseUniq.25Udb_uV.js} +1 -1
  17. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.C6t63owh.js → blockDiagram-DXYQGD6D.Bg-f3-qN.js} +1 -1
  18. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BtKabdXR.js → c4Diagram-AHTNJAMY.BywSQvK9.js} +1 -1
  19. package/dist/docs/assets/chunks/channel.C4s-x2x3.js +1 -0
  20. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.DQpNaR8N.js → chunk-4BX2VUAB.C3IdWWlO.js} +1 -1
  21. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.DrhL-6Rv.js → chunk-4TB4RGXK.D_t-pAXu.js} +1 -1
  22. package/dist/docs/assets/chunks/{chunk-55IACEB6.DRLIBfNR.js → chunk-55IACEB6.DvlNSQE5.js} +1 -1
  23. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.kuUuFkIg.js → chunk-EDXVE4YY.6LpTrDTf.js} +1 -1
  24. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.BlrVxprw.js → chunk-FMBD7UC4.BZxXsutI.js} +1 -1
  25. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CZCfYeQA.js → chunk-OYMX7WX6.CrtynS_e.js} +1 -1
  26. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.C7rwVEMV.js → chunk-QZHKN3VN.CUOQY0pM.js} +1 -1
  27. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.CGseJtT_.js → chunk-YZCP3GAM.Dv3biZVN.js} +1 -1
  28. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.h-fLya-M.js +1 -0
  29. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.h-fLya-M.js +1 -0
  30. package/dist/docs/assets/chunks/clone.BM9yCOiZ.js +1 -0
  31. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BWlczAK4.js → cose-bilkent-S5V4N54A.DDzCqntx.js} +1 -1
  32. package/dist/docs/assets/chunks/{dagre-KV5264BT.Cw0tT0bB.js → dagre-KV5264BT.DoiV-U_C.js} +1 -1
  33. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.Cm96ah9V.js → diagram-5BDNPKRD.LHX1aUDr.js} +1 -1
  34. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Cl0AoWYM.js → diagram-G4DWMVQ6.lTnkbDQp.js} +1 -1
  35. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.Bp7mlzKs.js → diagram-MMDJMWI5.CclJPnEx.js} +1 -1
  36. package/dist/docs/assets/chunks/{diagram-TYMM5635.ClVeqpcW.js → diagram-TYMM5635.CLmB0KKs.js} +1 -1
  37. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.Bi8dojF9.js → erDiagram-SMLLAGMA.qKkkB7iQ.js} +1 -1
  38. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.Bb4urpfG.js → flowDiagram-DWJPFMVM.HIkXNLJ3.js} +1 -1
  39. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.whR4wFze.js → ganttDiagram-T4ZO3ILL.YN9lDgHe.js} +1 -1
  40. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.6oVMi6-3.js → gitGraphDiagram-UUTBAWPF.CL6gf7f9.js} +1 -1
  41. package/dist/docs/assets/chunks/{graph.D8AJDOFK.js → graph.DMkP70rB.js} +1 -1
  42. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.nTpsf5Vk.js → infoDiagram-42DDH7IO.CT98u6Zd.js} +1 -1
  43. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DhYDOwyB.js → ishikawaDiagram-UXIWVN3A.CF88w8YD.js} +1 -1
  44. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.Bg7Rudw3.js → journeyDiagram-VCZTEJTY.BoWKk6Rz.js} +1 -1
  45. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.D80D_ZAR.js → kanban-definition-6JOO6SKY.CrmPv2sG.js} +1 -1
  46. package/dist/docs/assets/chunks/{layout.e9hmuC-K.js → layout.CEiPTQln.js} +1 -1
  47. package/dist/docs/assets/chunks/{linear.D6hEyqVB.js → linear.gkXuWu8G.js} +1 -1
  48. package/dist/docs/assets/chunks/{min.BPAdvB9D.js → min.C4EHK60v.js} +1 -1
  49. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.tm2Sov2Q.js → mindmap-definition-QFDTVHPH.C-JqTP4s.js} +1 -1
  50. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.BKHZ497m.js → pieDiagram-DEJITSTG.t2HgQOCt.js} +1 -1
  51. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.CPj7gSp6.js → quadrantDiagram-34T5L4WZ.D1k-BEKc.js} +1 -1
  52. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E._U68yVUd.js → requirementDiagram-MS252O5E.CUu9VVrt.js} +1 -1
  53. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6._6jrIQPb.js → sankeyDiagram-XADWPNL6.HroiBrt1.js} +1 -1
  54. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.D9UlmB6F.js → sequenceDiagram-FGHM5R23.CeJapdwH.js} +1 -1
  55. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.BQSaiJCe.js → stateDiagram-FHFEXIEX.CLj6JnXZ.js} +1 -1
  56. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CLFLHNN0.js +1 -0
  57. package/dist/docs/assets/chunks/{theme.25ZC61Iy.js → theme.B9ZHHvCq.js} +2 -2
  58. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.d-17NZ3L.js → timeline-definition-GMOUNBTQ.BzKGPAdN.js} +1 -1
  59. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DE9AGEjG.js → vennDiagram-DHZGUBPP.DtBNkpF9.js} +1 -1
  60. package/dist/docs/assets/chunks/wardley-RL74JXVD.D_iarxve.js +162 -0
  61. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.D9SDNipV.js → wardleyDiagram-NUSXRM2D.rOXEXIA9.js} +1 -1
  62. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.DM1sIMf8.js → xychartDiagram-5P7HB3ND.BrM71_SA.js} +1 -1
  63. package/dist/docs/assets/{deployment.md.ajc3VM0m.js → deployment.md.CtSJ6sF9.js} +3 -3
  64. package/dist/docs/assets/{deployment.md.ajc3VM0m.lean.js → deployment.md.CtSJ6sF9.lean.js} +1 -1
  65. package/dist/docs/assets/{guides_agent-to-agent.md.Cps5NiCV.js → guides_agent-to-agent.md.CwL5cwuE.js} +6 -5
  66. package/dist/docs/assets/{guides_agent-to-agent.md.Cps5NiCV.lean.js → guides_agent-to-agent.md.CwL5cwuE.lean.js} +1 -1
  67. package/dist/docs/assets/guides_export-grokbot.md.qo5bxi4h.js +55 -0
  68. package/dist/docs/assets/guides_export-grokbot.md.qo5bxi4h.lean.js +1 -0
  69. package/dist/docs/assets/{guides_hooks.md.B_bKG1oA.js → guides_hooks.md.Bfj0pK91.js} +1 -1
  70. package/dist/docs/assets/{guides_hooks.md.B_bKG1oA.lean.js → guides_hooks.md.Bfj0pK91.lean.js} +1 -1
  71. package/dist/docs/assets/{guides_opentelemetry.md.jcPNrQbH.js → guides_opentelemetry.md.ByW1Fs7b.js} +5 -5
  72. package/dist/docs/assets/{guides_opentelemetry.md.jcPNrQbH.lean.js → guides_opentelemetry.md.ByW1Fs7b.lean.js} +1 -1
  73. package/dist/docs/assets/{index.md.CHAFTf6m.js → index.md.CAnsLl8D.js} +2 -2
  74. package/dist/docs/assets/{index.md.CHAFTf6m.lean.js → index.md.CAnsLl8D.lean.js} +1 -1
  75. package/dist/docs/assets/{reference_cli.md.Bt3sAfat.js → reference_cli.md.Bkrsce22.js} +7 -4
  76. package/dist/docs/assets/{reference_cli.md.Bt3sAfat.lean.js → reference_cli.md.Bkrsce22.lean.js} +1 -1
  77. package/dist/docs/assets/{reference_connections.md.CxbLpaaP.js → reference_connections.md.BJE2Zllp.js} +4 -4
  78. package/dist/docs/assets/{reference_connections.md.CxbLpaaP.lean.js → reference_connections.md.BJE2Zllp.lean.js} +1 -1
  79. package/dist/docs/assets/{reference_hooks.md.DbJC8mcZ.js → reference_hooks.md.B1jq3oGl.js} +3 -3
  80. package/dist/docs/assets/{reference_hooks.md.DbJC8mcZ.lean.js → reference_hooks.md.B1jq3oGl.lean.js} +1 -1
  81. package/dist/docs/assets/reference_memory.md.BwyJXYZe.js +4 -0
  82. package/dist/docs/assets/reference_memory.md.BwyJXYZe.lean.js +1 -0
  83. package/dist/docs/assets/{reference_project-layout.md.SNzIvnmC.js → reference_project-layout.md.mFcS8yDD.js} +3 -3
  84. package/dist/docs/assets/{reference_project-layout.md.SNzIvnmC.lean.js → reference_project-layout.md.mFcS8yDD.lean.js} +1 -1
  85. package/dist/docs/assets/{reference_sessions.md.C_uzIWuy.js → reference_sessions.md.C8FXuGwk.js} +1 -1
  86. package/dist/docs/assets/{reference_skills.md.Ckddg6KX.js → reference_skills.md.C2GWh7g8.js} +3 -3
  87. package/dist/docs/assets/{reference_subagents.md.gmPt5J-M.js → reference_subagents.md.ChNGh6HK.js} +1 -1
  88. package/dist/docs/assets/{reference_subagents.md.gmPt5J-M.lean.js → reference_subagents.md.ChNGh6HK.lean.js} +1 -1
  89. package/dist/docs/assets/{troubleshooting.md.PCafNCb5.js → troubleshooting.md.DFnoTDlQ.js} +1 -1
  90. package/dist/docs/building-with-agents.html +35 -35
  91. package/dist/docs/deployment.html +38 -38
  92. package/dist/docs/deployment.md +27 -3
  93. package/dist/docs/evals.html +35 -35
  94. package/dist/docs/guides/agent-to-agent.html +41 -40
  95. package/dist/docs/guides/agent-to-agent.md +34 -21
  96. package/dist/docs/guides/bitbucket.html +35 -35
  97. package/dist/docs/guides/cloud-agents.html +35 -35
  98. package/dist/docs/guides/convert-automation.html +35 -35
  99. package/dist/docs/guides/export-grokbot.html +114 -0
  100. package/dist/docs/guides/export-grokbot.md +239 -0
  101. package/dist/docs/guides/github.html +35 -35
  102. package/dist/docs/guides/gitlab.html +35 -35
  103. package/dist/docs/guides/grokbot-agents.html +35 -35
  104. package/dist/docs/guides/hooks.html +37 -37
  105. package/dist/docs/guides/hooks.md +3 -1
  106. package/dist/docs/guides/improve.html +35 -35
  107. package/dist/docs/guides/jev.html +35 -35
  108. package/dist/docs/guides/mcp-oauth.html +35 -35
  109. package/dist/docs/guides/migrate.html +36 -36
  110. package/dist/docs/guides/opentelemetry.html +39 -39
  111. package/dist/docs/guides/opentelemetry.md +37 -5
  112. package/dist/docs/guides/slack.html +35 -35
  113. package/dist/docs/guides/webhooks.html +35 -35
  114. package/dist/docs/hashmap.json +1 -1
  115. package/dist/docs/hillclimbing.html +35 -35
  116. package/dist/docs/index.html +37 -37
  117. package/dist/docs/index.md +3 -0
  118. package/dist/docs/llms-full.txt +536 -44
  119. package/dist/docs/llms.txt +2 -0
  120. package/dist/docs/quickstart.html +35 -35
  121. package/dist/docs/reference/agent-config.html +35 -35
  122. package/dist/docs/reference/artifacts.html +35 -35
  123. package/dist/docs/reference/channels.html +35 -35
  124. package/dist/docs/reference/cli.html +41 -38
  125. package/dist/docs/reference/cli.md +39 -1
  126. package/dist/docs/reference/connections.html +38 -38
  127. package/dist/docs/reference/connections.md +16 -6
  128. package/dist/docs/reference/evals.html +36 -36
  129. package/dist/docs/reference/extensions.html +35 -35
  130. package/dist/docs/reference/hooks.html +38 -38
  131. package/dist/docs/reference/hooks.md +6 -2
  132. package/dist/docs/reference/http-api.html +35 -35
  133. package/dist/docs/reference/instructions.html +35 -35
  134. package/dist/docs/reference/memory.html +63 -0
  135. package/dist/docs/reference/memory.md +114 -0
  136. package/dist/docs/reference/playground.html +35 -35
  137. package/dist/docs/reference/project-layout.html +37 -37
  138. package/dist/docs/reference/project-layout.md +4 -1
  139. package/dist/docs/reference/prompt.html +35 -35
  140. package/dist/docs/reference/schedules.html +35 -35
  141. package/dist/docs/reference/sessions.html +36 -36
  142. package/dist/docs/reference/sessions.md +1 -3
  143. package/dist/docs/reference/skills.html +38 -38
  144. package/dist/docs/reference/subagents.html +36 -36
  145. package/dist/docs/reference/subagents.md +2 -0
  146. package/dist/docs/reference/tools.html +35 -35
  147. package/dist/docs/templates/agentic-owners.html +35 -35
  148. package/dist/docs/templates/grokbot-agents.html +35 -35
  149. package/dist/docs/templates/security-reviewer.html +35 -35
  150. package/dist/docs/templates/thermo-quality-review.html +35 -35
  151. package/dist/docs/templates/thermo-review.html +35 -35
  152. package/dist/docs/templates/triage.html +35 -35
  153. package/dist/docs/troubleshooting.html +36 -36
  154. package/dist/docs/troubleshooting.md +1 -1
  155. package/dist/evals/assertions.d.ts +3 -3
  156. package/dist/evals/assertions.d.ts.map +1 -1
  157. package/dist/evals/assertions.js +2 -2
  158. package/dist/evals/judge.d.ts +5 -4
  159. package/dist/evals/judge.d.ts.map +1 -1
  160. package/dist/evals.d.ts +1 -1
  161. package/dist/evals.js +1 -1
  162. package/dist/extensions/cursor-cloud-agents/extension.d.ts +5 -2
  163. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  164. package/dist/extensions/cursor-cloud-agents/extension.js +21 -1
  165. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +22 -1
  166. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
  167. package/dist/extensions/cursor-cloud-agents/lib/backend.js +1 -0
  168. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +10 -3
  169. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -1
  170. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +10 -1
  171. package/dist/filesystem.js +1 -1
  172. package/dist/internal/cli-ax.d.ts +7 -7
  173. package/dist/internal/cli-ax.d.ts.map +1 -1
  174. package/dist/internal/cli-ax.js +36 -15
  175. package/dist/internal/cloud-turn-usage.d.ts +34 -0
  176. package/dist/internal/cloud-turn-usage.d.ts.map +1 -0
  177. package/dist/internal/cloud-turn-usage.js +94 -0
  178. package/dist/internal/cursor/account-mcp.d.ts +1 -1
  179. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  180. package/dist/internal/cursor/account-mcp.js +1 -1
  181. package/dist/internal/cursor/github-credentials.d.ts +1 -1
  182. package/dist/internal/cursor/github-credentials.d.ts.map +1 -1
  183. package/dist/internal/deploy-client.js +20 -1
  184. package/dist/internal/discovery/agent.d.ts +1 -1
  185. package/dist/internal/discovery/agent.d.ts.map +1 -1
  186. package/dist/internal/estimate-cost.d.ts +55 -0
  187. package/dist/internal/estimate-cost.d.ts.map +1 -0
  188. package/dist/internal/{turn-cost.js → estimate-cost.js} +15 -23
  189. package/dist/internal/eval-judge-model.d.ts +1 -1
  190. package/dist/internal/eval-judge-model.d.ts.map +1 -1
  191. package/dist/internal/eval-runner.d.ts +2 -2
  192. package/dist/internal/eval-runner.d.ts.map +1 -1
  193. package/dist/internal/eval-runner.js +1 -1
  194. package/dist/internal/evals-client.d.ts +1 -1
  195. package/dist/internal/evals-client.d.ts.map +1 -1
  196. package/dist/internal/evals-client.js +1 -1
  197. package/dist/internal/event-log.d.ts +2 -2
  198. package/dist/internal/event-log.d.ts.map +1 -1
  199. package/dist/internal/event-log.js +6 -3
  200. package/dist/internal/event-mapper.d.ts.map +1 -1
  201. package/dist/internal/event-mapper.js +5 -1
  202. package/dist/internal/filesystem/nearest.d.ts +1 -1
  203. package/dist/internal/filesystem/nearest.d.ts.map +1 -1
  204. package/dist/internal/filesystem/walk.d.ts +1 -1
  205. package/dist/internal/filesystem/walk.d.ts.map +1 -1
  206. package/dist/internal/filesystem/walk.js +1 -1
  207. package/dist/internal/host-otel.d.ts.map +1 -1
  208. package/dist/internal/http-channel.js +1 -1
  209. package/dist/internal/init-scaffold.d.ts.map +1 -1
  210. package/dist/internal/init-scaffold.js +3 -4
  211. package/dist/internal/memory-dir.d.ts +8 -0
  212. package/dist/internal/memory-dir.d.ts.map +1 -0
  213. package/dist/internal/memory-dir.js +7 -0
  214. package/dist/internal/otel/collector.d.ts +3 -3
  215. package/dist/internal/otel/collector.d.ts.map +1 -1
  216. package/dist/internal/otel/collector.js +68 -43
  217. package/dist/internal/otel/computer-use-attrs.d.ts +18 -0
  218. package/dist/internal/otel/computer-use-attrs.d.ts.map +1 -0
  219. package/dist/internal/otel/computer-use-attrs.js +30 -0
  220. package/dist/internal/otel/config.d.ts +1 -1
  221. package/dist/internal/otel/config.d.ts.map +1 -1
  222. package/dist/internal/otel/config.js +1 -1
  223. package/dist/internal/otel/runtime.d.ts +2 -6
  224. package/dist/internal/otel/runtime.d.ts.map +1 -1
  225. package/dist/internal/otel/runtime.js +54 -43
  226. package/dist/internal/otel/tool-error-class.d.ts +4 -0
  227. package/dist/internal/otel/tool-error-class.d.ts.map +1 -0
  228. package/dist/internal/otel/tool-error-class.js +36 -0
  229. package/dist/internal/sdk-runner.d.ts.map +1 -1
  230. package/dist/internal/sdk-runner.js +5 -13
  231. package/dist/internal/session-cost.d.ts +21 -22
  232. package/dist/internal/session-cost.d.ts.map +1 -1
  233. package/dist/internal/session-cost.js +38 -46
  234. package/dist/internal/session-engine.d.ts +22 -40
  235. package/dist/internal/session-engine.d.ts.map +1 -1
  236. package/dist/internal/session-engine.js +62 -109
  237. package/dist/internal/sessions-client.d.ts +13 -1
  238. package/dist/internal/sessions-client.d.ts.map +1 -1
  239. package/dist/internal/sessions-client.js +24 -0
  240. package/dist/internal/tool-result.d.ts +2 -2
  241. package/dist/internal/tool-result.d.ts.map +1 -1
  242. package/dist/internal/tool-result.js +16 -11
  243. package/dist/internal/trajectory.d.ts +5 -6
  244. package/dist/internal/trajectory.d.ts.map +1 -1
  245. package/dist/internal/trajectory.js +1 -13
  246. package/dist/internal/workspace-sync.js +1 -1
  247. package/dist/internal/workspace.js +1 -1
  248. package/dist/memory.d.ts +5 -4
  249. package/dist/memory.d.ts.map +1 -1
  250. package/dist/memory.js +2 -3
  251. package/dist/playground/assets/cursor-icons-16-gwXtdAvu.woff2 +0 -0
  252. package/dist/playground/assets/index-BfePgvWh.css +1 -0
  253. package/dist/playground/assets/index-DAlf9lxD.js +71 -0
  254. package/dist/playground/index.html +2 -2
  255. package/dist/types.d.ts +25 -29
  256. package/dist/types.d.ts.map +1 -1
  257. package/docs/README.md +3 -0
  258. package/docs/deployment.md +27 -3
  259. package/docs/guides/agent-to-agent.md +34 -21
  260. package/docs/guides/export-grokbot.md +244 -0
  261. package/docs/guides/hooks.md +3 -1
  262. package/docs/guides/opentelemetry.md +37 -5
  263. package/docs/reference/cli.md +39 -1
  264. package/docs/reference/connections.md +16 -6
  265. package/docs/reference/hooks.md +6 -2
  266. package/docs/reference/memory.md +119 -0
  267. package/docs/reference/project-layout.md +4 -1
  268. package/docs/reference/sessions.md +1 -3
  269. package/docs/reference/subagents.md +2 -0
  270. package/docs/troubleshooting.md +1 -1
  271. package/package.json +6 -5
  272. package/skills/evals/SKILL.md +1 -1
  273. package/skills/framework-map/SKILL.md +3 -1
  274. package/skills/otel/SKILL.md +4 -3
  275. package/templates/agentic-owners/bot/lib/owners/matching.ts +57 -2
  276. package/templates/pr-autofixer/bot/tools/drive_pr.ts +1 -2
  277. package/dist/docs/assets/chunks/@localSearchIndexroot.ylB4B_Ud.js +0 -1
  278. package/dist/docs/assets/chunks/channel.BgjgeSqp.js +0 -1
  279. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CIVv63wE.js +0 -1
  280. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CIVv63wE.js +0 -1
  281. package/dist/docs/assets/chunks/clone.HcW7h-70.js +0 -1
  282. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.B5d7jT7E.js +0 -1
  283. package/dist/docs/assets/chunks/wardley-RL74JXVD.BcY0KddE.js +0 -162
  284. package/dist/internal/cloud-turn-cost.d.ts +0 -42
  285. package/dist/internal/cloud-turn-cost.d.ts.map +0 -1
  286. package/dist/internal/cloud-turn-cost.js +0 -120
  287. package/dist/internal/turn-cost.d.ts +0 -41
  288. package/dist/internal/turn-cost.d.ts.map +0 -1
  289. package/dist/playground/assets/cursor-icons-16-DBmD_cqy.woff2 +0 -0
  290. package/dist/playground/assets/index-BDPd0Sec.css +0 -1
  291. package/dist/playground/assets/index-BrXDwbrN.js +0 -71
  292. /package/dist/docs/assets/{reference_sessions.md.C_uzIWuy.lean.js → reference_sessions.md.C8FXuGwk.lean.js} +0 -0
  293. /package/dist/docs/assets/{reference_skills.md.Ckddg6KX.lean.js → reference_skills.md.C2GWh7g8.lean.js} +0 -0
  294. /package/dist/docs/assets/{troubleshooting.md.PCafNCb5.lean.js → troubleshooting.md.DFnoTDlQ.lean.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{_ as a,c as e,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"OpenTelemetry","description":"Send agent traces and metrics to an OTLP collector, follow one conversation, and add domain telemetry.","frontmatter":{"title":"OpenTelemetry","description":"Send agent traces and metrics to an OTLP collector, follow one conversation, and add domain telemetry."},"headers":[],"relativePath":"guides/opentelemetry.md","filePath":"guides/opentelemetry.md"}'),n={name:"guides/opentelemetry.md"};function l(o,s,p,h,r,d){return i(),e("div",null,[...s[0]||(s[0]=[t(`<h1 id="observe-an-agent-with-opentelemetry" tabindex="-1">Observe an agent with OpenTelemetry <a class="header-anchor" href="#observe-an-agent-with-opentelemetry" aria-label="Permalink to &quot;Observe an agent with OpenTelemetry&quot;">​</a></h1><p>OpenTelemetry connects an agent turn to the observability system your team already uses. Once you configure an OTLP collector, each request, model turn, tool call, and subagent appears alongside token, tool, and cost metrics from the serve process.</p><p>Export is opt-in. Nothing leaves the process until you configure a destination.</p><h2 id="connect-an-otlp-collector" tabindex="-1">Connect an OTLP collector <a class="header-anchor" href="#connect-an-otlp-collector" aria-label="Permalink to &quot;Connect an OTLP collector&quot;">​</a></h2><p>Set the collector endpoint, start the agent, and send it a message. You should see an <code>agent_sdk.http</code> request span and an <code>agent_sdk.turn</code> trace, with any tool or subagent work nested under the turn.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OTEL_EXPORTER_OTLP_ENDPOINT</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">https://otel.example.com</span></span>
1
+ import{_ as e,c as t,o as a,a3 as i}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"OpenTelemetry","description":"Send agent traces and metrics to an OTLP collector, follow one conversation, and add domain telemetry.","frontmatter":{"title":"OpenTelemetry","description":"Send agent traces and metrics to an OTLP collector, follow one conversation, and add domain telemetry."},"headers":[],"relativePath":"guides/opentelemetry.md","filePath":"guides/opentelemetry.md"}'),n={name:"guides/opentelemetry.md"};function o(l,s,r,p,h,d){return a(),t("div",null,[...s[0]||(s[0]=[i(`<h1 id="observe-an-agent-with-opentelemetry" tabindex="-1">Observe an agent with OpenTelemetry <a class="header-anchor" href="#observe-an-agent-with-opentelemetry" aria-label="Permalink to &quot;Observe an agent with OpenTelemetry&quot;">​</a></h1><p>OpenTelemetry connects an agent turn to the observability system your team already uses. Once you configure an OTLP collector, each request, model turn, tool call, and subagent appears alongside token, tool, and cost metrics from the serve process.</p><p>Export is opt-in. Nothing leaves the process until you configure a destination.</p><h2 id="connect-an-otlp-collector" tabindex="-1">Connect an OTLP collector <a class="header-anchor" href="#connect-an-otlp-collector" aria-label="Permalink to &quot;Connect an OTLP collector&quot;">​</a></h2><p>Set the collector endpoint, start the agent, and send it a message. You should see an <code>agent_sdk.http</code> request span and an <code>agent_sdk.turn</code> trace, with any tool or subagent work nested under the turn.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OTEL_EXPORTER_OTLP_ENDPOINT</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">https://otel.example.com</span></span>
2
2
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OTEL_EXPORTER_OTLP_HEADERS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Authorization=Bearer </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$OTEL_TOKEN</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
3
3
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OTEL_SERVICE_NAME</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">incident-agent</span></span>
4
4
  <span class="line"></span>
@@ -16,12 +16,12 @@ import{_ as a,c as e,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const c
16
16
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
17
17
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
18
18
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
19
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Use environment variables when you start the agent with <code>bdk serve</code>. Use <code>serve({ otel })</code> when your TypeScript application starts the server itself.</p><h2 id="follow-one-conversation" tabindex="-1">Follow one conversation <a class="header-anchor" href="#follow-one-conversation" aria-label="Permalink to &quot;Follow one conversation&quot;">​</a></h2><p>Copy the complete session ID from the playground or session API, then filter your observability system on either <code>agent_sdk.session_id</code> or <code>cursor.conversation.id</code>. Every turn in that conversation carries the same value, including follow-ups and tool work.</p><p>The trace shape stays small:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>request: agent_sdk.http</span></span>
19
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Use environment variables when you start the agent with <code>bdk serve</code>. Use <code>serve({ otel })</code> when your TypeScript application starts the server itself. When that application already uses OpenTelemetry, BDK sends its traces, metrics, and logs to the collector configured here.</p><h2 id="follow-one-conversation" tabindex="-1">Follow one conversation <a class="header-anchor" href="#follow-one-conversation" aria-label="Permalink to &quot;Follow one conversation&quot;">​</a></h2><p>Copy the complete session ID from the playground or session API, then filter your observability system on either <code>agent_sdk.session_id</code> or <code>cursor.conversation.id</code>. Every turn in that conversation carries the same value, including follow-ups and tool work.</p><p>The trace shape stays small:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>request: agent_sdk.http</span></span>
20
20
  <span class="line"><span></span></span>
21
21
  <span class="line"><span>turn: agent_sdk.turn</span></span>
22
22
  <span class="line"><span> |- agent_sdk.tool</span></span>
23
23
  <span class="line"><span> \`- agent_sdk.subagent</span></span>
24
- <span class="line"><span> \`- agent_sdk.tool</span></span></code></pre></div><p>A conversation can produce several turn traces, so use the session ID as the join key instead of expecting one long-lived session span.</p><h2 id="add-domain-telemetry" tabindex="-1">Add domain telemetry <a class="header-anchor" href="#add-domain-telemetry" aria-label="Permalink to &quot;Add domain telemetry&quot;">​</a></h2><p>Use <code>ctx.host.otel</code> when your dashboard should answer questions the built-in telemetry cannot, such as which incident a turn handled or how long approval took. Attributes appear on the active turn and tool spans, while counters and histograms give you metrics to graph and alert on.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">ctx.host.otel.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">setAttributes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
24
+ <span class="line"><span> \`- agent_sdk.tool</span></span></code></pre></div><p>A conversation can produce several turn traces, so use the session ID as the join key instead of expecting one long-lived session span.</p><h3 id="subagents" tabindex="-1">Subagents <a class="header-anchor" href="#subagents" aria-label="Permalink to &quot;Subagents&quot;">​</a></h3><p>A subagent&#39;s tool calls are <code>agent_sdk.tool</code> spans under its <code>agent_sdk.subagent</code> span. Its <code>reasoning.completed</code> and <code>message.completed</code> events sit on that span too, so the subagent span shows where its time went. Time between two tool spans is the model choosing the next step. A subagent that fails or is cancelled ends its span with ERROR status when it stops.</p><h3 id="computer-use" tabindex="-1">Computer use <a class="header-anchor" href="#computer-use" aria-label="Permalink to &quot;Computer use&quot;">​</a></h3><p>Each computer use action is an <code>agent_sdk.tool</code> span with <code>cursor.tool.name</code> set to <code>computerUse</code>, under the computer use subagent&#39;s span. A failed action has ERROR status. These attributes describe the action without typed text, coordinates, or screenshots:</p><table tabindex="0"><thead><tr><th>Attribute</th><th>Value</th></tr></thead><tbody><tr><td><code>agent_sdk.computer.actions</code></td><td>The action type, such as <code>click</code>, <code>type</code>, or <code>screenshot</code></td></tr><tr><td><code>agent_sdk.computer.executor_duration_ms</code></td><td>Time the desktop took to run the action and capture the screen</td></tr><tr><td><code>agent_sdk.computer.settle_ms</code></td><td>Part of that time spent waiting for the screen to settle</td></tr></tbody></table><p>The two durations appear only on actions that succeed.</p><p>To export the full actions, turn on tool content as shown in <a href="#control-what-leaves-the-process">Control what leaves the process</a>. Tool content includes the text the agent typed, which can contain passwords.</p><h2 id="add-domain-telemetry" tabindex="-1">Add domain telemetry <a class="header-anchor" href="#add-domain-telemetry" aria-label="Permalink to &quot;Add domain telemetry&quot;">​</a></h2><p>Use <code>ctx.host.otel</code> when your dashboard should answer questions the built-in telemetry cannot, such as which incident a turn handled or how long approval took. Attributes appear on the active turn and tool spans, while counters and histograms give you metrics to graph and alert on.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">ctx.host.otel.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">setAttributes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
25
25
  <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;support.ticket_id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;INC-123&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
26
26
  <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;support.queue&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;p1&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
27
27
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span>
@@ -32,6 +32,6 @@ import{_ as a,c as e,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const c
32
32
  <span class="line"></span>
33
33
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">ctx.host.otel.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">record</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;support.approval.duration_ms&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1420</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
34
34
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> outcome: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;approved&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
35
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>This API is available in tools, hooks, and channel handlers. A session-bound context adds <code>cursor.conversation.id</code> and <code>agent_sdk.agent</code> automatically, so custom measurements join the first-party telemetry without extra plumbing.</p><p>Prefix custom names with your team or agent. First-party metric names and join keys are reserved, and this surface does not create custom spans.</p><h2 id="choose-signals" tabindex="-1">Choose signals <a class="header-anchor" href="#choose-signals" aria-label="Permalink to &quot;Choose signals&quot;">​</a></h2><p>Once export has a destination, traces and metrics are on by default; logs remain off until you opt in.</p><table tabindex="0"><thead><tr><th>Signal</th><th>What appears</th></tr></thead><tbody><tr><td>Traces</td><td>HTTP requests, turns, tools, and subagents</td></tr><tr><td>Metrics</td><td>Token usage, tool calls, cost, and BDK session or turn counts</td></tr><tr><td>Logs</td><td>Session events, after you enable log export</td></tr></tbody></table><p>The first metrics to look for are <code>cursor.token.usage</code>, <code>cursor.tool.calls</code>, and <code>cursor.cost.usage</code>. Configure <code>traces: false</code>, <code>metrics: false</code>, or <code>logs: true</code> under <code>serve({ otel })</code> when you need a different signal mix.</p><h2 id="control-what-leaves-the-process" tabindex="-1">Control what leaves the process <a class="header-anchor" href="#control-what-leaves-the-process" aria-label="Permalink to &quot;Control what leaves the process&quot;">​</a></h2><p>User prompts, tool arguments, tool results, and failure text stay off the wire by default. You still get trace structure, tool names and status, usage metrics, and generic failure status without exporting the underlying content.</p><p>Turn on logs first, then opt into prompt or tool content separately:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OTEL_LOGS_EXPORTER</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">otlp</span></span>
35
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>This API is available in tools, hooks, and channel handlers. A session-bound context adds <code>cursor.conversation.id</code> and <code>agent_sdk.agent</code> automatically, so custom measurements join the first-party telemetry without extra plumbing.</p><p>Prefix custom names with your team or agent. First-party metric names and join keys are reserved, and this surface does not create custom spans.</p><h2 id="choose-signals" tabindex="-1">Choose signals <a class="header-anchor" href="#choose-signals" aria-label="Permalink to &quot;Choose signals&quot;">​</a></h2><p>Once export has a destination, traces and metrics are on by default; logs remain off until you opt in.</p><table tabindex="0"><thead><tr><th>Signal</th><th>What appears</th></tr></thead><tbody><tr><td>Traces</td><td>HTTP requests, turns, tools, and subagents</td></tr><tr><td>Metrics</td><td>Token usage, tool calls, cost, and BDK session or turn counts</td></tr><tr><td>Logs</td><td>Session events, after you enable log export</td></tr></tbody></table><p>The first metrics to look for are <code>cursor.token.usage</code>, <code>cursor.tool.calls</code>, and <code>cursor.cost.usage</code>. Configure <code>traces: false</code>, <code>metrics: false</code>, or <code>logs: true</code> under <code>serve({ otel })</code> when you need a different signal mix.</p><h2 id="control-what-leaves-the-process" tabindex="-1">Control what leaves the process <a class="header-anchor" href="#control-what-leaves-the-process" aria-label="Permalink to &quot;Control what leaves the process&quot;">​</a></h2><p>Traces include structure, tool names, usage metrics, and span status. A failed tool&#39;s status includes a short failure reason. A tool or subagent that is still open when the turn ends gets ERROR status with the reason <code>no result</code>. User prompts, tool arguments, and full tool results stay off the wire until you opt in.</p><p>Turn on logs first, then opt into prompt or tool content separately:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OTEL_LOGS_EXPORTER</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">otlp</span></span>
36
36
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OTEL_LOG_USER_PROMPTS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span></span>
37
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OTEL_LOG_TOOL_CONTENT</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span></span></code></pre></div><p><code>OTEL_LOG_USER_PROMPTS</code> exports user text. <code>OTEL_LOG_TOOL_CONTENT</code> exports tool inputs, outputs, and failure details. Enable either only when the collector&#39;s access and retention policies are appropriate for that data.</p><p>The same controls are available as <code>logs: { userPrompts, toolContent }</code> under <code>serve({ otel })</code>.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./../../skills/otel/SKILL.html"><code>skills/otel/SKILL.md</code></a>: compact configuration and custom-metric reference for coding agents</li><li><a href="./../reference/hooks.html">Hooks</a>: emit domain telemetry from session events</li><li><a href="./../deployment.html">Deployment</a>: set collector endpoints and secrets on hosted or self-hosted agents</li><li><a href="https://cursor.com/docs/enterprise/opentelemetry-export" target="_blank" rel="noreferrer">Cursor enterprise OpenTelemetry Export</a>: send organization-wide Cursor telemetry to the same collector</li></ul>`,31)])])}const E=a(n,[["render",l]]);export{c as __pageData,E as default};
37
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OTEL_LOG_TOOL_CONTENT</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span></span></code></pre></div><p><code>OTEL_LOG_USER_PROMPTS</code> exports user text. <code>OTEL_LOG_TOOL_CONTENT</code> exports tool inputs, outputs, and failure details. Enable either only when the collector&#39;s access and retention policies are appropriate for that data.</p><p>The same controls are available as <code>logs: { userPrompts, toolContent }</code> under <code>serve({ otel })</code>.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./../../skills/otel/SKILL.html"><code>skills/otel/SKILL.md</code></a>: compact configuration and custom-metric reference for coding agents</li><li><a href="./../reference/hooks.html">Hooks</a>: emit domain telemetry from session events</li><li><a href="./../deployment.html">Deployment</a>: set collector endpoints and secrets on hosted or self-hosted agents</li><li><a href="https://cursor.com/docs/enterprise/opentelemetry-export" target="_blank" rel="noreferrer">Cursor enterprise OpenTelemetry Export</a>: send organization-wide Cursor telemetry to the same collector</li></ul>`,38)])])}const E=e(n,[["render",o]]);export{k as __pageData,E as default};
@@ -1 +1 @@
1
- import{_ as a,c as e,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"OpenTelemetry","description":"Send agent traces and metrics to an OTLP collector, follow one conversation, and add domain telemetry.","frontmatter":{"title":"OpenTelemetry","description":"Send agent traces and metrics to an OTLP collector, follow one conversation, and add domain telemetry."},"headers":[],"relativePath":"guides/opentelemetry.md","filePath":"guides/opentelemetry.md"}'),n={name:"guides/opentelemetry.md"};function l(o,s,p,h,r,d){return i(),e("div",null,[...s[0]||(s[0]=[t("",31)])])}const E=a(n,[["render",l]]);export{c as __pageData,E as default};
1
+ import{_ as e,c as t,o as a,a3 as i}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"OpenTelemetry","description":"Send agent traces and metrics to an OTLP collector, follow one conversation, and add domain telemetry.","frontmatter":{"title":"OpenTelemetry","description":"Send agent traces and metrics to an OTLP collector, follow one conversation, and add domain telemetry."},"headers":[],"relativePath":"guides/opentelemetry.md","filePath":"guides/opentelemetry.md"}'),n={name:"guides/opentelemetry.md"};function o(l,s,r,p,h,d){return a(),t("div",null,[...s[0]||(s[0]=[i("",38)])])}const E=e(n,[["render",o]]);export{k as __pageData,E as default};
@@ -1,4 +1,4 @@
1
- import{_ as t,c as s,o as a,a3 as n}from"./chunks/framework.BNw1pucY.js";const o="/docs/architecture.svg",m=JSON.parse('{"title":"Bot Development Kit (BDK)","description":"Build, test, and deploy bots and agents as code with the Bot Development Kit (BDK).","frontmatter":{"title":"Bot Development Kit (BDK)","description":"Build, test, and deploy bots and agents as code with the Bot Development Kit (BDK)."},"headers":[],"relativePath":"index.md","filePath":"README.md"}'),r={name:"index.md"};function i(p,e,l,d,c,h){return a(),s("div",null,[...e[0]||(e[0]=[n('<h1 id="bot-development-kit-bdk" tabindex="-1">Bot Development Kit (BDK) <a class="header-anchor" href="#bot-development-kit-bdk" aria-label="Permalink to &quot;Bot Development Kit (BDK)&quot;">​</a></h1><p>The Bot Development Kit (BDK) lets you define, test, and deploy agents as code. It uses the Cursor SDK harness that powers Bugbot, Security Review, Approval Bot, and Rollouts.</p><p>A BDK project is a folder of Markdown and TypeScript. Combine deterministic code with model judgment, then make the bot or agent available in source control, Slack, issue trackers, and Cursor.</p><h2 id="why-use-it" tabindex="-1">Why use it <a class="header-anchor" href="#why-use-it" aria-label="Permalink to &quot;Why use it&quot;">​</a></h2><ul><li><p><strong>Bots and agents live in your repo.</strong> Instructions, tools, and evals are files you review, version, and ship like the rest of your code.</p></li><li><p><strong>Cursor runs the loop.</strong> You write the instructions and tools. Your agent gets Cursor&#39;s models, tool calling, skills, MCP, and subagents. Each turn runs on your host.</p></li><li><p><strong>Use it where you work.</strong> Trigger a project from source-control events, Slack threads, custom webhooks, or schedules.</p></li><li><p><strong>Test normal TypeScript.</strong> Add evals and unit tests without a separate configuration language.</p></li><li><p><strong>Choose where it runs.</strong> Deploy to Cursor-managed hosting or run the process on your infrastructure.</p></li></ul><h2 id="when-to-use-bdk" tabindex="-1">When to use BDK <a class="header-anchor" href="#when-to-use-bdk" aria-label="Permalink to &quot;When to use BDK&quot;">​</a></h2><table tabindex="0"><thead><tr><th></th><th>Cursor Automations</th><th>Grok Bot</th><th>BDK</th></tr></thead><tbody><tr><td><strong>Use for</strong></td><td>Repeatable jobs driven by a prompt and a trigger</td><td>Interactive agents that work with you in Cursor</td><td>Agents that need custom code, integrations, tests, or deployment choices</td></tr><tr><td><strong>You define</strong></td><td>A prompt, model, and trigger in the dashboard</td><td>Instructions, skills, and connected tools in the app</td><td>A versioned Markdown and TypeScript project</td></tr><tr><td><strong>Where it runs</strong></td><td>Cursor-managed</td><td>Cursor-managed</td><td>Cursor-managed hosting or your infrastructure</td></tr><tr><td><strong>Choose it when</strong></td><td>The job fits a schedule or event trigger</td><td>You want an agent you can configure and talk to without creating a software project</td><td>You want deterministic code around model judgment and a project your team can review and test</td></tr></tbody></table><h2 id="architecture" tabindex="-1">Architecture <a class="header-anchor" href="#architecture" aria-label="Permalink to &quot;Architecture&quot;">​</a></h2><p>Define the project in source control. Run execution, inference, and sandboxing on Cursor infrastructure or on your own host.</p><p><img src="'+o+`" alt="BDK architecture: you bring the agent as code, and the platform provides triggers, runtime, integrations, and operations"></p><h2 id="get-started" tabindex="-1">Get started <a class="header-anchor" href="#get-started" aria-label="Permalink to &quot;Get started&quot;">​</a></h2><p>Install <code>@cursor/bdk</code>, then start with <code>bdk init</code> and <code>bdk dev</code>.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>npm install --global @cursor/bdk</span></span>
1
+ import{_ as t,c as a,o as s,a3 as n}from"./chunks/framework.BNw1pucY.js";const o="/docs/architecture.svg",m=JSON.parse('{"title":"Bot Development Kit (BDK)","description":"Build, test, and deploy bots and agents as code with the Bot Development Kit (BDK).","frontmatter":{"title":"Bot Development Kit (BDK)","description":"Build, test, and deploy bots and agents as code with the Bot Development Kit (BDK)."},"headers":[],"relativePath":"index.md","filePath":"README.md"}'),r={name:"index.md"};function i(p,e,l,d,c,h){return s(),a("div",null,[...e[0]||(e[0]=[n('<h1 id="bot-development-kit-bdk" tabindex="-1">Bot Development Kit (BDK) <a class="header-anchor" href="#bot-development-kit-bdk" aria-label="Permalink to &quot;Bot Development Kit (BDK)&quot;">​</a></h1><p>The Bot Development Kit (BDK) lets you define, test, and deploy agents as code. It uses the Cursor SDK harness that powers Bugbot, Security Review, Approval Bot, and Rollouts.</p><p>A BDK project is a folder of Markdown and TypeScript. Combine deterministic code with model judgment, then make the bot or agent available in source control, Slack, issue trackers, and Cursor.</p><h2 id="why-use-it" tabindex="-1">Why use it <a class="header-anchor" href="#why-use-it" aria-label="Permalink to &quot;Why use it&quot;">​</a></h2><ul><li><p><strong>Bots and agents live in your repo.</strong> Instructions, tools, and evals are files you review, version, and ship like the rest of your code.</p></li><li><p><strong>Cursor runs the loop.</strong> You write the instructions and tools. Your agent gets Cursor&#39;s models, tool calling, skills, MCP, and subagents. Each turn runs on your host.</p></li><li><p><strong>Use it where you work.</strong> Trigger a project from source-control events, Slack threads, custom webhooks, or schedules.</p></li><li><p><strong>Test normal TypeScript.</strong> Add evals and unit tests without a separate configuration language.</p></li><li><p><strong>Choose where it runs.</strong> Deploy to Cursor-managed hosting or run the process on your infrastructure.</p></li></ul><h2 id="when-to-use-bdk" tabindex="-1">When to use BDK <a class="header-anchor" href="#when-to-use-bdk" aria-label="Permalink to &quot;When to use BDK&quot;">​</a></h2><table tabindex="0"><thead><tr><th></th><th>Cursor Automations</th><th>Grok Bot</th><th>BDK</th></tr></thead><tbody><tr><td><strong>Use for</strong></td><td>Repeatable jobs driven by a prompt and a trigger</td><td>Interactive agents that work with you in Cursor</td><td>Agents that need custom code, integrations, tests, or deployment choices</td></tr><tr><td><strong>You define</strong></td><td>A prompt, model, and trigger in the dashboard</td><td>Instructions, skills, and connected tools in the app</td><td>A versioned Markdown and TypeScript project</td></tr><tr><td><strong>Where it runs</strong></td><td>Cursor-managed</td><td>Cursor-managed</td><td>Cursor-managed hosting or your infrastructure</td></tr><tr><td><strong>Choose it when</strong></td><td>The job fits a schedule or event trigger</td><td>You want an agent you can configure and talk to without creating a software project</td><td>You want deterministic code around model judgment and a project your team can review and test</td></tr></tbody></table><h2 id="architecture" tabindex="-1">Architecture <a class="header-anchor" href="#architecture" aria-label="Permalink to &quot;Architecture&quot;">​</a></h2><p>Define the project in source control. Run execution, inference, and sandboxing on Cursor infrastructure or on your own host.</p><p><img src="'+o+`" alt="BDK architecture: you bring the agent as code, and the platform provides triggers, runtime, integrations, and operations"></p><h2 id="get-started" tabindex="-1">Get started <a class="header-anchor" href="#get-started" aria-label="Permalink to &quot;Get started&quot;">​</a></h2><p>Install <code>@cursor/bdk</code>, then start with <code>bdk init</code> and <code>bdk dev</code>.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>npm install --global @cursor/bdk</span></span>
2
2
  <span class="line"><span>bdk init ./my-bot</span></span>
3
3
  <span class="line"><span>cd my-bot</span></span>
4
4
  <span class="line"><span>bdk dev</span></span></code></pre></div><p>Open the project in Cursor. BDK projects use <code>bot/</code>.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>my-bot/</span></span>
@@ -24,4 +24,4 @@ import{_ as t,c as s,o as a,a3 as n}from"./chunks/framework.BNw1pucY.js";const o
24
24
  <span class="line"><span>│ └── hooks/</span></span>
25
25
  <span class="line"><span>│ └── audit.ts # observe session events</span></span>
26
26
  <span class="line"><span>└── evals/</span></span>
27
- <span class="line"><span> └── readiness.eval.ts # regression checks</span></span></code></pre></div><p>Describe your bot or agent in Cursor, or edit the files yourself.</p><h2 id="next-steps" tabindex="-1">Next steps <a class="header-anchor" href="#next-steps" aria-label="Permalink to &quot;Next steps&quot;">​</a></h2><ul><li><p><a href="./quickstart.html">Build your first PR reviewer</a>: a working GitHub reviewer, one step at a time.</p></li><li><p>Start from a template: <a href="./templates/grokbot-agents.html">Grok Bot agents</a>, <a href="./templates/security-reviewer.html">security reviewer</a>, <a href="./templates/thermo-review.html">Thermo review</a>, <a href="./templates/thermo-quality-review.html">Thermo quality review</a>, <a href="./templates/agentic-owners.html">owners-policy approver</a>, <a href="./templates/triage.html">issue triager</a>.</p></li><li><p><a href="./guides/convert-automation.html">Convert a Cursor Automation</a>: export an Automation from the dashboard into a project you own.</p></li><li><p><a href="./building-with-agents.html">Build agents with agents</a>: hand the build to a coding agent with the package&#39;s bundled skills.</p></li><li><p><a href="./reference/project-layout.html">Project layout</a> and <a href="./reference/cli.html">CLI</a>: every folder and every command.</p></li></ul>`,18)])])}const g=t(r,[["render",i]]);export{m as __pageData,g as default};
27
+ <span class="line"><span> └── readiness.eval.ts # regression checks</span></span></code></pre></div><p>Describe your bot or agent in Cursor, or edit the files yourself.</p><h2 id="next-steps" tabindex="-1">Next steps <a class="header-anchor" href="#next-steps" aria-label="Permalink to &quot;Next steps&quot;">​</a></h2><ul><li><p><a href="./quickstart.html">Build your first PR reviewer</a>: a working GitHub reviewer, one step at a time.</p></li><li><p>Start from a template: <a href="./templates/grokbot-agents.html">Grok Bot agents</a>, <a href="./templates/security-reviewer.html">security reviewer</a>, <a href="./templates/thermo-review.html">Thermo review</a>, <a href="./templates/thermo-quality-review.html">Thermo quality review</a>, <a href="./templates/agentic-owners.html">owners-policy approver</a>, <a href="./templates/triage.html">issue triager</a>.</p></li><li><p><a href="./guides/convert-automation.html">Convert a Cursor Automation</a>: export an Automation from the dashboard into a project you own.</p></li><li><p><a href="./guides/export-grokbot.html">Export a Grok Bot</a>: turn a recipe into a BDK project and review what needs manual setup.</p></li><li><p><a href="./building-with-agents.html">Build agents with agents</a>: hand the build to a coding agent with the package&#39;s bundled skills.</p></li><li><p><a href="./reference/project-layout.html">Project layout</a> and <a href="./reference/cli.html">CLI</a>: every folder and every command.</p></li></ul>`,18)])])}const g=t(r,[["render",i]]);export{m as __pageData,g as default};
@@ -1 +1 @@
1
- import{_ as t,c as s,o as a,a3 as n}from"./chunks/framework.BNw1pucY.js";const o="/docs/architecture.svg",m=JSON.parse('{"title":"Bot Development Kit (BDK)","description":"Build, test, and deploy bots and agents as code with the Bot Development Kit (BDK).","frontmatter":{"title":"Bot Development Kit (BDK)","description":"Build, test, and deploy bots and agents as code with the Bot Development Kit (BDK)."},"headers":[],"relativePath":"index.md","filePath":"README.md"}'),r={name:"index.md"};function i(p,e,l,d,c,h){return a(),s("div",null,[...e[0]||(e[0]=[n("",18)])])}const g=t(r,[["render",i]]);export{m as __pageData,g as default};
1
+ import{_ as t,c as a,o as s,a3 as n}from"./chunks/framework.BNw1pucY.js";const o="/docs/architecture.svg",m=JSON.parse('{"title":"Bot Development Kit (BDK)","description":"Build, test, and deploy bots and agents as code with the Bot Development Kit (BDK).","frontmatter":{"title":"Bot Development Kit (BDK)","description":"Build, test, and deploy bots and agents as code with the Bot Development Kit (BDK)."},"headers":[],"relativePath":"index.md","filePath":"README.md"}'),r={name:"index.md"};function i(p,e,l,d,c,h){return s(),a("div",null,[...e[0]||(e[0]=[n("",18)])])}const g=t(r,[["render",i]]);export{m as __pageData,g as default};
@@ -1,4 +1,4 @@
1
- import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),d={name:"reference/cli.md"};function n(c,e,r,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s(`<h1 id="bdk-cli" tabindex="-1">BDK CLI <a class="header-anchor" href="#bdk-cli" aria-label="Permalink to &quot;BDK CLI&quot;">​</a></h1><p>The Bot Development Kit (BDK) is published as <code>@cursor/bdk</code> with the <code>bdk</code> CLI.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk &lt;command&gt;</span></span></code></pre></div><p>The command catalog below documents the <code>bdk</code> binary from <code>@cursor/bdk</code>. Run it with Node 22.13 or newer; Bun is not supported. Commands exit nonzero when validation or a synchronous request fails; asynchronous commands can exit <code>0</code> once work is accepted. Project paths use the <a href="./project-layout.html">BDK project layout</a>.</p><p>Install <code>@cursor/bdk</code> to obtain the binary. <code>bdk help</code> prints top-level help; the Slack, GitHub, GitLab, and Bitbucket command packs provide their own <code>help</code> subcommands.</p><h2 id="command-catalog" tabindex="-1">Command catalog <a class="header-anchor" href="#command-catalog" aria-label="Permalink to &quot;Command catalog&quot;">​</a></h2><h3 id="development-commands" tabindex="-1">Development commands <a class="header-anchor" href="#development-commands" aria-label="Permalink to &quot;Development commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>help</code>, <code>--help</code>, <code>-h</code></td><td>Print top-level help</td></tr><tr><td><a href="#serve"><code>serve</code></a></td><td>Serve one or more agents over HTTP</td></tr><tr><td><a href="#dev"><code>dev</code></a></td><td>Serve agents with local-development behavior</td></tr><tr><td><a href="#docs"><code>docs</code></a></td><td>Serve the documentation bundled with <code>@cursor/bdk</code></td></tr><tr><td><a href="#init"><code>init</code></a></td><td>Scaffold a BDK project</td></tr><tr><td><a href="#convert-automation"><code>convert-automation</code></a></td><td>Export a Cursor Automation into a project</td></tr><tr><td><a href="#migrate"><code>migrate</code></a></td><td>Move an early-alpha project to architecture v2 through a pull request</td></tr><tr><td><a href="#install-skills"><code>install-skills</code></a></td><td>Refresh the bundled coding-agent skills</td></tr><tr><td><a href="#info"><code>info</code></a></td><td>Print the discovered project surface</td></tr><tr><td><a href="#validate"><code>validate</code></a></td><td>Check project diagnostics and set the exit status</td></tr><tr><td><a href="#manifest"><code>manifest</code></a></td><td>Print deployment metadata as JSON</td></tr><tr><td><a href="#version"><code>version</code></a></td><td>Print the installed package version</td></tr><tr><td><a href="#update"><code>update</code></a></td><td>Upgrade the installed CLI</td></tr><tr><td><a href="#login-logout-whoami"><code>login</code></a></td><td>Sign the host in to Cursor</td></tr><tr><td><a href="#login-logout-whoami"><code>logout</code></a></td><td>Remove the stored Cursor credential</td></tr><tr><td><a href="#login-logout-whoami"><code>whoami</code></a></td><td>Show the active Cursor credential</td></tr></tbody></table><h3 id="session-and-eval-commands" tabindex="-1">Session and eval commands <a class="header-anchor" href="#session-and-eval-commands" aria-label="Permalink to &quot;Session and eval commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#chat"><code>chat</code></a></td><td>Talk to a running agent</td></tr><tr><td><a href="#resume"><code>resume</code></a></td><td>Reattach chat to a previous session</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Start or continue work on a local, running, or hosted agent</td></tr><tr><td><a href="#call"><code>call</code></a></td><td>Call a server tool without a model turn</td></tr><tr><td><a href="#skill"><code>skill</code></a></td><td>Read an authored skill without a model turn</td></tr><tr><td><a href="#logs"><code>logs</code></a></td><td>Follow or dump agent logs</td></tr><tr><td><a href="#sessions"><code>sessions</code></a></td><td>List sessions</td></tr><tr><td><a href="#session"><code>session</code></a></td><td>Inspect a session or start a hosted session turn</td></tr><tr><td><a href="#cost"><code>cost</code></a></td><td>Report token usage and estimated cost</td></tr><tr><td><a href="#playground"><code>playground</code></a></td><td>Open an agent&#39;s playground</td></tr><tr><td><a href="#trajectory"><code>trajectory</code></a></td><td>Summarize a saved event stream</td></tr><tr><td><a href="#eval"><code>eval</code></a></td><td>List, run, inspect, or cancel evals</td></tr></tbody></table><h3 id="managed-hosting-commands" tabindex="-1">Managed hosting commands <a class="header-anchor" href="#managed-hosting-commands" aria-label="Permalink to &quot;Managed hosting commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#deploy"><code>deploy</code></a></td><td>Deploy one or more agents</td></tr><tr><td><a href="#deployments"><code>deployments</code></a></td><td>List deployments</td></tr><tr><td><a href="#deployment"><code>deployment</code></a></td><td>Inspect one deployment</td></tr><tr><td><a href="#stop"><code>stop</code></a></td><td>Stop a deployment</td></tr><tr><td><a href="#start"><code>start</code></a></td><td>Start a stopped deployment</td></tr><tr><td><a href="#kill"><code>kill</code></a></td><td>Stop a deployment, cancel its runs, and lock deploys</td></tr><tr><td><a href="#unlock-deploys"><code>unlock-deploys</code></a></td><td>Let a killed deployment deploy again</td></tr><tr><td><a href="#cancel-runs"><code>cancel-runs</code></a></td><td>Cancel active runs and reminder wakes</td></tr><tr><td><a href="#event-repos"><code>event-repos</code></a></td><td>Replace a deployment&#39;s event repositories</td></tr><tr><td><a href="#upgrade"><code>upgrade</code></a></td><td>Move a deployment to a release</td></tr><tr><td><a href="#rollback"><code>rollback</code></a></td><td>Move a deployment to an earlier release</td></tr><tr><td><a href="#delete"><code>delete</code></a></td><td>Delete a deployment</td></tr><tr><td><a href="#rotate-token"><code>rotate-token</code></a></td><td>Replace a deployment&#39;s alias token</td></tr><tr><td><a href="#secrets"><code>secrets</code></a></td><td>Set, list, or remove deployment secrets</td></tr><tr><td><a href="#images"><code>images</code></a></td><td>Push, list, or remove container images for persistent agents</td></tr></tbody></table><h3 id="connection-and-channel-commands" tabindex="-1">Connection and channel commands <a class="header-anchor" href="#connection-and-channel-commands" aria-label="Permalink to &quot;Connection and channel commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#mcp"><code>mcp</code></a></td><td>Proxy an agent&#39;s MCP endpoint over stdio</td></tr><tr><td><a href="#mcp"><code>mcp install</code></a></td><td>Add the agent to an MCP client config</td></tr><tr><td><a href="#mcp-oauth"><code>mcp oauth</code></a></td><td>Authorize an MCP connection</td></tr><tr><td><a href="#slack"><code>slack</code></a></td><td>Provision and check Slack channel apps</td></tr><tr><td><a href="#github"><code>github</code></a></td><td>Forward, replay, and inspect GitHub webhooks</td></tr><tr><td><a href="#gitlab"><code>gitlab</code></a></td><td>Replay and inspect GitLab webhooks</td></tr><tr><td><a href="#bitbucket"><code>bitbucket</code></a></td><td>Replay and inspect Bitbucket webhooks</td></tr></tbody></table><h2 id="choose-a-target" tabindex="-1">Targets <a class="header-anchor" href="#choose-a-target" aria-label="Permalink to &quot;Targets {#choose-a-target}&quot;">​</a></h2><p>Commands that send requests support these targets:</p><table tabindex="0"><thead><tr><th>Target</th><th>Selection</th><th>Commands</th></tr></thead><tbody><tr><td>Ephemeral local server</td><td>Omit <code>--url</code> and <code>--prod</code></td><td><code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code></td></tr><tr><td>Running server</td><td>Pass <code>--url &lt;baseUrl&gt;</code></td><td><code>chat</code>, <code>resume</code>, <code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code>, <code>mcp</code></td></tr><tr><td>Default local server</td><td>Omit <code>--url</code> and <code>--prod</code>; uses <code>http://127.0.0.1:3000</code></td><td><code>chat</code>, <code>resume</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code></td></tr><tr><td>Hosted deployment</td><td>Pass <code>--prod</code></td><td><code>run</code>, <code>session</code>, <code>logs</code>, <code>playground</code></td></tr></tbody></table><p>An explicit <code>--url</code> must include the slug for a multi-agent server, such as <code>http://127.0.0.1:3000/pr-approver</code>. <code>--slug</code> never changes an explicit URL. <code>--url</code> and <code>--prod</code> are mutually exclusive.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--dir &lt;path&gt;</code></td><td>Select the project root. The default is the current directory.</td></tr><tr><td><code>--url &lt;baseUrl&gt;</code></td><td>Use a running agent instead of local project discovery.</td></tr><tr><td><code>--prod</code></td><td>Use the hosted deployment. Only <code>run</code>, <code>session</code>, <code>logs</code>, and <code>playground</code> accept it; <code>chat</code>, <code>resume</code>, <code>call</code>, <code>skill</code>, <code>sessions</code>, <code>cost</code>, and <code>mcp</code> report that the deployment doesn&#39;t support the command, and <code>eval</code> rejects the flag.</td></tr><tr><td><code>--slug &lt;slug&gt;</code></td><td>Select an agent from a multi-agent project or a hosted deployment. Under <code>--prod</code>, the default is the <code>--dir</code> basename.</td></tr><tr><td><code>--team &lt;id&gt;</code></td><td>Select a Cursor team. The signed-in account&#39;s team is the default.</td></tr><tr><td><code>--api-key &lt;key&gt;</code></td><td>Override the Cursor credential for commands that authenticate with Cursor.</td></tr><tr><td><code>--bearer-token &lt;token&gt;</code></td><td>Authenticate to a running server with a bearer token.</td></tr><tr><td><code>--state-root &lt;path&gt;</code></td><td>Select local state for <code>serve</code> and ephemeral <code>run</code>, <code>call</code>, <code>skill</code>, and <code>eval</code> targets. Running and <code>--prod</code> targets ignore it.</td></tr><tr><td><code>--json</code></td><td>Request machine-readable output when the command supports it. <code>run</code> already defaults to JSON.</td></tr></tbody></table><h2 id="local-servers" tabindex="-1">Local servers <a class="header-anchor" href="#local-servers" aria-label="Permalink to &quot;Local servers&quot;">​</a></h2><h3 id="serve" tabindex="-1">Serve agents <a class="header-anchor" href="#serve" aria-label="Permalink to &quot;Serve agents {#serve}&quot;">​</a></h3><p><code>serve</code> mounts every project discovered under <code>--dir</code>:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk serve [--dir &lt;path&gt;] [--port &lt;n&gt;] [--host &lt;host&gt;]</span></span>
1
+ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),d={name:"reference/cli.md"};function n(r,e,c,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s(`<h1 id="bdk-cli" tabindex="-1">BDK CLI <a class="header-anchor" href="#bdk-cli" aria-label="Permalink to &quot;BDK CLI&quot;">​</a></h1><p>The Bot Development Kit (BDK) is published as <code>@cursor/bdk</code> with the <code>bdk</code> CLI.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk &lt;command&gt;</span></span></code></pre></div><p>The command catalog below documents the <code>bdk</code> binary from <code>@cursor/bdk</code>. Run it with Node 22.13 or newer; Bun is not supported. Commands exit nonzero when validation or a synchronous request fails; asynchronous commands can exit <code>0</code> once work is accepted. Project paths use the <a href="./project-layout.html">BDK project layout</a>.</p><p>Install <code>@cursor/bdk</code> to obtain the binary. <code>bdk help</code> prints top-level help; the Slack, GitHub, GitLab, and Bitbucket command packs provide their own <code>help</code> subcommands.</p><h2 id="command-catalog" tabindex="-1">Command catalog <a class="header-anchor" href="#command-catalog" aria-label="Permalink to &quot;Command catalog&quot;">​</a></h2><h3 id="development-commands" tabindex="-1">Development commands <a class="header-anchor" href="#development-commands" aria-label="Permalink to &quot;Development commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>help</code>, <code>--help</code>, <code>-h</code></td><td>Print top-level help</td></tr><tr><td><a href="#serve"><code>serve</code></a></td><td>Serve one or more agents over HTTP</td></tr><tr><td><a href="#dev"><code>dev</code></a></td><td>Serve agents with local-development behavior</td></tr><tr><td><a href="#docs"><code>docs</code></a></td><td>Serve the documentation bundled with <code>@cursor/bdk</code></td></tr><tr><td><a href="#init"><code>init</code></a></td><td>Scaffold a BDK project</td></tr><tr><td><a href="#convert-automation"><code>convert-automation</code></a></td><td>Export a Cursor Automation into a project</td></tr><tr><td><a href="#migrate"><code>migrate</code></a></td><td>Move an early-alpha project to architecture v2 through a pull request</td></tr><tr><td><a href="#install-skills"><code>install-skills</code></a></td><td>Refresh the bundled coding-agent skills</td></tr><tr><td><a href="#info"><code>info</code></a></td><td>Print the discovered project surface</td></tr><tr><td><a href="#validate"><code>validate</code></a></td><td>Check project diagnostics and set the exit status</td></tr><tr><td><a href="#manifest"><code>manifest</code></a></td><td>Print deployment metadata as JSON</td></tr><tr><td><a href="#version"><code>version</code></a></td><td>Print the installed package version</td></tr><tr><td><a href="#update"><code>update</code></a></td><td>Upgrade the installed CLI</td></tr><tr><td><a href="#login-logout-whoami"><code>login</code></a></td><td>Sign the host in to Cursor</td></tr><tr><td><a href="#login-logout-whoami"><code>logout</code></a></td><td>Remove the stored Cursor credential</td></tr><tr><td><a href="#login-logout-whoami"><code>whoami</code></a></td><td>Show the active Cursor credential</td></tr></tbody></table><h3 id="session-and-eval-commands" tabindex="-1">Session and eval commands <a class="header-anchor" href="#session-and-eval-commands" aria-label="Permalink to &quot;Session and eval commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#chat"><code>chat</code></a></td><td>Talk to a running agent</td></tr><tr><td><a href="#resume"><code>resume</code></a></td><td>Reattach chat to a previous session</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Start or continue work on a local, running, or hosted agent</td></tr><tr><td><a href="#call"><code>call</code></a></td><td>Call a server tool without a model turn</td></tr><tr><td><a href="#skill"><code>skill</code></a></td><td>Read an authored skill without a model turn</td></tr><tr><td><a href="#logs"><code>logs</code></a></td><td>Follow or dump agent logs</td></tr><tr><td><a href="#sessions"><code>sessions</code></a></td><td>List sessions</td></tr><tr><td><a href="#session"><code>session</code></a></td><td>Inspect a session or start a hosted session turn</td></tr><tr><td><a href="#cost"><code>cost</code></a></td><td>Report token usage and estimated cost</td></tr><tr><td><a href="#playground"><code>playground</code></a></td><td>Open an agent&#39;s playground</td></tr><tr><td><a href="#trajectory"><code>trajectory</code></a></td><td>Summarize a saved event stream</td></tr><tr><td><a href="#eval"><code>eval</code></a></td><td>List, run, inspect, or cancel evals</td></tr></tbody></table><h3 id="managed-hosting-commands" tabindex="-1">Managed hosting commands <a class="header-anchor" href="#managed-hosting-commands" aria-label="Permalink to &quot;Managed hosting commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#deploy"><code>deploy</code></a></td><td>Deploy one or more agents</td></tr><tr><td><a href="#deployments"><code>deployments</code></a></td><td>List deployments</td></tr><tr><td><a href="#deployment"><code>deployment</code></a></td><td>Inspect one deployment</td></tr><tr><td><a href="#stop"><code>stop</code></a></td><td>Stop a deployment</td></tr><tr><td><a href="#start"><code>start</code></a></td><td>Start a stopped deployment</td></tr><tr><td><a href="#kill"><code>kill</code></a></td><td>Stop a deployment, cancel its runs, and lock deploys</td></tr><tr><td><a href="#unlock-deploys"><code>unlock-deploys</code></a></td><td>Let a killed deployment deploy again</td></tr><tr><td><a href="#cancel-runs"><code>cancel-runs</code></a></td><td>Cancel active runs and reminder wakes</td></tr><tr><td><a href="#event-repos"><code>event-repos</code></a></td><td>Replace a deployment&#39;s event repositories</td></tr><tr><td><a href="#upgrade"><code>upgrade</code></a></td><td>Move a deployment to a release</td></tr><tr><td><a href="#rollback"><code>rollback</code></a></td><td>Move a deployment to an earlier release</td></tr><tr><td><a href="#delete"><code>delete</code></a></td><td>Delete a deployment</td></tr><tr><td><a href="#rotate-token"><code>rotate-token</code></a></td><td>Replace a deployment&#39;s alias token</td></tr><tr><td><a href="#secrets"><code>secrets</code></a></td><td>Set, list, or remove deployment secrets</td></tr><tr><td><a href="#images"><code>images</code></a></td><td>Push, list, or remove container images for persistent agents</td></tr></tbody></table><h3 id="connection-and-channel-commands" tabindex="-1">Connection and channel commands <a class="header-anchor" href="#connection-and-channel-commands" aria-label="Permalink to &quot;Connection and channel commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#mcp"><code>mcp</code></a></td><td>Proxy an agent&#39;s MCP endpoint over stdio</td></tr><tr><td><a href="#mcp"><code>mcp install</code></a></td><td>Add the agent to an MCP client config</td></tr><tr><td><a href="#mcp-oauth"><code>mcp oauth</code></a></td><td>Authorize an MCP connection</td></tr><tr><td><a href="#slack"><code>slack</code></a></td><td>Provision and check Slack channel apps</td></tr><tr><td><a href="#github"><code>github</code></a></td><td>Forward, replay, and inspect GitHub webhooks</td></tr><tr><td><a href="#gitlab"><code>gitlab</code></a></td><td>Replay and inspect GitLab webhooks</td></tr><tr><td><a href="#bitbucket"><code>bitbucket</code></a></td><td>Replay and inspect Bitbucket webhooks</td></tr></tbody></table><h2 id="choose-a-target" tabindex="-1">Targets <a class="header-anchor" href="#choose-a-target" aria-label="Permalink to &quot;Targets {#choose-a-target}&quot;">​</a></h2><p>Commands that send requests support these targets:</p><table tabindex="0"><thead><tr><th>Target</th><th>Selection</th><th>Commands</th></tr></thead><tbody><tr><td>Ephemeral local server</td><td>Omit <code>--url</code> and <code>--prod</code></td><td><code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code></td></tr><tr><td>Running server</td><td>Pass <code>--url &lt;baseUrl&gt;</code></td><td><code>chat</code>, <code>resume</code>, <code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code>, <code>mcp</code></td></tr><tr><td>Default local server</td><td>Omit <code>--url</code> and <code>--prod</code>; uses <code>http://127.0.0.1:3000</code></td><td><code>chat</code>, <code>resume</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code></td></tr><tr><td>Hosted deployment</td><td>Pass <code>--prod</code></td><td><code>run</code>, <code>session</code>, <code>logs</code>, <code>playground</code></td></tr></tbody></table><p>An explicit <code>--url</code> must include the slug for a multi-agent server, such as <code>http://127.0.0.1:3000/pr-approver</code>. <code>--slug</code> never changes an explicit URL. <code>--url</code> and <code>--prod</code> are mutually exclusive.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--dir &lt;path&gt;</code></td><td>Select the project root. The default is the current directory.</td></tr><tr><td><code>--url &lt;baseUrl&gt;</code></td><td>Use a running agent instead of local project discovery.</td></tr><tr><td><code>--prod</code></td><td>Use the hosted deployment. Only <code>run</code>, <code>session</code>, <code>logs</code>, and <code>playground</code> accept it; <code>chat</code>, <code>resume</code>, <code>call</code>, <code>skill</code>, <code>sessions</code>, <code>cost</code>, and <code>mcp</code> report that the deployment doesn&#39;t support the command, and <code>eval</code> rejects the flag.</td></tr><tr><td><code>--slug &lt;slug&gt;</code></td><td>Select an agent from a multi-agent project or a hosted deployment. Under <code>--prod</code>, the default is the <code>--dir</code> basename.</td></tr><tr><td><code>--team &lt;id&gt;</code></td><td>Select a Cursor team. The signed-in account&#39;s team is the default.</td></tr><tr><td><code>--api-key &lt;key&gt;</code></td><td>Override the Cursor credential for commands that authenticate with Cursor.</td></tr><tr><td><code>--bearer-token &lt;token&gt;</code></td><td>Authenticate to a running server with a bearer token.</td></tr><tr><td><code>--state-root &lt;path&gt;</code></td><td>Select local state for <code>serve</code> and ephemeral <code>run</code>, <code>call</code>, <code>skill</code>, and <code>eval</code> targets. Running and <code>--prod</code> targets ignore it.</td></tr><tr><td><code>--json</code></td><td>Request machine-readable output when the command supports it. <code>run</code> already defaults to JSON.</td></tr></tbody></table><h2 id="local-servers" tabindex="-1">Local servers <a class="header-anchor" href="#local-servers" aria-label="Permalink to &quot;Local servers&quot;">​</a></h2><h3 id="serve" tabindex="-1">Serve agents <a class="header-anchor" href="#serve" aria-label="Permalink to &quot;Serve agents {#serve}&quot;">​</a></h3><p><code>serve</code> mounts every project discovered under <code>--dir</code>:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk serve [--dir &lt;path&gt;] [--port &lt;n&gt;] [--host &lt;host&gt;]</span></span>
2
2
  <span class="line"><span> [--mode multi|single] [--dev] [--api-key &lt;key&gt;]</span></span>
3
3
  <span class="line"><span> [--state-root &lt;path&gt;]</span></span>
4
4
  <span class="line"><span> [--bearer-token &lt;secret&gt; | --allow-anonymous]</span></span>
@@ -6,8 +6,9 @@ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON
6
6
  <span class="line"><span> [--allow-anonymous-cursor-account-mcp]</span></span>
7
7
  <span class="line"><span> [--allow-anonymous-grokbot]</span></span>
8
8
  <span class="line"><span> [--public-url &lt;url&gt;]</span></span>
9
+ <span class="line"><span> [--peers-url &lt;url&gt;]</span></span>
9
10
  <span class="line"><span> [--no-schedules] [--no-playground] [--no-docs]</span></span>
10
- <span class="line"><span> [--cursor-events --repo &lt;owner/name&gt;]...</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--port &lt;n&gt;</code></td><td>Listen on this port. The default is <code>3000</code>; <code>0</code> 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.</td></tr><tr><td><code>--host &lt;host&gt;</code></td><td>Bind this host. The default is loopback-only <code>127.0.0.1</code>.</td></tr><tr><td><code>--mode multi</code></td><td>Mount projects at <code>/&lt;slug&gt;/v1/*</code> and <code>/&lt;slug&gt;/playground</code>, with an index at <code>/</code>. This is the default.</td></tr><tr><td><code>--mode single</code></td><td>Mount one project at <code>/v1/*</code> and <code>/playground</code>.</td></tr><tr><td><code>--dev</code></td><td>Disable automatic schedule and reminder firing, admit unsigned loopback GitHub deliveries, and enable local playground access.</td></tr><tr><td><code>--state-root &lt;path&gt;</code></td><td>Store local sessions, streams, workspaces, and channel state here. Keep durable state outside a repository whose rules shouldn&#39;t reach agent workspaces.</td></tr><tr><td><code>--bearer-token &lt;secret&gt;</code></td><td>Require this token on routes without authored authentication. Mutually exclusive with <code>--allow-anonymous</code>.</td></tr><tr><td><code>--allow-anonymous</code></td><td>Admit callers as one anonymous principal. Use it only behind a trusted network boundary.</td></tr><tr><td><code>--allow-anonymous-cursor-github</code></td><td>Let anonymous callers use sessions with a Cursor account&#39;s repository-scoped GitHub credential. Requires an authenticating proxy.</td></tr><tr><td><code>--allow-anonymous-cursor-account-mcp</code></td><td>Let anonymous callers use Cursor account MCP connections. Requires an authenticating proxy.</td></tr><tr><td><code>--allow-anonymous-grokbot</code></td><td>Let anonymous callers drive hosted Grok Bot runtime agents. Requires an authenticating proxy.</td></tr><tr><td><code>--public-url &lt;url&gt;</code></td><td>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.</td></tr><tr><td><code>--no-schedules</code></td><td>Disable schedule firing outside dev mode.</td></tr><tr><td><code>--no-playground</code></td><td>Skip the playground.</td></tr><tr><td><code>--no-docs</code></td><td>Skip the documentation site at <code>/docs</code>.</td></tr><tr><td><code>--cursor-events</code></td><td>Receive SCM events through Cursor. Requires sign-in and one or more repeatable <code>--repo owner/name</code> values.</td></tr></tbody></table><p>Multi-agent slugs start with a letter or digit and contain only letters, digits, <code>_</code>, or <code>-</code>. The reserved slugs are <code>v1</code>, <code>playground</code>, and <code>docs</code>.</p><h3 id="dev" tabindex="-1">Develop locally <a class="header-anchor" href="#dev" aria-label="Permalink to &quot;Develop locally {#dev}&quot;">​</a></h3><p><code>dev</code> is <code>serve --dev</code> with an optional positional project path:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk dev</span></span>
11
+ <span class="line"><span> [--cursor-events --repo &lt;owner/name&gt;]...</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--port &lt;n&gt;</code></td><td>Listen on this port. The default is <code>3000</code>; <code>0</code> 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.</td></tr><tr><td><code>--host &lt;host&gt;</code></td><td>Bind this host. The default is loopback-only <code>127.0.0.1</code>.</td></tr><tr><td><code>--mode multi</code></td><td>Mount projects at <code>/&lt;slug&gt;/v1/*</code> and <code>/&lt;slug&gt;/playground</code>, with an index at <code>/</code>. This is the default.</td></tr><tr><td><code>--mode single</code></td><td>Mount one project at <code>/v1/*</code> and <code>/playground</code>. Declared peers are omitted with a warning unless <code>--peers-url</code> is set.</td></tr><tr><td><code>--dev</code></td><td>Disable automatic schedule and reminder firing, admit unsigned loopback GitHub deliveries, and enable local playground access.</td></tr><tr><td><code>--state-root &lt;path&gt;</code></td><td>Store local sessions, streams, workspaces, and channel state here. Keep durable state outside a repository whose rules shouldn&#39;t reach agent workspaces.</td></tr><tr><td><code>--bearer-token &lt;secret&gt;</code></td><td>Require this token on routes without authored authentication. Mutually exclusive with <code>--allow-anonymous</code>.</td></tr><tr><td><code>--allow-anonymous</code></td><td>Admit callers as one anonymous principal. Use it only behind a trusted network boundary.</td></tr><tr><td><code>--allow-anonymous-cursor-github</code></td><td>Let anonymous callers use sessions with a Cursor account&#39;s repository-scoped GitHub credential. Requires an authenticating proxy.</td></tr><tr><td><code>--allow-anonymous-cursor-account-mcp</code></td><td>Let anonymous callers use Cursor account MCP connections. Requires an authenticating proxy.</td></tr><tr><td><code>--allow-anonymous-grokbot</code></td><td>Let anonymous callers drive hosted Grok Bot runtime agents. Requires an authenticating proxy.</td></tr><tr><td><code>--public-url &lt;url&gt;</code></td><td>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.</td></tr><tr><td><code>--peers-url &lt;url&gt;</code></td><td>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.</td></tr><tr><td><code>--no-schedules</code></td><td>Disable schedule firing outside dev mode.</td></tr><tr><td><code>--no-playground</code></td><td>Skip the playground.</td></tr><tr><td><code>--no-docs</code></td><td>Skip the documentation site at <code>/docs</code>.</td></tr><tr><td><code>--cursor-events</code></td><td>Receive SCM events through Cursor. Requires sign-in and one or more repeatable <code>--repo owner/name</code> values.</td></tr></tbody></table><p>Multi-agent slugs start with a letter or digit and contain only letters, digits, <code>_</code>, or <code>-</code>. The reserved slugs are <code>v1</code>, <code>playground</code>, and <code>docs</code>.</p><h3 id="dev" tabindex="-1">Develop locally <a class="header-anchor" href="#dev" aria-label="Permalink to &quot;Develop locally {#dev}&quot;">​</a></h3><p><code>dev</code> is <code>serve --dev</code> with an optional positional project path:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk dev</span></span>
11
12
  <span class="line"><span>bdk dev ./bdk-pr-reviewer --port 3000</span></span></code></pre></div><p>It accepts every <code>serve</code> option. Pass at most one positional path, and don&#39;t combine it with a different <code>--dir</code>.</p><h3 id="docs" tabindex="-1">Serve the docs <a class="header-anchor" href="#docs" aria-label="Permalink to &quot;Serve the docs {#docs}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk docs [--port &lt;n&gt;] [--host 127.0.0.1] [--print]</span></span></code></pre></div><p><code>docs</code> serves the bundled documentation without an agent project. It uses an available loopback port by default and stays open until Ctrl-C. <code>--print</code> prints the URL without opening a browser.</p><h2 id="sessions-and-turns" tabindex="-1">Sessions and turns <a class="header-anchor" href="#sessions-and-turns" aria-label="Permalink to &quot;Sessions and turns&quot;">​</a></h2><h3 id="chat" tabindex="-1">Chat with an agent <a class="header-anchor" href="#chat" aria-label="Permalink to &quot;Chat with an agent {#chat}&quot;">​</a></h3><p><code>chat</code> connects to a running server and never starts an ephemeral one:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk chat [--url &lt;baseUrl&gt;] [--message &lt;text&gt;]</span></span>
12
13
  <span class="line"><span> [--session &lt;id&gt; | --resume] [--continuation-token &lt;token&gt;]</span></span>
13
14
  <span class="line"><span> [--slug &lt;slug&gt;] [--json] [--text] [--no-color]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Input mode</th><th>Behavior</th></tr></thead><tbody><tr><td>TTY without <code>--message</code></td><td>Open an interactive REPL.</td></tr><tr><td>TTY with <code>--message</code></td><td>Send the message, then keep the REPL open.</td></tr><tr><td>Non-TTY with <code>--message</code></td><td>Send one turn and exit.</td></tr><tr><td>Non-TTY without <code>--message</code></td><td>Read newline-delimited messages until EOF.</td></tr><tr><td><code>--json --message &lt;text&gt;</code></td><td>Send one turn and print <code>{ ok, sessionId, continuationToken, trajectory }</code>.</td></tr><tr><td><code>--json --text --message &lt;text&gt;</code></td><td>Print a compact trajectory instead of JSON.</td></tr></tbody></table><p>Use <code>--session &lt;id&gt;</code> to reattach a stored session. If you omit <code>--continuation-token</code>, the CLI looks it up from the target&#39;s session list. <code>--resume</code> selects the most recently updated session with a continuation token. An explicit session ID takes precedence.</p><h3 id="resume" tabindex="-1">Resume a session <a class="header-anchor" href="#resume" aria-label="Permalink to &quot;Resume a session {#resume}&quot;">​</a></h3><p><code>resume</code> provides the same reattachment contract as <code>chat --session</code>:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk resume [sessionId] [--url &lt;baseUrl&gt;]</span></span>
@@ -35,7 +36,9 @@ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON
35
36
  <span class="line"><span> [--junit &lt;path&gt;] [--artifacts &lt;dir&gt; | --no-artifacts]</span></span>
36
37
  <span class="line"><span> [--skip-report] [--out &lt;file.json&gt;] [--no-stream]</span></span>
37
38
  <span class="line"><span> [--url &lt;baseUrl&gt;] [--no-wait] [--slug &lt;slug&gt;]</span></span></code></pre></div><p>Select an exact case such as <code>weather/nyc</code>, a file prefix such as <code>weather</code>, several IDs, or no IDs for every case. Repeat <code>--tag</code> for OR matching. Projects must provide <code>evals/evals.config.{ts,js}</code> with <code>maxConcurrency</code> between 1 and 200.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--list</code></td><td>List matching cases without running them. <code>--list --json</code> prints an array.</td></tr><tr><td><code>--tag &lt;tag&gt;</code></td><td>Select a tag. Repeat the option for OR matching.</td></tr><tr><td><code>--json</code></td><td>Print <code>{ ok, passed, failed, scored, skipped, strict, results }</code>.</td></tr><tr><td><code>--verbose</code></td><td>Stream <code>t.log</code> lines and reply snippets.</td></tr><tr><td><code>--no-stream</code></td><td>Hide live progress on stderr.</td></tr><tr><td><code>--strict</code></td><td>Treat a scored case below its soft threshold as a failure.</td></tr><tr><td><code>--max-concurrency &lt;n&gt;</code></td><td>Override <code>maxConcurrency</code> from the eval config for an ephemeral local run.</td></tr><tr><td><code>--timeout-ms &lt;n&gt;</code></td><td>Override the per-case timeout. A case timeout takes precedence, followed by this option, the config timeout, and the 180-second default.</td></tr><tr><td><code>--junit &lt;path&gt;</code></td><td>Write JUnit XML for an ephemeral local run.</td></tr><tr><td><code>--artifacts &lt;dir&gt;</code></td><td>Select the artifact directory for an ephemeral local run. The default is a timestamped directory under the project&#39;s state directory.</td></tr><tr><td><code>--no-artifacts</code></td><td>Skip artifacts for an ephemeral local run.</td></tr><tr><td><code>--skip-report</code></td><td>Ignore reporters from eval files and the eval config during an ephemeral local run.</td></tr><tr><td><code>--out &lt;file.json&gt;</code></td><td>Also write the full result JSON.</td></tr><tr><td><code>--no-wait</code></td><td>Return after a running server accepts the batch.</td></tr></tbody></table><p>A running server prints its Eval ID when it accepts the batch. Use these commands to inspect or cancel it:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk eval status [evalId] --url &lt;baseUrl&gt;</span></span>
38
- <span class="line"><span>bdk eval cancel &lt;evalId&gt; --url &lt;baseUrl&gt;</span></span></code></pre></div><p><code>eval status</code> without an ID lists recent remote runs. <code>eval status --out</code> requires an ID. The <code>status</code> and <code>cancel</code> subcommands require <code>--url</code>.</p><h2 id="projects" tabindex="-1">Projects <a class="header-anchor" href="#projects" aria-label="Permalink to &quot;Projects&quot;">​</a></h2><h3 id="init" tabindex="-1">Scaffold a project <a class="header-anchor" href="#init" aria-label="Permalink to &quot;Scaffold a project {#init}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk init [directory] [--template &lt;name&gt;] [--var id=value]... [--json]</span></span></code></pre></div><p>Without a directory, <code>init</code> prints the setup guide and changes no files. With a directory, it preserves existing scaffold files, adds missing files, installs dependencies, and tries to put <code>bdk</code> on <code>PATH</code>.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--template &lt;name&gt;</code></td><td>Use a bundled template: <code>agentic-owners</code>, <code>agents-md</code>, <code>code-wiki</code>, <code>demo</code>, <code>grokbot-agents</code>, <code>security-help</code>, <code>security-reviewer</code>, <code>thermo-quality-review</code>, <code>thermo-review</code>, <code>triage-jira</code>, or <code>triage-linear</code>. <code>triage</code> selects <code>triage-linear</code>.</td></tr><tr><td><code>--var id=value</code></td><td>Answer a template question without a prompt. Repeat for multiple answers.</td></tr><tr><td><code>--json</code></td><td>Skip interactive login and skill prompts, then print <code>{ ok, directory, template, created, skipped, installed, installError, cliOnPath, cliLinkError, next }</code>. <code>ok</code> reflects dependency installation.</td></tr></tbody></table><p>On a TTY, templates with questions run their interview before writing files. <code>init</code> also offers to refresh the bundled coding-agent skills and starts login when the host has no Cursor credential.</p><h3 id="convert-automation" tabindex="-1">Convert an Automation <a class="header-anchor" href="#convert-automation" aria-label="Permalink to &quot;Convert an Automation {#convert-automation}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk convert-automation &lt;url-or-uuid&gt; [--dir &lt;path&gt;] [--json]</span></span></code></pre></div><p>The input can be a Cursor Automation dashboard URL or its UUID. The output directory defaults to <code>./&lt;automation-name&gt;</code>. Generated files don&#39;t overwrite existing paths, and missing scaffold files are added. The following <code>npm install</code> can update lockfiles and run lifecycle scripts from an existing <code>package.json</code>.</p><p><code>--json</code> prints <code>{ ok, directory, files, warnings, setupSteps, installed, installError, mcpConnections }</code>. Conversion warnings and dependency-install failures remain visible in this output without failing a completed file conversion. Invalid input, authentication, export, and file-write failures exit nonzero.</p><p>See <a href="./../guides/convert-automation.html">Convert a Cursor Automation</a> for the generated project and features that need manual review.</p><h3 id="migrate" tabindex="-1">Migrate an early-alpha project <a class="header-anchor" href="#migrate" aria-label="Permalink to &quot;Migrate an early-alpha project {#migrate}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk migrate [--dir &lt;path&gt;] [--repo &lt;https-url&gt;] [--ref &lt;git-ref&gt;]</span></span>
39
+ <span class="line"><span>bdk eval cancel &lt;evalId&gt; --url &lt;baseUrl&gt;</span></span></code></pre></div><p><code>eval status</code> without an ID lists recent remote runs. <code>eval status --out</code> requires an ID. The <code>status</code> and <code>cancel</code> subcommands require <code>--url</code>.</p><h2 id="projects" tabindex="-1">Projects <a class="header-anchor" href="#projects" aria-label="Permalink to &quot;Projects&quot;">​</a></h2><h3 id="init" tabindex="-1">Scaffold a project <a class="header-anchor" href="#init" aria-label="Permalink to &quot;Scaffold a project {#init}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk init [directory] [--template &lt;name&gt;] [--var id=value]... [--json]</span></span>
40
+ <span class="line"><span>bdk init [directory] --from-grokbot &lt;recipe.json&gt;</span></span>
41
+ <span class="line"><span> [--answers &lt;file&gt;] [--dry-run] [--json]</span></span></code></pre></div><p>Without a directory, <code>init</code> prints the setup guide and changes no files. With a directory, it preserves existing scaffold files, adds missing files, installs dependencies, and tries to put <code>bdk</code> on <code>PATH</code>.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--template &lt;name&gt;</code></td><td>Use a bundled template: <code>agentic-owners</code>, <code>agents-md</code>, <code>code-wiki</code>, <code>demo</code>, <code>grokbot-agents</code>, <code>security-help</code>, <code>security-reviewer</code>, <code>thermo-quality-review</code>, <code>thermo-review</code>, <code>triage-jira</code>, or <code>triage-linear</code>. <code>triage</code> selects <code>triage-linear</code>.</td></tr><tr><td><code>--var id=value</code></td><td>Answer a template question without a prompt. Repeat for multiple answers.</td></tr><tr><td><code>--json</code></td><td>Skip interactive login and skill prompts, then print <code>{ ok, directory, template, created, skipped, installed, installError, cliOnPath, cliLinkError, next }</code>. <code>ok</code> reflects dependency installation.</td></tr></tbody></table><p>On a TTY, templates with questions run their interview before writing files. <code>init</code> also offers to refresh the bundled coding-agent skills and starts login when the host has no Cursor credential.</p><h4 id="export-a-grok-bot-recipe" tabindex="-1">Export a Grok Bot recipe <a class="header-anchor" href="#export-a-grok-bot-recipe" aria-label="Permalink to &quot;Export a Grok Bot recipe&quot;">​</a></h4><p><code>--from-grokbot</code> reads a Grok Bot recipe and maps its profile, selected skills and routines, memory, channels, and connectors into a BDK project. The target directory defaults to the resolved <code>location</code> answer; a positional directory overrides it. A target previously created with <code>bdk init --template</code> is rejected; export into a fresh directory instead.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--from-grokbot &lt;recipe.json&gt;</code></td><td>Read the recipe to export.</td></tr><tr><td><code>--answers &lt;file&gt;</code></td><td>Read export decisions from a JSON object. Fields present in the file are not asked again. The published schema is <code>schemas/grokbot-answers.schema.json</code>.</td></tr><tr><td><code>--dry-run</code></td><td>Print the planned files, defaults, exclusions, unmapped behavior, placeholders, secret names, warnings, and setup steps without writing files or installing dependencies.</td></tr><tr><td><code>--json</code></td><td>Never prompt and print machine-readable output. Combine it with <code>--dry-run</code> for a machine-readable preview.</td></tr></tbody></table><p>On a TTY, the command asks for missing decisions and offers recipe-derived defaults. Off a TTY, it never prompts, takes defaults where possible, and lists the fields it defaulted.</p><p><code>--dry-run --json</code> prints <code>{ ok, dryRun, directory, preview }</code>. The preview contains <code>version</code>, <code>name</code>, resolved <code>answers</code>, <code>defaulted</code>, <code>ignored</code>, <code>files</code> as <code>{ path, from }</code>, <code>excluded</code>, <code>unmapped</code> as <code>{ from, reason }</code>, <code>fillIns</code>, <code>secrets</code> as <code>{ names, reauth }</code>, <code>warnings</code>, and <code>setupSteps</code>. A write with <code>--json</code> also reports <code>files</code>, <code>installed</code>, and <code>installError</code>. A dependency install failure leaves <code>ok: true</code>, sets <code>installed: false</code>, reports <code>installError</code>, and exits <code>0</code>. Other errors print <code>{ ok: false, error }</code> and exit nonzero.</p><p><code>--answers</code> and <code>--dry-run</code> require <code>--from-grokbot</code>. This export mode does not accept <code>--template</code> or <code>--var</code>.</p><p>See <a href="./../guides/export-grokbot.html">Export a Grok Bot</a> for the preview-first workflow, mapping table, and post-export checklist.</p><h3 id="convert-automation" tabindex="-1">Convert an Automation <a class="header-anchor" href="#convert-automation" aria-label="Permalink to &quot;Convert an Automation {#convert-automation}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk convert-automation &lt;url-or-uuid&gt; [--dir &lt;path&gt;] [--json]</span></span></code></pre></div><p>The input can be a Cursor Automation dashboard URL or its UUID. The output directory defaults to <code>./&lt;automation-name&gt;</code>. Generated files don&#39;t overwrite existing paths, and missing scaffold files are added. The following <code>npm install</code> can update lockfiles and run lifecycle scripts from an existing <code>package.json</code>.</p><p><code>--json</code> prints <code>{ ok, directory, files, warnings, setupSteps, installed, installError, mcpConnections }</code>. Conversion warnings and dependency-install failures remain visible in this output without failing a completed file conversion. Invalid input, authentication, export, and file-write failures exit nonzero.</p><p>See <a href="./../guides/convert-automation.html">Convert a Cursor Automation</a> for the generated project and features that need manual review.</p><h3 id="migrate" tabindex="-1">Migrate an early-alpha project <a class="header-anchor" href="#migrate" aria-label="Permalink to &quot;Migrate an early-alpha project {#migrate}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk migrate [--dir &lt;path&gt;] [--repo &lt;https-url&gt;] [--ref &lt;git-ref&gt;]</span></span>
39
42
  <span class="line"><span> [--path &lt;agent-path&gt;] [--no-wait] [--json] [--api-key &lt;key&gt;]</span></span></code></pre></div><p><code>migrate</code> applies only to projects deployed on architecture v1 during the BDK early alpha. It reads a pushed Git ref, starts a Cursor cloud agent with the bundled <code>bdk-migrate-v2</code> skill, and opens a pull request with the source changes. The command waits for the pull request by default and never deploys the project or changes deployment secrets.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--dir &lt;path&gt;</code></td><td>Select the local BDK project. The default is the current directory.</td></tr><tr><td><code>--repo &lt;https-url&gt;</code></td><td>Select the source repository. The CLI infers the current checkout&#39;s origin when possible.</td></tr><tr><td><code>--ref &lt;git-ref&gt;</code></td><td>Select the pushed ref for the cloud agent. The CLI infers the current branch when possible.</td></tr><tr><td><code>--path &lt;agent-path&gt;</code></td><td>Select the project path relative to the repository root. The CLI infers it from <code>--dir</code> when possible.</td></tr><tr><td><code>--no-wait</code></td><td>Print the cloud agent URL and return after the agent starts.</td></tr><tr><td><code>--json</code></td><td>Print a report with <code>ok</code>, <code>status</code>, <code>agentId</code>, and the cloud agent <code>url</code>. A completed migration adds <code>prUrl</code>; a blocked or failed migration adds its explanation.</td></tr><tr><td><code>--api-key &lt;key&gt;</code></td><td>Override the Cursor credential.</td></tr></tbody></table><p>Credential resolution follows the normal order: <code>--api-key</code>, <code>CURSOR_API_KEY</code>, <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, then the stored <code>bdk login</code> credential. See <a href="./../guides/migrate.html">Migrate an early-alpha project</a> for detection, pull request review, and deployment cutover.</p><h3 id="install-skills" tabindex="-1">Install coding-agent skills <a class="header-anchor" href="#install-skills" aria-label="Permalink to &quot;Install coding-agent skills {#install-skills}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk install-skills [--print] [--json]</span></span></code></pre></div><p>The command replaces the installed BDK skills with the package copy and removes stale bundled skills. <code>--print</code> previews the change. <code>--json</code> prints <code>{ ok, dryRun, directory, firstInstall, skills, removed }</code>.</p><p>Package installation performs this copy. Run <code>bdk install-skills</code> when you need to refresh it.</p><h3 id="info" tabindex="-1">Inspect a project <a class="header-anchor" href="#info" aria-label="Permalink to &quot;Inspect a project {#info}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk info [--dir &lt;path&gt;] [--json]</span></span></code></pre></div><p>Text output lists the model, instructions, tools, skills, extensions, connections, subagents, channels, schedules, hooks, hosting settings, and diagnostics. For one unslugged project, <code>--json</code> prints its project info object. For slugged or multi-agent discovery, it prints <code>{ agents }</code>.</p><h3 id="validate" tabindex="-1">Validate a project <a class="header-anchor" href="#validate" aria-label="Permalink to &quot;Validate a project {#validate}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk validate [--dir &lt;path&gt;]</span></span></code></pre></div><p><code>validate</code> prints every discovered project&#39;s diagnostics and exits nonzero when any diagnostic has error severity. Use it instead of <code>info --json</code> when a script needs validation status.</p><p>Hosting checks run here too. On architecture v2 (the default), a <code>githubChannel</code> credential or a GitLab or Bitbucket <code>webhookSecret</code> written as a literal or a <code>() =&gt; process.env.NAME</code> getter is an error whose message quotes the <code>{ secretName: &quot;NAME&quot; }</code> form to use instead. A project that still sets <code>architecture: &quot;v1&quot;</code> gets the same finding as a warning, so run <code>validate</code> before removing the pin to list what the migration must rename.</p><h3 id="manifest" tabindex="-1">Print a deployment manifest <a class="header-anchor" href="#manifest" aria-label="Permalink to &quot;Print a deployment manifest {#manifest}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk manifest [--dir &lt;path&gt;] [--json]</span></span></code></pre></div><p><code>manifest</code> validates one project and prints its deployment metadata without a network request. Default output is indented JSON; <code>--json</code> prints one compact line.</p><h2 id="credentials-and-versions" tabindex="-1">Credentials and versions <a class="header-anchor" href="#credentials-and-versions" aria-label="Permalink to &quot;Credentials and versions&quot;">​</a></h2><h3 id="login-logout-whoami" tabindex="-1">Manage credentials <a class="header-anchor" href="#login-logout-whoami" aria-label="Permalink to &quot;Manage credentials {#login-logout-whoami}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk login [--api-key &lt;key&gt;] [--key-name &lt;name&gt;]</span></span>
40
43
  <span class="line"><span>bdk whoami [--json]</span></span>
41
44
  <span class="line"><span>bdk logout</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>login</code></td><td>Use a supplied API key, or open browser sign-in and store the resulting dashboard-revocable key in the CLI config directory. <code>--key-name</code> labels a browser-created key.</td></tr><tr><td><code>whoami</code></td><td>Show the active credential and its source. <code>--json</code> returns the same identity as JSON.</td></tr><tr><td><code>logout</code></td><td>Remove the stored credential file. It doesn&#39;t revoke the API key; revoke the key in the Cursor dashboard.</td></tr></tbody></table><h3 id="version" tabindex="-1">Print the version <a class="header-anchor" href="#version" aria-label="Permalink to &quot;Print the version {#version}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk version [--json]</span></span>
@@ -92,4 +95,4 @@ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON
92
95
  <span class="line"><span> [--url &lt;url&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;]</span></span>
93
96
  <span class="line"><span> [--secret &lt;secret&gt;] [--dry-run] [--out &lt;dir&gt;] [--json]</span></span>
94
97
  <span class="line"><span>bdk bitbucket events [--dir &lt;path&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;] [--json]</span></span>
95
- <span class="line"><span>bdk bitbucket forward [--dir &lt;path&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Subcommand</th><th>Contract</th></tr></thead><tbody><tr><td><code>replay</code></td><td>Read a pull request, synthesize webhook payloads in the host&#39;s Cloud or Data Center format, and post them to matching channels.</td></tr><tr><td><code>events</code></td><td>List discovered Bitbucket channel URLs and event keys.</td></tr><tr><td><code>forward</code></td><td>Print the repository-hook and tunnel recipe for live deliveries.</td></tr></tbody></table><p>Replay supports <code>pullrequest:created</code>, <code>pullrequest:updated</code>, <code>pullrequest:comment_created</code>, and <code>repo:push</code>, along with their supported Data Center forms. It requires <code>BITBUCKET_TOKEN</code> with pull-request read access. <code>--secret</code> defaults to <code>BITBUCKET_WEBHOOK_SECRET</code>; <code>--dry-run</code> and <code>--out</code> follow the GitHub replay contract.</p><p>See <a href="./../guides/bitbucket.html">Bitbucket</a> for Cloud and Data Center setup.</p><h2 id="environment-variables" tabindex="-1">Environment variables <a class="header-anchor" href="#environment-variables" aria-label="Permalink to &quot;Environment variables&quot;">​</a></h2><p>Credential resolution follows this order: <code>--api-key</code>, <code>CURSOR_API_KEY</code>, <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, then the stored login.</p><table tabindex="0"><thead><tr><th>Variable</th><th>Contract</th></tr></thead><tbody><tr><td><code>CURSOR_API_KEY</code></td><td>Cursor credential.</td></tr><tr><td><code>CURSOR_API_KEY_FILE</code></td><td>Path to a Cursor credential file.</td></tr><tr><td><code>CURSOR_SERVICE_ACCOUNT_KEY</code></td><td>Team service-account credential used after the API key and key-file sources.</td></tr><tr><td><code>CURSOR_API_BASE_URL</code></td><td>Backend for login, account, deployment, and event commands.</td></tr><tr><td><code>CURSOR_BACKEND_URL</code></td><td>Backend for BDK turns. Set it with <code>CURSOR_API_BASE_URL</code> when using a non-default backend.</td></tr><tr><td><code>AGENT_SERVE_CONFIG_DIR</code></td><td>Override the CLI config directory for stored credentials and update state.</td></tr><tr><td><code>AGENT_SERVE_NO_UPDATE_CHECK</code>, <code>NO_UPDATE_NOTIFIER</code>, <code>CI</code></td><td>Disable published-version checks when set to a non-empty value other than <code>0</code>.</td></tr><tr><td><code>GITHUB_WEBHOOK_SECRET</code></td><td>Default signature secret for GitHub forwarding and replay.</td></tr><tr><td><code>GITHUB_APP_ID</code>, <code>GITHUB_APP_PRIVATE_KEY</code>, <code>GITHUB_APP_INSTALLATION_ID</code></td><td>GitHub App credentials for outbound API calls.</td></tr><tr><td><code>GITHUB_TOKEN</code>, <code>GH_TOKEN</code></td><td>Token credentials for outbound GitHub calls. Unset both for <code>github forward</code>.</td></tr><tr><td><code>GITLAB_TOKEN</code></td><td>Token for GitLab API reads and direct channel calls.</td></tr><tr><td><code>GITLAB_API_BASE_URL</code></td><td>Override the GitLab REST base URL for self-managed hosts.</td></tr><tr><td><code>GITLAB_WEBHOOK_SECRET</code></td><td>Default GitLab webhook token for replay and channel verification.</td></tr><tr><td><code>BITBUCKET_TOKEN</code></td><td>Token for Bitbucket API reads and direct channel calls.</td></tr><tr><td><code>BITBUCKET_API_BASE_URL</code></td><td>Override the Bitbucket Data Center REST base URL.</td></tr><tr><td><code>BITBUCKET_WEBHOOK_SECRET</code></td><td>Default Bitbucket signing secret for replay and channel verification.</td></tr><tr><td><code>SLACK_BOT_TOKEN</code>, <code>SLACK_APP_TOKEN</code></td><td>Slack tokens for one agent. Multi-agent servers use <code>&lt;PREFIX&gt;_SLACK_BOT_TOKEN</code> and <code>&lt;PREFIX&gt;_SLACK_APP_TOKEN</code>.</td></tr></tbody></table><h2 id="exit-status" tabindex="-1">Exit status <a class="header-anchor" href="#exit-status" aria-label="Permalink to &quot;Exit status&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Command</th><th>Nonzero contract</th></tr></thead><tbody><tr><td>No command</td><td>Print help and exit <code>1</code>. Explicit <code>help</code>, <code>--help</code>, and <code>-h</code> exit <code>0</code>.</td></tr><tr><td><code>run</code></td><td>For local and running-server trajectories, exit <code>1</code> when the trajectory fails.</td></tr><tr><td><code>call</code></td><td>Exit <code>1</code> unless the response succeeds with <code>ok: true</code>.</td></tr><tr><td><code>skill</code></td><td>Exit <code>2</code> when the name is missing and <code>1</code> when the request fails.</td></tr><tr><td><code>trajectory</code></td><td>Exit <code>1</code> when the reconstructed trajectory failed.</td></tr><tr><td><code>eval</code></td><td>Exit <code>1</code> for failed cases, or scored cases below threshold with <code>--strict</code>; exit <code>2</code> for invalid eval options or an execution with no matching cases. An empty <code>--list</code> succeeds.</td></tr><tr><td><code>eval status</code></td><td>Exit <code>3</code> while the batch runs, <code>1</code> when it failed or was cancelled, and <code>2</code> for invalid usage.</td></tr><tr><td><code>chat</code>, <code>session</code></td><td>Exit <code>2</code> for documented option conflicts or missing required input.</td></tr><tr><td><code>validate</code></td><td>Exit <code>1</code> when any project diagnostic has error severity.</td></tr><tr><td><code>convert-automation</code></td><td>Exit <code>1</code> for invalid input, authentication, export, or file-write failure. Warnings and dependency-install failure don&#39;t change a successful conversion exit.</td></tr><tr><td><code>migrate</code></td><td>Exit <code>0</code> after starting with <code>--no-wait</code> or after the agent opens a pull request. Exit <code>1</code> for invalid input, authentication or agent failure, or a completed run without a pull request.</td></tr><tr><td>Other commands</td><td>Exit nonzero when validation, authentication, a request, or the requested operation fails.</td></tr></tbody></table><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./project-layout.html">Project layout</a></li><li><a href="./sessions.html">Sessions, events, and streaming</a></li><li><a href="./evals.html">Evals</a></li><li><a href="./http-api.html">HTTP API</a></li><li><a href="./../deployment.html">Deployment</a></li><li><a href="./../guides/migrate.html">Early-alpha migration</a></li></ul>`,223)])])}const g=t(d,[["render",n]]);export{u as __pageData,g as default};
98
+ <span class="line"><span>bdk bitbucket forward [--dir &lt;path&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Subcommand</th><th>Contract</th></tr></thead><tbody><tr><td><code>replay</code></td><td>Read a pull request, synthesize webhook payloads in the host&#39;s Cloud or Data Center format, and post them to matching channels.</td></tr><tr><td><code>events</code></td><td>List discovered Bitbucket channel URLs and event keys.</td></tr><tr><td><code>forward</code></td><td>Print the repository-hook and tunnel recipe for live deliveries.</td></tr></tbody></table><p>Replay supports <code>pullrequest:created</code>, <code>pullrequest:updated</code>, <code>pullrequest:comment_created</code>, and <code>repo:push</code>, along with their supported Data Center forms. It requires <code>BITBUCKET_TOKEN</code> with pull-request read access. <code>--secret</code> defaults to <code>BITBUCKET_WEBHOOK_SECRET</code>; <code>--dry-run</code> and <code>--out</code> follow the GitHub replay contract.</p><p>See <a href="./../guides/bitbucket.html">Bitbucket</a> for Cloud and Data Center setup.</p><h2 id="environment-variables" tabindex="-1">Environment variables <a class="header-anchor" href="#environment-variables" aria-label="Permalink to &quot;Environment variables&quot;">​</a></h2><p>Credential resolution follows this order: <code>--api-key</code>, <code>CURSOR_API_KEY</code>, <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, then the stored login.</p><table tabindex="0"><thead><tr><th>Variable</th><th>Contract</th></tr></thead><tbody><tr><td><code>CURSOR_API_KEY</code></td><td>Cursor credential.</td></tr><tr><td><code>CURSOR_API_KEY_FILE</code></td><td>Path to a Cursor credential file.</td></tr><tr><td><code>CURSOR_SERVICE_ACCOUNT_KEY</code></td><td>Team service-account credential used after the API key and key-file sources.</td></tr><tr><td><code>CURSOR_API_BASE_URL</code></td><td>Backend for login, account, deployment, and event commands.</td></tr><tr><td><code>CURSOR_BACKEND_URL</code></td><td>Backend for BDK turns. Set it with <code>CURSOR_API_BASE_URL</code> when using a non-default backend.</td></tr><tr><td><code>AGENT_SERVE_CONFIG_DIR</code></td><td>Override the CLI config directory for stored credentials and update state.</td></tr><tr><td><code>AGENT_SERVE_NO_UPDATE_CHECK</code>, <code>NO_UPDATE_NOTIFIER</code>, <code>CI</code></td><td>Disable published-version checks when set to a non-empty value other than <code>0</code>.</td></tr><tr><td><code>GITHUB_WEBHOOK_SECRET</code></td><td>Default signature secret for GitHub forwarding and replay.</td></tr><tr><td><code>GITHUB_APP_ID</code>, <code>GITHUB_APP_PRIVATE_KEY</code>, <code>GITHUB_APP_INSTALLATION_ID</code></td><td>GitHub App credentials for outbound API calls.</td></tr><tr><td><code>GITHUB_TOKEN</code>, <code>GH_TOKEN</code></td><td>Token credentials for outbound GitHub calls. Unset both for <code>github forward</code>.</td></tr><tr><td><code>GITLAB_TOKEN</code></td><td>Token for GitLab API reads and direct channel calls.</td></tr><tr><td><code>GITLAB_API_BASE_URL</code></td><td>Override the GitLab REST base URL for self-managed hosts.</td></tr><tr><td><code>GITLAB_WEBHOOK_SECRET</code></td><td>Default GitLab webhook token for replay and channel verification.</td></tr><tr><td><code>BITBUCKET_TOKEN</code></td><td>Token for Bitbucket API reads and direct channel calls.</td></tr><tr><td><code>BITBUCKET_API_BASE_URL</code></td><td>Override the Bitbucket Data Center REST base URL.</td></tr><tr><td><code>BITBUCKET_WEBHOOK_SECRET</code></td><td>Default Bitbucket signing secret for replay and channel verification.</td></tr><tr><td><code>SLACK_BOT_TOKEN</code>, <code>SLACK_APP_TOKEN</code></td><td>Slack tokens for one agent. Multi-agent servers use <code>&lt;PREFIX&gt;_SLACK_BOT_TOKEN</code> and <code>&lt;PREFIX&gt;_SLACK_APP_TOKEN</code>.</td></tr></tbody></table><h2 id="exit-status" tabindex="-1">Exit status <a class="header-anchor" href="#exit-status" aria-label="Permalink to &quot;Exit status&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Command</th><th>Nonzero contract</th></tr></thead><tbody><tr><td>No command</td><td>Print help and exit <code>1</code>. Explicit <code>help</code>, <code>--help</code>, and <code>-h</code> exit <code>0</code>.</td></tr><tr><td><code>run</code></td><td>For local and running-server trajectories, exit <code>1</code> when the trajectory fails.</td></tr><tr><td><code>call</code></td><td>Exit <code>1</code> unless the response succeeds with <code>ok: true</code>.</td></tr><tr><td><code>skill</code></td><td>Exit <code>2</code> when the name is missing and <code>1</code> when the request fails.</td></tr><tr><td><code>trajectory</code></td><td>Exit <code>1</code> when the reconstructed trajectory failed.</td></tr><tr><td><code>eval</code></td><td>Exit <code>1</code> for failed cases, or scored cases below threshold with <code>--strict</code>; exit <code>2</code> for invalid eval options or an execution with no matching cases. An empty <code>--list</code> succeeds.</td></tr><tr><td><code>eval status</code></td><td>Exit <code>3</code> while the batch runs, <code>1</code> when it failed or was cancelled, and <code>2</code> for invalid usage.</td></tr><tr><td><code>chat</code>, <code>session</code></td><td>Exit <code>2</code> for documented option conflicts or missing required input.</td></tr><tr><td><code>validate</code></td><td>Exit <code>1</code> when any project diagnostic has error severity.</td></tr><tr><td><code>convert-automation</code></td><td>Exit <code>1</code> for invalid input, authentication, export, or file-write failure. Warnings and dependency-install failure don&#39;t change a successful conversion exit.</td></tr><tr><td><code>migrate</code></td><td>Exit <code>0</code> after starting with <code>--no-wait</code> or after the agent opens a pull request. Exit <code>1</code> for invalid input, authentication or agent failure, or a completed run without a pull request.</td></tr><tr><td>Other commands</td><td>Exit nonzero when validation, authentication, a request, or the requested operation fails.</td></tr></tbody></table><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./project-layout.html">Project layout</a></li><li><a href="./sessions.html">Sessions, events, and streaming</a></li><li><a href="./evals.html">Evals</a></li><li><a href="./http-api.html">HTTP API</a></li><li><a href="./../deployment.html">Deployment</a></li><li><a href="./../guides/migrate.html">Early-alpha migration</a></li></ul>`,230)])])}const g=t(d,[["render",n]]);export{u as __pageData,g as default};
@@ -1 +1 @@
1
- import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),d={name:"reference/cli.md"};function n(c,e,r,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s("",223)])])}const g=t(d,[["render",n]]);export{u as __pageData,g as default};
1
+ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),d={name:"reference/cli.md"};function n(r,e,c,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s("",230)])])}const g=t(d,[["render",n]]);export{u as __pageData,g as default};
@@ -1,4 +1,4 @@
1
- import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse(`{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),n={name:"reference/connections.md"};function h(l,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="mcp-connections" tabindex="-1">MCP connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP connections&quot;">​</a></h1><p>An MCP connection gives the agent tools from an MCP server. Define one file per server under <code>bot/mcp-connections/</code>; the filename becomes the server name. Default-export <code>defineConnection</code> from <code>@cursor/bdk/connections</code>. The transport is remote HTTP, local stdio, the signed-in Cursor account&#39;s connectors, or a peer agent on the same host.</p><p>Put a server in <code>bot/host-connections/</code> when only host tools should call it. Host connections use the same <code>defineConnection</code> shape and support <code>bdk mcp oauth</code>; the model and playground don&#39;t see them.</p><h2 id="remote-mcp-server" tabindex="-1">Remote MCP server <a class="header-anchor" href="#remote-mcp-server" aria-label="Permalink to &quot;Remote MCP server&quot;">​</a></h2><p>Point an MCP connection at a remote server with a URL.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineConnection } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/bdk/connections&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
1
+ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse(`{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),n={name:"reference/connections.md"};function h(l,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="mcp-connections" tabindex="-1">MCP connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP connections&quot;">​</a></h1><p>An MCP connection gives the agent tools from an MCP server. Define one file per server under <code>bot/mcp-connections/</code>; the filename becomes the server name. Default-export <code>defineConnection</code> from <code>@cursor/bdk/connections</code>. The transport is remote HTTP, local stdio, the signed-in Cursor account&#39;s connectors, or a peer agent addressed by slug.</p><p>Put a server in <code>bot/host-connections/</code> when only host tools should call it. Host connections use the same <code>defineConnection</code> shape and support <code>bdk mcp oauth</code>; the model and playground don&#39;t see them.</p><h2 id="remote-mcp-server" tabindex="-1">Remote MCP server <a class="header-anchor" href="#remote-mcp-server" aria-label="Permalink to &quot;Remote MCP server&quot;">​</a></h2><p>Point an MCP connection at a remote server with a URL.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineConnection } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/bdk/connections&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
2
2
  <span class="line"></span>
3
3
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
4
4
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://mcp.linear.app/mcp&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@@ -50,10 +50,10 @@ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c
50
50
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cursorAccount: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
51
51
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> servers: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Linear&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
52
52
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> advertiseTools: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
53
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Name the file <code>account.ts</code>. <code>cursor.ts</code> collides with the IDE <code>cursor</code> MCP namespace. <code>advertiseTools: true</code> puts connector tools on local turns by name.</p><p>The host must be signed in (<code>bdk login</code>, <code>CURSOR_API_KEY</code>, or <code>CURSOR_SERVICE_ACCOUNT_KEY</code>). <code>serve</code> fails at startup otherwise.</p><p>Use a <code>{ command }</code> connection for stdio servers.</p><div class="caution custom-block github-alert"><p class="custom-block-title">CAUTION</p><p>Whoever can talk to the agent can drive these connectors, because they are ordinary agent tools. <code>serve</code> refuses to start when <code>--allow-anonymous</code> is combined with account MCP connections unless you also pass <code>--allow-anonymous-cursor-account-mcp</code> (trusted boundary only; for example an SSO proxy or the hosted alias token). Prefer <code>--bearer-token</code> on shared hosts.</p></div><h2 id="peer-mcp-connection" tabindex="-1">Peer MCP connection <a class="header-anchor" href="#peer-mcp-connection" aria-label="Permalink to &quot;Peer MCP connection {#peer-mcp-connection}&quot;">​</a></h2><p><code>{ agent: &quot;&lt;slug&gt;&quot; }</code> addresses another agent mounted on the same serve host. The model gets the peer&#39;s <code>ask</code> and <code>check</code> tools, plus <code>call_tool</code> when the peer has server tools, and can delegate work to it:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
53
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Name the file <code>account.ts</code>. <code>cursor.ts</code> collides with the IDE <code>cursor</code> MCP namespace. <code>advertiseTools: true</code> puts connector tools on local turns by name.</p><p>The host must be signed in (<code>bdk login</code>, <code>CURSOR_API_KEY</code>, or <code>CURSOR_SERVICE_ACCOUNT_KEY</code>). <code>serve</code> fails at startup otherwise.</p><p>Use a <code>{ command }</code> connection for stdio servers.</p><div class="caution custom-block github-alert"><p class="custom-block-title">CAUTION</p><p>Whoever can talk to the agent can drive these connectors, because they are ordinary agent tools. <code>serve</code> refuses to start when <code>--allow-anonymous</code> is combined with account MCP connections unless you also pass <code>--allow-anonymous-cursor-account-mcp</code> (trusted boundary only; for example an SSO proxy or the hosted alias token). Prefer <code>--bearer-token</code> on shared hosts.</p></div><h2 id="peer-mcp-connection" tabindex="-1">Peer MCP connection <a class="header-anchor" href="#peer-mcp-connection" aria-label="Permalink to &quot;Peer MCP connection {#peer-mcp-connection}&quot;">​</a></h2><p><code>{ agent: &quot;&lt;slug&gt;&quot; }</code> addresses another agent without configuring a URL, headers, or secrets. On a local multi-agent serve, the target is another mount slug. On Cursor-managed hosting, it is the lowercase deployment slug of another agent on the same team.</p><p>On a local multi-agent serve, the model gets the peer&#39;s <code>ask</code> and <code>check</code> tools, plus <code>call_tool</code> when the peer has server tools, and can delegate work to it:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
54
54
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> agent: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;weather-agent&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
55
55
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Delegate weather questions to the weather agent.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
56
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Unknown slugs and self-references fail <code>serve</code> at startup. Walkthrough: <a href="./../guides/agent-to-agent.html#delegate-a-question-to-a-specialist">Peer agents</a>.</p><h2 id="call-mcp-from-host-code" tabindex="-1">Call MCP from host code <a class="header-anchor" href="#call-mcp-from-host-code" aria-label="Permalink to &quot;Call MCP from host code&quot;">​</a></h2><p>A file under <code>bot/mcp-connections/</code> is available to the Cursor agent, to server tools through <code>ctx.host.mcp</code>, and to channel and schedule handlers through <code>args.host.mcp</code>. Host connections skip the model.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// bot/tools/search_linear.ts</span></span>
56
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Declare the connection only on the caller. The specialist needs no matching configuration.</p><p>In a local multi-agent serve, unknown slugs and self-references fail at startup. A single-agent serve omits peers with a warning unless its hosting platform sets <code>--peers-url</code>. Walkthrough: <a href="./../guides/agent-to-agent.html#delegate-a-question-to-a-specialist">Peer agents</a>.</p><h2 id="call-mcp-from-host-code" tabindex="-1">Call MCP from host code <a class="header-anchor" href="#call-mcp-from-host-code" aria-label="Permalink to &quot;Call MCP from host code&quot;">​</a></h2><p>A file under <code>bot/mcp-connections/</code> is available to the Cursor agent, to server tools through <code>ctx.host.mcp</code>, and to channel and schedule handlers through <code>args.host.mcp</code>. Host connections skip the model.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// bot/tools/search_linear.ts</span></span>
57
57
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineTool } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/bdk/tools&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
58
58
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { z } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;zod&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
59
59
  <span class="line"></span>
@@ -63,4 +63,4 @@ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c
63
63
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> execute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">query</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">ctx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
64
64
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ctx.host.mcp.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">callTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;linear&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;list_issues&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, { query });</span></span>
65
65
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
66
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>host.mcp.names()</code> lists connection names. <code>listTools(name)</code> / <code>callTool(name, tool, args)</code> call into a named connection.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./../guides/mcp-oauth.html">Host MCP OAuth</a>: <code>mcp oauth</code>, Connect, and hosted agents</li><li><a href="./tools.html">Tools</a>: authored tools that wrap MCP connections</li><li><a href="./../guides/webhooks.html">Webhooks</a>: calling MCP connections from handlers</li><li><a href="./../guides/agent-to-agent.html">Peer agents</a>: when a specialist is its own agent</li></ul>`,58)])])}const E=i(n,[["render",h]]);export{c as __pageData,E as default};
66
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>host.mcp.names()</code> lists connection names. <code>listTools(name)</code> / <code>callTool(name, tool, args)</code> call into a named connection.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./../guides/mcp-oauth.html">Host MCP OAuth</a>: <code>mcp oauth</code>, Connect, and hosted agents</li><li><a href="./tools.html">Tools</a>: authored tools that wrap MCP connections</li><li><a href="./../guides/webhooks.html">Webhooks</a>: calling MCP connections from handlers</li><li><a href="./../guides/agent-to-agent.html">Peer agents</a>: when a specialist is its own agent</li></ul>`,60)])])}const E=i(n,[["render",h]]);export{c as __pageData,E as default};
@@ -1 +1 @@
1
- import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse(`{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),n={name:"reference/connections.md"};function h(l,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t("",58)])])}const E=i(n,[["render",h]]);export{c as __pageData,E as default};
1
+ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse(`{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),n={name:"reference/connections.md"};function h(l,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t("",60)])])}const E=i(n,[["render",h]]);export{c as __pageData,E as default};