@grok/agent-sdk 0.2.29 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/dist/channels/slack/cli-project.js +1 -1
  2. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  3. package/dist/channels/slack/slack-channel.js +27 -14
  4. package/dist/docs/404.html +2 -2
  5. package/dist/docs/assets/{app.DMrZKFjI.js → app.BSH__xV4.js} +4 -4
  6. package/dist/docs/assets/building-with-agents.md.Bo3ct-rf.js +6 -0
  7. package/dist/docs/assets/{building-with-agents.md.Bf1yH2tG.lean.js → building-with-agents.md.Bo3ct-rf.lean.js} +1 -1
  8. package/dist/docs/assets/changelog.md.b6H_ea44.js +1 -0
  9. package/dist/docs/assets/changelog.md.b6H_ea44.lean.js +1 -0
  10. package/dist/docs/assets/chunks/@localSearchIndexroot.CiRGcfZg.js +1 -0
  11. package/dist/docs/assets/chunks/{VPLocalSearchBox.DQvuw1KA.js → VPLocalSearchBox.Cadl7A0k.js} +1 -1
  12. package/dist/docs/assets/chunks/{arc.ahOG-Qza.js → arc.K7t9nNY6.js} +1 -1
  13. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.BcgfYNO_.js → architectureDiagram-Q4EWVU46.SlHEknkX.js} +1 -1
  14. package/dist/docs/assets/chunks/{baseUniq.DeIYZrWh.js → baseUniq.DJLRMLkz.js} +1 -1
  15. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.HjJ2goMX.js → blockDiagram-DXYQGD6D.Bs6XxFpe.js} +1 -1
  16. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.C1QTb9GM.js → c4Diagram-AHTNJAMY.CyLg6Ovc.js} +1 -1
  17. package/dist/docs/assets/chunks/channel.CVTdqYx0.js +1 -0
  18. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.UuZiDiVp.js → chunk-4BX2VUAB.DTQ4TinT.js} +1 -1
  19. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.5A3YmkhI.js → chunk-4TB4RGXK.Es84IgcH.js} +1 -1
  20. package/dist/docs/assets/chunks/{chunk-55IACEB6.B4uf1yYV.js → chunk-55IACEB6.Clm3cGPQ.js} +1 -1
  21. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.CoXBce8t.js → chunk-EDXVE4YY.DE4CRkS5.js} +1 -1
  22. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DnC5NO4e.js → chunk-FMBD7UC4.Bf8HCvqp.js} +1 -1
  23. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CzfHCeIi.js → chunk-OYMX7WX6.eub-7nSx.js} +1 -1
  24. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.C6tcwkVd.js → chunk-QZHKN3VN.WyP9VAS_.js} +1 -1
  25. package/dist/docs/assets/chunks/{chunk-YZCP3GAM._oboyZ1A.js → chunk-YZCP3GAM.LO9ohhDE.js} +1 -1
  26. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CsJJyx6-.js +1 -0
  27. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CsJJyx6-.js +1 -0
  28. package/dist/docs/assets/chunks/clone.Dk8KvtOB.js +1 -0
  29. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BfPVKeId.js → cose-bilkent-S5V4N54A.D5za6aH0.js} +1 -1
  30. package/dist/docs/assets/chunks/{dagre-KV5264BT.CLMLc0lD.js → dagre-KV5264BT.Dq1daUru.js} +1 -1
  31. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.C7OF7UfH.js → diagram-5BDNPKRD.j1YL5BKS.js} +1 -1
  32. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Dpao0Bl1.js → diagram-G4DWMVQ6.Bi1aLdhC.js} +1 -1
  33. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.DLnM9eLp.js → diagram-MMDJMWI5.BOzMEkAr.js} +1 -1
  34. package/dist/docs/assets/chunks/{diagram-TYMM5635.BcpVgA_M.js → diagram-TYMM5635.Dx2FVhCr.js} +1 -1
  35. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.CsL5JuCV.js → erDiagram-SMLLAGMA.DI4TNkye.js} +1 -1
  36. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.MFihq9AF.js → flowDiagram-DWJPFMVM.C58Z9uPK.js} +1 -1
  37. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.CJeLodyG.js → ganttDiagram-T4ZO3ILL.DXSpW809.js} +1 -1
  38. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.1HhlE45Z.js → gitGraphDiagram-UUTBAWPF.B955oaFl.js} +1 -1
  39. package/dist/docs/assets/chunks/{graph.BS02KkWA.js → graph.BQXhKtxS.js} +1 -1
  40. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.fp5gvytQ.js → infoDiagram-42DDH7IO.Dozj_-Gm.js} +1 -1
  41. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.C6Wk1V4I.js → ishikawaDiagram-UXIWVN3A.D2140OzH.js} +1 -1
  42. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.qJt4uJ_H.js → journeyDiagram-VCZTEJTY.DrqrMhCk.js} +1 -1
  43. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.z2tG9kly.js → kanban-definition-6JOO6SKY.Dv-LTrlw.js} +1 -1
  44. package/dist/docs/assets/chunks/{layout.BPCkdejr.js → layout.CGtHp49X.js} +1 -1
  45. package/dist/docs/assets/chunks/{linear.CL3TC3u7.js → linear.CHZLYB52.js} +1 -1
  46. package/dist/docs/assets/chunks/{min.SPrSp704.js → min.D4Vt3eIy.js} +1 -1
  47. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.DgrQRFZW.js → mindmap-definition-QFDTVHPH.BBfpYTea.js} +1 -1
  48. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.Ba7yxiW2.js → pieDiagram-DEJITSTG.BVYvElmY.js} +1 -1
  49. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.Bvskad4p.js → quadrantDiagram-34T5L4WZ.C6Gc2mdY.js} +1 -1
  50. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.Ce70ugV9.js → requirementDiagram-MS252O5E.DWa8b4cn.js} +1 -1
  51. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.BJ5OEULO.js → sankeyDiagram-XADWPNL6.Bi-g4ajv.js} +1 -1
  52. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.C8a1hDs6.js → sequenceDiagram-FGHM5R23.DlU3vVN9.js} +1 -1
  53. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.D2D8A5CK.js → stateDiagram-FHFEXIEX.CeqJRqnU.js} +1 -1
  54. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DE0BnUZh.js +1 -0
  55. package/dist/docs/assets/chunks/{theme.DRciHmS1.js → theme.DGq7D4tt.js} +2 -2
  56. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.C4ePrY8-.js → timeline-definition-GMOUNBTQ.Cqf2kjq9.js} +1 -1
  57. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.Dzso6dEA.js → vennDiagram-DHZGUBPP.BeOpE_lM.js} +1 -1
  58. package/dist/docs/assets/chunks/{wardley-RL74JXVD.djgXR0ar.js → wardley-RL74JXVD.FMQXA-6q.js} +1 -1
  59. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.Bf2ICxjh.js → wardleyDiagram-NUSXRM2D.BXS65dAC.js} +1 -1
  60. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.DEH4BcVJ.js → xychartDiagram-5P7HB3ND.haEiSxqc.js} +1 -1
  61. package/dist/docs/assets/deployment.md.DJtuDVLh.js +31 -0
  62. package/dist/docs/assets/{deployment.md.KW0Ni_rY.lean.js → deployment.md.DJtuDVLh.lean.js} +1 -1
  63. package/dist/docs/assets/evals.md.Dne6VRmZ.js +49 -0
  64. package/dist/docs/assets/evals.md.Dne6VRmZ.lean.js +1 -0
  65. package/dist/docs/assets/{guides_agent-to-agent.md.D1D5f6Jc.js → guides_agent-to-agent.md.DcB3nhOz.js} +8 -8
  66. package/dist/docs/assets/guides_agent-to-agent.md.DcB3nhOz.lean.js +1 -0
  67. package/dist/docs/assets/{guides_bitbucket.md.DkjkBRU8.js → guides_bitbucket.md.BiA6ZMFW.js} +27 -27
  68. package/dist/docs/assets/{guides_bitbucket.md.DkjkBRU8.lean.js → guides_bitbucket.md.BiA6ZMFW.lean.js} +1 -1
  69. package/dist/docs/assets/guides_cloud-agents.md.CiXAW6on.js +9 -0
  70. package/dist/docs/assets/{guides_cloud-agents.md.Ceyjv0ul.lean.js → guides_cloud-agents.md.CiXAW6on.lean.js} +1 -1
  71. package/dist/docs/assets/guides_convert-automation.md.BvTxsJ8J.js +26 -0
  72. package/dist/docs/assets/{guides_convert-automation.md.BjraCvok.lean.js → guides_convert-automation.md.BvTxsJ8J.lean.js} +1 -1
  73. package/dist/docs/assets/{guides_github.md.CgN5sNbW.js → guides_github.md.CcuZ7keS.js} +11 -19
  74. package/dist/docs/assets/{guides_github.md.CgN5sNbW.lean.js → guides_github.md.CcuZ7keS.lean.js} +1 -1
  75. package/dist/docs/assets/{guides_gitlab.md.DCE0p7_w.js → guides_gitlab.md.DcKusOcU.js} +63 -73
  76. package/dist/docs/assets/{guides_gitlab.md.DCE0p7_w.lean.js → guides_gitlab.md.DcKusOcU.lean.js} +1 -1
  77. package/dist/docs/assets/guides_improve.md.o3WOGR7n.js +16 -0
  78. package/dist/docs/assets/{guides_improve.md.BFYtrtLE.lean.js → guides_improve.md.o3WOGR7n.lean.js} +1 -1
  79. package/dist/docs/assets/{guides_jev.md.CEqLgjj9.js → guides_jev.md.DGCzkMUN.js} +20 -60
  80. package/dist/docs/assets/{guides_jev.md.CEqLgjj9.lean.js → guides_jev.md.DGCzkMUN.lean.js} +1 -1
  81. package/dist/docs/assets/{guides_mcp-oauth.md.DrGY92u4.js → guides_mcp-oauth.md.GVPMKcYl.js} +3 -5
  82. package/dist/docs/assets/{guides_mcp-oauth.md.DrGY92u4.lean.js → guides_mcp-oauth.md.GVPMKcYl.lean.js} +1 -1
  83. package/dist/docs/assets/guides_migrate.md.B8CZxnnX.js +3 -0
  84. package/dist/docs/assets/{guides_migrate.md.RS9Eu-Xh.lean.js → guides_migrate.md.B8CZxnnX.lean.js} +1 -1
  85. package/dist/docs/assets/guides_opentelemetry.md.BRSktBHt.js +26 -0
  86. package/dist/docs/assets/guides_opentelemetry.md.BRSktBHt.lean.js +1 -0
  87. package/dist/docs/assets/guides_pagerduty.md.pMXUkZZc.js +61 -0
  88. package/dist/docs/assets/guides_pagerduty.md.pMXUkZZc.lean.js +1 -0
  89. package/dist/docs/assets/guides_slack.md.D7Rwyva4.js +82 -0
  90. package/dist/docs/assets/{guides_slack.md.BwXHURvY.lean.js → guides_slack.md.D7Rwyva4.lean.js} +1 -1
  91. package/dist/docs/assets/{guides_webhooks.md.BJk63ZTs.js → guides_webhooks.md.B5DXt2v1.js} +7 -7
  92. package/dist/docs/assets/{guides_webhooks.md.BJk63ZTs.lean.js → guides_webhooks.md.B5DXt2v1.lean.js} +1 -1
  93. package/dist/docs/assets/hillclimbing.md.M51bF-oT.js +5 -0
  94. package/dist/docs/assets/hillclimbing.md.M51bF-oT.lean.js +1 -0
  95. package/dist/docs/assets/index.md.DnJPj_B6.js +14 -0
  96. package/dist/docs/assets/index.md.DnJPj_B6.lean.js +1 -0
  97. package/dist/docs/assets/quickstart.md.r-oE8nkX.js +113 -0
  98. package/dist/docs/assets/{quickstart.md.CljDaJBi.lean.js → quickstart.md.r-oE8nkX.lean.js} +1 -1
  99. package/dist/docs/assets/reference_access.md.C5lblfUC.js +1 -0
  100. package/dist/docs/assets/reference_access.md.C5lblfUC.lean.js +1 -0
  101. package/dist/docs/assets/reference_agent-config.md.BSNp2uJ7.js +27 -0
  102. package/dist/docs/assets/{reference_agent-config.md.Ck29qYNj.lean.js → reference_agent-config.md.BSNp2uJ7.lean.js} +1 -1
  103. package/dist/docs/assets/reference_artifacts.md.BJpAI7h9.js +17 -0
  104. package/dist/docs/assets/{reference_artifacts.md.C-hKR2hp.lean.js → reference_artifacts.md.BJpAI7h9.lean.js} +1 -1
  105. package/dist/docs/assets/reference_channels.md.CPWOpdsC.js +21 -0
  106. package/dist/docs/assets/{reference_channels.md.DsJfGSBJ.lean.js → reference_channels.md.CPWOpdsC.lean.js} +1 -1
  107. package/dist/docs/assets/reference_cli.md.DHm6DmYk.js +83 -0
  108. package/dist/docs/assets/reference_cli.md.DHm6DmYk.lean.js +1 -0
  109. package/dist/docs/assets/reference_connections.md.DoY4vrDH.js +54 -0
  110. package/dist/docs/assets/{reference_connections.md.BoAotr7_.lean.js → reference_connections.md.DoY4vrDH.lean.js} +1 -1
  111. package/dist/docs/assets/reference_evals.md.DgfUtfIc.js +69 -0
  112. package/dist/docs/assets/{reference_evals.md.2BXeMiO2.lean.js → reference_evals.md.DgfUtfIc.lean.js} +1 -1
  113. package/dist/docs/assets/{reference_extensions.md.DI5X5x8p.js → reference_extensions.md.DHbW6eOf.js} +6 -8
  114. package/dist/docs/assets/{reference_extensions.md.DI5X5x8p.lean.js → reference_extensions.md.DHbW6eOf.lean.js} +1 -1
  115. package/dist/docs/assets/reference_hooks.md.vbIM394-.js +39 -0
  116. package/dist/docs/assets/reference_hooks.md.vbIM394-.lean.js +1 -0
  117. package/dist/docs/assets/reference_http-api.md.C7Cb0r2J.js +7 -0
  118. package/dist/docs/assets/{reference_http-api.md._RWELr3d.lean.js → reference_http-api.md.C7Cb0r2J.lean.js} +1 -1
  119. package/dist/docs/assets/reference_instructions.md.CV6Qq0UX.js +14 -0
  120. package/dist/docs/assets/reference_instructions.md.CV6Qq0UX.lean.js +1 -0
  121. package/dist/docs/assets/reference_limits.md.CbdtFr4T.js +8 -0
  122. package/dist/docs/assets/reference_limits.md.CbdtFr4T.lean.js +1 -0
  123. package/dist/docs/assets/reference_memory.md.CdoJISM-.js +3 -0
  124. package/dist/docs/assets/{reference_memory.md.Dd7cyV9V.lean.js → reference_memory.md.CdoJISM-.lean.js} +1 -1
  125. package/dist/docs/assets/reference_playground.md.DIUsRAcy.js +1 -0
  126. package/dist/docs/assets/{reference_playground.md.CQiJk9CM.lean.js → reference_playground.md.DIUsRAcy.lean.js} +1 -1
  127. package/dist/docs/assets/reference_project-layout.md.9DiKoE16.js +26 -0
  128. package/dist/docs/assets/reference_project-layout.md.9DiKoE16.lean.js +1 -0
  129. package/dist/docs/assets/reference_schedules.md.Dd8_d0WG.js +45 -0
  130. package/dist/docs/assets/{reference_schedules.md.RC47aFm4.lean.js → reference_schedules.md.Dd8_d0WG.lean.js} +1 -1
  131. package/dist/docs/assets/reference_sessions.md.NXVQt9mP.js +22 -0
  132. package/dist/docs/assets/{reference_sessions.md.C7KFhWXV.lean.js → reference_sessions.md.NXVQt9mP.lean.js} +1 -1
  133. package/dist/docs/assets/{reference_skills.md.Dej2zQxi.js → reference_skills.md.DzCPNPkG.js} +4 -4
  134. package/dist/docs/assets/{reference_skills.md.Dej2zQxi.lean.js → reference_skills.md.DzCPNPkG.lean.js} +1 -1
  135. package/dist/docs/assets/reference_subagents.md.Dvpq2sUu.js +10 -0
  136. package/dist/docs/assets/{reference_subagents.md.CAhvW4yS.lean.js → reference_subagents.md.Dvpq2sUu.lean.js} +1 -1
  137. package/dist/docs/assets/reference_tools.md.B2OaR1Nb.js +62 -0
  138. package/dist/docs/assets/{reference_tools.md.DQr7Fnhu.lean.js → reference_tools.md.B2OaR1Nb.lean.js} +1 -1
  139. package/dist/docs/assets/templates_agentic-owners.md.B6ZmKAzT.js +13 -0
  140. package/dist/docs/assets/{templates_agentic-owners.md.Dh2nDSqg.lean.js → templates_agentic-owners.md.B6ZmKAzT.lean.js} +1 -1
  141. package/dist/docs/assets/templates_reviews.md.dr9Xv_KM.js +10 -0
  142. package/dist/docs/assets/templates_reviews.md.dr9Xv_KM.lean.js +1 -0
  143. package/dist/docs/assets/troubleshooting.md.DfKKvW1R.js +3 -0
  144. package/dist/docs/assets/{troubleshooting.md.CGOdNVAL.lean.js → troubleshooting.md.DfKKvW1R.lean.js} +1 -1
  145. package/dist/docs/building-with-agents.html +41 -44
  146. package/dist/docs/building-with-agents.md +11 -104
  147. package/dist/docs/changelog.html +37 -37
  148. package/dist/docs/changelog.md +14 -145
  149. package/dist/docs/deployment.html +54 -54
  150. package/dist/docs/deployment.md +97 -270
  151. package/dist/docs/evals.html +52 -71
  152. package/dist/docs/evals.md +33 -129
  153. package/dist/docs/guides/agent-to-agent.html +43 -43
  154. package/dist/docs/guides/agent-to-agent.md +29 -64
  155. package/dist/docs/guides/bitbucket.html +62 -62
  156. package/dist/docs/guides/bitbucket.md +73 -134
  157. package/dist/docs/guides/cloud-agents.html +37 -37
  158. package/dist/docs/guides/cloud-agents.md +23 -53
  159. package/dist/docs/guides/convert-automation.html +39 -56
  160. package/dist/docs/guides/convert-automation.md +31 -115
  161. package/dist/docs/guides/github.html +46 -54
  162. package/dist/docs/guides/github.md +49 -131
  163. package/dist/docs/guides/gitlab.html +98 -108
  164. package/dist/docs/guides/gitlab.md +104 -184
  165. package/dist/docs/guides/improve.html +38 -43
  166. package/dist/docs/guides/improve.md +24 -90
  167. package/dist/docs/guides/jev.html +55 -95
  168. package/dist/docs/guides/jev.md +53 -160
  169. package/dist/docs/guides/mcp-oauth.html +38 -40
  170. package/dist/docs/guides/mcp-oauth.md +33 -67
  171. package/dist/docs/guides/migrate.html +38 -43
  172. package/dist/docs/guides/migrate.md +56 -130
  173. package/dist/docs/guides/opentelemetry.html +41 -43
  174. package/dist/docs/guides/opentelemetry.md +32 -27
  175. package/dist/docs/guides/pagerduty.html +50 -49
  176. package/dist/docs/guides/pagerduty.md +65 -199
  177. package/dist/docs/guides/slack.html +51 -57
  178. package/dist/docs/guides/slack.md +76 -204
  179. package/dist/docs/guides/webhooks.html +42 -42
  180. package/dist/docs/guides/webhooks.md +64 -146
  181. package/dist/docs/hashmap.json +1 -1
  182. package/dist/docs/hillclimbing.html +40 -42
  183. package/dist/docs/hillclimbing.md +40 -102
  184. package/dist/docs/index.html +49 -61
  185. package/dist/docs/index.md +42 -82
  186. package/dist/docs/llms-full.txt +2272 -5711
  187. package/dist/docs/llms.txt +9 -14
  188. package/dist/docs/quickstart.html +95 -152
  189. package/dist/docs/quickstart.md +91 -180
  190. package/dist/docs/reference/access.html +36 -36
  191. package/dist/docs/reference/access.md +7 -12
  192. package/dist/docs/reference/agent-config.html +45 -58
  193. package/dist/docs/reference/agent-config.md +92 -176
  194. package/dist/docs/reference/artifacts.html +38 -39
  195. package/dist/docs/reference/artifacts.md +38 -62
  196. package/dist/docs/reference/channels.html +38 -39
  197. package/dist/docs/reference/channels.md +102 -151
  198. package/dist/docs/reference/cli.html +68 -84
  199. package/dist/docs/reference/cli.md +232 -697
  200. package/dist/docs/reference/connections.html +45 -57
  201. package/dist/docs/reference/connections.md +83 -164
  202. package/dist/docs/reference/evals.html +47 -54
  203. package/dist/docs/reference/evals.md +75 -141
  204. package/dist/docs/reference/extensions.html +41 -43
  205. package/dist/docs/reference/extensions.md +37 -70
  206. package/dist/docs/reference/hooks.html +40 -52
  207. package/dist/docs/reference/hooks.md +62 -133
  208. package/dist/docs/reference/http-api.html +38 -42
  209. package/dist/docs/reference/http-api.md +66 -118
  210. package/dist/docs/reference/instructions.html +39 -39
  211. package/dist/docs/reference/instructions.md +19 -29
  212. package/dist/docs/reference/limits.html +38 -38
  213. package/dist/docs/reference/limits.md +9 -21
  214. package/dist/docs/reference/memory.html +37 -38
  215. package/dist/docs/reference/memory.md +38 -75
  216. package/dist/docs/reference/playground.html +36 -36
  217. package/dist/docs/reference/playground.md +14 -22
  218. package/dist/docs/reference/project-layout.html +49 -48
  219. package/dist/docs/reference/project-layout.md +38 -84
  220. package/dist/docs/reference/schedules.html +44 -46
  221. package/dist/docs/reference/schedules.md +59 -90
  222. package/dist/docs/reference/sessions.html +37 -37
  223. package/dist/docs/reference/sessions.md +66 -113
  224. package/dist/docs/reference/skills.html +39 -39
  225. package/dist/docs/reference/skills.md +11 -31
  226. package/dist/docs/reference/subagents.html +37 -37
  227. package/dist/docs/reference/subagents.md +17 -31
  228. package/dist/docs/reference/tools.html +47 -64
  229. package/dist/docs/reference/tools.md +48 -130
  230. package/dist/docs/templates/agentic-owners.html +38 -38
  231. package/dist/docs/templates/agentic-owners.md +50 -74
  232. package/dist/docs/templates/reviews.html +69 -0
  233. package/dist/docs/templates/reviews.md +71 -0
  234. package/dist/docs/troubleshooting.html +38 -36
  235. package/dist/docs/troubleshooting.md +48 -101
  236. package/dist/filesystem.d.ts +7 -320
  237. package/dist/filesystem.d.ts.map +1 -1
  238. package/dist/filesystem.js +10 -691
  239. package/dist/index.d.ts +1 -1
  240. package/dist/index.d.ts.map +1 -1
  241. package/dist/index.js +1 -1
  242. package/dist/internal/authored-alias-hooks.d.ts +6 -0
  243. package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
  244. package/dist/internal/authored-alias-hooks.js +12 -0
  245. package/dist/internal/authored-loaders.js +10 -1
  246. package/dist/internal/cli/commands/scaffold.js +1 -1
  247. package/dist/internal/cli-deploy.js +1 -1
  248. package/dist/internal/cli-docs.js +1 -1
  249. package/dist/internal/cli-images.js +1 -1
  250. package/dist/internal/cli-skills.js +1 -1
  251. package/dist/internal/continuation-session-ids.d.ts +15 -0
  252. package/dist/internal/continuation-session-ids.d.ts.map +1 -0
  253. package/dist/internal/continuation-session-ids.js +43 -0
  254. package/dist/internal/cursor/credentials.js +1 -1
  255. package/dist/internal/deploy-manifest.d.ts +1 -0
  256. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  257. package/dist/internal/deploy-manifest.js +0 -1
  258. package/dist/internal/discovery/agent-config.d.ts +2 -6
  259. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  260. package/dist/internal/discovery/agent-config.js +8 -25
  261. package/dist/internal/discovery/agent.d.ts.map +1 -1
  262. package/dist/internal/discovery/agent.js +2 -3
  263. package/dist/internal/discovery/project.d.ts.map +1 -1
  264. package/dist/internal/discovery/project.js +15 -0
  265. package/dist/internal/filesystem/walk.d.ts +1 -5
  266. package/dist/internal/filesystem/walk.d.ts.map +1 -1
  267. package/dist/internal/filesystem/walk.js +1 -9
  268. package/dist/internal/hosted-catch-protocol.d.ts +3 -3
  269. package/dist/internal/hosted-catch-protocol.js +3 -3
  270. package/dist/internal/hosted-fetch.d.ts +7 -0
  271. package/dist/internal/hosted-fetch.d.ts.map +1 -0
  272. package/dist/internal/hosted-fetch.js +26 -0
  273. package/dist/internal/init-project.d.ts.map +1 -1
  274. package/dist/internal/init-project.js +7 -5
  275. package/dist/internal/install-cursor-skills.d.ts +5 -6
  276. package/dist/internal/install-cursor-skills.d.ts.map +1 -1
  277. package/dist/internal/install-cursor-skills.js +19 -4
  278. package/dist/internal/mcp-endpoint.js +4 -4
  279. package/dist/internal/model-config.d.ts.map +1 -1
  280. package/dist/internal/model-config.js +11 -4
  281. package/dist/internal/platform-timers.d.ts +3 -7
  282. package/dist/internal/platform-timers.d.ts.map +1 -1
  283. package/dist/internal/platform-timers.js +10 -51
  284. package/dist/internal/reminder-runner.js +1 -1
  285. package/dist/internal/server.d.ts.map +1 -1
  286. package/dist/internal/server.js +6 -1
  287. package/dist/internal/session-engine.d.ts +3 -0
  288. package/dist/internal/session-engine.d.ts.map +1 -1
  289. package/dist/internal/session-engine.js +13 -4
  290. package/dist/internal/shallow-clone.js +1 -1
  291. package/dist/playground/assets/index-Bno25Cg0.css +1 -0
  292. package/dist/playground/assets/index-SGKsaznh.js +62 -0
  293. package/dist/playground/index.html +2 -2
  294. package/dist/types.d.ts +6 -17
  295. package/dist/types.d.ts.map +1 -1
  296. package/dist/types.js +2 -2
  297. package/docs/README.md +42 -82
  298. package/docs/building-with-agents.md +11 -104
  299. package/docs/changelog.md +15 -146
  300. package/docs/deployment.md +97 -270
  301. package/docs/evals.md +34 -130
  302. package/docs/guides/agent-to-agent.md +29 -64
  303. package/docs/guides/bitbucket.md +73 -134
  304. package/docs/guides/cloud-agents.md +23 -53
  305. package/docs/guides/convert-automation.md +31 -115
  306. package/docs/guides/github.md +49 -131
  307. package/docs/guides/gitlab.md +104 -184
  308. package/docs/guides/improve.md +24 -90
  309. package/docs/guides/jev.md +53 -160
  310. package/docs/guides/mcp-oauth.md +33 -67
  311. package/docs/guides/migrate.md +56 -130
  312. package/docs/guides/opentelemetry.md +37 -27
  313. package/docs/guides/pagerduty.md +68 -200
  314. package/docs/guides/slack.md +76 -204
  315. package/docs/guides/webhooks.md +64 -146
  316. package/docs/hillclimbing.md +41 -103
  317. package/docs/quickstart.md +91 -180
  318. package/docs/reference/access.md +7 -12
  319. package/docs/reference/agent-config.md +92 -176
  320. package/docs/reference/artifacts.md +38 -62
  321. package/docs/reference/channels.md +102 -151
  322. package/docs/reference/cli.md +232 -697
  323. package/docs/reference/connections.md +83 -164
  324. package/docs/reference/evals.md +75 -141
  325. package/docs/reference/extensions.md +37 -70
  326. package/docs/reference/hooks.md +61 -132
  327. package/docs/reference/http-api.md +66 -118
  328. package/docs/reference/instructions.md +20 -30
  329. package/docs/reference/limits.md +10 -22
  330. package/docs/reference/memory.md +38 -75
  331. package/docs/reference/playground.md +14 -22
  332. package/docs/reference/project-layout.md +38 -84
  333. package/docs/reference/schedules.md +59 -90
  334. package/docs/reference/sessions.md +66 -113
  335. package/docs/reference/skills.md +12 -32
  336. package/docs/reference/subagents.md +17 -31
  337. package/docs/reference/tools.md +48 -130
  338. package/docs/templates/agentic-owners.md +50 -74
  339. package/docs/templates/reviews.md +76 -0
  340. package/docs/troubleshooting.md +48 -101
  341. package/package.json +4 -4
  342. package/skills/cli/SKILL.md +1 -1
  343. package/skills/create-agent/SKILL.md +61 -7
  344. package/skills/debug/SKILL.md +1 -1
  345. package/skills/deploy/SKILL.md +3 -3
  346. package/skills/evals/SKILL.md +1 -1
  347. package/skills/framework-map/SKILL.md +2 -2
  348. package/skills/github/SKILL.md +1 -1
  349. package/skills/hillclimb/SKILL.md +1 -1
  350. package/skills/mcp-auth/SKILL.md +1 -1
  351. package/skills/migrate-v2/SKILL.md +2 -3
  352. package/skills/otel/SKILL.md +1 -1
  353. package/skills/setup-slack/SKILL.md +2 -2
  354. package/dist/docs/assets/building-with-agents.md.Bf1yH2tG.js +0 -9
  355. package/dist/docs/assets/changelog.md.DrLFQUlu.js +0 -1
  356. package/dist/docs/assets/changelog.md.DrLFQUlu.lean.js +0 -1
  357. package/dist/docs/assets/chunks/@localSearchIndexroot.Dpd_wxVU.js +0 -1
  358. package/dist/docs/assets/chunks/channel._fZX_hvU.js +0 -1
  359. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.eClS1Q0E.js +0 -1
  360. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.eClS1Q0E.js +0 -1
  361. package/dist/docs/assets/chunks/clone.W1Phdw9P.js +0 -1
  362. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.77yf4kRr.js +0 -1
  363. package/dist/docs/assets/deployment.md.KW0Ni_rY.js +0 -31
  364. package/dist/docs/assets/evals.md.DiljU__Z.js +0 -68
  365. package/dist/docs/assets/evals.md.DiljU__Z.lean.js +0 -1
  366. package/dist/docs/assets/guides_agent-to-agent.md.D1D5f6Jc.lean.js +0 -1
  367. package/dist/docs/assets/guides_cloud-agents.md.Ceyjv0ul.js +0 -9
  368. package/dist/docs/assets/guides_convert-automation.md.BjraCvok.js +0 -43
  369. package/dist/docs/assets/guides_hooks.md.BjeEiM7s.js +0 -54
  370. package/dist/docs/assets/guides_hooks.md.BjeEiM7s.lean.js +0 -1
  371. package/dist/docs/assets/guides_improve.md.BFYtrtLE.js +0 -21
  372. package/dist/docs/assets/guides_migrate.md.RS9Eu-Xh.js +0 -8
  373. package/dist/docs/assets/guides_opentelemetry.md.CoZ1kNyd.js +0 -28
  374. package/dist/docs/assets/guides_opentelemetry.md.CoZ1kNyd.lean.js +0 -1
  375. package/dist/docs/assets/guides_pagerduty.md.mnKXe9U0.js +0 -60
  376. package/dist/docs/assets/guides_pagerduty.md.mnKXe9U0.lean.js +0 -1
  377. package/dist/docs/assets/guides_slack.md.BwXHURvY.js +0 -88
  378. package/dist/docs/assets/hillclimbing.md.By61f3uq.js +0 -7
  379. package/dist/docs/assets/hillclimbing.md.By61f3uq.lean.js +0 -1
  380. package/dist/docs/assets/index.md.CAruw_rp.js +0 -26
  381. package/dist/docs/assets/index.md.CAruw_rp.lean.js +0 -1
  382. package/dist/docs/assets/quickstart.md.CljDaJBi.js +0 -170
  383. package/dist/docs/assets/reference_access.md.CEtibb4i.js +0 -1
  384. package/dist/docs/assets/reference_access.md.CEtibb4i.lean.js +0 -1
  385. package/dist/docs/assets/reference_agent-config.md.Ck29qYNj.js +0 -40
  386. package/dist/docs/assets/reference_artifacts.md.C-hKR2hp.js +0 -18
  387. package/dist/docs/assets/reference_channels.md.DsJfGSBJ.js +0 -22
  388. package/dist/docs/assets/reference_cli.md.BkdLRbXg.js +0 -99
  389. package/dist/docs/assets/reference_cli.md.BkdLRbXg.lean.js +0 -1
  390. package/dist/docs/assets/reference_connections.md.BoAotr7_.js +0 -66
  391. package/dist/docs/assets/reference_evals.md.2BXeMiO2.js +0 -76
  392. package/dist/docs/assets/reference_hooks.md.B-bwJuiG.js +0 -51
  393. package/dist/docs/assets/reference_hooks.md.B-bwJuiG.lean.js +0 -1
  394. package/dist/docs/assets/reference_http-api.md._RWELr3d.js +0 -11
  395. package/dist/docs/assets/reference_instructions.md.yL2hXLnl.js +0 -14
  396. package/dist/docs/assets/reference_instructions.md.yL2hXLnl.lean.js +0 -1
  397. package/dist/docs/assets/reference_limits.md.BCCnvt3o.js +0 -8
  398. package/dist/docs/assets/reference_limits.md.BCCnvt3o.lean.js +0 -1
  399. package/dist/docs/assets/reference_memory.md.Dd7cyV9V.js +0 -4
  400. package/dist/docs/assets/reference_playground.md.CQiJk9CM.js +0 -1
  401. package/dist/docs/assets/reference_project-layout.md.BamcPDUn.js +0 -25
  402. package/dist/docs/assets/reference_project-layout.md.BamcPDUn.lean.js +0 -1
  403. package/dist/docs/assets/reference_prompt.md.BMjm1Jp3.js +0 -9
  404. package/dist/docs/assets/reference_prompt.md.BMjm1Jp3.lean.js +0 -1
  405. package/dist/docs/assets/reference_schedules.md.RC47aFm4.js +0 -47
  406. package/dist/docs/assets/reference_sessions.md.C7KFhWXV.js +0 -22
  407. package/dist/docs/assets/reference_subagents.md.CAhvW4yS.js +0 -10
  408. package/dist/docs/assets/reference_tools.md.DQr7Fnhu.js +0 -79
  409. package/dist/docs/assets/templates_agentic-owners.md.Dh2nDSqg.js +0 -13
  410. package/dist/docs/assets/templates_security-reviewer.md.DnwXdnB5.js +0 -3
  411. package/dist/docs/assets/templates_security-reviewer.md.DnwXdnB5.lean.js +0 -1
  412. package/dist/docs/assets/templates_thermo-quality-review.md.MJIdHkzE.js +0 -3
  413. package/dist/docs/assets/templates_thermo-quality-review.md.MJIdHkzE.lean.js +0 -1
  414. package/dist/docs/assets/templates_thermo-review.md.DfN1OFOl.js +0 -3
  415. package/dist/docs/assets/templates_thermo-review.md.DfN1OFOl.lean.js +0 -1
  416. package/dist/docs/assets/templates_triage.md.BYWMloV4.js +0 -9
  417. package/dist/docs/assets/templates_triage.md.BYWMloV4.lean.js +0 -1
  418. package/dist/docs/assets/troubleshooting.md.CGOdNVAL.js +0 -1
  419. package/dist/docs/guides/hooks.html +0 -113
  420. package/dist/docs/guides/hooks.md +0 -116
  421. package/dist/docs/package/skills/create-agent/SKILL.md +0 -178
  422. package/dist/docs/package/skills/evals/SKILL.md +0 -145
  423. package/dist/docs/package/skills/github/SKILL.md +0 -133
  424. package/dist/docs/package/skills/hillclimb/SKILL.md +0 -63
  425. package/dist/docs/package/skills/mcp-auth/SKILL.md +0 -60
  426. package/dist/docs/package/skills/migrate-v2/SKILL.md +0 -394
  427. package/dist/docs/package/skills/setup-slack/SKILL.md +0 -136
  428. package/dist/docs/reference/prompt.html +0 -68
  429. package/dist/docs/reference/prompt.md +0 -47
  430. package/dist/docs/templates/security-reviewer.html +0 -62
  431. package/dist/docs/templates/security-reviewer.md +0 -81
  432. package/dist/docs/templates/thermo-quality-review.html +0 -62
  433. package/dist/docs/templates/thermo-quality-review.md +0 -75
  434. package/dist/docs/templates/thermo-review.html +0 -62
  435. package/dist/docs/templates/thermo-review.md +0 -75
  436. package/dist/docs/templates/triage.html +0 -68
  437. package/dist/docs/templates/triage.md +0 -101
  438. package/dist/internal/filesystem/errors.d.ts +0 -64
  439. package/dist/internal/filesystem/errors.d.ts.map +0 -1
  440. package/dist/internal/filesystem/errors.js +0 -180
  441. package/dist/internal/filesystem/merge.d.ts +0 -34
  442. package/dist/internal/filesystem/merge.d.ts.map +0 -1
  443. package/dist/internal/filesystem/merge.js +0 -154
  444. package/dist/playground/assets/index-Cl9zvmmf.js +0 -62
  445. package/dist/playground/assets/index-F8b5WvWi.css +0 -1
  446. package/docs/guides/hooks.md +0 -121
  447. package/docs/reference/prompt.md +0 -52
  448. package/docs/templates/security-reviewer.md +0 -86
  449. package/docs/templates/thermo-quality-review.md +0 -80
  450. package/docs/templates/thermo-review.md +0 -80
  451. package/docs/templates/triage.md +0 -106
@@ -1,29 +1,20 @@
1
1
  # Agent SDK CLI
2
2
 
3
- The Agent SDK is published as `@grok/agent-sdk` with the `agent-sdk`
4
- CLI.
3
+ The CLI needs Node 22.13 or newer. Run `agent-sdk <command> --help` to see
4
+ every flag for that command.
5
5
 
6
6
  ```text
7
7
  agent-sdk <command>
8
8
  ```
9
9
 
10
- The command catalog below documents the `agent-sdk` binary from
11
- `@grok/agent-sdk`. Run it with Node 22.13 or newer; Bun is not
12
- supported. Commands exit nonzero when validation or a synchronous request fails;
13
- asynchronous commands can exit `0` once work is accepted. Project paths use the
14
- [Agent SDK project layout](/docs/reference/project-layout.md).
10
+ `agent-sdk help --all` prints every command, and
11
+ `agent-sdk help <command> --json` prints one command's flags as JSON.
15
12
 
16
- Install `@grok/agent-sdk` to obtain the binary. Bare `agent-sdk` prints the command
17
- index. `agent-sdk <command> --help` prints one command's help, `agent-sdk help --all`
18
- prints every command, and `agent-sdk help <command> --json` prints one command's
19
- arguments and flags as JSON.
20
-
21
- The `bdk` command remains available.
22
-
23
- Commands are named `agent-sdk <resource> <verb>`, such as `agent-sdk deployment list`,
24
- except for a few workflow verbs (`init`, `dev`, `run`, `eval`, `deploy`, and
25
- others). Older names, such as `agent-sdk deployments` or `agent-sdk secrets set`, still
26
- run for now. Each one prints the new form on stderr.
13
+ Commands are named `agent-sdk <resource> <verb>`, such as
14
+ `agent-sdk deployment list`, apart from workflow verbs such as `init`, `dev`,
15
+ and `deploy`. Older names, such as `agent-sdk deployments` or
16
+ `agent-sdk secrets set`, still run and print the new form on stderr. The `bdk`
17
+ command remains available.
27
18
 
28
19
  ## Command catalog
29
20
 
@@ -34,18 +25,15 @@ run for now. Each one prints the new form on stderr.
34
25
  | `help`, `--help`, `-h` | Print the command index, or one command's help |
35
26
  | [`serve`](#serve) | Serve one or more agents over HTTP |
36
27
  | [`dev`](#dev) | Serve agents with local-development behavior |
37
- | [`docs`](#docs) | Serve the documentation bundled with `@grok/agent-sdk` |
38
- | [`init`](#init) | Scaffold an Agent SDK project, or convert an Automation |
39
- | [`migrate`](#migrate) | Move an early-alpha project to architecture v2 through a pull request |
40
- | [`skills list`](#skills-install) | List the bundled coding-agent skills and their installed versions |
41
- | [`skills install`](#skills-install) | Refresh the bundled coding-agent skills |
42
- | [`info`](#info) | Print the discovered project surface or its deployment manifest |
28
+ | [`docs`](#docs) | Serve the bundled documentation |
29
+ | [`init`](#init) | Scaffold a project, or convert an Automation |
30
+ | [`migrate`](#migrate) | Open a pull request that migrates an early-alpha project |
31
+ | [`skills list`, `skills install`](#skills-install) | List or refresh the bundled coding-agent skills |
32
+ | [`info`](#info) | Print a project's discovered parts or deployment manifest |
43
33
  | [`validate`](#validate) | Check project diagnostics and set the exit status |
44
34
  | [`version`](#version) | Print the installed package version |
45
35
  | [`update`](#update) | Upgrade the installed CLI |
46
- | [`login`](#login-logout-whoami) | Sign the host in to Cursor |
47
- | [`logout`](#login-logout-whoami) | Remove the stored Cursor credential |
48
- | [`whoami`](#login-logout-whoami) | Show the active Cursor credential |
36
+ | [`login`, `logout`, `whoami`](#login-logout-whoami) | Store, remove, or show the Cursor credential |
49
37
 
50
38
  ### Session and eval commands
51
39
 
@@ -56,7 +44,7 @@ run for now. Each one prints the new form on stderr.
56
44
  | [`tool call`](#tool-call) | Call a server tool without a model turn |
57
45
  | [`logs`](#logs) | Follow or dump agent logs |
58
46
  | [`session list`](#session-list) | List sessions, or their costs |
59
- | [`session get`](#session-get) | Inspect a session or a saved trace, or open it in the playground |
47
+ | [`session get`](#session-get) | Inspect a session or a saved trace |
60
48
  | [`session create`](#session-create) | Start or continue a hosted session |
61
49
  | [`eval`](#eval) | Run evals, or list, get, and cancel remote eval batches |
62
50
 
@@ -64,61 +52,42 @@ run for now. Each one prints the new form on stderr.
64
52
 
65
53
  | Command | Contract |
66
54
  | --- | --- |
67
- | [`deploy`](#deploy) | Deploy one or more agents |
68
- | [`deployment list`](#deployment-list) | List deployments |
69
- | [`deployment get`](#deployment-get) | Inspect one deployment |
70
- | [`deployment stop`](#deployment-stop) | Stop a deployment |
71
- | [`deployment start`](#deployment-start) | Start a stopped deployment |
72
- | [`deployment kill`](#deployment-kill) | Stop a deployment, cancel its runs, and lock deploys |
73
- | [`deployment unlock`](#deployment-unlock) | Let a killed deployment deploy again |
74
- | [`deployment cancel-runs`](#deployment-cancel-runs) | Cancel active runs and reminder wakes |
55
+ | [`deploy`](#deploy) | Deploy an agent |
56
+ | [`deployment list`, `deployment get`](#deployment-list) | List deployments, or inspect one |
57
+ | [`deployment stop`, `start`, `kill`, `unlock`, `cancel-runs`, `upgrade`, `rollback`, `delete`, `rotate-token`](#deployment-lifecycle) | Change a deployment's state, release, or alias token |
75
58
  | [`deployment update`](#deployment-update) | Replace a deployment's event repositories |
76
- | [`deployment upgrade`](#deployment-upgrade) | Move a deployment to a release |
77
- | [`deployment rollback`](#deployment-rollback) | Move a deployment to an earlier release |
78
- | [`deployment delete`](#deployment-delete) | Delete a deployment |
79
- | [`deployment rotate-token`](#deployment-rotate-token) | Replace a deployment's alias token |
80
59
  | [`secret`](#secret) | Set, list, or delete deployment secrets |
81
- | [`image`](#image) | Push, list, or delete container images for persistent agents |
82
60
 
83
61
  ### Connection and channel commands
84
62
 
85
63
  | Command | Contract |
86
64
  | --- | --- |
87
- | [`mcp serve`](#mcp) | Proxy an agent's MCP endpoint over stdio |
88
- | [`mcp install`](#mcp) | Add the agent to an MCP client config |
65
+ | [`mcp serve`, `mcp install`](#mcp) | Connect an MCP client to an agent |
89
66
  | [`mcp oauth`](#mcp-oauth) | Authorize an MCP connection |
90
67
  | [`slack`](#slack) | Provision and check Slack channel apps |
91
68
  | [`github`](#github) | Forward, replay, and inspect GitHub webhooks |
92
- | [`gitlab`](#gitlab) | Replay and inspect GitLab webhooks |
93
- | [`bitbucket`](#bitbucket) | Replay and inspect Bitbucket webhooks |
94
- | [`pagerduty`](#pagerduty) | Replay and inspect PagerDuty webhooks |
69
+ | [`gitlab`, `bitbucket`, `pagerduty`](#replay-other-webhooks) | Replay and inspect GitLab, Bitbucket, or PagerDuty webhooks |
95
70
 
96
71
  ## Targets {#choose-a-target}
97
72
 
98
- Commands that send requests support these targets:
99
-
100
73
  | Target | Selection | Commands |
101
74
  | --- | --- | --- |
102
75
  | Ephemeral local server | Omit `--url` and `--prod` | `run`, `tool call`, `eval` |
103
76
  | Running server | Pass `--url <baseUrl>` | `chat`, `run`, `tool call`, `eval`, `logs`, `session list`, `session get`, `mcp serve` |
104
- | Default local server | Omit `--url` and `--prod`; uses `http://127.0.0.1:3000` | `chat`, `logs`, `session list`, `session get` |
105
- | Hosted deployment | Pass `--prod` | `session list`, `session get`, `logs`; `session create` is always hosted |
77
+ | Default local server | Omit `--url` and `--prod` to use `http://127.0.0.1:3000` | `chat`, `logs`, `session list`, `session get` |
78
+ | Hosted deployment | Pass `--prod` | `session list`, `session get`, `logs`. `session create` is always hosted. |
106
79
 
107
- An explicit `--url` must include the slug for a multi-agent server, such as
108
- `http://127.0.0.1:3000/pr-approver`. `--slug` never changes an explicit URL.
109
- `--url` and `--prod` are mutually exclusive.
80
+ A hosted deployment supports only the commands in its row. `chat`, `run`,
81
+ `tool call`, `eval`, `mcp serve`, and `mcp install` exit with a usage error
82
+ when you pass `--prod`. To test a hosted agent, start a turn with
83
+ [`session create`](#session-create) and inspect it with
84
+ [`session get`](#session-get).
110
85
 
111
- | Option | Contract |
112
- | --- | --- |
113
- | `--dir <path>` | Select the project root. The default is the current directory. |
114
- | `--url <baseUrl>` | Use a running agent instead of local project discovery. |
115
- | `--prod` | Use the hosted deployment. `session list`, `session get`, and `logs` accept it; `chat`, `run`, `tool call`, `mcp serve`, and `eval` exit with a usage error. |
116
- | `--slug <slug>` | Select an agent from a multi-agent project or a hosted deployment. Under `--prod`, the default is the `--dir` basename. |
117
- | `--team <id>` | Select a Cursor team. The signed-in account's team is the default. |
118
- | `--api-key <key>` | Override the Cursor credential for commands that authenticate with Cursor. |
119
- | `--bearer-token <token>` | Authenticate to a running server with a bearer token. |
120
- | `--state-root <path>` | Select local state for `serve` and ephemeral `run`, `tool call`, and `eval` targets. Running and `--prod` targets ignore it. |
121
- | `--json` | Print one JSON document on stdout, errors included (`{"error":{"code","message","hint"}}`). Without it, output is text, also when piped. `agent-sdk help` lists the exit codes. |
86
+ `--url` and `--prod` are mutually exclusive. An explicit `--url` must include
87
+ the slug for a multi-agent server, such as `http://127.0.0.1:3000/pr-approver`.
88
+ Otherwise `--slug` picks the agent, and under `--prod` it defaults to the
89
+ `--dir` basename. `--json` prints one JSON document on stdout, including
90
+ errors. Without it, output is text, even when piped.
122
91
 
123
92
  ## Local servers
124
93
 
@@ -139,39 +108,27 @@ agent-sdk serve [--dir <path>] [--port <n>] [--host <host>]
139
108
  [--cursor-events --repo <owner/name>]...
140
109
  ```
141
110
 
142
- | Option | Contract |
143
- | --- | --- |
144
- | `--port <n>` | Listen on this port. The default is `3000`; `0` selects an available port. When an omitted default is occupied, the CLI selects the next port. An occupied explicit port fails with a next-port hint. |
145
- | `--host <host>` | Bind this host. The default is loopback-only `127.0.0.1`. |
146
- | `--mode multi` | Mount projects at `/<slug>/v1/*` and `/<slug>/playground`, with an index at `/`. This is the default. |
147
- | `--mode single` | Mount one project at `/v1/*` and `/playground`. Declared peers are omitted with a warning unless `--peers-url` is set. |
148
- | `--dev` | Disable automatic schedule and reminder firing, admit unsigned loopback GitHub deliveries, and enable local playground access. |
149
- | `--state-root <path>` | Store local sessions, streams, workspaces, and channel state here. Keep durable state outside a repository whose rules shouldn't reach agent workspaces. |
150
- | `--bearer-token <secret>` | Require this token on routes without authored authentication. Mutually exclusive with `--allow-anonymous`. |
151
- | `--allow-anonymous` | Admit callers as one anonymous principal. Use it only behind a trusted network boundary. |
152
- | `--allow-anonymous-cursor-github` | Let anonymous callers use sessions with a Cursor account's repository-scoped GitHub credential. Requires an authenticating proxy. |
153
- | `--allow-anonymous-cursor-account-mcp` | Let anonymous callers use Cursor account MCP connections. Requires an authenticating proxy. |
154
- | `--public-url <url>` | Set the externally reachable base URL that turns running off the serve host use for peer MCP and host bridges. It does not expose the server; configure the listener or proxy separately. Local-runtime peers use loopback. |
155
- | `--peers-url <url>` | Resolve declared peers for a single-agent serve through a hosting-provided peer service. Cursor-managed hosting sets this option automatically; a multi-agent serve rejects it. |
156
- | `--no-schedules` | Disable schedule firing outside dev mode. |
157
- | `--no-playground` | Skip the playground. |
158
- | `--no-docs` | Skip the documentation site at `/docs`. |
159
- | `--cursor-events` | Receive SCM events through Cursor. Requires sign-in and one or more repeatable `--repo owner/name` values. |
160
-
161
- Multi-agent slugs start with a letter or digit and contain only letters,
162
- digits, `_`, or `-`. The reserved slugs are `v1`, `playground`, and `docs`.
111
+ `serve` listens on `127.0.0.1:3000`, or the next free port when that one is
112
+ taken. `--mode multi`, the default, mounts each project at `/<slug>/v1/*`, and
113
+ `--mode single` mounts one project at `/v1/*`. `--dev` turns off schedule and
114
+ reminder firing and admits unsigned loopback GitHub deliveries.
115
+
116
+ `--bearer-token` requires a token on routes that don't declare their own
117
+ authentication. `--allow-anonymous` admits every caller as one principal, so
118
+ use it only behind a trusted network boundary. The slugs `v1`, `playground`,
119
+ and `docs` are reserved.
163
120
 
164
121
  ### Develop locally {#dev}
165
122
 
166
- `dev` is `serve --dev` with an optional positional project path:
123
+ `dev` is `serve --dev` with an optional project path:
167
124
 
168
125
  ```text
169
126
  agent-sdk dev
170
127
  agent-sdk dev ./agent-sdk-pr-reviewer --port 3000
171
128
  ```
172
129
 
173
- It accepts every `serve` option. Pass at most one positional path, and don't
174
- combine it with a different `--dir`.
130
+ It accepts every `serve` option. Don't combine the path with a different
131
+ `--dir`.
175
132
 
176
133
  ### Serve the docs {#docs}
177
134
 
@@ -179,40 +136,26 @@ combine it with a different `--dir`.
179
136
  agent-sdk docs [--port <n>] [--host 127.0.0.1] [--print]
180
137
  ```
181
138
 
182
- `docs` serves the bundled documentation without an agent project. It uses an
183
- available loopback port by default and stays open until Ctrl-C. `--print`
184
- prints the URL without opening a browser.
139
+ `docs` serves the bundled documentation on a loopback port until you press
140
+ Ctrl-C. `--print` prints the URL without opening a browser.
185
141
 
186
142
  ## Sessions and turns
187
143
 
188
144
  ### Chat with an agent {#chat}
189
145
 
190
- `chat` connects to a running server and never starts an ephemeral one:
191
-
192
146
  ```text
193
147
  agent-sdk chat [--url <baseUrl>] [--message <text>]
194
148
  [--session <id> | --resume] [--continuation-token <token>]
195
149
  [--slug <slug>] [--json] [--text] [--no-color]
196
150
  ```
197
151
 
198
- | Input mode | Behavior |
199
- | --- | --- |
200
- | TTY without `--message` | Open an interactive REPL. |
201
- | TTY with `--message` | Send the message, then keep the REPL open. |
202
- | Non-TTY with `--message` | Send one turn and exit. |
203
- | Non-TTY without `--message` | Read newline-delimited messages until EOF. |
204
- | `--json --message <text>` | Send one turn and print `{ ok, sessionId, continuationToken, trajectory }`. |
205
- | `--json --text --message <text>` | Print a compact trajectory instead of JSON. |
206
-
207
- Use `--session <id>` to reattach a stored session and replay its transcript.
208
- If you omit `--continuation-token`, the CLI looks it up from the target's
209
- session list. `--resume` selects the most recently updated session with a
210
- continuation token. An explicit session ID takes precedence.
152
+ On a TTY, `chat` opens a REPL and sends any `--message` first. Without a TTY, it
153
+ sends `--message` as one turn, or reads newline-delimited messages until EOF.
154
+ `--session <id>` reattaches a stored session, and `--resume` picks the most
155
+ recent one.
211
156
 
212
157
  ### Run turns {#run}
213
158
 
214
- `run` sends messages to an ephemeral local server or a running server:
215
-
216
159
  ```text
217
160
  agent-sdk run [--dir <path>] [--message <text>]...
218
161
  [--messages-file <path>] [--url <baseUrl>]
@@ -221,48 +164,22 @@ agent-sdk run [--dir <path>] [--message <text>]...
221
164
  [--timeout-ms <n>] [--no-stream] [--slug <slug>] [--dry-run]
222
165
  ```
223
166
 
224
- | Option | Contract |
225
- | --- | --- |
226
- | `--message <text>` | Send a user message. Repeat it for a multi-turn run. |
227
- | `--messages-file <path>` | Read a JSON array of strings. File messages run before repeated `--message` values. |
228
- | `--session <id>` | Continue a session on the target. |
229
- | `--continuation-token <token>` | Continue the session selected by `--session` on a running server. |
230
- | `--trace <file>` | Write the raw NDJSON stream to this path. |
231
- | `--no-trace` | Skip the NDJSON trace. |
232
- | `--json` | Print the JSON result instead of the compact trajectory. |
233
- | `--timeout-ms <n>` | Stop waiting after a positive number of milliseconds. There is no default timeout. |
234
- | `--no-stream` | Hide live tool and reply progress on stderr. |
235
- | `--dry-run` | Send nothing. Print the request the run would send. A local run starts no server. |
236
-
237
- Text output is the compact trajectory, with the session ID and trace path on
238
- stderr. `--json` output contains `ok`, `sessionId`, `continuationToken`,
239
- `trace`, `playgroundUrl`, `visualize`, and `trajectory`. The `trace` value
240
- gives the saved path when trace output is enabled.
241
-
242
- For the hosted deployment, use [`session create`](#session-create).
167
+ Repeat `--message` for a multi-turn run. `run` prints the compact trajectory,
168
+ writes an NDJSON trace unless you pass `--no-trace`, and exits `1` when the
169
+ trajectory fails. It has no default timeout.
243
170
 
244
171
  ### Call a tool {#tool-call}
245
172
 
246
- `tool call` invokes a server tool without a model turn:
247
-
248
173
  ```text
249
174
  agent-sdk tool call <tool> [--input <json>]
250
175
  [--dir <path> | --url <baseUrl>]
251
176
  [--session <id>] [--slug <slug>] [--json]
252
177
  ```
253
178
 
254
- `--input` accepts JSON and defaults to `{}`. `--session` uses the session
255
- workspace and records the call on its event stream. The command prints the
256
- tool result (a string as is, anything else as JSON). `--json` prints the
257
- server's full JSON response. The command succeeds only when the HTTP response
258
- succeeds with `ok: true`.
259
-
260
- Hosted deployments don't support `tool call`. Start a model turn with
261
- [`session create`](#session-create) and check it with
262
- [`session get`](#session-get).
263
-
264
- See [Tools](/docs/reference/tools.md#call-a-tool-without-a-model-turn) for validation,
265
- busy-session behavior, and error codes.
179
+ `--input` takes JSON and defaults to `{}`. `--session` runs the tool in that
180
+ session's workspace and records the call. The command exits `1` unless the
181
+ response has `ok: true`. See
182
+ [Tools](/docs/reference/tools.md#call-a-tool-without-a-model-turn) for error codes.
266
183
 
267
184
  ### List sessions {#session-list}
268
185
 
@@ -272,19 +189,10 @@ agent-sdk session list [--url <baseUrl> | --prod] [--since <duration|instant>]
272
189
  [--bearer-token <token>] [--limit <n>] [--page-token <token>] [--json]
273
190
  ```
274
191
 
275
- Text output shows the session ID, channel, mode, turn count, running status,
276
- and update time. `--json` prints `{ items, nextPageToken }`, including
277
- continuation tokens. `--limit` (default 20, at most 100) sets the page size,
278
- and `--page-token` reads the next page.
279
-
280
- With `--prod`, `session list` lists the hosted deployment's most recently
281
- active sessions; `--since 24h` (or an ISO-8601 date or instant) reads back to
282
- that cutoff, up to `--limit` sessions. Check one with
283
- [`session get <sessionId> --prod`](#session-get).
284
-
285
- `--view cost` prints token usage per session and a total from a running
286
- server. Turns saved before cost tracking appear as unpriced. `--json` prints
287
- `{ sessions }`. `--prod` doesn't support this view.
192
+ `--limit` sets the page size, 20 by default and at most 100. With `--prod`,
193
+ it lists the most recently active hosted sessions, and `--since` reads back
194
+ to a cutoff such as `24h` or an ISO-8601 instant.
195
+ `--view cost` works only against a running server.
288
196
 
289
197
  ### Inspect a session {#session-get}
290
198
 
@@ -297,29 +205,12 @@ agent-sdk session get <sessionId> [--url <baseUrl> | --prod]
297
205
  agent-sdk session get --file <file.ndjson> [--json]
298
206
  ```
299
207
 
300
- | Option | Contract |
301
- | --- | --- |
302
- | No option | Print a compact trajectory. |
303
- | `--json` | Print the trajectory object. |
304
- | `--view events` | Print `{ sessionId, events }` with the raw event list. With `--prod`, each tool call is an `actions.requested` or `action.result` event. The tool name is `toolName`. |
305
- | `--view cost` | Print per-turn token usage and estimated cost from a running server. `--prod` doesn't support it. |
306
- | `--trace <file.ndjson>` | Write the raw NDJSON trace instead of printing it. Not available with `--prod`. |
307
- | `--file <file.ndjson>` | Read a saved trace (for example from `run --trace`) instead of a server, and print its trajectory. |
308
- | `--web` | Open the session in the playground, or the [Deployed Agents](https://cursor.com/dashboard/deployed-agents) playground with `--prod`. `--print` prints the URL only. A running target with credentials that a browser can't send starts a loopback proxy and stays open until Ctrl-C. |
309
-
310
- Use [`chat --session`](#chat) to continue a conversational session on a
311
- local or running server.
312
-
313
- With `--prod`, the command prints the session's hosted executions: one line
314
- per run with its status, duration, and time, followed by that run's log
315
- lines. When the deployment stored process output, a `Process output:` section
316
- prints that output next. `--json` prints `{ sessionId, executions, startLog, ... }`.
317
- `startLog` is the process output, or `null` when none is stored.
318
- `--view events` prints `{ sessionId, events }`. `--trace` isn't available.
319
- While a turn is running, text output also reports the event count and latest
320
- event type and prints `Turn running; runs may lag behind events.` A run can
321
- show `running` with no logs until the turn ends, so a growing event count is
322
- the progress signal.
208
+ `session get` prints a compact trajectory, or raw [events](/docs/reference/sessions.md#stream-events) with `--view events`. `--view cost` and `--trace` work only locally. `--file` reads a saved trace and exits `1` when that trajectory failed, and `--web` opens the session in the playground. For a hosted deployment:
209
+
210
+ ```bash
211
+ agent-sdk session list --prod
212
+ agent-sdk session get <sessionId> --prod --slug <slug> --view events
213
+ ```
323
214
 
324
215
  ### Start a hosted session {#session-create}
325
216
 
@@ -329,23 +220,14 @@ agent-sdk session create --message <text> [--session <ses_...>]
329
220
  [--read-only] [--as-of <instant>] [--component <key>] [--dry-run] [--json]
330
221
  ```
331
222
 
332
- | Option | Contract |
333
- | --- | --- |
334
- | `--message <text>` | The message to send. Exactly one. |
335
- | `--session <ses_...>` | Continue a hosted session that `session create` started. Slack, SCM, and custom-route sessions can't be continued this way. |
336
- | `--wait` | Poll the delivery until it names the session, then print it. Exit `3` (`pending`) when `--timeout-ms` (default 120000) passes first. A skipped or failed delivery exits `1`. |
337
- | `--read-only` | Run read tools and stub write tools. |
338
- | `--as-of <instant>` | Freeze the session's clock at an ISO-8601 instant with a timezone, such as `2026-08-31T12:00:00Z`. |
339
- | `--component <key>` | Wake a named component instead of the deployment's default. A continued session must belong to that component. |
340
- | `--dry-run` | Send nothing. Print the request it would send. |
341
-
342
- Without `--wait`, the command returns as soon as the deployment accepts the
343
- turn and exits `0` before the turn outcome is known. It prints the delivery
344
- ID, the session ID when known, and the session mode. `--json` prints
345
- `deliveryId`, `workflowId`, `sessionMode`, and `sessionId` when known, plus
346
- `dryRun` and `asOf` when set. A fresh start has no `sessionId` until the turn
347
- starts; a continuation echoes the `--session` value. See
348
- [Verify a hosted turn](/docs/deployment.md#verify-a-hosted-turn).
223
+ `session create` sends one `--message` to the hosted deployment. Without
224
+ `--wait`, it exits `0` once the deployment accepts the turn, before a new
225
+ session has an ID. `--wait` polls until the session starts. It exits `3` when
226
+ `--timeout-ms` passes first and `1` when the delivery is skipped or fails.
227
+
228
+ `--session` continues a session that `session create` started. `--read-only`
229
+ stubs write tools, and `--as-of` freezes the session's clock at an ISO-8601
230
+ instant. See [Verify a hosted turn](/docs/deployment.md#verify-a-hosted-turn).
349
231
 
350
232
  ### Follow logs {#logs}
351
233
 
@@ -354,68 +236,44 @@ agent-sdk logs [sessionId] [--url <baseUrl> | --prod]
354
236
  [--session <sessionId>] [--slug <slug>] [--team <id>] [--once] [--json]
355
237
  ```
356
238
 
357
- The command follows logs until Ctrl-C. `--once` prints the current buffer and
358
- exits; `--json` emits newline-delimited JSON events. With `--prod`, it follows
359
- the output of the hosted deployment's most recent sessions on every channel
360
- and prints a `==> <sessionId> (<channel>) <==` header each time the output
361
- switches sessions. A persistent deployment also prints a `==> process-output <==`
362
- block. That block is the process log that [Deployed Agents](https://cursor.com/dashboard/deployed-agents) shows for the deployment.
363
- Pass a session ID, as an argument or with `--session`, to follow only that
364
- session; a session ID requires `--prod`. The session view starts with
365
- `Process output:` for the deployment process log and `Session process output:`
366
- for that session's own process output, and a `tool <name>` line for each tool
367
- call. Hosted log events
368
- carry `sessionId` and `line` rather than `index` and `at`.
239
+ `logs` follows output until Ctrl-C, and `--once` prints the current buffer and
240
+ exits. With `--prod`, it follows the hosted deployment's recent sessions and
241
+ prints a `==> <sessionId> (<channel>) <==` header when the output switches
242
+ sessions. A session ID follows one hosted session and requires `--prod`.
369
243
 
370
244
  ## Evals
371
245
 
372
246
  ### Run evals {#eval}
373
247
 
374
- `eval` discovers `evals/**/*.eval.{ts,js}` and runs selected cases:
248
+ `eval` discovers `evals/**/*.eval.{ts,js}` and runs the selected cases:
375
249
 
376
250
  ```text
377
251
  agent-sdk eval [--dir <path>] [evalId...]
378
252
  [--list] [--tag <tag>]... [--json] [--verbose]
379
253
  [--timeout-ms <n>] [--strict] [--max-concurrency <n>]
380
254
  [--junit <path>] [--artifacts <dir> | --no-artifacts]
381
- [--skip-report] [--out <file.json>] [--no-stream]
255
+ [--skip-report] [--no-stream]
382
256
  [--url <baseUrl>] [--no-wait] [--slug <slug>]
383
257
  ```
384
258
 
385
259
  Select an exact case such as `weather/nyc`, a file prefix such as `weather`,
386
- several IDs, or no IDs for every case. Repeat `--tag` for OR matching. To run
387
- an eval whose ID is a subcommand word (`list`, `get`, `cancel`), put it after
388
- `--`, as in `agent-sdk eval -- list`. Projects must provide
389
- `evals/evals.config.{ts,js}` with `maxConcurrency` between 1 and 200.
260
+ several IDs, or none for every case. Put an ID that is also a subcommand word
261
+ after `--`, as in `agent-sdk eval -- list`. The project needs an
262
+ [eval configuration](/docs/reference/evals.md#eval-configuration).
390
263
 
391
- | Option | Contract |
392
- | --- | --- |
393
- | `--list` | List matching cases without running them. `--list --json` prints an array. |
394
- | `--tag <tag>` | Select a tag. Repeat the option for OR matching. |
395
- | `--json` | Print `{ ok, passed, failed, scored, skipped, strict, results }`. |
396
- | `--verbose` | Stream `t.log` lines and reply snippets. |
397
- | `--no-stream` | Hide live progress on stderr. |
398
- | `--strict` | Treat a scored case below its soft threshold as a failure. |
399
- | `--max-concurrency <n>` | Override `maxConcurrency` from the eval config for an ephemeral local run. |
400
- | `--timeout-ms <n>` | Override the per-case timeout. A case timeout takes precedence, followed by this option, the config timeout, and the 180-second default. |
401
- | `--junit <path>` | Write JUnit XML for an ephemeral local run. |
402
- | `--artifacts <dir>` | Select the artifact directory for an ephemeral local run. The default is a timestamped directory under the project's state directory. |
403
- | `--no-artifacts` | Skip artifacts for an ephemeral local run. |
404
- | `--skip-report` | Ignore reporters from eval files and the eval config during an ephemeral local run. |
405
- | `--out <file.json>` | Also write the full result JSON. |
406
- | `--no-wait` | Return after a running server accepts the batch. |
407
-
408
- A running server prints its Eval ID when it accepts the batch.
409
- Use these commands to inspect or cancel it:
264
+ `--strict` fails a scored case below its soft threshold. The command exits `1`
265
+ for failed cases and `2` for invalid options or no matching cases. A running
266
+ server prints an Eval ID when it accepts the batch, and `--no-wait` returns at
267
+ that point. These commands require `--url`:
410
268
 
411
269
  ```text
412
270
  agent-sdk eval list --url <baseUrl> [--limit <n>] [--page-token <token>]
413
- agent-sdk eval get <evalId> --url <baseUrl> [--out <file.json>]
271
+ agent-sdk eval get <evalId> --url <baseUrl>
414
272
  agent-sdk eval cancel <evalId> --url <baseUrl>
415
273
  ```
416
274
 
417
- `eval list` lists recent remote runs. `eval get` exits `3` (`pending`) while
418
- the batch still runs. All three require `--url`.
275
+ `eval get` exits `3` while the batch runs and `1` when it failed or was
276
+ cancelled.
419
277
 
420
278
  ## Projects
421
279
 
@@ -426,45 +284,23 @@ agent-sdk init [directory] [--template <name>] [--var id=value]... [--json] [--d
426
284
  agent-sdk init [directory] --from automation:<url-or-uuid> [--dry-run] [--json]
427
285
  ```
428
286
 
429
- Without a directory, `init` prints the setup guide and changes no files. With
430
- a directory, it preserves existing scaffold files, adds missing files,
431
- installs dependencies, and tries to put `agent-sdk` on `PATH`.
432
-
433
- | Option | Contract |
434
- | --- | --- |
435
- | `--template <name>` | Use a bundled template: `agentic-owners`, `agents-md`, `code-wiki`, `demo`, `security-help`, `security-reviewer`, `thermo-quality-review`, `thermo-review`, `triage-jira`, or `triage-linear`. `triage` selects `triage-linear`. |
436
- | `--var id=value` | Answer a template question without a prompt. Repeat for multiple answers. |
437
- | `--json` | Skip interactive login and skill prompts, then print `{ ok, directory, template, created, skipped, installed, installError, cliOnPath, cliLinkError, next }`. `ok` reflects dependency installation. |
438
- | `--dry-run` | List the files `init` would create. Write and install nothing. |
439
-
440
- On a TTY, templates with questions run their interview before writing files.
441
- `init` also offers to refresh the bundled coding-agent skills and starts login
442
- when the host has no Cursor credential.
287
+ Without a directory, `init` prints the setup guide. With one, it adds missing
288
+ scaffold files, installs dependencies, and tries to put `agent-sdk` on `PATH`.
289
+ On a TTY, it also asks the template's questions and starts login when needed.
443
290
 
444
- `--from grokbot:<recipe.json>` and `--from-grokbot <recipe.json>` exit with
445
- `Grok Bot import was removed.`
291
+ `--template` takes `agentic-owners`, `agents-md`, `code-wiki`, `demo`,
292
+ `security-help`, `security-reviewer`, `thermo-quality-review`, `thermo-review`,
293
+ `triage-jira`, or `triage-linear`. `triage` selects `triage-linear`.
294
+ `--var id=value` answers a template question without a prompt. `--dry-run`
295
+ lists the files without writing them.
446
296
 
447
297
  #### Convert an Automation {#convert-automation}
448
298
 
449
- ```text
450
- agent-sdk init [directory] --from automation:<url-or-uuid> [--dry-run] [--json]
451
- ```
452
-
453
- The input can be a Cursor Automation dashboard URL or its UUID. The output
454
- directory defaults to `./<automation-name>`; a positional directory overrides
455
- it. Generated files don't overwrite
456
- existing paths, and missing scaffold files are added. The following
457
- `npm install` can update lockfiles and run lifecycle scripts from an existing
458
- `package.json`.
459
-
460
- `--json` prints
461
- `{ ok, directory, files, warnings, setupSteps, installed, installError, mcpConnections }`.
462
- Conversion warnings and dependency-install failures remain visible in this
463
- output without failing a completed file conversion. Invalid input,
464
- authentication, export, and file-write failures exit nonzero.
465
-
466
- See [Convert a Cursor Automation](/docs/guides/convert-automation.md) for the
467
- generated project and features that need manual review.
299
+ `--from automation:` takes a Cursor Automation dashboard URL or UUID and
300
+ writes to `./<automation-name>` unless you name a directory. Generated files
301
+ don't overwrite existing paths, but the `npm install` that follows can run
302
+ lifecycle scripts from an existing `package.json`. See
303
+ [Convert a Cursor Automation](/docs/guides/convert-automation.md).
468
304
 
469
305
  ### Migrate an early-alpha project {#migrate}
470
306
 
@@ -473,67 +309,21 @@ agent-sdk migrate [--dir <path>] [--repo <https-url>] [--ref <git-ref>]
473
309
  [--path <agent-path>] [--no-wait] [--json] [--api-key <key>]
474
310
  ```
475
311
 
476
- `migrate` applies only to projects deployed on architecture v1 during the Agent SDK
477
- early alpha. It reads a pushed Git ref, starts a Cursor cloud agent with the
478
- bundled `bdk-migrate-v2` skill, and opens a pull request with the source
479
- changes. The command waits for the pull request by default and never deploys
480
- the project or changes deployment secrets. When it starts an agent, it prints
481
- a checklist for the steps after the first deploy: deploy each agent folder,
482
- create the prod Slack app, unset peer URL secrets, and set secrets a new slug
483
- still needs.
484
-
485
- The command prints `Nothing to migrate.` and exits 0 only when `--dir` shows
486
- no migration work. That check looks for a legacy early-alpha package dependency,
487
- `architecture: "v1"`, `bot/storage.ts` or `agent/storage.ts`,
488
- `runtime: "grokbot"`, a literal SCM credential, a `/v1` continuation selector,
489
- an anonymous reminder, and a `*_MCP_URL` peer connection. When any of those is
490
- present, or a project file cannot be read, the command starts the agent. It
491
- does not read the hosted deployment.
492
-
493
- | Option | Contract |
494
- | --- | --- |
495
- | `--dir <path>` | Select the local Agent SDK project. The default is the current directory. |
496
- | `--repo <https-url>` | Select the source repository. The CLI infers the current checkout's origin when possible. |
497
- | `--ref <git-ref>` | Select the pushed ref for the cloud agent. The CLI infers the current branch when possible. |
498
- | `--path <agent-path>` | Select the project path relative to the repository root. The CLI infers it from `--dir` when possible. |
499
- | `--no-wait` | Print the cloud agent URL and return after the agent starts. |
500
- | `--json` | Print a report with `ok`, `status`, `agentId`, and the cloud agent `url`. A completed migration adds `prUrl` and `checklist`. A run with nothing to migrate uses `status: "current"` and `message` (no agent started) or `summary` (the agent reported it). A blocked or failed migration adds its explanation. |
501
- | `--api-key <key>` | Override the Cursor credential. |
502
-
503
- Credential resolution follows the normal order: `--api-key`,
504
- `CURSOR_API_KEY`, `CURSOR_API_KEY_FILE`, `CURSOR_SERVICE_ACCOUNT_KEY`, then
505
- the stored `agent-sdk login` credential. See
506
- [Migrate an early-alpha project](/docs/guides/migrate.md) for detection, pull
507
- request review, and deployment cutover.
312
+ `migrate` applies only to projects that deployed with `architecture: "v1"`
313
+ during the early alpha. It starts a Cursor cloud agent on a pushed Git ref
314
+ with the bundled `agent-sdk-migrate-v2` skill, and the agent opens a pull request
315
+ with the source changes. The command never deploys or changes secrets.
316
+
317
+ With nothing to change, it prints `Nothing to migrate.` and exits `0`, and it exits `1` if the run ends without a pull request. `deploy` refuses a project that sets `architecture: "v1"` and points to `migrate`. See [Migrate an early-alpha project](/docs/guides/migrate.md).
508
318
 
509
319
  ### Install and list coding-agent skills {#skills-install}
510
320
 
511
321
  ```text
512
322
  agent-sdk skills install [--dry-run] [--json]
513
- ```
514
-
515
- The command replaces the installed Agent SDK skills with the package copy and
516
- removes stale bundled skills. `--dry-run` previews the change. `--json` prints
517
- `{ ok, dryRun, directory, firstInstall, skills, removed }`.
518
-
519
- Package installation performs this copy.
520
- Run `agent-sdk skills install` when you need to refresh it.
521
-
522
- Each installed `SKILL.md` records the package release in `metadata.version`.
523
-
524
- ```text
525
323
  agent-sdk skills list [--json [--fields <a,b.c>]] [--limit <n>] [--page-token <token>]
526
324
  ```
527
325
 
528
- `skills list` prints each bundled skill and the version of its installed
529
- copy. `--json` prints `{ items, nextPageToken }`. Each item has `name`,
530
- `description`, `version`, `installedVersion`, and `path`. `installedVersion`
531
- is `null` when the skill is not installed, and `"unknown"` when the installed
532
- copy has no `metadata.version`. When `installedVersion` differs from
533
- `version`, run `agent-sdk skills install`.
534
-
535
- The `bdk-cli` skill holds the rules for agents that run `agent-sdk`: `--json`,
536
- exit codes, `--fields`, `--dry-run`, `--yes`, secrets, and untrusted output.
326
+ Package installation copies the bundled skills, `skills install` replaces the installed copies and removes stale ones, and `skills list` prints each skill's bundled and installed versions. The `agent-sdk-cli` skill teaches agents to run `agent-sdk` safely.
537
327
 
538
328
  ### Inspect a project {#info}
539
329
 
@@ -541,14 +331,9 @@ exit codes, `--fields`, `--dry-run`, `--yes`, secrets, and untrusted output.
541
331
  agent-sdk info [--dir <path>] [--view info|manifest] [--json [--fields <a,b.c>]]
542
332
  ```
543
333
 
544
- Text output lists the model, instructions, tools, skills, extensions,
545
- connections, subagents, channels, schedules, hooks, hosting settings, and
546
- diagnostics. For one unslugged project, `--json` prints its project info
547
- object. For slugged or multi-agent discovery, it prints `{ agents }`.
548
-
549
- `--view manifest` validates one project and prints a summary of its
550
- deployment metadata without a network request. `--json` then prints the full
551
- manifest JSON.
334
+ Text output lists what discovery found, such as tools, channels, and
335
+ diagnostics. `--view manifest` summarizes one project's deployment metadata
336
+ without a network request.
552
337
 
553
338
  ### Validate a project {#validate}
554
339
 
@@ -556,16 +341,11 @@ manifest JSON.
556
341
  agent-sdk validate [--dir <path>]
557
342
  ```
558
343
 
559
- `validate` prints every discovered project's diagnostics and exits nonzero
560
- when any diagnostic has error severity. Use it instead of `info --json` when a
561
- script needs validation status.
562
-
563
- Hosting checks run here too. On architecture v2 (the default), a
564
- `githubChannel` credential or a GitLab or Bitbucket `webhookSecret` written
565
- as a literal or a `() => process.env.NAME` getter is an error whose message
566
- quotes the `{ secretName: "NAME" }` form to use instead. A project that still
567
- sets `architecture: "v1"` gets the same finding as a warning, so run
568
- `validate` before removing the pin to list what the migration must rename.
344
+ `validate` prints every discovered project's diagnostics and exits `1` when
345
+ any diagnostic has error severity. `validate` fails when an SCM webhook secret
346
+ or GitHub credential is a literal or a getter, and the error message shows the
347
+ `{ secretName }` form to use. A project that still sets `architecture: "v1"`
348
+ gets the same finding as a warning.
569
349
 
570
350
  ## Credentials and versions
571
351
 
@@ -577,49 +357,38 @@ agent-sdk whoami [--json]
577
357
  agent-sdk logout
578
358
  ```
579
359
 
580
- | Command | Contract |
581
- | --- | --- |
582
- | `login` | Use a supplied API key, or open browser sign-in and store the resulting dashboard-revocable key in the CLI config directory. `--key-name` labels a browser-created key. |
583
- | `whoami` | Show the active credential and its source. `--json` returns the same identity as JSON. |
584
- | `logout` | Remove the stored credential file. It doesn't revoke the API key; revoke the key in the Cursor dashboard. |
360
+ `login` stores a supplied API key, or opens browser sign-in and stores the key
361
+ it creates. `whoami` shows the active credential and its source. `logout`
362
+ removes the stored credential but doesn't revoke the key, so revoke it in the
363
+ Cursor dashboard.
585
364
 
586
365
  ### Print the version {#version}
587
366
 
588
367
  ```text
589
368
  agent-sdk version [--json]
590
369
  agent-sdk --version
591
- agent-sdk -V
592
370
  ```
593
371
 
594
- Text output is the version number. `--json` prints
595
- `{ name, version }`.
596
-
597
372
  ### Update the CLI {#update}
598
373
 
599
374
  ```text
600
375
  agent-sdk update
601
376
  ```
602
377
 
603
- `update` checks npm's `latest` tag and upgrades a recognized global or project
604
- install with its package manager. If it can't identify an installed copy, it
605
- prints a manual upgrade command instead.
606
-
607
- Published installs check for updates at most once every 24 hours. Set
608
- `AGENT_SERVE_NO_UPDATE_CHECK`, `NO_UPDATE_NOTIFIER`, or `CI` to disable the
609
- automatic warning.
378
+ `update` upgrades a recognized global or project install to npm's `latest`
379
+ tag, or prints a manual upgrade command. Published installs check for updates
380
+ daily unless an [update-check variable](#environment-variables) is set.
610
381
 
611
382
  ## Managed hosting
612
383
 
613
- Every command here that changes a deployment takes `--dry-run`. It runs the
614
- reads (sign-in, team, and deployment checks), then stops at the first request
615
- that would change state and prints that request, with secret values
616
- redacted. Nothing is sent, and the command exits `0`.
384
+ Every command here that changes a deployment takes `--dry-run`, which runs
385
+ the reads, stops at the first change, prints that request with secrets
386
+ redacted, and exits `0`.
617
387
 
618
- `deployment kill`, `deployment cancel-runs`, `deployment delete`,
619
- `deployment rotate-token`, `secret delete`, `image delete`, and
620
- `slack destroy` cannot be undone. On a terminal they ask you to type the
621
- slug or name. Without a terminal, as when an agent runs them, they exit `2`
622
- unless you pass `--yes`.
388
+ `secret delete`, `image delete`, `slack destroy`, and the `deployment`
389
+ commands marked No in the [lifecycle table](#deployment-lifecycle) can't be
390
+ undone. On a terminal they ask you to type the slug or name, and a mismatch
391
+ exits `1`. Without a terminal, they exit `2` unless you pass `--yes`.
623
392
 
624
393
  ### Deploy agents {#deploy}
625
394
 
@@ -629,113 +398,53 @@ agent-sdk deploy [--dir <path>] [--slug <slug> | --all] [--team <id>]
629
398
  [--cursor-events-repo <repo>]... [--no-wait] [--json]
630
399
  ```
631
400
 
632
- Managed hosting requires a team with agent hosting enabled. A team
633
- service-account API key with agent access can deploy.
401
+ Deploying needs a team with agent hosting turned on, and a team service-account key with agent access can deploy. The CLI infers `--repo`, `--ref`, and `--path` from the current checkout, and the repository must use HTTPS.
634
402
 
635
- | Option | Contract |
636
- | --- | --- |
637
- | `--slug <slug>` | Select one project and set its deployment slug. Under a folder of several agents, this deploys that one agent. |
638
- | `--all` | Deploy every child under a folder of several agents. For a folder of v2 agents, print one deploy command for each agent. |
639
- | `--team <id>` | Select the Cursor team. |
640
- | `--repo <https-url>` | Set the source repository. The CLI infers it from the current checkout when possible. HTTPS is required. |
641
- | `--ref <git-ref>` | Set the source Git ref. The CLI infers the current branch when possible. |
642
- | `--path <agent-path>` | Set the project path relative to the repository root. |
643
- | `--cursor-events-repo <repo>` | Watch a repository's Cursor events. Write `owner/name` for GitHub and Origin, `gitlab.com/<group>/<project>` for GitLab (subgroups allowed), or `bitbucket.org/<workspace>/<repo>` for Bitbucket. Repeat the flag for each repository; the repositories you pass replace the previous list. Without the flag, the deployment watches its GitHub source repository. |
644
- | `--no-wait` | Return after the deployment request is accepted. |
645
- | `--json` | Print one object for one target or an array for multiple targets. |
646
-
647
- Deployment slugs contain lowercase letters, digits, `_`, or `-`, start with a
648
- letter or digit, and have at most 64 characters. Egress entries are lowercase
649
- hostnames with an alphabetic top-level domain; one leading `*.` wildcard is
650
- allowed, or a trailing `:port` for a protocol that is not HTTPS, with at most
651
- 64 entries.
652
-
653
- By default, `deploy` waits until the deployment is running and exits nonzero
654
- if it reaches a failed state. A first deployment can return an alias token
655
- once. Store it as a secret and send it as `X-Agent-Alias-Token` when calling
656
- the stable alias URL.
657
-
658
- When the team egress policy blocks a host, `deploy` exits nonzero and prints
659
- `Error: agent-sdk deploy blocked.` The message names each blocked host, the team
660
- egress mode, and two fixes: add the hosts to the team egress list, or remove
661
- them from `hosting.egressDomains` and deploy again. The running bot does not
662
- change.
663
-
664
- An agent that sets `architecture: "v1"` does not deploy: `deploy` exits
665
- nonzero and tells you to run [`migrate`](#migrate) first.
666
-
667
- ### List deployments {#deployment-list}
403
+ `deploy` deploys one agent. On a folder of several agents, pass `--slug` to
404
+ pick one. `--all`, or picking several agents, prints one
405
+ `agent-sdk deploy --dir` command per agent and exits `1`.
668
406
 
669
- ```text
670
- agent-sdk deployment list [--team <id>] [--limit <n>] [--page-token <token>]
671
- [--json [--fields <a,b.c>]]
672
- ```
407
+ `--cursor-events-repo` sets the repositories whose Cursor events the
408
+ deployment receives. Write `owner/name` for GitHub,
409
+ `gitlab.com/<group>/<project>` for GitLab, or
410
+ `bitbucket.org/<workspace>/<repo>` for Bitbucket. A GitLab path can include
411
+ subgroups. Repeat the flag once per repository. Each deploy replaces the whole list. Without the flag, the deployment watches its GitHub
412
+ source repository.
673
413
 
674
- Text output shows slug, status, and update time. `--json` prints
675
- `{ items, nextPageToken }`. `--limit` (default 20, at most 100) sets the page
676
- size, and `--page-token` reads the next page. An empty list succeeds.
414
+ `deploy` waits until the deployment runs and exits nonzero if it fails, unless
415
+ you pass `--no-wait`. The first deploy of a slug can print an alias token
416
+ once. Slugs use lowercase letters, digits, `_`, and `-`, start with a letter
417
+ or digit, and have at most 64 characters. See [Deployment](/docs/deployment.md)
418
+ for egress hosts and the alias token.
677
419
 
678
- ### Inspect a deployment {#deployment-get}
420
+ ### Inspect deployments {#deployment-list}
679
421
 
680
422
  ```text
423
+ agent-sdk deployment list [--team <id>] [--limit <n>] [--page-token <token>]
424
+ [--json [--fields <a,b.c>]]
681
425
  agent-sdk deployment get <slug> [--team <id>] [--json [--fields <a,b.c>]] [--web]
682
426
  ```
683
427
 
684
- Text output includes status, release, watched repositories, routes, secret
685
- names, and the latest error. `--web` opens the deployment's page in
686
- [Deployed Agents](https://cursor.com/dashboard/deployed-agents). A deployment still on architecture v1 shows its status with
687
- `architecture: v1` and the [`migrate`](#migrate) steps; `deployment stop` and
688
- `deployment delete` also still accept it.
689
-
690
- ### Stop a deployment {#deployment-stop}
691
-
692
- ```text
693
- agent-sdk deployment stop <slug> [--team <id>] [--no-wait] [--cancel-runs] [--json]
694
- ```
695
-
696
- The command waits for `stopped` by default. `--no-wait` returns after the
697
- request is accepted. `--cancel-runs` also requests cancellation of active
698
- runs and reminder wakes.
699
-
700
- ### Start a deployment {#deployment-start}
701
-
702
- ```text
703
- agent-sdk deployment start <slug> [--team <id>] [--json]
704
- ```
705
-
706
- `deployment start` resumes a stopped deployment. It doesn't remove the
707
- deploy lock that [`deployment kill`](#deployment-kill) sets.
708
-
709
- ### Kill a deployment {#deployment-kill}
710
-
711
- ```text
712
- agent-sdk deployment kill <slug> [--team <id>] [--yes] [--dry-run] [--json]
713
- ```
714
-
715
- Use `deployment kill` in an emergency. It locks deploys of the slug, stops
716
- the deployment, and requests cancellation of its active runs and reminder
717
- wakes. To bring the deployment back, run
718
- [`deployment unlock`](#deployment-unlock) and then
719
- [`deployment start`](#deployment-start).
428
+ `deployment list` shows each deployment's slug, status, and update time, and `deployment get` adds the release, watched repositories, routes, secret names, and latest error. `--web` opens the deployment in [Deployed Agents](https://cursor.com/dashboard/deployed-agents), and an early-alpha deployment shows the steps to migrate it.
720
429
 
721
- ### Unlock deploys {#deployment-unlock}
430
+ ### Change a deployment {#deployment-lifecycle}
722
431
 
723
432
  ```text
724
- agent-sdk deployment unlock <slug> [--team <id>] [--json]
433
+ agent-sdk deployment <command> <slug> [--team <id>] [--json] [--dry-run]
725
434
  ```
726
435
 
727
- `deployment unlock` removes the lock that `deployment kill` sets, so
728
- `deploy`, `deployment upgrade`, and `deployment rollback` work for the slug
729
- again. It doesn't resume traffic; run `deployment start` for that.
730
-
731
- ### Cancel active runs {#deployment-cancel-runs}
732
-
733
- ```text
734
- agent-sdk deployment cancel-runs <slug> [--team <id>] [--yes] [--dry-run] [--json]
735
- ```
736
-
737
- The command requests cancellation for a deployment's active runs and reminder
738
- wakes. It exits nonzero if any cancellation request fails to start.
436
+ | Command | What it does | Undoable? |
437
+ | --- | --- | --- |
438
+ | `stop` | Stop the deployment. `--cancel-runs` also cancels active runs and reminder wakes. | Yes |
439
+ | `start` | Resume a stopped deployment. A kill lock stays. | Yes |
440
+ | `kill` | Lock deploys, stop the deployment, and cancel its runs and reminder wakes. To recover, run `unlock` and then `start`. | No |
441
+ | `unlock` | Remove the kill lock so deploys, upgrades, and rollbacks work again. Traffic stays stopped. | Yes |
442
+ | `cancel-runs` | Cancel active runs and reminder wakes. | No |
443
+ | `update` | Replace the [event repositories](#deployment-update). | Yes |
444
+ | `upgrade` | Move to a ready release, the newest unless you pass `--release`. | Yes |
445
+ | `rollback` | Move to an earlier ready release, the previous one unless you pass `--release`. | Yes |
446
+ | `delete` | Remove the deployment and free its slug. | No |
447
+ | `rotate-token` | Replace the alias token. The old one stops working at once. | No |
739
448
 
740
449
  ### Replace event repositories {#deployment-update}
741
450
 
@@ -744,48 +453,8 @@ agent-sdk deployment update <slug> (--event-repo <owner/name>... | --no-event-re
744
453
  [--team <id>] [--dry-run] [--json]
745
454
  ```
746
455
 
747
- The supplied repositories replace the deployment's complete event repository
748
- list; they aren't merged with the previous list. `--no-event-repos` clears
749
- the list.
750
-
751
- ### Upgrade a deployment {#deployment-upgrade}
752
-
753
- ```text
754
- agent-sdk deployment upgrade <slug> [--release <id-or-version>]
755
- [--team <id>] [--json]
756
- ```
757
-
758
- `--release` accepts a release ID or version. Omit it to select the newest
759
- ready release. `--json` prints `{ releaseId }`.
760
-
761
- ### Roll back a deployment {#deployment-rollback}
762
-
763
- ```text
764
- agent-sdk deployment rollback <slug> [--release <id-or-version>]
765
- [--team <id>] [--json]
766
- ```
767
-
768
- `deployment rollback` moves the deployment to an earlier ready release without
769
- building a new one. Omit `--release` to select the release before the
770
- current one. `--json` prints `{ releaseId }`.
771
-
772
- ### Delete a deployment {#deployment-delete}
773
-
774
- ```text
775
- agent-sdk deployment delete <slug> [--team <id>] [--no-wait] [--yes] [--dry-run] [--json]
776
- ```
777
-
778
- `deployment delete` removes the deployment and frees its slug. It waits until the
779
- deployment is gone unless `--no-wait` is set.
780
-
781
- ### Rotate an alias token {#deployment-rotate-token}
782
-
783
- ```text
784
- agent-sdk deployment rotate-token <slug> [--team <id>] [--yes] [--dry-run] [--json]
785
- ```
786
-
787
- The old token stops working immediately. The replacement appears once;
788
- `--json` prints `{ aliasToken }`.
456
+ The repositories you pass replace the deployment's whole event repository
457
+ list, and `--no-event-repos` clears it.
789
458
 
790
459
  ### Manage deployment secrets {#secret}
791
460
 
@@ -796,44 +465,15 @@ agent-sdk secret list <slug> [--team <id>] [--limit <n>] [--page-token <token>]
796
465
  agent-sdk secret delete <slug> NAME [--team <id>] [--yes] [--dry-run] [--json]
797
466
  ```
798
467
 
799
- Pass secret names to `set`. On a TTY, the CLI prompts for a hidden value and
800
- ends that value at the first newline. With one name, redirected stdin is the
801
- whole value and one trailing newline is removed, so a PEM private key keeps
802
- its line breaks:
468
+ On a TTY, `secret set` prompts for each hidden value. With one name,
469
+ redirected stdin is the whole value minus one trailing newline, so a PEM key
470
+ keeps its line breaks:
803
471
 
804
472
  ```bash
805
473
  agent-sdk secret set my-bot GITHUB_APP_PRIVATE_KEY < ./app.private-key.pem
806
474
  ```
807
475
 
808
- With several names, provide one line per name. `set` rejects `NAME=VALUE` on
809
- the command line unless `--from-argv` is set, because those values can enter
810
- shell history and captured terminals.
811
-
812
- Names use `UPPER_SNAKE_CASE`, start with a letter, and contain at most 64
813
- characters. Names beginning with `CURSOR_` are reserved. Values contain at
814
- most 4096 bytes, and each deployment holds at most 32 secrets.
815
-
816
- `list` returns names and creation times, never values. JSON output is
817
- `{ secretNames }` for `set`, `{ items, nextPageToken }` for `list`, and
818
- `{ removed }` for `delete`. Changes are available to subsequent hosted work.
819
-
820
- ### Manage container images {#image}
821
-
822
- ```text
823
- agent-sdk image push <local-image> --name <name> [--team <id>] [--json]
824
- agent-sdk image list [--team <id>] [--limit <n>] [--page-token <token>] [--json]
825
- agent-sdk image delete <name> [--team <id>] [--yes] [--dry-run] [--json]
826
- ```
827
-
828
- A persistent agent can run inside a container image that your team pushes
829
- and names in `hosting.image`. `push` needs Docker on your machine. It
830
- checks the local image first: the image must be `linux/amd64` and have
831
- `bash`, `git`, `node` 22.13 or newer, and `npm` on `PATH`. The command
832
- then compresses the image and uploads it under `--name`.
833
-
834
- `list` shows the team's images and how many the team can keep (`--json`:
835
- `{ items, nextPageToken, teamImageLimit }`), and `delete` deletes one image. A deploy pins the image it uses, so after you push a
836
- new image under the same name, deploy again to pick it up.
476
+ With several names, give one line per name. `set` rejects `NAME=VALUE` arguments unless you pass `--from-argv`, because shell history keeps them. Names use `UPPER_SNAKE_CASE`, and the `CURSOR_` prefix is reserved. `secret list` returns names, never values.
837
477
 
838
478
  ## MCP connections
839
479
 
@@ -846,13 +486,10 @@ agent-sdk mcp install --url <baseUrl> [--bearer-token <token>]
846
486
  [--name <server-name>] [--dry-run] [--json]
847
487
  ```
848
488
 
849
- | Command | Contract |
850
- | --- | --- |
851
- | `mcp serve` | Read newline-delimited JSON-RPC from stdin and proxy it to the selected agent's MCP endpoint. stdout is reserved for MCP messages. A target is required. |
852
- | `mcp install` | Add the selected agent to `~/.cursor/mcp.json`. The entry runs `agent-sdk mcp`, which older CLI versions also understand. `--name` sets the server name, `--dry-run` previews the entry, and `--json` prints a machine-readable result. A `--url` entry with `--bearer-token` contains that token; handle printed and written copies as credentials. |
853
-
854
- Hosted deployments don't support `mcp serve` or `mcp install`; both exit with a
855
- usage error when you pass `--prod`.
489
+ `mcp serve` proxies newline-delimited JSON-RPC from stdin to the agent's MCP
490
+ endpoint and reserves stdout for MCP messages. `mcp install` adds the agent to
491
+ `~/.cursor/mcp.json`. An entry made with `--bearer-token` contains that token,
492
+ so treat every printed or written copy as a credential.
856
493
 
857
494
  ### Authorize MCP OAuth {#mcp-oauth}
858
495
 
@@ -862,17 +499,10 @@ agent-sdk mcp oauth <connection> [--dir <path>]
862
499
  ```
863
500
 
864
501
  `<connection>` is the basename under `bot/mcp-connections/` or
865
- `bot/host-connections/`.
866
-
867
- | Connection | Result |
868
- | --- | --- |
869
- | `defineConnection({ url, oauth: true })` | Open a browser PKCE flow and save tokens in `mcp-auth.json` under the CLI config directory. |
870
- | `defineConnection({ cursorAccount: true })` | Exits nonzero and points at the cursor.com dashboard, where you authorize the deployment's connectors. |
871
-
872
- URL-connection tokens are bound to the resource URL; authorize again after
873
- changing it.
874
-
875
- See [Host MCP OAuth](/docs/guides/mcp-oauth.md) for the full setup flow.
502
+ `bot/host-connections/`. A `url` connection with `oauth: true` opens a browser
503
+ PKCE flow and saves tokens bound to that URL, so authorize again after you
504
+ change it. A `cursorAccount` connection exits nonzero and points to the
505
+ cursor.com dashboard. See [Host MCP OAuth](/docs/guides/mcp-oauth.md).
876
506
 
877
507
  ## Channel helpers
878
508
 
@@ -896,24 +526,13 @@ agent-sdk slack doctor [--dir <path>]
896
526
  [--prefix <prefix> | --no-prefix] [--channel <id>]... [--json]
897
527
  ```
898
528
 
899
- | Subcommand | Contract |
900
- | --- | --- |
901
- | `setup` | Print the setup choices without changing files. |
902
- | `create` | Open the signed-in [Deployed Agents](https://cursor.com/dashboard/deployed-agents) wizard, write the resulting token pair to `.env.local`, and run `doctor`. The development app is the default; `--env prod` selects production. A second create overwrites the live app manifest. |
903
- | `destroy` | Delete the provisioned app. Existing local token entries remain but stop working. |
904
- | `icon` | Set an HTTPS or local PNG, JPG, or GIF icon of at most 512 KB. |
905
- | `init --manual` | Write the channel, manifests, Slack CLI project, and setup files for a manually managed app. |
906
- | `manifest` | Generate Slack manifests. `--env` defaults to `both`; with `--dry-run`, select one environment when you need one JSON document. |
907
- | `doctor` | Check both tokens, Socket Mode connectivity, Slack authentication, and any repeatable `--channel` values. |
908
-
909
- The default token prefix is the project directory name normalized to upper
910
- snake case. `--no-prefix` uses `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`.
911
- Channel-post subscriptions are off by default; `--channel-posts` adds message
912
- events for public and private channels as required by
913
- `engagement.channelPosts`.
914
- Multi-agent servers need one token pair per agent.
915
-
916
- See [Slack](/docs/guides/slack.md) for app consent and manual setup.
529
+ `slack create` opens the
530
+ [Deployed Agents](https://cursor.com/dashboard/deployed-agents) wizard, writes
531
+ the token pair to `.env.local`, and runs `doctor`, which checks both tokens and
532
+ Socket Mode. It makes the development app unless you pass `--env prod`. The
533
+ token prefix defaults to the project directory name in upper snake case.
534
+ `--channel-posts` adds the message events that `engagement.channelPosts`
535
+ needs. See [Slack](/docs/guides/slack.md) for manual setup.
917
536
 
918
537
  ### Test GitHub webhooks {#github}
919
538
 
@@ -931,165 +550,81 @@ agent-sdk github events [--dir <path>] [--host <host>] [--port <n>] [--json]
931
550
  agent-sdk github doctor [--install] [--json]
932
551
  ```
933
552
 
934
- | Subcommand | Contract |
935
- | --- | --- |
936
- | `forward` | Forward live deliveries with `gh webhook forward`. The CLI derives URLs and events from discovered channels and can fan out to several matches. |
937
- | `replay` | Read a pull request, synthesize selected webhook payloads, and post them to matching channels. The default event is `pull_request`; `'*'` selects the channel's supported declared events. |
938
- | `events` | List discovered channel URLs and event sets. No channels is a successful empty result. |
939
- | `doctor` | Check the GitHub CLI, its login, and the pinned webhook extension. `--install` installs or repairs the extension. |
940
-
941
- Replay supports `pull_request`, `issue_comment`,
942
- `pull_request_review_comment`, `check_run`, `check_suite`, `workflow_run`, and
943
- `status`. `--dry-run` prints without posting. `--fixtures-dir` writes fixtures and
944
- still posts unless combined with `--dry-run`.
553
+ `forward` sends live deliveries to discovered channels through `gh webhook forward`. It needs repository admin access, or organization owner access for `--org`, and it uses the GitHub CLI's own login, so unset `GITHUB_TOKEN` and `GH_TOKEN` first. `doctor` checks the GitHub CLI and its webhook extension.
945
554
 
946
- Forwarding requires repository admin access, or organization owner access for
947
- `--org`. It uses the GitHub CLI's stored login; unset `GITHUB_TOKEN` and
948
- `GH_TOKEN` before forwarding. Replay needs only pull-request read access.
555
+ `replay` reads a pull request with read access, builds webhook payloads, and
556
+ posts them to matching channels. Its events are `pull_request`, the default,
557
+ `issue_comment`, `pull_request_review_comment`, `check_run`, `check_suite`,
558
+ `workflow_run`, and `status`. `--dry-run` prints the payloads without posting,
559
+ and `--fixtures-dir` also writes them as fixtures. See
560
+ [GitHub](/docs/guides/github.md) for channel setup.
949
561
 
950
- See [GitHub](/docs/guides/github.md) for channel setup and live delivery.
951
-
952
- ### Test GitLab webhooks {#gitlab}
562
+ ### Test GitLab, Bitbucket, and PagerDuty webhooks {#replay-other-webhooks}
953
563
 
954
564
  ```text
955
- agent-sdk gitlab replay <mr-url-or-group/project!N>
956
- [--events a,b,c | '*'] [--action <action>]
957
- [--conclusion <status>] [--comment <body>]
958
- [--dir <path>] [--slug <slug>] [--channel <id>]
959
- [--url <url>] [--host <host>] [--port <n>]
960
- [--secret <secret>] [--dry-run] [--fixtures-dir <dir>] [--json]
961
- agent-sdk gitlab events [--dir <path>] [--host <host>] [--port <n>] [--json]
962
- agent-sdk gitlab forward [--dir <path>] [--host <host>] [--port <n>]
565
+ agent-sdk gitlab replay <mr-url-or-group/project!N> [replay flags]
566
+ agent-sdk bitbucket replay <pr-url-or-workspace/repo#N> [replay flags]
567
+ agent-sdk pagerduty replay [incident-id] [replay flags]
568
+ agent-sdk <gitlab|bitbucket|pagerduty> events [--dir <path>] [--json]
569
+ agent-sdk <gitlab|bitbucket> forward [--dir <path>]
963
570
  ```
964
571
 
965
- | Subcommand | Contract |
966
- | --- | --- |
967
- | `replay` | Read a merge request, synthesize selected webhook payloads, and post them to matching channels. The default event is `merge_request`; `'*'` selects the channel's declared events. |
968
- | `events` | List discovered GitLab channel URLs and object kinds. |
969
- | `forward` | Print the public-hook and tunnel recipe for live deliveries. |
572
+ Replay takes the same flags as `github replay`, including `--fixtures-dir`. `events` lists the discovered channels, and `forward` prints the webhook and tunnel recipe for live deliveries.
970
573
 
971
- Replay supports `merge_request`, `note`, `pipeline`, and `push`. It requires
972
- `GITLAB_TOKEN` with project read access. `--secret` defaults to
973
- `GITLAB_WEBHOOK_SECRET`; `--dry-run` and `--fixtures-dir` follow the GitHub replay
974
- contract.
574
+ | Command | Replay events | Default event | Read credential | `--secret` default |
575
+ | --- | --- | --- | --- | --- |
576
+ | `gitlab replay` | `merge_request`, `note`, `pipeline`, `push` | `merge_request` | `GITLAB_TOKEN` | `GITLAB_WEBHOOK_SECRET` |
577
+ | `bitbucket replay` | `pullrequest:created`, `pullrequest:updated`, `pullrequest:comment_created`, `repo:push`, in Cloud or Data Center format | `pullrequest:created` | `BITBUCKET_TOKEN` | `BITBUCKET_WEBHOOK_SECRET` |
578
+ | `pagerduty replay` | `incident.triggered`, `.acknowledged`, `.annotated`, `.escalated`, `.resolved`, `.reopened` | `incident.triggered` | None | `PAGERDUTY_WEBHOOK_SECRET` |
975
579
 
976
- See [GitLab](/docs/guides/gitlab.md) for channel setup and self-managed hosts.
580
+ PagerDuty replay's incident ID defaults to `PREPLAY1`, and `--comment` is the
581
+ note body for `annotated`. Without a secret, its deliveries are unsigned, and
582
+ `agent-sdk dev` admits them from loopback. See [GitLab](/docs/guides/gitlab.md),
583
+ [Bitbucket](/docs/guides/bitbucket.md), and [PagerDuty](/docs/guides/pagerduty.md)
584
+ for channel setup.
977
585
 
978
- ### Test Bitbucket webhooks {#bitbucket}
586
+ ## Environment variables {#environment-variables}
979
587
 
980
- ```text
981
- agent-sdk bitbucket replay <pr-url-or-workspace/repo#N>
982
- [--events a,b,c | '*'] [--comment <body>]
983
- [--dir <path>] [--slug <slug>] [--channel <id>]
984
- [--url <url>] [--host <host>] [--port <n>]
985
- [--secret <secret>] [--dry-run] [--fixtures-dir <dir>] [--json]
986
- agent-sdk bitbucket events [--dir <path>] [--host <host>] [--port <n>] [--json]
987
- agent-sdk bitbucket forward [--dir <path>] [--host <host>] [--port <n>]
988
- ```
989
-
990
- | Subcommand | Contract |
991
- | --- | --- |
992
- | `replay` | Read a pull request, synthesize webhook payloads in the host's Cloud or Data Center format, and post them to matching channels. |
993
- | `events` | List discovered Bitbucket channel URLs and event keys. |
994
- | `forward` | Print the repository-hook and tunnel recipe for live deliveries. |
995
-
996
- Replay supports `pullrequest:created`, `pullrequest:updated`,
997
- `pullrequest:comment_created`, and `repo:push`, along with their supported Data
998
- Center forms. It requires `BITBUCKET_TOKEN` with pull-request read access.
999
- `--secret` defaults to `BITBUCKET_WEBHOOK_SECRET`; `--dry-run` and `--out`
1000
- follow the GitHub replay contract.
1001
-
1002
- See [Bitbucket](/docs/guides/bitbucket.md) for Cloud and Data Center setup.
1003
-
1004
- ### Test PagerDuty webhooks {#pagerduty}
1005
-
1006
- ```text
1007
- agent-sdk pagerduty replay [incident-id]
1008
- [--events a,b,c | '*'] [--comment <body>]
1009
- [--dir <path>] [--slug <slug>] [--channel <id>]
1010
- [--url <url>] [--host <host>] [--port <n>]
1011
- [--secret <secret>] [--dry-run] [--fixtures-dir <dir>] [--json]
1012
- agent-sdk pagerduty events [--dir <path>] [--host <host>] [--port <n>] [--json]
1013
- ```
1014
-
1015
- | Subcommand | Contract |
1016
- | --- | --- |
1017
- | `replay` | Synthesize v3 webhook bodies for one incident and post them, in order, to matching channels. The default event is `incident.triggered`; `'*'` selects every declared event replay supports. |
1018
- | `events` | List discovered PagerDuty channel URLs and event types. |
1019
-
1020
- Replay supports `incident.triggered`, `.acknowledged`, `.annotated`,
1021
- `.escalated`, `.resolved`, and `.reopened`, by full name or by action alone
1022
- (`resolved`). It needs no PagerDuty account. The incident id defaults to
1023
- `PREPLAY1`, and `--comment` is the note body for `annotated`. `--secret`
1024
- defaults to `PAGERDUTY_WEBHOOK_SECRET`, signing with its first line when it
1025
- lists several; without either the deliveries are unsigned, which `agent-sdk dev`
1026
- admits from loopback. `--dry-run` and `--out`
1027
- follow the GitHub replay contract.
1028
-
1029
- See [PagerDuty](/docs/guides/pagerduty.md) for channel setup.
1030
-
1031
- ## Environment variables
1032
-
1033
- Credential resolution follows this order: `--api-key`, `CURSOR_API_KEY`,
1034
- `CURSOR_API_KEY_FILE`, `CURSOR_SERVICE_ACCOUNT_KEY`, then the stored login.
588
+ The CLI tries `--api-key`, `CURSOR_API_KEY`, `CURSOR_API_KEY_FILE`,
589
+ `CURSOR_SERVICE_ACCOUNT_KEY`, then the stored `agent-sdk login` credential, in
590
+ that order.
1035
591
 
1036
592
  | Variable | Contract |
1037
593
  | --- | --- |
1038
594
  | `CURSOR_API_KEY` | Cursor credential. |
1039
595
  | `CURSOR_API_KEY_FILE` | Path to a Cursor credential file. |
1040
- | `CURSOR_SERVICE_ACCOUNT_KEY` | Team service-account credential used after the API key and key-file sources. |
596
+ | `CURSOR_SERVICE_ACCOUNT_KEY` | Team service-account credential. |
1041
597
  | `CURSOR_API_BASE_URL` | Backend for login, account, deployment, and event commands. |
1042
- | `CURSOR_BACKEND_URL` | Backend for Agent SDK turns. Set it with `CURSOR_API_BASE_URL` when using a non-default backend. |
1043
- | `AGENT_SERVE_CONFIG_DIR` | Override the CLI config directory for stored credentials and update state. |
1044
- | `AGENT_SERVE_NO_UPDATE_CHECK`, `NO_UPDATE_NOTIFIER`, `CI` | Disable published-version checks when set to a non-empty value other than `0`. |
1045
- | `GITHUB_WEBHOOK_SECRET` | Default signature secret for GitHub forwarding and replay. |
598
+ | `CURSOR_BACKEND_URL` | Backend for agent turns. Set it with `CURSOR_API_BASE_URL` for a non-default backend. |
599
+ | `AGENT_SERVE_CONFIG_DIR` | CLI config directory for stored credentials and update state. |
600
+ | `AGENT_SERVE_NO_UPDATE_CHECK`, `NO_UPDATE_NOTIFIER`, `CI` | Turn off update checks when set to a value other than `0`. |
601
+ | `GITHUB_WEBHOOK_SECRET` | Default secret for GitHub forwarding and replay. |
1046
602
  | `GITHUB_APP_ID`, `GITHUB_APP_PRIVATE_KEY`, `GITHUB_APP_INSTALLATION_ID` | GitHub App credentials for outbound API calls. |
1047
- | `GITHUB_TOKEN`, `GH_TOKEN` | Token credentials for outbound GitHub calls. Unset both for `github forward`. |
1048
- | `GITLAB_TOKEN` | Token for GitLab API reads and direct channel calls. |
1049
- | `GITLAB_API_BASE_URL` | Override the GitLab REST base URL for self-managed hosts. |
1050
- | `GITLAB_WEBHOOK_SECRET` | Default GitLab webhook token for replay and channel verification. |
1051
- | `BITBUCKET_TOKEN` | Token for Bitbucket API reads and direct channel calls. |
1052
- | `BITBUCKET_API_BASE_URL` | Override the Bitbucket Data Center REST base URL. |
1053
- | `BITBUCKET_WEBHOOK_SECRET` | Default Bitbucket signing secret for replay and channel verification. |
603
+ | `GITHUB_TOKEN`, `GH_TOKEN` | Tokens for outbound GitHub calls. |
604
+ | `GITLAB_TOKEN`, `GITLAB_WEBHOOK_SECRET` | GitLab API token and default webhook token. |
605
+ | `GITLAB_API_BASE_URL` | GitLab REST base URL for self-managed hosts. |
606
+ | `BITBUCKET_TOKEN`, `BITBUCKET_WEBHOOK_SECRET` | Bitbucket API token and default signing secret. |
607
+ | `BITBUCKET_API_BASE_URL` | Bitbucket Data Center REST base URL. |
1054
608
  | `SLACK_BOT_TOKEN`, `SLACK_APP_TOKEN` | Slack tokens for one agent. Multi-agent servers use `<PREFIX>_SLACK_BOT_TOKEN` and `<PREFIX>_SLACK_APP_TOKEN`. |
1055
609
 
1056
610
  ## Exit status
1057
611
 
1058
- Every command uses one exit code table. `agent-sdk help` prints it, and
1059
- `agent-sdk help --json` includes it as `exitCodes`.
612
+ Every command uses these exit codes, and `agent-sdk help --json` lists them
613
+ as `exitCodes`.
1060
614
 
1061
615
  | Code | Meaning |
1062
616
  | --- | --- |
1063
- | `0` | ok |
1064
- | `1` | failed (also `aborted`, `invalid_argument`, `rate_limited`, `unavailable`) |
1065
- | `2` | usage: bad command, flag, or argument |
1066
- | `3` | pending: the work is still running |
617
+ | `0` | `ok` |
618
+ | `1` | `failed`, `aborted`, `invalid_argument`, `rate_limited`, or `unavailable` |
619
+ | `2` | `usage`, for a bad command, flag, or argument |
620
+ | `3` | `pending`, while the work still runs |
1067
621
  | `4` | `not_found` |
1068
622
  | `5` | `unauthenticated` or `permission_denied` |
1069
623
  | `6` | `conflict` or `failed_precondition` |
1070
624
 
1071
- | Command | Nonzero contract |
1072
- | --- | --- |
1073
- | No command | Print the command index and exit `0`. An unknown command exits `2`. |
1074
- | `run` | For local and running-server trajectories, exit `1` when the trajectory fails. |
1075
- | `tool call` | Exit `1` unless the response succeeds with `ok: true`. |
1076
- | `session get --file` | Exit `1` when the reconstructed trajectory failed. |
1077
- | `session create --wait` | Exit `3` when the delivery names no session before `--timeout-ms`, and `1` when it was skipped or failed. |
1078
- | `eval` | Exit `1` for failed cases, or scored cases below threshold with `--strict`; exit `2` for invalid eval options or an execution with no matching cases. An empty `--list` succeeds. |
1079
- | `eval get` | Exit `3` while the batch runs, `1` when it failed or was cancelled, and `2` for invalid usage. |
1080
- | `chat`, `session get` | Exit `2` for documented option conflicts or missing required input. |
1081
- | `validate` | Exit `1` when any project diagnostic has error severity. |
1082
- | Commands that cannot be undone | Exit `2` without `--yes` when there is no terminal to ask on. Exit `1` (`aborted`) when the typed confirmation does not match. |
1083
- | Any command with `--dry-run` | Exit `0` after printing what it would do, unless a check before the first change fails. |
1084
- | `init --from automation:…` | Exit `1` for invalid input, authentication, export, or file-write failure. Warnings and dependency-install failure don't change a successful conversion exit. |
1085
- | `migrate` | Exit `0` when nothing needs a migration, after starting with `--no-wait`, or after the agent opens a pull request. Exit `1` for invalid input, authentication or agent failure, or a completed run without a pull request. |
1086
- | Other commands | Exit nonzero when validation, authentication, a request, or the requested operation fails. |
1087
-
1088
625
  ## Related
1089
626
 
1090
627
  - [Project layout](/docs/reference/project-layout.md)
1091
628
  - [Sessions, events, and streaming](/docs/reference/sessions.md)
1092
- - [Evals](/docs/reference/evals.md)
1093
- - [HTTP API](/docs/reference/http-api.md)
1094
629
  - [Deployment](/docs/deployment.md)
1095
630
  - [Early-alpha migration](/docs/guides/migrate.md)