@grok/agent-sdk 0.2.28 → 0.3.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 (528) hide show
  1. package/AGENTS.md +29 -29
  2. package/dist/bin/agent-serve.d.ts +2 -2
  3. package/dist/bin/agent-serve.js +3 -3
  4. package/dist/channels/pagerduty/api.js +1 -1
  5. package/dist/channels/pagerduty/pagerduty-channel.d.ts +1 -1
  6. package/dist/channels/pagerduty/pagerduty-channel.d.ts.map +1 -1
  7. package/dist/channels/pagerduty/pagerduty-channel.js +1 -1
  8. package/dist/channels/pagerduty/replay.d.ts +1 -1
  9. package/dist/channels/pagerduty/replay.js +4 -4
  10. package/dist/channels/slack/cli-project.js +1 -1
  11. package/dist/docs/404.html +2 -2
  12. package/dist/docs/assets/{app.DF9vlcdn.js → app.BzTUBOAD.js} +4 -4
  13. package/dist/docs/assets/building-with-agents.md.BqJ7AAjG.js +6 -0
  14. package/dist/docs/assets/{building-with-agents.md.Bf1yH2tG.lean.js → building-with-agents.md.BqJ7AAjG.lean.js} +1 -1
  15. package/dist/docs/assets/changelog.md.BWhC6DET.js +1 -0
  16. package/dist/docs/assets/changelog.md.BWhC6DET.lean.js +1 -0
  17. package/dist/docs/assets/chunks/@localSearchIndexroot.CWxwVoCG.js +1 -0
  18. package/dist/docs/assets/chunks/{VPLocalSearchBox.D8OuwKO0.js → VPLocalSearchBox.DsnRlUT5.js} +1 -1
  19. package/dist/docs/assets/chunks/{arc.DCq_TCYV.js → arc.DH8GOhiv.js} +1 -1
  20. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.PWRNTPbk.js → architectureDiagram-Q4EWVU46.9m9ObyuE.js} +1 -1
  21. package/dist/docs/assets/chunks/{baseUniq.BeRPvRUL.js → baseUniq.BXHpx1lE.js} +1 -1
  22. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.BuRmZVSo.js → blockDiagram-DXYQGD6D.xY3EX59q.js} +1 -1
  23. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.7DKSMwuv.js → c4Diagram-AHTNJAMY.DnqgMVgc.js} +1 -1
  24. package/dist/docs/assets/chunks/channel.Cctv0f7X.js +1 -0
  25. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.7VrO9-9i.js → chunk-4BX2VUAB.BjFxK2A3.js} +1 -1
  26. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.CHystNE2.js → chunk-4TB4RGXK.BujS_Spt.js} +1 -1
  27. package/dist/docs/assets/chunks/{chunk-55IACEB6.Nuh9TbTq.js → chunk-55IACEB6.YbTjhdaM.js} +1 -1
  28. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.CA0EKugm.js → chunk-EDXVE4YY.DnQ8t4GC.js} +1 -1
  29. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.F9_mp7U8.js → chunk-FMBD7UC4.B67AwAmj.js} +1 -1
  30. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CEU4QfE1.js → chunk-OYMX7WX6.DrZIAFOm.js} +1 -1
  31. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.B8h_x9_i.js → chunk-QZHKN3VN.BLmmydkn.js} +1 -1
  32. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.Btfb-rKg.js → chunk-YZCP3GAM.DaoOfw0O.js} +1 -1
  33. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DU5sqchW.js +1 -0
  34. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DU5sqchW.js +1 -0
  35. package/dist/docs/assets/chunks/clone.B9rdNt6j.js +1 -0
  36. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.DKvc96Wa.js → cose-bilkent-S5V4N54A.DMQuNhM5.js} +1 -1
  37. package/dist/docs/assets/chunks/{dagre-KV5264BT.CMo0cy1b.js → dagre-KV5264BT.CZoGVuUf.js} +1 -1
  38. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DDgMOQhB.js → diagram-5BDNPKRD.CLt9uOyL.js} +1 -1
  39. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.BdJnoIsU.js → diagram-G4DWMVQ6.DpczEm1G.js} +1 -1
  40. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.oSvhAZaL.js → diagram-MMDJMWI5.D4r13DvJ.js} +1 -1
  41. package/dist/docs/assets/chunks/{diagram-TYMM5635.C9zZLIE-.js → diagram-TYMM5635.CYU9eGFu.js} +1 -1
  42. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.BNhVyccy.js → erDiagram-SMLLAGMA.QA9naWEw.js} +1 -1
  43. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BEFLLBiU.js → flowDiagram-DWJPFMVM.BbNoVZYd.js} +1 -1
  44. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.BdUzXBgY.js → ganttDiagram-T4ZO3ILL.IHjDoG7r.js} +1 -1
  45. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.Rd3LlOIJ.js → gitGraphDiagram-UUTBAWPF.B21VMdf5.js} +1 -1
  46. package/dist/docs/assets/chunks/{graph.DnJC1GpG.js → graph.DgJ4L-8V.js} +1 -1
  47. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.xv0xntDJ.js → infoDiagram-42DDH7IO.CQjrcthc.js} +1 -1
  48. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.BaGIlviU.js → ishikawaDiagram-UXIWVN3A.D4tPGtVo.js} +1 -1
  49. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.Cof_h0fp.js → journeyDiagram-VCZTEJTY.BD3WaNbQ.js} +1 -1
  50. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.C5GozFuU.js → kanban-definition-6JOO6SKY.Ca0o4Tqz.js} +1 -1
  51. package/dist/docs/assets/chunks/{layout.zc9UShLc.js → layout.DXXqX4MQ.js} +1 -1
  52. package/dist/docs/assets/chunks/{linear.BoqrFVcJ.js → linear.5c61gNw4.js} +1 -1
  53. package/dist/docs/assets/chunks/{min.DwIfr8hG.js → min.B1-NAjHX.js} +1 -1
  54. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.Dkq2yTtp.js → mindmap-definition-QFDTVHPH.BELznv3-.js} +1 -1
  55. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.B4CpTmHK.js → pieDiagram-DEJITSTG.qPzO1mq5.js} +1 -1
  56. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.BqXnFC9C.js → quadrantDiagram-34T5L4WZ.CxIvzbjX.js} +1 -1
  57. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.DhIN2z-E.js → requirementDiagram-MS252O5E.CqA0iJx8.js} +1 -1
  58. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.BhxUAmg2.js → sankeyDiagram-XADWPNL6.XRTutBnb.js} +1 -1
  59. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BqgU7HU-.js → sequenceDiagram-FGHM5R23.E--7bRLQ.js} +1 -1
  60. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.B1BCO18N.js → stateDiagram-FHFEXIEX.C4vGu8zq.js} +1 -1
  61. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.ECMu2BdJ.js +1 -0
  62. package/dist/docs/assets/chunks/{theme.oV7rddEz.js → theme.DMj_7q3B.js} +2 -2
  63. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.oRI8UwMC.js → timeline-definition-GMOUNBTQ.C7LgNVAL.js} +1 -1
  64. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DmuWrIxN.js → vennDiagram-DHZGUBPP.HUwoZcy_.js} +1 -1
  65. package/dist/docs/assets/chunks/{wardley-RL74JXVD.CEBjM5ov.js → wardley-RL74JXVD.BxFEFYZS.js} +1 -1
  66. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.m5zsCOF9.js → wardleyDiagram-NUSXRM2D.B2pSo5rB.js} +1 -1
  67. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.cPN-587n.js → xychartDiagram-5P7HB3ND.NQhMiOOL.js} +1 -1
  68. package/dist/docs/assets/deployment.md.BtqJrHhp.js +31 -0
  69. package/dist/docs/assets/{deployment.md.DDmjAVbg.lean.js → deployment.md.BtqJrHhp.lean.js} +1 -1
  70. package/dist/docs/assets/evals.md.Dne6VRmZ.js +49 -0
  71. package/dist/docs/assets/evals.md.Dne6VRmZ.lean.js +1 -0
  72. package/dist/docs/assets/{guides_agent-to-agent.md.D1D5f6Jc.js → guides_agent-to-agent.md.BcmSqL2z.js} +8 -8
  73. package/dist/docs/assets/guides_agent-to-agent.md.BcmSqL2z.lean.js +1 -0
  74. package/dist/docs/assets/{guides_bitbucket.md.DkjkBRU8.js → guides_bitbucket.md.BiA6ZMFW.js} +27 -27
  75. package/dist/docs/assets/{guides_bitbucket.md.DkjkBRU8.lean.js → guides_bitbucket.md.BiA6ZMFW.lean.js} +1 -1
  76. package/dist/docs/assets/guides_cloud-agents.md.CiXAW6on.js +9 -0
  77. package/dist/docs/assets/{guides_cloud-agents.md.Ceyjv0ul.lean.js → guides_cloud-agents.md.CiXAW6on.lean.js} +1 -1
  78. package/dist/docs/assets/guides_convert-automation.md.BvTxsJ8J.js +26 -0
  79. package/dist/docs/assets/{guides_convert-automation.md.BjraCvok.lean.js → guides_convert-automation.md.BvTxsJ8J.lean.js} +1 -1
  80. package/dist/docs/assets/{guides_github.md.CgN5sNbW.js → guides_github.md.6jiEH7dg.js} +11 -19
  81. package/dist/docs/assets/{guides_github.md.CgN5sNbW.lean.js → guides_github.md.6jiEH7dg.lean.js} +1 -1
  82. package/dist/docs/assets/{guides_gitlab.md.DCE0p7_w.js → guides_gitlab.md.DcKusOcU.js} +63 -73
  83. package/dist/docs/assets/{guides_gitlab.md.DCE0p7_w.lean.js → guides_gitlab.md.DcKusOcU.lean.js} +1 -1
  84. package/dist/docs/assets/guides_improve.md.o3WOGR7n.js +16 -0
  85. package/dist/docs/assets/{guides_improve.md.BFYtrtLE.lean.js → guides_improve.md.o3WOGR7n.lean.js} +1 -1
  86. package/dist/docs/assets/{guides_jev.md.Ccw4pedT.js → guides_jev.md.DGCzkMUN.js} +20 -60
  87. package/dist/docs/assets/{guides_jev.md.Ccw4pedT.lean.js → guides_jev.md.DGCzkMUN.lean.js} +1 -1
  88. package/dist/docs/assets/{guides_mcp-oauth.md.ekpWOZCC.js → guides_mcp-oauth.md.C-Sx_IPa.js} +3 -5
  89. package/dist/docs/assets/{guides_mcp-oauth.md.ekpWOZCC.lean.js → guides_mcp-oauth.md.C-Sx_IPa.lean.js} +1 -1
  90. package/dist/docs/assets/guides_migrate.md.BbhHYeCr.js +3 -0
  91. package/dist/docs/assets/{guides_migrate.md.RS9Eu-Xh.lean.js → guides_migrate.md.BbhHYeCr.lean.js} +1 -1
  92. package/dist/docs/assets/guides_opentelemetry.md.BRSktBHt.js +26 -0
  93. package/dist/docs/assets/guides_opentelemetry.md.BRSktBHt.lean.js +1 -0
  94. package/dist/docs/assets/guides_pagerduty.md.pMXUkZZc.js +61 -0
  95. package/dist/docs/assets/guides_pagerduty.md.pMXUkZZc.lean.js +1 -0
  96. package/dist/docs/assets/guides_slack.md.BgIGG9ur.js +82 -0
  97. package/dist/docs/assets/{guides_slack.md.BqiGSYGX.lean.js → guides_slack.md.BgIGG9ur.lean.js} +1 -1
  98. package/dist/docs/assets/{guides_webhooks.md.BJk63ZTs.js → guides_webhooks.md.B5DXt2v1.js} +7 -7
  99. package/dist/docs/assets/{guides_webhooks.md.BJk63ZTs.lean.js → guides_webhooks.md.B5DXt2v1.lean.js} +1 -1
  100. package/dist/docs/assets/hillclimbing.md.3TkdF79A.js +5 -0
  101. package/dist/docs/assets/hillclimbing.md.3TkdF79A.lean.js +1 -0
  102. package/dist/docs/assets/index.md.DRfaoRCZ.js +20 -0
  103. package/dist/docs/assets/index.md.DRfaoRCZ.lean.js +1 -0
  104. package/dist/docs/assets/quickstart.md.r-oE8nkX.js +113 -0
  105. package/dist/docs/assets/{quickstart.md.DaLk4ZIF.lean.js → quickstart.md.r-oE8nkX.lean.js} +1 -1
  106. package/dist/docs/assets/reference_access.md.C5lblfUC.js +1 -0
  107. package/dist/docs/assets/{reference_access.md.CExlH_mR.lean.js → reference_access.md.C5lblfUC.lean.js} +1 -1
  108. package/dist/docs/assets/reference_agent-config.md.C0Tp_Fk9.js +27 -0
  109. package/dist/docs/assets/{reference_agent-config.md.11E_xe--.lean.js → reference_agent-config.md.C0Tp_Fk9.lean.js} +1 -1
  110. package/dist/docs/assets/reference_artifacts.md.BJpAI7h9.js +17 -0
  111. package/dist/docs/assets/{reference_artifacts.md.C-hKR2hp.lean.js → reference_artifacts.md.BJpAI7h9.lean.js} +1 -1
  112. package/dist/docs/assets/reference_channels.md.CPWOpdsC.js +21 -0
  113. package/dist/docs/assets/{reference_channels.md.DsJfGSBJ.lean.js → reference_channels.md.CPWOpdsC.lean.js} +1 -1
  114. package/dist/docs/assets/reference_cli.md.B8GdpaRj.js +83 -0
  115. package/dist/docs/assets/reference_cli.md.B8GdpaRj.lean.js +1 -0
  116. package/dist/docs/assets/reference_connections.md.DoY4vrDH.js +54 -0
  117. package/dist/docs/assets/{reference_connections.md.BoAotr7_.lean.js → reference_connections.md.DoY4vrDH.lean.js} +1 -1
  118. package/dist/docs/assets/reference_evals.md.DgfUtfIc.js +69 -0
  119. package/dist/docs/assets/{reference_evals.md.DYKjGFi-.lean.js → reference_evals.md.DgfUtfIc.lean.js} +1 -1
  120. package/dist/docs/assets/{reference_extensions.md.pEVj72Xo.js → reference_extensions.md.DHbW6eOf.js} +6 -8
  121. package/dist/docs/assets/{reference_extensions.md.pEVj72Xo.lean.js → reference_extensions.md.DHbW6eOf.lean.js} +1 -1
  122. package/dist/docs/assets/reference_hooks.md.CSWmOwMM.js +39 -0
  123. package/dist/docs/assets/reference_hooks.md.CSWmOwMM.lean.js +1 -0
  124. package/dist/docs/assets/reference_http-api.md.C7Cb0r2J.js +7 -0
  125. package/dist/docs/assets/{reference_http-api.md._RWELr3d.lean.js → reference_http-api.md.C7Cb0r2J.lean.js} +1 -1
  126. package/dist/docs/assets/reference_instructions.md.CV6Qq0UX.js +14 -0
  127. package/dist/docs/assets/reference_instructions.md.CV6Qq0UX.lean.js +1 -0
  128. package/dist/docs/assets/reference_limits.md.CbdtFr4T.js +8 -0
  129. package/dist/docs/assets/reference_limits.md.CbdtFr4T.lean.js +1 -0
  130. package/dist/docs/assets/reference_memory.md.CdoJISM-.js +3 -0
  131. package/dist/docs/assets/{reference_memory.md.Dd7cyV9V.lean.js → reference_memory.md.CdoJISM-.lean.js} +1 -1
  132. package/dist/docs/assets/reference_playground.md.DIUsRAcy.js +1 -0
  133. package/dist/docs/assets/{reference_playground.md.CQiJk9CM.lean.js → reference_playground.md.DIUsRAcy.lean.js} +1 -1
  134. package/dist/docs/assets/reference_project-layout.md.9DiKoE16.js +26 -0
  135. package/dist/docs/assets/reference_project-layout.md.9DiKoE16.lean.js +1 -0
  136. package/dist/docs/assets/reference_schedules.md.RhQ9ZLo1.js +45 -0
  137. package/dist/docs/assets/{reference_schedules.md.RC47aFm4.lean.js → reference_schedules.md.RhQ9ZLo1.lean.js} +1 -1
  138. package/dist/docs/assets/reference_sessions.md.NXVQt9mP.js +22 -0
  139. package/dist/docs/assets/{reference_sessions.md.C7KFhWXV.lean.js → reference_sessions.md.NXVQt9mP.lean.js} +1 -1
  140. package/dist/docs/assets/{reference_skills.md.Dej2zQxi.js → reference_skills.md.DzCPNPkG.js} +4 -4
  141. package/dist/docs/assets/{reference_skills.md.Dej2zQxi.lean.js → reference_skills.md.DzCPNPkG.lean.js} +1 -1
  142. package/dist/docs/assets/reference_subagents.md.Dvpq2sUu.js +10 -0
  143. package/dist/docs/assets/{reference_subagents.md.CAhvW4yS.lean.js → reference_subagents.md.Dvpq2sUu.lean.js} +1 -1
  144. package/dist/docs/assets/reference_tools.md.B2OaR1Nb.js +62 -0
  145. package/dist/docs/assets/{reference_tools.md.DQr7Fnhu.lean.js → reference_tools.md.B2OaR1Nb.lean.js} +1 -1
  146. package/dist/docs/assets/templates_agentic-owners.md.B6ZmKAzT.js +13 -0
  147. package/dist/docs/assets/{templates_agentic-owners.md.Dh2nDSqg.lean.js → templates_agentic-owners.md.B6ZmKAzT.lean.js} +1 -1
  148. package/dist/docs/assets/templates_reviews.md.dr9Xv_KM.js +10 -0
  149. package/dist/docs/assets/templates_reviews.md.dr9Xv_KM.lean.js +1 -0
  150. package/dist/docs/assets/troubleshooting.md.DfKKvW1R.js +3 -0
  151. package/dist/docs/assets/{troubleshooting.md.AGJ3jDzj.lean.js → troubleshooting.md.DfKKvW1R.lean.js} +1 -1
  152. package/dist/docs/building-with-agents.html +41 -44
  153. package/dist/docs/building-with-agents.md +11 -104
  154. package/dist/docs/changelog.html +37 -37
  155. package/dist/docs/changelog.md +5 -145
  156. package/dist/docs/deployment.html +54 -54
  157. package/dist/docs/deployment.md +86 -265
  158. package/dist/docs/evals.html +52 -71
  159. package/dist/docs/evals.md +33 -127
  160. package/dist/docs/guides/agent-to-agent.html +43 -43
  161. package/dist/docs/guides/agent-to-agent.md +27 -64
  162. package/dist/docs/guides/bitbucket.html +62 -62
  163. package/dist/docs/guides/bitbucket.md +73 -134
  164. package/dist/docs/guides/cloud-agents.html +37 -37
  165. package/dist/docs/guides/cloud-agents.md +23 -53
  166. package/dist/docs/guides/convert-automation.html +39 -56
  167. package/dist/docs/guides/convert-automation.md +31 -115
  168. package/dist/docs/guides/github.html +46 -54
  169. package/dist/docs/guides/github.md +49 -131
  170. package/dist/docs/guides/gitlab.html +98 -108
  171. package/dist/docs/guides/gitlab.md +104 -184
  172. package/dist/docs/guides/improve.html +38 -43
  173. package/dist/docs/guides/improve.md +24 -90
  174. package/dist/docs/guides/jev.html +55 -95
  175. package/dist/docs/guides/jev.md +57 -159
  176. package/dist/docs/guides/mcp-oauth.html +38 -40
  177. package/dist/docs/guides/mcp-oauth.md +34 -69
  178. package/dist/docs/guides/migrate.html +38 -43
  179. package/dist/docs/guides/migrate.md +56 -130
  180. package/dist/docs/guides/opentelemetry.html +41 -43
  181. package/dist/docs/guides/opentelemetry.md +32 -27
  182. package/dist/docs/guides/pagerduty.html +50 -49
  183. package/dist/docs/guides/pagerduty.md +65 -199
  184. package/dist/docs/guides/slack.html +51 -57
  185. package/dist/docs/guides/slack.md +76 -205
  186. package/dist/docs/guides/webhooks.html +42 -42
  187. package/dist/docs/guides/webhooks.md +64 -146
  188. package/dist/docs/hashmap.json +1 -1
  189. package/dist/docs/hillclimbing.html +40 -42
  190. package/dist/docs/hillclimbing.md +40 -102
  191. package/dist/docs/index.html +55 -62
  192. package/dist/docs/index.md +49 -82
  193. package/dist/docs/llms-full.txt +2292 -5830
  194. package/dist/docs/llms.txt +9 -15
  195. package/dist/docs/quickstart.html +96 -153
  196. package/dist/docs/quickstart.md +93 -178
  197. package/dist/docs/reference/access.html +36 -36
  198. package/dist/docs/reference/access.md +7 -12
  199. package/dist/docs/reference/agent-config.html +43 -56
  200. package/dist/docs/reference/agent-config.md +93 -176
  201. package/dist/docs/reference/artifacts.html +38 -39
  202. package/dist/docs/reference/artifacts.md +38 -62
  203. package/dist/docs/reference/channels.html +38 -39
  204. package/dist/docs/reference/channels.md +102 -151
  205. package/dist/docs/reference/cli.html +68 -84
  206. package/dist/docs/reference/cli.md +233 -698
  207. package/dist/docs/reference/connections.html +45 -57
  208. package/dist/docs/reference/connections.md +83 -164
  209. package/dist/docs/reference/evals.html +66 -53
  210. package/dist/docs/reference/evals.md +97 -128
  211. package/dist/docs/reference/extensions.html +41 -43
  212. package/dist/docs/reference/extensions.md +37 -70
  213. package/dist/docs/reference/hooks.html +40 -52
  214. package/dist/docs/reference/hooks.md +62 -133
  215. package/dist/docs/reference/http-api.html +38 -42
  216. package/dist/docs/reference/http-api.md +66 -118
  217. package/dist/docs/reference/instructions.html +39 -39
  218. package/dist/docs/reference/instructions.md +19 -29
  219. package/dist/docs/reference/limits.html +38 -38
  220. package/dist/docs/reference/limits.md +9 -21
  221. package/dist/docs/reference/memory.html +37 -38
  222. package/dist/docs/reference/memory.md +38 -75
  223. package/dist/docs/reference/playground.html +36 -36
  224. package/dist/docs/reference/playground.md +14 -22
  225. package/dist/docs/reference/project-layout.html +49 -48
  226. package/dist/docs/reference/project-layout.md +38 -84
  227. package/dist/docs/reference/schedules.html +46 -48
  228. package/dist/docs/reference/schedules.md +59 -90
  229. package/dist/docs/reference/sessions.html +37 -37
  230. package/dist/docs/reference/sessions.md +66 -113
  231. package/dist/docs/reference/skills.html +39 -39
  232. package/dist/docs/reference/skills.md +11 -31
  233. package/dist/docs/reference/subagents.html +37 -37
  234. package/dist/docs/reference/subagents.md +17 -31
  235. package/dist/docs/reference/tools.html +47 -64
  236. package/dist/docs/reference/tools.md +48 -130
  237. package/dist/docs/templates/agentic-owners.html +38 -38
  238. package/dist/docs/templates/agentic-owners.md +50 -74
  239. package/dist/docs/templates/reviews.html +69 -0
  240. package/dist/docs/templates/reviews.md +71 -0
  241. package/dist/docs/troubleshooting.html +38 -36
  242. package/dist/docs/troubleshooting.md +48 -101
  243. package/dist/evals.d.ts +2 -2
  244. package/dist/extensions/jev/extension.d.ts +12 -2
  245. package/dist/extensions/jev/extension.d.ts.map +1 -1
  246. package/dist/extensions/jev/extension.js +4 -0
  247. package/dist/extensions/jev/lib/evaluate.d.ts +31 -4
  248. package/dist/extensions/jev/lib/evaluate.d.ts.map +1 -1
  249. package/dist/extensions/jev/lib/evaluate.js +18 -4
  250. package/dist/internal/cli/command.d.ts +1 -1
  251. package/dist/internal/cli/command.js +1 -1
  252. package/dist/internal/cli/commands/channels.js +6 -6
  253. package/dist/internal/cli/commands/develop.d.ts.map +1 -1
  254. package/dist/internal/cli/commands/develop.js +23 -14
  255. package/dist/internal/cli/commands/hosted.js +4 -4
  256. package/dist/internal/cli/commands/index.d.ts +1 -1
  257. package/dist/internal/cli/commands/index.d.ts.map +1 -1
  258. package/dist/internal/cli/commands/index.js +1 -1
  259. package/dist/internal/cli/commands/mcp.js +1 -1
  260. package/dist/internal/cli/commands/project.js +4 -4
  261. package/dist/internal/cli/commands/scaffold.d.ts.map +1 -1
  262. package/dist/internal/cli/commands/scaffold.js +9 -6
  263. package/dist/internal/cli/commands/serve.d.ts +1 -1
  264. package/dist/internal/cli/commands/serve.js +5 -5
  265. package/dist/internal/cli/commands/session.d.ts.map +1 -1
  266. package/dist/internal/cli/commands/session.js +12 -7
  267. package/dist/internal/cli/dispatch.d.ts +3 -3
  268. package/dist/internal/cli/dispatch.js +3 -3
  269. package/dist/internal/cli/errors.d.ts +1 -1
  270. package/dist/internal/cli/errors.d.ts.map +1 -1
  271. package/dist/internal/cli/errors.js +1 -1
  272. package/dist/internal/cli/flags.d.ts +2 -2
  273. package/dist/internal/cli/flags.d.ts.map +1 -1
  274. package/dist/internal/cli/flags.js +2 -2
  275. package/dist/internal/cli/help-command.d.ts +1 -1
  276. package/dist/internal/cli/help-command.js +2 -2
  277. package/dist/internal/cli/help.d.ts +7 -7
  278. package/dist/internal/cli/help.d.ts.map +1 -1
  279. package/dist/internal/cli/help.js +8 -8
  280. package/dist/internal/cli-ax.d.ts.map +1 -1
  281. package/dist/internal/cli-ax.js +3 -0
  282. package/dist/internal/cli-convert-automation.d.ts +1 -1
  283. package/dist/internal/cli-convert-automation.js +1 -1
  284. package/dist/internal/cli-deploy.js +1 -1
  285. package/dist/internal/cli-docs.js +1 -1
  286. package/dist/internal/cli-images.js +1 -1
  287. package/dist/internal/cli-migrate.d.ts +1 -1
  288. package/dist/internal/cli-migrate.js +1 -1
  289. package/dist/internal/cli-pagerduty.d.ts +1 -1
  290. package/dist/internal/cli-pagerduty.js +1 -1
  291. package/dist/internal/cli-skills.js +1 -1
  292. package/dist/internal/convert-automation/types.d.ts +1 -1
  293. package/dist/internal/convert-automation/types.js +1 -1
  294. package/dist/internal/cursor/credentials.js +1 -1
  295. package/dist/internal/deploy-client.d.ts +2 -2
  296. package/dist/internal/deploy-client.d.ts.map +1 -1
  297. package/dist/internal/deploy-manifest.d.ts +1 -0
  298. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  299. package/dist/internal/deploy-manifest.js +0 -1
  300. package/dist/internal/discovery/agent-config.d.ts +2 -6
  301. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  302. package/dist/internal/discovery/agent-config.js +8 -25
  303. package/dist/internal/discovery/agent.d.ts.map +1 -1
  304. package/dist/internal/discovery/agent.js +2 -3
  305. package/dist/internal/discovery/project.d.ts.map +1 -1
  306. package/dist/internal/discovery/project.js +15 -0
  307. package/dist/internal/init-project.d.ts +7 -3
  308. package/dist/internal/init-project.d.ts.map +1 -1
  309. package/dist/internal/init-project.js +60 -12
  310. package/dist/internal/init-scaffold.d.ts +2 -1
  311. package/dist/internal/init-scaffold.d.ts.map +1 -1
  312. package/dist/internal/init-scaffold.js +20 -7
  313. package/dist/internal/peer-connections.js +1 -1
  314. package/dist/internal/reminder-runner.js +1 -1
  315. package/dist/internal/server.d.ts +1 -1
  316. package/dist/internal/session-cost.d.ts +4 -4
  317. package/dist/internal/session-cost.d.ts.map +1 -1
  318. package/dist/internal/session-cost.js +4 -4
  319. package/dist/internal/session-engine.d.ts +1 -1
  320. package/dist/internal/session-engine.js +2 -2
  321. package/dist/internal/shallow-clone.js +1 -1
  322. package/dist/playground/assets/index-D6mVn9og.js +62 -0
  323. package/dist/playground/assets/index-DlALM6gr.css +1 -0
  324. package/dist/playground/index.html +2 -2
  325. package/dist/types.d.ts +9 -22
  326. package/dist/types.d.ts.map +1 -1
  327. package/docs/README.md +49 -82
  328. package/docs/building-with-agents.md +11 -104
  329. package/docs/changelog.md +6 -146
  330. package/docs/deployment.md +86 -265
  331. package/docs/evals.md +34 -128
  332. package/docs/guides/agent-to-agent.md +27 -64
  333. package/docs/guides/bitbucket.md +73 -134
  334. package/docs/guides/cloud-agents.md +23 -53
  335. package/docs/guides/convert-automation.md +31 -115
  336. package/docs/guides/github.md +49 -131
  337. package/docs/guides/gitlab.md +104 -184
  338. package/docs/guides/improve.md +24 -90
  339. package/docs/guides/jev.md +57 -159
  340. package/docs/guides/mcp-oauth.md +34 -69
  341. package/docs/guides/migrate.md +56 -130
  342. package/docs/guides/opentelemetry.md +37 -27
  343. package/docs/guides/pagerduty.md +68 -200
  344. package/docs/guides/slack.md +76 -205
  345. package/docs/guides/webhooks.md +64 -146
  346. package/docs/hillclimbing.md +41 -103
  347. package/docs/quickstart.md +93 -178
  348. package/docs/reference/access.md +7 -12
  349. package/docs/reference/agent-config.md +93 -176
  350. package/docs/reference/artifacts.md +38 -62
  351. package/docs/reference/channels.md +102 -151
  352. package/docs/reference/cli.md +233 -698
  353. package/docs/reference/connections.md +83 -164
  354. package/docs/reference/evals.md +97 -128
  355. package/docs/reference/extensions.md +37 -70
  356. package/docs/reference/hooks.md +61 -132
  357. package/docs/reference/http-api.md +66 -118
  358. package/docs/reference/instructions.md +20 -30
  359. package/docs/reference/limits.md +10 -22
  360. package/docs/reference/memory.md +38 -75
  361. package/docs/reference/playground.md +14 -22
  362. package/docs/reference/project-layout.md +38 -84
  363. package/docs/reference/schedules.md +59 -90
  364. package/docs/reference/sessions.md +66 -113
  365. package/docs/reference/skills.md +12 -32
  366. package/docs/reference/subagents.md +17 -31
  367. package/docs/reference/tools.md +48 -130
  368. package/docs/templates/agentic-owners.md +50 -74
  369. package/docs/templates/reviews.md +76 -0
  370. package/docs/troubleshooting.md +48 -101
  371. package/package.json +3 -9
  372. package/skills/cli/SKILL.md +15 -15
  373. package/skills/create-agent/SKILL.md +20 -19
  374. package/skills/debug/SKILL.md +4 -4
  375. package/skills/deploy/SKILL.md +2 -2
  376. package/skills/evals/SKILL.md +8 -8
  377. package/skills/framework-map/SKILL.md +3 -3
  378. package/skills/github/SKILL.md +7 -7
  379. package/skills/hillclimb/SKILL.md +4 -4
  380. package/skills/mcp-auth/SKILL.md +3 -3
  381. package/skills/migrate-v2/SKILL.md +40 -41
  382. package/skills/otel/SKILL.md +2 -2
  383. package/skills/setup-slack/SKILL.md +8 -8
  384. package/templates/agentic-owners/README.md +5 -5
  385. package/templates/agentic-owners/bot/tools/record_review.ts +1 -1
  386. package/templates/agentic-owners/package.json +1 -1
  387. package/templates/agents-md/README.md +4 -4
  388. package/templates/agents-md/package.json +1 -1
  389. package/templates/code-wiki/README.md +3 -3
  390. package/templates/code-wiki/package.json +1 -1
  391. package/templates/demo/README.md +3 -3
  392. package/templates/demo/package.json +1 -1
  393. package/templates/pr-autofixer/package.json +1 -1
  394. package/templates/security-help/README.md +5 -5
  395. package/templates/security-help/package.json +1 -1
  396. package/templates/security-reviewer/README.md +3 -3
  397. package/templates/security-reviewer/package.json +1 -1
  398. package/templates/thermo-quality-review/README.md +4 -4
  399. package/templates/thermo-quality-review/package.json +1 -1
  400. package/templates/thermo-review/README.md +4 -4
  401. package/templates/thermo-review/package.json +1 -1
  402. package/templates/triage/README.md +3 -3
  403. package/templates/triage/overlays/jira/README.md +3 -3
  404. package/templates/triage/overlays/linear/README.md +3 -3
  405. package/templates/triage/package.json +1 -1
  406. package/dist/docs/assets/building-with-agents.md.Bf1yH2tG.js +0 -9
  407. package/dist/docs/assets/changelog.md.fZ-NNFeJ.js +0 -1
  408. package/dist/docs/assets/changelog.md.fZ-NNFeJ.lean.js +0 -1
  409. package/dist/docs/assets/chunks/@localSearchIndexroot.mfzjiOsL.js +0 -1
  410. package/dist/docs/assets/chunks/channel.goFR5lbe.js +0 -1
  411. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.B2yLtFja.js +0 -1
  412. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.B2yLtFja.js +0 -1
  413. package/dist/docs/assets/chunks/clone.CztV97Wu.js +0 -1
  414. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CZlVHdDZ.js +0 -1
  415. package/dist/docs/assets/deployment.md.DDmjAVbg.js +0 -31
  416. package/dist/docs/assets/evals.md.OjKb7tNA.js +0 -68
  417. package/dist/docs/assets/evals.md.OjKb7tNA.lean.js +0 -1
  418. package/dist/docs/assets/guides_agent-to-agent.md.D1D5f6Jc.lean.js +0 -1
  419. package/dist/docs/assets/guides_cloud-agents.md.Ceyjv0ul.js +0 -9
  420. package/dist/docs/assets/guides_convert-automation.md.BjraCvok.js +0 -43
  421. package/dist/docs/assets/guides_grokbot-agents.md.D0PpM_Gf.js +0 -15
  422. package/dist/docs/assets/guides_grokbot-agents.md.D0PpM_Gf.lean.js +0 -1
  423. package/dist/docs/assets/guides_hooks.md.BjeEiM7s.js +0 -54
  424. package/dist/docs/assets/guides_hooks.md.BjeEiM7s.lean.js +0 -1
  425. package/dist/docs/assets/guides_improve.md.BFYtrtLE.js +0 -21
  426. package/dist/docs/assets/guides_migrate.md.RS9Eu-Xh.js +0 -8
  427. package/dist/docs/assets/guides_opentelemetry.md.CoZ1kNyd.js +0 -28
  428. package/dist/docs/assets/guides_opentelemetry.md.CoZ1kNyd.lean.js +0 -1
  429. package/dist/docs/assets/guides_pagerduty.md.mnKXe9U0.js +0 -60
  430. package/dist/docs/assets/guides_pagerduty.md.mnKXe9U0.lean.js +0 -1
  431. package/dist/docs/assets/guides_slack.md.BqiGSYGX.js +0 -88
  432. package/dist/docs/assets/hillclimbing.md.By61f3uq.js +0 -7
  433. package/dist/docs/assets/hillclimbing.md.By61f3uq.lean.js +0 -1
  434. package/dist/docs/assets/index.md.CVRjO09Y.js +0 -27
  435. package/dist/docs/assets/index.md.CVRjO09Y.lean.js +0 -1
  436. package/dist/docs/assets/quickstart.md.DaLk4ZIF.js +0 -170
  437. package/dist/docs/assets/reference_access.md.CExlH_mR.js +0 -1
  438. package/dist/docs/assets/reference_agent-config.md.11E_xe--.js +0 -40
  439. package/dist/docs/assets/reference_artifacts.md.C-hKR2hp.js +0 -18
  440. package/dist/docs/assets/reference_channels.md.DsJfGSBJ.js +0 -22
  441. package/dist/docs/assets/reference_cli.md.DQ3dCgmk.js +0 -99
  442. package/dist/docs/assets/reference_cli.md.DQ3dCgmk.lean.js +0 -1
  443. package/dist/docs/assets/reference_connections.md.BoAotr7_.js +0 -66
  444. package/dist/docs/assets/reference_evals.md.DYKjGFi-.js +0 -56
  445. package/dist/docs/assets/reference_hooks.md.B-bwJuiG.js +0 -51
  446. package/dist/docs/assets/reference_hooks.md.B-bwJuiG.lean.js +0 -1
  447. package/dist/docs/assets/reference_http-api.md._RWELr3d.js +0 -11
  448. package/dist/docs/assets/reference_instructions.md.yL2hXLnl.js +0 -14
  449. package/dist/docs/assets/reference_instructions.md.yL2hXLnl.lean.js +0 -1
  450. package/dist/docs/assets/reference_limits.md.Da1HegjB.js +0 -8
  451. package/dist/docs/assets/reference_limits.md.Da1HegjB.lean.js +0 -1
  452. package/dist/docs/assets/reference_memory.md.Dd7cyV9V.js +0 -4
  453. package/dist/docs/assets/reference_playground.md.CQiJk9CM.js +0 -1
  454. package/dist/docs/assets/reference_project-layout.md.BamcPDUn.js +0 -25
  455. package/dist/docs/assets/reference_project-layout.md.BamcPDUn.lean.js +0 -1
  456. package/dist/docs/assets/reference_prompt.md.BMjm1Jp3.js +0 -9
  457. package/dist/docs/assets/reference_prompt.md.BMjm1Jp3.lean.js +0 -1
  458. package/dist/docs/assets/reference_schedules.md.RC47aFm4.js +0 -47
  459. package/dist/docs/assets/reference_sessions.md.C7KFhWXV.js +0 -22
  460. package/dist/docs/assets/reference_subagents.md.CAhvW4yS.js +0 -10
  461. package/dist/docs/assets/reference_tools.md.DQr7Fnhu.js +0 -79
  462. package/dist/docs/assets/templates_agentic-owners.md.Dh2nDSqg.js +0 -13
  463. package/dist/docs/assets/templates_security-reviewer.md.DnwXdnB5.js +0 -3
  464. package/dist/docs/assets/templates_security-reviewer.md.DnwXdnB5.lean.js +0 -1
  465. package/dist/docs/assets/templates_thermo-quality-review.md.MJIdHkzE.js +0 -3
  466. package/dist/docs/assets/templates_thermo-quality-review.md.MJIdHkzE.lean.js +0 -1
  467. package/dist/docs/assets/templates_thermo-review.md.DfN1OFOl.js +0 -3
  468. package/dist/docs/assets/templates_thermo-review.md.DfN1OFOl.lean.js +0 -1
  469. package/dist/docs/assets/templates_triage.md.BYWMloV4.js +0 -9
  470. package/dist/docs/assets/templates_triage.md.BYWMloV4.lean.js +0 -1
  471. package/dist/docs/assets/troubleshooting.md.AGJ3jDzj.js +0 -1
  472. package/dist/docs/guides/grokbot-agents.html +0 -74
  473. package/dist/docs/guides/grokbot-agents.md +0 -129
  474. package/dist/docs/guides/hooks.html +0 -113
  475. package/dist/docs/guides/hooks.md +0 -116
  476. package/dist/docs/reference/prompt.html +0 -68
  477. package/dist/docs/reference/prompt.md +0 -47
  478. package/dist/docs/templates/security-reviewer.html +0 -62
  479. package/dist/docs/templates/security-reviewer.md +0 -81
  480. package/dist/docs/templates/thermo-quality-review.html +0 -62
  481. package/dist/docs/templates/thermo-quality-review.md +0 -75
  482. package/dist/docs/templates/thermo-review.html +0 -62
  483. package/dist/docs/templates/thermo-review.md +0 -75
  484. package/dist/docs/templates/triage.html +0 -68
  485. package/dist/docs/templates/triage.md +0 -101
  486. package/dist/extensions/cursor-grokbot-agents/extension.d.ts +0 -71
  487. package/dist/extensions/cursor-grokbot-agents/extension.d.ts.map +0 -1
  488. package/dist/extensions/cursor-grokbot-agents/extension.js +0 -64
  489. package/dist/extensions/cursor-grokbot-agents/lib/agents.d.ts +0 -11
  490. package/dist/extensions/cursor-grokbot-agents/lib/agents.d.ts.map +0 -1
  491. package/dist/extensions/cursor-grokbot-agents/lib/agents.js +0 -31
  492. package/dist/extensions/cursor-grokbot-agents/lib/backend.d.ts +0 -56
  493. package/dist/extensions/cursor-grokbot-agents/lib/backend.d.ts.map +0 -1
  494. package/dist/extensions/cursor-grokbot-agents/lib/backend.js +0 -139
  495. package/dist/extensions/cursor-grokbot-agents/lib/contacts.d.ts +0 -28
  496. package/dist/extensions/cursor-grokbot-agents/lib/contacts.d.ts.map +0 -1
  497. package/dist/extensions/cursor-grokbot-agents/lib/contacts.js +0 -46
  498. package/dist/extensions/cursor-grokbot-agents/lib/conversation.d.ts +0 -53
  499. package/dist/extensions/cursor-grokbot-agents/lib/conversation.d.ts.map +0 -1
  500. package/dist/extensions/cursor-grokbot-agents/lib/conversation.js +0 -186
  501. package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts +0 -4
  502. package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts.map +0 -1
  503. package/dist/extensions/cursor-grokbot-agents/lib/inputs.js +0 -15
  504. package/dist/extensions/cursor-grokbot-agents/lib/lock.d.ts +0 -12
  505. package/dist/extensions/cursor-grokbot-agents/lib/lock.d.ts.map +0 -1
  506. package/dist/extensions/cursor-grokbot-agents/lib/lock.js +0 -24
  507. package/dist/extensions/cursor-grokbot-agents/skills/consult.md +0 -40
  508. package/dist/extensions/cursor-grokbot-agents/tools/ask.d.ts +0 -4
  509. package/dist/extensions/cursor-grokbot-agents/tools/ask.d.ts.map +0 -1
  510. package/dist/extensions/cursor-grokbot-agents/tools/ask.js +0 -26
  511. package/dist/extensions/cursor-grokbot-agents/tools/check.d.ts +0 -4
  512. package/dist/extensions/cursor-grokbot-agents/tools/check.d.ts.map +0 -1
  513. package/dist/extensions/cursor-grokbot-agents/tools/check.js +0 -21
  514. package/dist/extensions/cursor-grokbot-agents/tools/interrupt.d.ts +0 -4
  515. package/dist/extensions/cursor-grokbot-agents/tools/interrupt.d.ts.map +0 -1
  516. package/dist/extensions/cursor-grokbot-agents/tools/interrupt.js +0 -13
  517. package/dist/extensions/cursor-grokbot-agents/tools/list.d.ts +0 -4
  518. package/dist/extensions/cursor-grokbot-agents/tools/list.d.ts.map +0 -1
  519. package/dist/extensions/cursor-grokbot-agents/tools/list.js +0 -22
  520. package/dist/playground/assets/index-BMpVzZzC.css +0 -1
  521. package/dist/playground/assets/index-_3zz3yh8.js +0 -62
  522. package/docs/guides/grokbot-agents.md +0 -134
  523. package/docs/guides/hooks.md +0 -121
  524. package/docs/reference/prompt.md +0 -52
  525. package/docs/templates/security-reviewer.md +0 -86
  526. package/docs/templates/thermo-quality-review.md +0 -80
  527. package/docs/templates/thermo-review.md +0 -80
  528. package/docs/templates/triage.md +0 -106
@@ -0,0 +1,83 @@
1
+ import{_ as t,c as a,o as s,a3 as o}from"./chunks/framework.BNw1pucY.js";const g=JSON.parse('{"title":"CLI","description":"Look up Agent SDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up Agent SDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),n={name:"reference/cli.md"};function d(c,e,l,i,r,p){return s(),a("div",null,[...e[0]||(e[0]=[o(`<h1 id="agent-sdk-cli" tabindex="-1">Agent SDK CLI <a class="header-anchor" href="#agent-sdk-cli" aria-label="Permalink to &quot;Agent SDK CLI&quot;">​</a></h1><p>The CLI needs Node 22.13 or newer. Run <code>agent-sdk &lt;command&gt; --help</code> to see every flag for that command.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk &lt;command&gt;</span></span></code></pre></div><p><code>agent-sdk help --all</code> prints every command, and <code>agent-sdk help &lt;command&gt; --json</code> prints one command&#39;s flags as JSON.</p><p>Commands are named <code>agent-sdk &lt;resource&gt; &lt;verb&gt;</code>, such as <code>agent-sdk deployment list</code>, apart from workflow verbs such as <code>init</code>, <code>dev</code>, and <code>deploy</code>. Older names, such as <code>agent-sdk deployments</code> or <code>agent-sdk secrets set</code>, still run and print the new form on stderr. The <code>bdk</code> command remains available.</p><h2 id="command-catalog" tabindex="-1">Command catalog <a class="header-anchor" href="#command-catalog" aria-label="Permalink to &quot;Command catalog&quot;">​</a></h2><h3 id="development-commands" tabindex="-1">Development commands <a class="header-anchor" href="#development-commands" aria-label="Permalink to &quot;Development commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>help</code>, <code>--help</code>, <code>-h</code></td><td>Print the command index, or one command&#39;s help</td></tr><tr><td><a href="#serve"><code>serve</code></a></td><td>Serve one or more agents over HTTP</td></tr><tr><td><a href="#dev"><code>dev</code></a></td><td>Serve agents with local-development behavior</td></tr><tr><td><a href="#docs"><code>docs</code></a></td><td>Serve the bundled documentation</td></tr><tr><td><a href="#init"><code>init</code></a></td><td>Scaffold a project, or convert an Automation</td></tr><tr><td><a href="#migrate"><code>migrate</code></a></td><td>Open a pull request that migrates an early-alpha project</td></tr><tr><td><a href="#skills-install"><code>skills list</code>, <code>skills install</code></a></td><td>List or refresh the bundled coding-agent skills</td></tr><tr><td><a href="#info"><code>info</code></a></td><td>Print a project&#39;s discovered parts or deployment manifest</td></tr><tr><td><a href="#validate"><code>validate</code></a></td><td>Check project diagnostics and set the exit status</td></tr><tr><td><a href="#version"><code>version</code></a></td><td>Print the installed package version</td></tr><tr><td><a href="#update"><code>update</code></a></td><td>Upgrade the installed CLI</td></tr><tr><td><a href="#login-logout-whoami"><code>login</code>, <code>logout</code>, <code>whoami</code></a></td><td>Store, remove, or show the Cursor credential</td></tr></tbody></table><h3 id="session-and-eval-commands" tabindex="-1">Session and eval commands <a class="header-anchor" href="#session-and-eval-commands" aria-label="Permalink to &quot;Session and eval commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#chat"><code>chat</code></a></td><td>Talk to a running agent, or reattach a session</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Run turns on a local or running agent</td></tr><tr><td><a href="#tool-call"><code>tool call</code></a></td><td>Call a server tool without a model turn</td></tr><tr><td><a href="#logs"><code>logs</code></a></td><td>Follow or dump agent logs</td></tr><tr><td><a href="#session-list"><code>session list</code></a></td><td>List sessions, or their costs</td></tr><tr><td><a href="#session-get"><code>session get</code></a></td><td>Inspect a session or a saved trace</td></tr><tr><td><a href="#session-create"><code>session create</code></a></td><td>Start or continue a hosted session</td></tr><tr><td><a href="#eval"><code>eval</code></a></td><td>Run evals, or list, get, and cancel remote eval batches</td></tr></tbody></table><h3 id="managed-hosting-commands" tabindex="-1">Managed hosting commands <a class="header-anchor" href="#managed-hosting-commands" aria-label="Permalink to &quot;Managed hosting commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#deploy"><code>deploy</code></a></td><td>Deploy an agent</td></tr><tr><td><a href="#deployment-list"><code>deployment list</code>, <code>deployment get</code></a></td><td>List deployments, or inspect one</td></tr><tr><td><a href="#deployment-lifecycle"><code>deployment stop</code>, <code>start</code>, <code>kill</code>, <code>unlock</code>, <code>cancel-runs</code>, <code>upgrade</code>, <code>rollback</code>, <code>delete</code>, <code>rotate-token</code></a></td><td>Change a deployment&#39;s state, release, or alias token</td></tr><tr><td><a href="#deployment-update"><code>deployment update</code></a></td><td>Replace a deployment&#39;s event repositories</td></tr><tr><td><a href="#secret"><code>secret</code></a></td><td>Set, list, or delete deployment secrets</td></tr></tbody></table><h3 id="connection-and-channel-commands" tabindex="-1">Connection and channel commands <a class="header-anchor" href="#connection-and-channel-commands" aria-label="Permalink to &quot;Connection and channel commands&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#mcp"><code>mcp serve</code>, <code>mcp install</code></a></td><td>Connect an MCP client to an agent</td></tr><tr><td><a href="#mcp-oauth"><code>mcp oauth</code></a></td><td>Authorize an MCP connection</td></tr><tr><td><a href="#slack"><code>slack</code></a></td><td>Provision and check Slack channel apps</td></tr><tr><td><a href="#github"><code>github</code></a></td><td>Forward, replay, and inspect GitHub webhooks</td></tr><tr><td><a href="#replay-other-webhooks"><code>gitlab</code>, <code>bitbucket</code>, <code>pagerduty</code></a></td><td>Replay and inspect GitLab, Bitbucket, or PagerDuty webhooks</td></tr></tbody></table><h2 id="choose-a-target" tabindex="-1">Targets <a class="header-anchor" href="#choose-a-target" aria-label="Permalink to &quot;Targets {#choose-a-target}&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Target</th><th>Selection</th><th>Commands</th></tr></thead><tbody><tr><td>Ephemeral local server</td><td>Omit <code>--url</code> and <code>--prod</code></td><td><code>run</code>, <code>tool call</code>, <code>eval</code></td></tr><tr><td>Running server</td><td>Pass <code>--url &lt;baseUrl&gt;</code></td><td><code>chat</code>, <code>run</code>, <code>tool call</code>, <code>eval</code>, <code>logs</code>, <code>session list</code>, <code>session get</code>, <code>mcp serve</code></td></tr><tr><td>Default local server</td><td>Omit <code>--url</code> and <code>--prod</code> to use <code>http://127.0.0.1:3000</code></td><td><code>chat</code>, <code>logs</code>, <code>session list</code>, <code>session get</code></td></tr><tr><td>Hosted deployment</td><td>Pass <code>--prod</code></td><td><code>session list</code>, <code>session get</code>, <code>logs</code>. <code>session create</code> is always hosted.</td></tr></tbody></table><p>A hosted deployment supports only the commands in its row. <code>chat</code>, <code>run</code>, <code>tool call</code>, <code>eval</code>, <code>mcp serve</code>, and <code>mcp install</code> exit with a usage error when you pass <code>--prod</code>. To test a hosted agent, start a turn with <a href="#session-create"><code>session create</code></a> and inspect it with <a href="#session-get"><code>session get</code></a>.</p><p><code>--url</code> and <code>--prod</code> are mutually exclusive. An explicit <code>--url</code> must include the slug for a multi-agent server, such as <code>http://127.0.0.1:3000/pr-approver</code>. Otherwise <code>--slug</code> picks the agent, and under <code>--prod</code> it defaults to the <code>--dir</code> basename. <code>--json</code> prints one JSON document on stdout, including errors. Without it, output is text, even when piped.</p><h2 id="local-servers" tabindex="-1">Local servers <a class="header-anchor" href="#local-servers" aria-label="Permalink to &quot;Local servers&quot;">​</a></h2><h3 id="serve" tabindex="-1">Serve agents <a class="header-anchor" href="#serve" aria-label="Permalink to &quot;Serve agents {#serve}&quot;">​</a></h3><p><code>serve</code> mounts every project discovered under <code>--dir</code>:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk serve [--dir &lt;path&gt;] [--port &lt;n&gt;] [--host &lt;host&gt;]</span></span>
2
+ <span class="line"><span> [--mode multi|single] [--dev] [--api-key &lt;key&gt;]</span></span>
3
+ <span class="line"><span> [--state-root &lt;path&gt;]</span></span>
4
+ <span class="line"><span> [--bearer-token &lt;secret&gt; | --allow-anonymous]</span></span>
5
+ <span class="line"><span> [--allow-anonymous-cursor-github]</span></span>
6
+ <span class="line"><span> [--allow-anonymous-cursor-account-mcp]</span></span>
7
+ <span class="line"><span> [--public-url &lt;url&gt;]</span></span>
8
+ <span class="line"><span> [--peers-url &lt;url&gt;]</span></span>
9
+ <span class="line"><span> [--no-schedules] [--no-playground] [--no-docs]</span></span>
10
+ <span class="line"><span> [--cursor-events --repo &lt;owner/name&gt;]...</span></span></code></pre></div><p><code>serve</code> listens on <code>127.0.0.1:3000</code>, or the next free port when that one is taken. <code>--mode multi</code>, the default, mounts each project at <code>/&lt;slug&gt;/v1/*</code>, and <code>--mode single</code> mounts one project at <code>/v1/*</code>. <code>--dev</code> turns off schedule and reminder firing and admits unsigned loopback GitHub deliveries.</p><p><code>--bearer-token</code> requires a token on routes that don&#39;t declare their own authentication. <code>--allow-anonymous</code> admits every caller as one principal, so use it only behind a trusted network boundary. The slugs <code>v1</code>, <code>playground</code>, and <code>docs</code> are reserved.</p><h3 id="dev" tabindex="-1">Develop locally <a class="header-anchor" href="#dev" aria-label="Permalink to &quot;Develop locally {#dev}&quot;">​</a></h3><p><code>dev</code> is <code>serve --dev</code> with an optional project path:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk dev</span></span>
11
+ <span class="line"><span>agent-sdk dev ./agent-sdk-pr-reviewer --port 3000</span></span></code></pre></div><p>It accepts every <code>serve</code> option. Don&#39;t combine the path with a different <code>--dir</code>.</p><h3 id="docs" tabindex="-1">Serve the docs <a class="header-anchor" href="#docs" aria-label="Permalink to &quot;Serve the docs {#docs}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk docs [--port &lt;n&gt;] [--host 127.0.0.1] [--print]</span></span></code></pre></div><p><code>docs</code> serves the bundled documentation on a loopback port until you press Ctrl-C. <code>--print</code> prints the URL without opening a browser.</p><h2 id="sessions-and-turns" tabindex="-1">Sessions and turns <a class="header-anchor" href="#sessions-and-turns" aria-label="Permalink to &quot;Sessions and turns&quot;">​</a></h2><h3 id="chat" tabindex="-1">Chat with an agent <a class="header-anchor" href="#chat" aria-label="Permalink to &quot;Chat with an agent {#chat}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk chat [--url &lt;baseUrl&gt;] [--message &lt;text&gt;]</span></span>
12
+ <span class="line"><span> [--session &lt;id&gt; | --resume] [--continuation-token &lt;token&gt;]</span></span>
13
+ <span class="line"><span> [--slug &lt;slug&gt;] [--json] [--text] [--no-color]</span></span></code></pre></div><p>On a TTY, <code>chat</code> opens a REPL and sends any <code>--message</code> first. Without a TTY, it sends <code>--message</code> as one turn, or reads newline-delimited messages until EOF. <code>--session &lt;id&gt;</code> reattaches a stored session, and <code>--resume</code> picks the most recent one.</p><h3 id="run" tabindex="-1">Run turns <a class="header-anchor" href="#run" aria-label="Permalink to &quot;Run turns {#run}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk run [--dir &lt;path&gt;] [--message &lt;text&gt;]...</span></span>
14
+ <span class="line"><span> [--messages-file &lt;path&gt;] [--url &lt;baseUrl&gt;]</span></span>
15
+ <span class="line"><span> [--session &lt;id&gt;] [--continuation-token &lt;token&gt;]</span></span>
16
+ <span class="line"><span> [--trace &lt;file&gt; | --no-trace] [--json]</span></span>
17
+ <span class="line"><span> [--timeout-ms &lt;n&gt;] [--no-stream] [--slug &lt;slug&gt;] [--dry-run]</span></span></code></pre></div><p>Repeat <code>--message</code> for a multi-turn run. <code>run</code> prints the compact trajectory, writes an NDJSON trace unless you pass <code>--no-trace</code>, and exits <code>1</code> when the trajectory fails. It has no default timeout.</p><h3 id="tool-call" tabindex="-1">Call a tool <a class="header-anchor" href="#tool-call" aria-label="Permalink to &quot;Call a tool {#tool-call}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk tool call &lt;tool&gt; [--input &lt;json&gt;]</span></span>
18
+ <span class="line"><span> [--dir &lt;path&gt; | --url &lt;baseUrl&gt;]</span></span>
19
+ <span class="line"><span> [--session &lt;id&gt;] [--slug &lt;slug&gt;] [--json]</span></span></code></pre></div><p><code>--input</code> takes JSON and defaults to <code>{}</code>. <code>--session</code> runs the tool in that session&#39;s workspace and records the call. The command exits <code>1</code> unless the response has <code>ok: true</code>. See <a href="./tools.html#call-a-tool-without-a-model-turn">Tools</a> for error codes.</p><h3 id="session-list" tabindex="-1">List sessions <a class="header-anchor" href="#session-list" aria-label="Permalink to &quot;List sessions {#session-list}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk session list [--url &lt;baseUrl&gt; | --prod] [--since &lt;duration|instant&gt;]</span></span>
20
+ <span class="line"><span> [--view sessions|cost] [--slug &lt;slug&gt;] [--team &lt;id&gt;]</span></span>
21
+ <span class="line"><span> [--bearer-token &lt;token&gt;] [--limit &lt;n&gt;] [--page-token &lt;token&gt;] [--json]</span></span></code></pre></div><p><code>--limit</code> sets the page size, 20 by default and at most 100. With <code>--prod</code>, it lists the most recently active hosted sessions, and <code>--since</code> reads back to a cutoff such as <code>24h</code> or an ISO-8601 instant. <code>--view cost</code> works only against a running server.</p><h3 id="session-get" tabindex="-1">Inspect a session <a class="header-anchor" href="#session-get" aria-label="Permalink to &quot;Inspect a session {#session-get}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk session get &lt;sessionId&gt; [--url &lt;baseUrl&gt; | --prod]</span></span>
22
+ <span class="line"><span> [--slug &lt;slug&gt;] [--team &lt;id&gt;]</span></span>
23
+ <span class="line"><span> [--view trajectory|events|cost] [--json [--fields &lt;a,b.c&gt;]]</span></span>
24
+ <span class="line"><span> [--trace &lt;file.ndjson&gt;] [--web [--print]]</span></span>
25
+ <span class="line"><span></span></span>
26
+ <span class="line"><span>agent-sdk session get --file &lt;file.ndjson&gt; [--json]</span></span></code></pre></div><p><code>session get</code> prints a compact trajectory, or raw <a href="./sessions.html#stream-events">events</a> with <code>--view events</code>. <code>--view cost</code> and <code>--trace</code> work only locally. <code>--file</code> reads a saved trace and exits <code>1</code> when that trajectory failed, and <code>--web</code> opens the session in the playground. For a hosted deployment:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> session</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> list</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span></span>
27
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> session</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> get</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">sessionI</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">slu</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">g</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --view</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> events</span></span></code></pre></div><h3 id="session-create" tabindex="-1">Start a hosted session <a class="header-anchor" href="#session-create" aria-label="Permalink to &quot;Start a hosted session {#session-create}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk session create --message &lt;text&gt; [--session &lt;ses_...&gt;]</span></span>
28
+ <span class="line"><span> [--slug &lt;slug&gt;] [--team &lt;id&gt;] [--wait [--timeout-ms &lt;n&gt;]]</span></span>
29
+ <span class="line"><span> [--read-only] [--as-of &lt;instant&gt;] [--component &lt;key&gt;] [--dry-run] [--json]</span></span></code></pre></div><p><code>session create</code> sends one <code>--message</code> to the hosted deployment. Without <code>--wait</code>, it exits <code>0</code> once the deployment accepts the turn, before a new session has an ID. <code>--wait</code> polls until the session starts. It exits <code>3</code> when <code>--timeout-ms</code> passes first and <code>1</code> when the delivery is skipped or fails.</p><p><code>--session</code> continues a session that <code>session create</code> started. <code>--read-only</code> stubs write tools, and <code>--as-of</code> freezes the session&#39;s clock at an ISO-8601 instant. See <a href="./../deployment.html#verify-a-hosted-turn">Verify a hosted turn</a>.</p><h3 id="logs" tabindex="-1">Follow logs <a class="header-anchor" href="#logs" aria-label="Permalink to &quot;Follow logs {#logs}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk logs [sessionId] [--url &lt;baseUrl&gt; | --prod]</span></span>
30
+ <span class="line"><span> [--session &lt;sessionId&gt;] [--slug &lt;slug&gt;] [--team &lt;id&gt;] [--once] [--json]</span></span></code></pre></div><p><code>logs</code> follows output until Ctrl-C, and <code>--once</code> prints the current buffer and exits. With <code>--prod</code>, it follows the hosted deployment&#39;s recent sessions and prints a <code>==&gt; &lt;sessionId&gt; (&lt;channel&gt;) &lt;==</code> header when the output switches sessions. A session ID follows one hosted session and requires <code>--prod</code>.</p><h2 id="evals" tabindex="-1">Evals <a class="header-anchor" href="#evals" aria-label="Permalink to &quot;Evals&quot;">​</a></h2><h3 id="eval" tabindex="-1">Run evals <a class="header-anchor" href="#eval" aria-label="Permalink to &quot;Run evals {#eval}&quot;">​</a></h3><p><code>eval</code> discovers <code>evals/**/*.eval.{ts,js}</code> and runs the selected cases:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk eval [--dir &lt;path&gt;] [evalId...]</span></span>
31
+ <span class="line"><span> [--list] [--tag &lt;tag&gt;]... [--json] [--verbose]</span></span>
32
+ <span class="line"><span> [--timeout-ms &lt;n&gt;] [--strict] [--max-concurrency &lt;n&gt;]</span></span>
33
+ <span class="line"><span> [--junit &lt;path&gt;] [--artifacts &lt;dir&gt; | --no-artifacts]</span></span>
34
+ <span class="line"><span> [--skip-report] [--no-stream]</span></span>
35
+ <span class="line"><span> [--url &lt;baseUrl&gt;] [--no-wait] [--slug &lt;slug&gt;]</span></span></code></pre></div><p>Select an exact case such as <code>weather/nyc</code>, a file prefix such as <code>weather</code>, several IDs, or none for every case. Put an ID that is also a subcommand word after <code>--</code>, as in <code>agent-sdk eval -- list</code>. The project needs an <a href="./evals.html#eval-configuration">eval configuration</a>.</p><p><code>--strict</code> fails a scored case below its soft threshold. The command exits <code>1</code> for failed cases and <code>2</code> for invalid options or no matching cases. A running server prints an Eval ID when it accepts the batch, and <code>--no-wait</code> returns at that point. These commands require <code>--url</code>:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk eval list --url &lt;baseUrl&gt; [--limit &lt;n&gt;] [--page-token &lt;token&gt;]</span></span>
36
+ <span class="line"><span>agent-sdk eval get &lt;evalId&gt; --url &lt;baseUrl&gt;</span></span>
37
+ <span class="line"><span>agent-sdk eval cancel &lt;evalId&gt; --url &lt;baseUrl&gt;</span></span></code></pre></div><p><code>eval get</code> exits <code>3</code> while the batch runs and <code>1</code> when it failed or was cancelled.</p><h2 id="projects" tabindex="-1">Projects <a class="header-anchor" href="#projects" aria-label="Permalink to &quot;Projects&quot;">​</a></h2><h3 id="init" tabindex="-1">Scaffold a project <a class="header-anchor" href="#init" aria-label="Permalink to &quot;Scaffold a project {#init}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk init [directory] [--template &lt;name&gt;] [--var id=value]... [--json] [--dry-run]</span></span>
38
+ <span class="line"><span>agent-sdk init [directory] --from automation:&lt;url-or-uuid&gt; [--dry-run] [--json]</span></span></code></pre></div><p>Without a directory, <code>init</code> prints the setup guide. With one, it adds missing scaffold files, installs dependencies, and tries to put <code>agent-sdk</code> on <code>PATH</code>. On a TTY, it also asks the template&#39;s questions and starts login when needed.</p><p><code>--template</code> takes <code>agentic-owners</code>, <code>agents-md</code>, <code>code-wiki</code>, <code>demo</code>, <code>security-help</code>, <code>security-reviewer</code>, <code>thermo-quality-review</code>, <code>thermo-review</code>, <code>triage-jira</code>, or <code>triage-linear</code>. <code>triage</code> selects <code>triage-linear</code>. <code>--var id=value</code> answers a template question without a prompt. <code>--dry-run</code> lists the files without writing them.</p><h4 id="convert-automation" tabindex="-1">Convert an Automation <a class="header-anchor" href="#convert-automation" aria-label="Permalink to &quot;Convert an Automation {#convert-automation}&quot;">​</a></h4><p><code>--from automation:</code> takes a Cursor Automation dashboard URL or UUID and writes to <code>./&lt;automation-name&gt;</code> unless you name a directory. Generated files don&#39;t overwrite existing paths, but the <code>npm install</code> that follows can run lifecycle scripts from an existing <code>package.json</code>. See <a href="./../guides/convert-automation.html">Convert a Cursor Automation</a>.</p><h3 id="migrate" tabindex="-1">Migrate an early-alpha project <a class="header-anchor" href="#migrate" aria-label="Permalink to &quot;Migrate an early-alpha project {#migrate}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk migrate [--dir &lt;path&gt;] [--repo &lt;https-url&gt;] [--ref &lt;git-ref&gt;]</span></span>
39
+ <span class="line"><span> [--path &lt;agent-path&gt;] [--no-wait] [--json] [--api-key &lt;key&gt;]</span></span></code></pre></div><p><code>migrate</code> applies only to projects that deployed with <code>architecture: &quot;v1&quot;</code> during the early alpha. It starts a Cursor cloud agent on a pushed Git ref with the bundled <code>bdk-migrate-v2</code> skill, and the agent opens a pull request with the source changes. The command never deploys or changes secrets.</p><p>With nothing to change, it prints <code>Nothing to migrate.</code> and exits <code>0</code>, and it exits <code>1</code> if the run ends without a pull request. <code>deploy</code> refuses a project that sets <code>architecture: &quot;v1&quot;</code> and points to <code>migrate</code>. See <a href="./../guides/migrate.html">Migrate an early-alpha project</a>.</p><h3 id="skills-install" tabindex="-1">Install and list coding-agent skills <a class="header-anchor" href="#skills-install" aria-label="Permalink to &quot;Install and list coding-agent skills {#skills-install}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk skills install [--dry-run] [--json]</span></span>
40
+ <span class="line"><span>agent-sdk skills list [--json [--fields &lt;a,b.c&gt;]] [--limit &lt;n&gt;] [--page-token &lt;token&gt;]</span></span></code></pre></div><p>Package installation copies the bundled skills, <code>skills install</code> replaces the installed copies and removes stale ones, and <code>skills list</code> prints each skill&#39;s bundled and installed versions. The <code>bdk-cli</code> skill teaches agents to run <code>agent-sdk</code> safely.</p><h3 id="info" tabindex="-1">Inspect a project <a class="header-anchor" href="#info" aria-label="Permalink to &quot;Inspect a project {#info}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk info [--dir &lt;path&gt;] [--view info|manifest] [--json [--fields &lt;a,b.c&gt;]]</span></span></code></pre></div><p>Text output lists what discovery found, such as tools, channels, and diagnostics. <code>--view manifest</code> summarizes one project&#39;s deployment metadata without a network request.</p><h3 id="validate" tabindex="-1">Validate a project <a class="header-anchor" href="#validate" aria-label="Permalink to &quot;Validate a project {#validate}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk validate [--dir &lt;path&gt;]</span></span></code></pre></div><p><code>validate</code> prints every discovered project&#39;s diagnostics and exits <code>1</code> when any diagnostic has error severity. <code>validate</code> fails when an SCM webhook secret or GitHub credential is a literal or a getter, and the error message shows the <code>{ secretName }</code> form to use. A project that still sets <code>architecture: &quot;v1&quot;</code> gets the same finding as a warning.</p><h2 id="credentials-and-versions" tabindex="-1">Credentials and versions <a class="header-anchor" href="#credentials-and-versions" aria-label="Permalink to &quot;Credentials and versions&quot;">​</a></h2><h3 id="login-logout-whoami" tabindex="-1">Manage credentials <a class="header-anchor" href="#login-logout-whoami" aria-label="Permalink to &quot;Manage credentials {#login-logout-whoami}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk login [--api-key &lt;key&gt;] [--key-name &lt;name&gt;]</span></span>
41
+ <span class="line"><span>agent-sdk whoami [--json]</span></span>
42
+ <span class="line"><span>agent-sdk logout</span></span></code></pre></div><p><code>login</code> stores a supplied API key, or opens browser sign-in and stores the key it creates. <code>whoami</code> shows the active credential and its source. <code>logout</code> removes the stored credential but doesn&#39;t revoke the key, so revoke it in the Cursor dashboard.</p><h3 id="version" tabindex="-1">Print the version <a class="header-anchor" href="#version" aria-label="Permalink to &quot;Print the version {#version}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk version [--json]</span></span>
43
+ <span class="line"><span>agent-sdk --version</span></span></code></pre></div><h3 id="update" tabindex="-1">Update the CLI <a class="header-anchor" href="#update" aria-label="Permalink to &quot;Update the CLI {#update}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk update</span></span></code></pre></div><p><code>update</code> upgrades a recognized global or project install to npm&#39;s <code>latest</code> tag, or prints a manual upgrade command. Published installs check for updates daily unless an <a href="#environment-variables">update-check variable</a> is set.</p><h2 id="managed-hosting" tabindex="-1">Managed hosting <a class="header-anchor" href="#managed-hosting" aria-label="Permalink to &quot;Managed hosting&quot;">​</a></h2><p>Every command here that changes a deployment takes <code>--dry-run</code>, which runs the reads, stops at the first change, prints that request with secrets redacted, and exits <code>0</code>.</p><p><code>secret delete</code>, <code>image delete</code>, <code>slack destroy</code>, and the <code>deployment</code> commands marked No in the <a href="#deployment-lifecycle">lifecycle table</a> can&#39;t be undone. On a terminal they ask you to type the slug or name, and a mismatch exits <code>1</code>. Without a terminal, they exit <code>2</code> unless you pass <code>--yes</code>.</p><h3 id="deploy" tabindex="-1">Deploy agents <a class="header-anchor" href="#deploy" aria-label="Permalink to &quot;Deploy agents {#deploy}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk deploy [--dir &lt;path&gt;] [--slug &lt;slug&gt; | --all] [--team &lt;id&gt;]</span></span>
44
+ <span class="line"><span> [--repo &lt;https-url&gt;] [--ref &lt;git-ref&gt;] [--path &lt;agent-path&gt;]</span></span>
45
+ <span class="line"><span> [--cursor-events-repo &lt;repo&gt;]... [--no-wait] [--json]</span></span></code></pre></div><p>Deploying needs a team with agent hosting turned on, and a team service-account key with agent access can deploy. The CLI infers <code>--repo</code>, <code>--ref</code>, and <code>--path</code> from the current checkout, and the repository must use HTTPS.</p><p><code>deploy</code> deploys one agent. On a folder of several agents, pass <code>--slug</code> to pick one. <code>--all</code>, or picking several agents, prints one <code>agent-sdk deploy --dir</code> command per agent and exits <code>1</code>.</p><p><code>--cursor-events-repo</code> sets the repositories whose Cursor events the deployment receives. Write <code>owner/name</code> for GitHub, <code>gitlab.com/&lt;group&gt;/&lt;project&gt;</code> for GitLab, or <code>bitbucket.org/&lt;workspace&gt;/&lt;repo&gt;</code> for Bitbucket. A GitLab path can include subgroups. Repeat the flag once per repository. Each deploy replaces the whole list. Without the flag, the deployment watches its GitHub source repository.</p><p><code>deploy</code> waits until the deployment runs and exits nonzero if it fails, unless you pass <code>--no-wait</code>. The first deploy of a slug can print an alias token once. Slugs use lowercase letters, digits, <code>_</code>, and <code>-</code>, start with a letter or digit, and have at most 64 characters. See <a href="./../deployment.html">Deployment</a> for egress hosts and the alias token.</p><h3 id="deployment-list" tabindex="-1">Inspect deployments <a class="header-anchor" href="#deployment-list" aria-label="Permalink to &quot;Inspect deployments {#deployment-list}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk deployment list [--team &lt;id&gt;] [--limit &lt;n&gt;] [--page-token &lt;token&gt;]</span></span>
46
+ <span class="line"><span> [--json [--fields &lt;a,b.c&gt;]]</span></span>
47
+ <span class="line"><span>agent-sdk deployment get &lt;slug&gt; [--team &lt;id&gt;] [--json [--fields &lt;a,b.c&gt;]] [--web]</span></span></code></pre></div><p><code>deployment list</code> shows each deployment&#39;s slug, status, and update time, and <code>deployment get</code> adds the release, watched repositories, routes, secret names, and latest error. <code>--web</code> opens the deployment in <a href="https://cursor.com/dashboard/deployed-agents" target="_blank" rel="noreferrer">Deployed Agents</a>, and an early-alpha deployment shows the steps to migrate it.</p><h3 id="deployment-lifecycle" tabindex="-1">Change a deployment <a class="header-anchor" href="#deployment-lifecycle" aria-label="Permalink to &quot;Change a deployment {#deployment-lifecycle}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk deployment &lt;command&gt; &lt;slug&gt; [--team &lt;id&gt;] [--json] [--dry-run]</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Command</th><th>What it does</th><th>Undoable?</th></tr></thead><tbody><tr><td><code>stop</code></td><td>Stop the deployment. <code>--cancel-runs</code> also cancels active runs and reminder wakes.</td><td>Yes</td></tr><tr><td><code>start</code></td><td>Resume a stopped deployment. A kill lock stays.</td><td>Yes</td></tr><tr><td><code>kill</code></td><td>Lock deploys, stop the deployment, and cancel its runs and reminder wakes. To recover, run <code>unlock</code> and then <code>start</code>.</td><td>No</td></tr><tr><td><code>unlock</code></td><td>Remove the kill lock so deploys, upgrades, and rollbacks work again. Traffic stays stopped.</td><td>Yes</td></tr><tr><td><code>cancel-runs</code></td><td>Cancel active runs and reminder wakes.</td><td>No</td></tr><tr><td><code>update</code></td><td>Replace the <a href="#deployment-update">event repositories</a>.</td><td>Yes</td></tr><tr><td><code>upgrade</code></td><td>Move to a ready release, the newest unless you pass <code>--release</code>.</td><td>Yes</td></tr><tr><td><code>rollback</code></td><td>Move to an earlier ready release, the previous one unless you pass <code>--release</code>.</td><td>Yes</td></tr><tr><td><code>delete</code></td><td>Remove the deployment and free its slug.</td><td>No</td></tr><tr><td><code>rotate-token</code></td><td>Replace the alias token. The old one stops working at once.</td><td>No</td></tr></tbody></table><h3 id="deployment-update" tabindex="-1">Replace event repositories <a class="header-anchor" href="#deployment-update" aria-label="Permalink to &quot;Replace event repositories {#deployment-update}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk deployment update &lt;slug&gt; (--event-repo &lt;owner/name&gt;... | --no-event-repos)</span></span>
48
+ <span class="line"><span> [--team &lt;id&gt;] [--dry-run] [--json]</span></span></code></pre></div><p>The repositories you pass replace the deployment&#39;s whole event repository list, and <code>--no-event-repos</code> clears it.</p><h3 id="secret" tabindex="-1">Manage deployment secrets <a class="header-anchor" href="#secret" aria-label="Permalink to &quot;Manage deployment secrets {#secret}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk secret set &lt;slug&gt; NAME [NAME2 ...]</span></span>
49
+ <span class="line"><span> [--team &lt;id&gt;] [--from-argv] [--json]</span></span>
50
+ <span class="line"><span>agent-sdk secret list &lt;slug&gt; [--team &lt;id&gt;] [--limit &lt;n&gt;] [--page-token &lt;token&gt;] [--json]</span></span>
51
+ <span class="line"><span>agent-sdk secret delete &lt;slug&gt; NAME [--team &lt;id&gt;] [--yes] [--dry-run] [--json]</span></span></code></pre></div><p>On a TTY, <code>secret set</code> prompts for each hidden value. With one name, redirected stdin is the whole value minus one trailing newline, so a PEM key keeps its line breaks:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> secret</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> set</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> my-bot</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> GITHUB_APP_PRIVATE_KEY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./app.private-key.pem</span></span></code></pre></div><p>With several names, give one line per name. <code>set</code> rejects <code>NAME=VALUE</code> arguments unless you pass <code>--from-argv</code>, because shell history keeps them. Names use <code>UPPER_SNAKE_CASE</code>, and the <code>CURSOR_</code> prefix is reserved. <code>secret list</code> returns names, never values.</p><h2 id="mcp-connections" tabindex="-1">MCP connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP connections&quot;">​</a></h2><h3 id="mcp" tabindex="-1">Connect an MCP client <a class="header-anchor" href="#mcp" aria-label="Permalink to &quot;Connect an MCP client {#mcp}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk mcp serve --url &lt;baseUrl&gt; [--bearer-token &lt;token&gt;]</span></span>
52
+ <span class="line"><span></span></span>
53
+ <span class="line"><span>agent-sdk mcp install --url &lt;baseUrl&gt; [--bearer-token &lt;token&gt;]</span></span>
54
+ <span class="line"><span> [--name &lt;server-name&gt;] [--dry-run] [--json]</span></span></code></pre></div><p><code>mcp serve</code> proxies newline-delimited JSON-RPC from stdin to the agent&#39;s MCP endpoint and reserves stdout for MCP messages. <code>mcp install</code> adds the agent to <code>~/.cursor/mcp.json</code>. An entry made with <code>--bearer-token</code> contains that token, so treat every printed or written copy as a credential.</p><h3 id="mcp-oauth" tabindex="-1">Authorize MCP OAuth <a class="header-anchor" href="#mcp-oauth" aria-label="Permalink to &quot;Authorize MCP OAuth {#mcp-oauth}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk mcp oauth &lt;connection&gt; [--dir &lt;path&gt;]</span></span>
55
+ <span class="line"><span> [--slug &lt;slug&gt;] [--team &lt;id&gt;]</span></span></code></pre></div><p><code>&lt;connection&gt;</code> is the basename under <code>bot/mcp-connections/</code> or <code>bot/host-connections/</code>. A <code>url</code> connection with <code>oauth: true</code> opens a browser PKCE flow and saves tokens bound to that URL, so authorize again after you change it. A <code>cursorAccount</code> connection exits nonzero and points to the cursor.com dashboard. See <a href="./../guides/mcp-oauth.html">Host MCP OAuth</a>.</p><h2 id="channel-helpers" tabindex="-1">Channel helpers <a class="header-anchor" href="#channel-helpers" aria-label="Permalink to &quot;Channel helpers&quot;">​</a></h2><h3 id="slack" tabindex="-1">Configure Slack <a class="header-anchor" href="#slack" aria-label="Permalink to &quot;Configure Slack {#slack}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk slack setup</span></span>
56
+ <span class="line"><span>agent-sdk slack create [--dir &lt;path&gt;] [--name &lt;name&gt;] [--env prod]</span></span>
57
+ <span class="line"><span> [--slack-team &lt;id&gt;] [--team &lt;id&gt;] [--icon &lt;url-or-file&gt;]</span></span>
58
+ <span class="line"><span> [--prefix &lt;prefix&gt; | --no-prefix] [--channel-posts] [--json]</span></span>
59
+ <span class="line"><span>agent-sdk slack destroy [--dir &lt;path&gt;] [--env prod] [--yes] [--dry-run]</span></span>
60
+ <span class="line"><span> [--slack-team &lt;id&gt;] [--team &lt;id&gt;] [--json]</span></span>
61
+ <span class="line"><span>agent-sdk slack icon &lt;url-or-file&gt; [--dir &lt;path&gt;] [--env prod]</span></span>
62
+ <span class="line"><span> [--slack-team &lt;id&gt;] [--team &lt;id&gt;] [--json]</span></span>
63
+ <span class="line"><span>agent-sdk slack init --manual [--dir &lt;path&gt;] [--name &lt;name&gt;]</span></span>
64
+ <span class="line"><span> [--prefix &lt;prefix&gt; | --no-prefix] [--channel-posts]</span></span>
65
+ <span class="line"><span> [--install | --no-install] [--slack-team &lt;id&gt;] [--env dev|prod]</span></span>
66
+ <span class="line"><span>agent-sdk slack manifest [--dir &lt;path&gt;] [--name &lt;name&gt;]</span></span>
67
+ <span class="line"><span> [--env dev|prod|both] [--channel-posts] [--dry-run]</span></span>
68
+ <span class="line"><span>agent-sdk slack doctor [--dir &lt;path&gt;]</span></span>
69
+ <span class="line"><span> [--prefix &lt;prefix&gt; | --no-prefix] [--channel &lt;id&gt;]... [--json]</span></span></code></pre></div><p><code>slack create</code> opens the <a href="https://cursor.com/dashboard/deployed-agents" target="_blank" rel="noreferrer">Deployed Agents</a> wizard, writes the token pair to <code>.env.local</code>, and runs <code>doctor</code>, which checks both tokens and Socket Mode. It makes the development app unless you pass <code>--env prod</code>. The token prefix defaults to the project directory name in upper snake case. <code>--channel-posts</code> adds the message events that <code>engagement.channelPosts</code> needs. See <a href="./../guides/slack.html">Slack</a> for manual setup.</p><h3 id="github" tabindex="-1">Test GitHub webhooks <a class="header-anchor" href="#github" aria-label="Permalink to &quot;Test GitHub webhooks {#github}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk github forward [--dir &lt;path&gt;] [--slug &lt;slug&gt;] [--channel &lt;id&gt;]</span></span>
70
+ <span class="line"><span> [--repo owner/repo | --org &lt;org&gt;] [--events a,b,c]</span></span>
71
+ <span class="line"><span> [--url &lt;url&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;]</span></span>
72
+ <span class="line"><span> [--secret &lt;secret&gt;] [--install]</span></span>
73
+ <span class="line"><span>agent-sdk github replay &lt;pr-url-or-owner/repo#N&gt;</span></span>
74
+ <span class="line"><span> [--events a,b,c | &#39;*&#39;] [--action &lt;action&gt;] [--conclusion &lt;result&gt;]</span></span>
75
+ <span class="line"><span> [--comment &lt;body&gt;] [--context &lt;name&gt;] [--dir &lt;path&gt;]</span></span>
76
+ <span class="line"><span> [--slug &lt;slug&gt;] [--channel &lt;id&gt;] [--url &lt;url&gt;]</span></span>
77
+ <span class="line"><span> [--secret &lt;secret&gt;] [--dry-run] [--fixtures-dir &lt;dir&gt;] [--json]</span></span>
78
+ <span class="line"><span>agent-sdk github events [--dir &lt;path&gt;] [--host &lt;host&gt;] [--port &lt;n&gt;] [--json]</span></span>
79
+ <span class="line"><span>agent-sdk github doctor [--install] [--json]</span></span></code></pre></div><p><code>forward</code> sends live deliveries to discovered channels through <code>gh webhook forward</code>. It needs repository admin access, or organization owner access for <code>--org</code>, and it uses the GitHub CLI&#39;s own login, so unset <code>GITHUB_TOKEN</code> and <code>GH_TOKEN</code> first. <code>doctor</code> checks the GitHub CLI and its webhook extension.</p><p><code>replay</code> reads a pull request with read access, builds webhook payloads, and posts them to matching channels. Its events are <code>pull_request</code>, the default, <code>issue_comment</code>, <code>pull_request_review_comment</code>, <code>check_run</code>, <code>check_suite</code>, <code>workflow_run</code>, and <code>status</code>. <code>--dry-run</code> prints the payloads without posting, and <code>--fixtures-dir</code> also writes them as fixtures. See <a href="./../guides/github.html">GitHub</a> for channel setup.</p><h3 id="replay-other-webhooks" tabindex="-1">Test GitLab, Bitbucket, and PagerDuty webhooks <a class="header-anchor" href="#replay-other-webhooks" aria-label="Permalink to &quot;Test GitLab, Bitbucket, and PagerDuty webhooks {#replay-other-webhooks}&quot;">​</a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk gitlab replay &lt;mr-url-or-group/project!N&gt; [replay flags]</span></span>
80
+ <span class="line"><span>agent-sdk bitbucket replay &lt;pr-url-or-workspace/repo#N&gt; [replay flags]</span></span>
81
+ <span class="line"><span>agent-sdk pagerduty replay [incident-id] [replay flags]</span></span>
82
+ <span class="line"><span>agent-sdk &lt;gitlab|bitbucket|pagerduty&gt; events [--dir &lt;path&gt;] [--json]</span></span>
83
+ <span class="line"><span>agent-sdk &lt;gitlab|bitbucket&gt; forward [--dir &lt;path&gt;]</span></span></code></pre></div><p>Replay takes the same flags as <code>github replay</code>, including <code>--fixtures-dir</code>. <code>events</code> lists the discovered channels, and <code>forward</code> prints the webhook and tunnel recipe for live deliveries.</p><table tabindex="0"><thead><tr><th>Command</th><th>Replay events</th><th>Default event</th><th>Read credential</th><th><code>--secret</code> default</th></tr></thead><tbody><tr><td><code>gitlab replay</code></td><td><code>merge_request</code>, <code>note</code>, <code>pipeline</code>, <code>push</code></td><td><code>merge_request</code></td><td><code>GITLAB_TOKEN</code></td><td><code>GITLAB_WEBHOOK_SECRET</code></td></tr><tr><td><code>bitbucket replay</code></td><td><code>pullrequest:created</code>, <code>pullrequest:updated</code>, <code>pullrequest:comment_created</code>, <code>repo:push</code>, in Cloud or Data Center format</td><td><code>pullrequest:created</code></td><td><code>BITBUCKET_TOKEN</code></td><td><code>BITBUCKET_WEBHOOK_SECRET</code></td></tr><tr><td><code>pagerduty replay</code></td><td><code>incident.triggered</code>, <code>.acknowledged</code>, <code>.annotated</code>, <code>.escalated</code>, <code>.resolved</code>, <code>.reopened</code></td><td><code>incident.triggered</code></td><td>None</td><td><code>PAGERDUTY_WEBHOOK_SECRET</code></td></tr></tbody></table><p>PagerDuty replay&#39;s incident ID defaults to <code>PREPLAY1</code>, and <code>--comment</code> is the note body for <code>annotated</code>. Without a secret, its deliveries are unsigned, and <code>agent-sdk dev</code> admits them from loopback. See <a href="./../guides/gitlab.html">GitLab</a>, <a href="./../guides/bitbucket.html">Bitbucket</a>, and <a href="./../guides/pagerduty.html">PagerDuty</a> for channel setup.</p><h2 id="environment-variables" tabindex="-1">Environment variables <a class="header-anchor" href="#environment-variables" aria-label="Permalink to &quot;Environment variables {#environment-variables}&quot;">​</a></h2><p>The CLI tries <code>--api-key</code>, <code>CURSOR_API_KEY</code>, <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, then the stored <code>agent-sdk login</code> credential, in that order.</p><table tabindex="0"><thead><tr><th>Variable</th><th>Contract</th></tr></thead><tbody><tr><td><code>CURSOR_API_KEY</code></td><td>Cursor credential.</td></tr><tr><td><code>CURSOR_API_KEY_FILE</code></td><td>Path to a Cursor credential file.</td></tr><tr><td><code>CURSOR_SERVICE_ACCOUNT_KEY</code></td><td>Team service-account credential.</td></tr><tr><td><code>CURSOR_API_BASE_URL</code></td><td>Backend for login, account, deployment, and event commands.</td></tr><tr><td><code>CURSOR_BACKEND_URL</code></td><td>Backend for agent turns. Set it with <code>CURSOR_API_BASE_URL</code> for a non-default backend.</td></tr><tr><td><code>AGENT_SERVE_CONFIG_DIR</code></td><td>CLI config directory for stored credentials and update state.</td></tr><tr><td><code>AGENT_SERVE_NO_UPDATE_CHECK</code>, <code>NO_UPDATE_NOTIFIER</code>, <code>CI</code></td><td>Turn off update checks when set to a value other than <code>0</code>.</td></tr><tr><td><code>GITHUB_WEBHOOK_SECRET</code></td><td>Default secret for GitHub forwarding and replay.</td></tr><tr><td><code>GITHUB_APP_ID</code>, <code>GITHUB_APP_PRIVATE_KEY</code>, <code>GITHUB_APP_INSTALLATION_ID</code></td><td>GitHub App credentials for outbound API calls.</td></tr><tr><td><code>GITHUB_TOKEN</code>, <code>GH_TOKEN</code></td><td>Tokens for outbound GitHub calls.</td></tr><tr><td><code>GITLAB_TOKEN</code>, <code>GITLAB_WEBHOOK_SECRET</code></td><td>GitLab API token and default webhook token.</td></tr><tr><td><code>GITLAB_API_BASE_URL</code></td><td>GitLab REST base URL for self-managed hosts.</td></tr><tr><td><code>BITBUCKET_TOKEN</code>, <code>BITBUCKET_WEBHOOK_SECRET</code></td><td>Bitbucket API token and default signing secret.</td></tr><tr><td><code>BITBUCKET_API_BASE_URL</code></td><td>Bitbucket Data Center REST base URL.</td></tr><tr><td><code>SLACK_BOT_TOKEN</code>, <code>SLACK_APP_TOKEN</code></td><td>Slack tokens for one agent. Multi-agent servers use <code>&lt;PREFIX&gt;_SLACK_BOT_TOKEN</code> and <code>&lt;PREFIX&gt;_SLACK_APP_TOKEN</code>.</td></tr></tbody></table><h2 id="exit-status" tabindex="-1">Exit status <a class="header-anchor" href="#exit-status" aria-label="Permalink to &quot;Exit status&quot;">​</a></h2><p>Every command uses these exit codes, and <code>agent-sdk help --json</code> lists them as <code>exitCodes</code>.</p><table tabindex="0"><thead><tr><th>Code</th><th>Meaning</th></tr></thead><tbody><tr><td><code>0</code></td><td><code>ok</code></td></tr><tr><td><code>1</code></td><td><code>failed</code>, <code>aborted</code>, <code>invalid_argument</code>, <code>rate_limited</code>, or <code>unavailable</code></td></tr><tr><td><code>2</code></td><td><code>usage</code>, for a bad command, flag, or argument</td></tr><tr><td><code>3</code></td><td><code>pending</code>, while the work still runs</td></tr><tr><td><code>4</code></td><td><code>not_found</code></td></tr><tr><td><code>5</code></td><td><code>unauthenticated</code> or <code>permission_denied</code></td></tr><tr><td><code>6</code></td><td><code>conflict</code> or <code>failed_precondition</code></td></tr></tbody></table><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./project-layout.html">Project layout</a></li><li><a href="./sessions.html">Sessions, events, and streaming</a></li><li><a href="./../deployment.html">Deployment</a></li><li><a href="./../guides/migrate.html">Early-alpha migration</a></li></ul>`,143)])])}const u=t(n,[["render",d]]);export{g as __pageData,u as default};
@@ -0,0 +1 @@
1
+ import{_ as t,c as a,o as s,a3 as o}from"./chunks/framework.BNw1pucY.js";const g=JSON.parse('{"title":"CLI","description":"Look up Agent SDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up Agent SDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),n={name:"reference/cli.md"};function d(c,e,l,i,r,p){return s(),a("div",null,[...e[0]||(e[0]=[o("",143)])])}const u=t(n,[["render",d]]);export{g as __pageData,u as default};
@@ -0,0 +1,54 @@
1
+ import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse(`{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),t={name:"reference/connections.md"};function l(h,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[n(`<h1 id="mcp-connections" tabindex="-1">MCP connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP connections&quot;">​</a></h1><p>An MCP connection gives the agent tools from an MCP server. Each file under <code>bot/mcp-connections/</code> default-exports <code>defineConnection</code> from <code>@grok/agent-sdk/connections</code>, and its filename becomes the server name. A connection reaches a remote HTTP server, a local stdio process, the signed-in Cursor account&#39;s connectors, or a peer agent by slug.</p><p>Put a server in <code>bot/host-connections/</code> when only host code should call it. Host connections use the same shape and support <code>agent-sdk mcp oauth</code>, but the model and playground don&#39;t see them.</p><h2 id="remote-mcp-server" tabindex="-1">Remote MCP server <a class="header-anchor" href="#remote-mcp-server" aria-label="Permalink to &quot;Remote MCP server&quot;">​</a></h2><p>Point a connection at a remote server with a URL.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineConnection } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@grok/agent-sdk/connections&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
2
+ <span class="line"></span>
3
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
4
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://mcp.linear.app/mcp&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
5
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> headers: { authorization: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Bearer \${LINEAR_TOKEN}&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
6
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="credentials-in-headers-and-env" tabindex="-1">Credentials in headers and env <a class="header-anchor" href="#credentials-in-headers-and-env" aria-label="Permalink to &quot;Credentials in headers and env&quot;">​</a></h2><p>Write a credential as a <code>\${NAME}</code> template in <code>headers</code> on a remote connection or in <code>env</code> on a stdio one.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
7
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> command: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;slack-mcp-server&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
8
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> args: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;--transport&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;stdio&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
9
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> env: { SLACK_MCP_XOXB_TOKEN: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;\${SLACK_BOT_TOKEN}&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
10
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>On Cursor hosting, your secrets aren&#39;t in <code>process.env</code> yet when the connection file loads. Agent SDK resolves a <code>\${NAME}</code> template each time the connection opens, so the template works locally and on hosting. Reading <code>process.env.NAME</code> at the top of the file only works locally.</p><p><code>agent-sdk validate</code> warns when the environment doesn&#39;t define a template&#39;s variable. An unset variable resolves to an empty value, which the server reports as an auth failure.</p><h2 id="host-mcp-oauth" tabindex="-1">Host MCP OAuth <a class="header-anchor" href="#host-mcp-oauth" aria-label="Permalink to &quot;Host MCP OAuth&quot;">​</a></h2><p>For a server that speaks OAuth, set <code>oauth: true</code> and follow <a href="./../guides/mcp-oauth.html">Connect a private MCP server with OAuth</a>.</p><h2 id="per-session-auth" tabindex="-1">Per-session auth <a class="header-anchor" href="#per-session-auth" aria-label="Permalink to &quot;Per-session auth&quot;">​</a></h2><p>For an HTTP or SSE connection whose credential depends on who the session is for, declare an <code>auth</code> callback instead of static headers. The headers it returns override the static ones.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
11
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://api.cursor.com/v1/mcp/plugins&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
12
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> auth</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">session</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ({</span></span>
13
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> headers: { Authorization: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`Bearer \${</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">await</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> grantFor</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">(</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">session</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
14
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }),</span></span>
15
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> advertiseTools: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
16
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><ul><li>The callback runs on the host before every turn, including reminder fires and follow-ups after a restart, so the model never sees or chooses the account. A callback that throws fails the turn.</li><li>Derive the identity from <code>session.auth</code>, <code>session.id</code>, or your channel&#39;s session state, not from <code>session.continuationKey</code>, which the HTTP channel rotates after every follow-up.</li><li><code>host.mcp</code> calls from server tools send only the static headers, and <code>auth</code> can&#39;t be combined with <code>oauth: true</code>.</li></ul><h2 id="advertise-tools" tabindex="-1">Advertise tools <a class="header-anchor" href="#advertise-tools" aria-label="Permalink to &quot;Advertise tools {#advertise-tools}&quot;">​</a></h2><p>Set <code>advertiseTools: true</code> when the model should call an MCP server&#39;s tools by name. Agent SDK keeps each tool&#39;s description, schemas, and MCP annotations, and renames invalid or colliding names.</p><p>A listing or auth failure, an invalid tool name, or a name collision fails the turn. Set <code>optional: true</code> to skip an unavailable connection instead. Advertised tools behave like server tools, and <a href="./tools.html#call-a-tool-without-a-model-turn">direct tool calls</a> use the same names.</p><p>In a dry-run session, read-only MCP tools run, Agent SDK stubs write tools, and tools without effect annotations are unavailable. A read-only tool gets the same transient retry as an authored read, and a tool with no effect annotation runs once.</p><h2 id="filter-connection-tools" tabindex="-1">Filter connection tools <a class="header-anchor" href="#filter-connection-tools" aria-label="Permalink to &quot;Filter connection tools&quot;">​</a></h2><p>Set <code>tools</code> to serve only the listed names, or <code>disallowedTools</code> to drop names. When both list a name, <code>disallowedTools</code> wins. The model and <code>host.mcp</code> see only what remains, and a filter the model sees requires <code>advertiseTools: true</code>.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
17
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://mcp.example.com/inventory&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
18
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> advertiseTools: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
19
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tools: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;search_skus&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;get_stock&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
20
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
21
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://mcp.example.com/inventory&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
22
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> advertiseTools: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
23
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> disallowedTools: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;place_order&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;delete_sku&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
24
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Names are the server&#39;s <code>tools/list</code> names, and Agent SDK skips unknown names. A filter that matches nothing fails the turn unless <code>optional: true</code>. Add <code>effects: &quot;read&quot;</code> to keep only the listed tools the server marks as reads. On a host connection, a name list limits <code>host.mcp</code> without advertising anything.</p><h2 id="local-stdio-mcp-server" tabindex="-1">Local stdio MCP server <a class="header-anchor" href="#local-stdio-mcp-server" aria-label="Permalink to &quot;Local stdio MCP server&quot;">​</a></h2><p>Run a local MCP server as a child process with <code>command</code>.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
25
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> command: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;node&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
26
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> args: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;--import&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;tsx&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;mcp/units-server.ts&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
27
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // env, cwd</span></span>
28
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>To run TypeScript in the agent environment, define the tools on the connection instead. Here <code>tools</code> takes an object of handlers rather than a list of names. Agent SDK packages them as a stdio MCP server, so you write only <code>execute</code>.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
29
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tools: {</span></span>
30
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> probe_agent_tool: {</span></span>
31
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Prove the tool ran in the agent environment.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
32
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> execute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">label</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }) {</span></span>
33
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { ok: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, label };</span></span>
34
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
35
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
36
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
37
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="cursor-account-mcp-connection" tabindex="-1">Cursor account MCP connection <a class="header-anchor" href="#cursor-account-mcp-connection" aria-label="Permalink to &quot;Cursor account MCP connection&quot;">​</a></h2><p><code>{ cursorAccount: true }</code> forwards the MCP connectors that the signed-in Cursor account already authorized in the dashboard, such as Linear, Notion, and Slack. Each tool runs on the Cursor backend with the account&#39;s stored OAuth credentials, so raw tokens never reach the serving host, session workspaces, or traces.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// bot/mcp-connections/account.ts</span></span>
38
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
39
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cursorAccount: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
40
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> advertiseTools: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
41
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>The agent gets every connected HTTP or SSE connector, the same as <code>servers: &quot;*&quot;</code>, unless you pass a list such as <code>servers: [&quot;Linear&quot;]</code>. Name the file <code>account.ts</code>, because <code>cursor.ts</code> collides with the IDE&#39;s <code>cursor</code> MCP namespace. The host must be <a href="./cli.html#environment-variables">signed in</a>, or <code>serve</code> fails at startup.</p><div class="caution custom-block github-alert"><p class="custom-block-title">CAUTION</p><p>Anyone who can talk to the agent can drive these connectors. <code>serve</code> refuses to start with <code>--allow-anonymous</code> and account connections unless you also pass <code>--allow-anonymous-cursor-account-mcp</code>, which belongs only behind a trusted boundary such as an SSO proxy. Prefer <code>--bearer-token</code> on shared hosts.</p></div><h2 id="peer-mcp-connection" tabindex="-1">Peer MCP connection <a class="header-anchor" href="#peer-mcp-connection" aria-label="Permalink to &quot;Peer MCP connection {#peer-mcp-connection}&quot;">​</a></h2><p><code>{ agent: &quot;&lt;slug&gt;&quot; }</code> addresses another agent without a URL, headers, or secrets. On a local multi-agent serve, the target is another mount slug. On Cursor hosting, it&#39;s the lowercase deployment slug of another agent on the same team.</p><p>The model gets the peer&#39;s <code>ask</code> and <code>check</code> tools, plus <code>call_tool</code> when the peer has server tools, so it can delegate work:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
42
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> agent: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;weather-agent&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
43
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Delegate weather questions to the weather agent.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
44
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Declare the connection only on the caller. In a local multi-agent serve, unknown slugs and self-references fail at startup. A single-agent serve omits peers with a warning unless its hosting platform sets <code>--peers-url</code>. See <a href="./../guides/agent-to-agent.html#delegate-a-question-to-a-specialist">Peer agents</a>.</p><h2 id="call-mcp-from-host-code" tabindex="-1">Call MCP from host code <a class="header-anchor" href="#call-mcp-from-host-code" aria-label="Permalink to &quot;Call MCP from host code&quot;">​</a></h2><p>Server tools reach every connection, including host connections, through <code>ctx.host.mcp</code>. Channel and schedule handlers use <code>args.host.mcp</code>.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// bot/tools/search_linear.ts</span></span>
45
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineTool } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@grok/agent-sdk/tools&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
46
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { z } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;zod&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
47
+ <span class="line"></span>
48
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
49
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Search Linear issues.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
50
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> inputSchema: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ query: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() }),</span></span>
51
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> execute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">query</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">ctx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
52
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ctx.host.mcp.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">callTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;linear&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;list_issues&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, { query });</span></span>
53
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
54
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>host.mcp.names()</code> lists connection names, and <code>listTools(name)</code> and <code>callTool(name, tool, args)</code> call into a named connection.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./tools.html">Tools</a></li><li><a href="./../guides/agent-to-agent.html">Peer agents</a></li></ul>`,47)])])}const E=i(t,[["render",l]]);export{c as __pageData,E as default};
@@ -1 +1 @@
1
- import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse(`{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),n={name:"reference/connections.md"};function h(l,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t("",60)])])}const E=i(n,[["render",h]]);export{c as __pageData,E as default};
1
+ import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse(`{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),t={name:"reference/connections.md"};function l(h,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[n("",47)])])}const E=i(t,[["render",l]]);export{c as __pageData,E as default};
@@ -0,0 +1,69 @@
1
+ import{_ as a,c as i,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function l(h,s,d,p,r,o){return e(),i("div",null,[...s[0]||(s[0]=[t(`<h1 id="evals" tabindex="-1">Evals <a class="header-anchor" href="#evals" aria-label="Permalink to &quot;Evals&quot;">​</a></h1><p>Evals run fixed cases against an agent and record whether its turns, tools, events, and output meet a contract. The <a href="./../evals.html">Evals guide</a> covers the regression workflow.</p><h2 id="eval-discovery-and-case-ids" tabindex="-1">Eval discovery and case IDs <a class="header-anchor" href="#eval-discovery-and-case-ids" aria-label="Permalink to &quot;Eval discovery and case IDs&quot;">​</a></h2><p>Eval files live under the project-root <code>evals/</code> directory and end in <code>.eval.ts</code> or <code>.eval.js</code>. The path under that directory becomes the eval ID, so <code>evals/readiness.eval.ts</code> becomes <code>readiness</code>, <code>evals/builds/api.eval.ts</code> becomes <code>builds/api</code>, and <code>evals/builds/index.eval.ts</code> becomes <code>builds</code>.</p><p>Export one <code>defineEval</code> that sets exactly one of <code>test</code> or <code>cases</code>. A case ID adds one path segment to the file ID:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
2
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tags: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;smoke&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
3
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cases: [</span></span>
4
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
5
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;checkout&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
6
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> test</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
7
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Review checkout PR 42.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
8
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">succeeded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
9
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
10
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
11
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
12
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;search&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
13
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> test</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
14
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Review search PR 7.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
15
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">succeeded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
16
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
17
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
18
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
19
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Those cases are <code>prs/checkout</code> and <code>prs/search</code> when the file is <code>evals/prs.eval.ts</code>. Case IDs must be unique single path segments.</p><p>A file can also export an array of <code>defineEval</code> calls, named with zero-padded indexes such as <code>sql/0000</code>.</p><p><code>iterations</code> repeats one datapoint 1 to 100 times. With <code>iterations: 3</code>, <code>weather/nyc</code> runs as <code>weather/nyc/1</code> through <code>weather/nyc/3</code>, and selecting <code>weather/nyc</code> runs all three.</p><h2 id="eval-configuration" tabindex="-1">Eval configuration <a class="header-anchor" href="#eval-configuration" aria-label="Permalink to &quot;Eval configuration&quot;">​</a></h2><p>Every suite needs <code>evals/evals.config.ts</code> with <code>maxConcurrency</code>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineEvalConfig } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@grok/agent-sdk/evals&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
20
+ <span class="line"></span>
21
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEvalConfig</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
22
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> maxConcurrency: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">20</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
23
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> judge: { model: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;gpt-5.4-mini&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
24
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>maxConcurrency</code></td><td>Required. Concurrent authored datapoints, from 1 to 200</td></tr><tr><td><code>timeoutMs</code></td><td>Per-case timeout. A case or file value wins, then the CLI flag, then this config</td></tr><tr><td><code>judge</code></td><td>Default model for <code>t.judge</code></td></tr><tr><td><code>reporters</code></td><td>Objects notified as cases and runs complete</td></tr><tr><td><code>maxPlaygroundRuns</code></td><td>Server-side batches kept in playground history. Defaults to 20</td></tr></tbody></table><p>A case can override <code>description</code>, <code>tags</code>, <code>timeoutMs</code>, <code>iterations</code>, <code>judge</code>, <code>reporters</code>, and <code>metadata</code>. Case metadata merges over file metadata, and case reporters add to the file&#39;s reporters.</p><h2 id="send-turns-in-a-case" tabindex="-1">Send turns in a case <a class="header-anchor" href="#send-turns-in-a-case" aria-label="Permalink to &quot;Send turns in a case&quot;">​</a></h2><p><code>await t.send(message, options?)</code> runs one turn and waits until it finishes or fails. Sends in one test share a session.</p><p>The returned turn has the assistant <code>message</code>, <code>sessionId</code>, <code>events</code>, ordered <code>toolCalls</code>, <code>ok</code>, and a one-based <code>index</code>. Assertions on a turn inspect only that turn, and assertions on <code>t</code> inspect the whole case. The case also exposes <code>t.reply</code>, <code>t.events</code>, <code>t.turns</code>, <code>t.sessionId</code>, <code>t.iteration</code>, <code>t.iterations</code>, and the timeout <code>t.signal</code>.</p><p>On the first send only, <code>workspaceFiles</code> seeds the session workspace from a map of relative paths to content, and <code>workspaceDir</code> sets an absolute working directory for a new local session.</p><p><code>turn.expectOk()</code> throws when the turn failed, so later steps that depend on it don&#39;t run.</p><h2 id="trajectory-assertions" tabindex="-1">Trajectory assertions <a class="header-anchor" href="#trajectory-assertions" aria-label="Permalink to &quot;Trajectory assertions&quot;">​</a></h2><p>Assertions record failures without stopping the test.</p><table tabindex="0"><thead><tr><th>Assertion</th><th>Checks</th></tr></thead><tbody><tr><td><code>t.succeeded()</code></td><td>Run finished without failure</td></tr><tr><td><code>t.calledTool(name, matcher?)</code>, <code>t.notCalledTool(name)</code></td><td>A matching tool request occurred, or none did</td></tr><tr><td><code>t.loadedSkill(name)</code></td><td>Agent opened a named skill</td></tr><tr><td><code>t.toolOrder(names)</code>, <code>t.eventOrder(matchers)</code></td><td>Tool requests or event groups appeared in relative order</td></tr><tr><td><code>t.usedNoTools()</code>, <code>t.maxToolCalls(max)</code></td><td>No tool was requested, or the count stayed under the bound</td></tr><tr><td><code>t.noFailedActions()</code></td><td>No tool result failed</td></tr><tr><td><code>t.calledSubagent(name, matcher?)</code></td><td>Matching subagent call occurred</td></tr><tr><td><code>t.taggedArtifact(kind?, predicate?)</code></td><td>Matching durable artifact was tagged</td></tr><tr><td><code>t.event(type, matcher?)</code>, <code>t.notEvent(type, matcher?)</code></td><td>A matching session event occurred, or none did</td></tr><tr><td><code>t.eventsSatisfy(label, predicate)</code></td><td>Predicate accepted the event stream</td></tr><tr><td><code>t.check(value, expectation)</code></td><td>Value met an expectation builder</td></tr><tr><td><code>t.score(name, value)</code></td><td>Recorded a numeric score from 0 to 1</td></tr></tbody></table><p><code>t.requireToolCall</code>, <code>t.requireInputRequest</code>, and <code>t.require</code> return the matched value and stop the rest of the test when nothing matches.</p><h2 id="tool-and-event-matchers" tabindex="-1">Tool and event matchers <a class="header-anchor" href="#tool-and-event-matchers" aria-label="Permalink to &quot;Tool and event matchers&quot;">​</a></h2><p>Tool matchers can narrow by <code>input</code>, <code>output</code>, <code>status</code>, and <code>count</code>. Values can be literals, regular expressions, or predicates. Object literals match partially:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">calledTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;inspect_pr&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
25
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> input: { verdict: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;review&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
26
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> count: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
27
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Tool status is <code>completed</code>, <code>failed</code>, <code>pending</code>, or <code>rejected</code>. Subagent matchers accept <code>output</code>, <code>status</code>, <code>count</code>, and <code>callId</code>. Event matchers accept <code>data</code> and <code>count</code>.</p><h2 id="expectation-builders" tabindex="-1">Expectation builders <a class="header-anchor" href="#expectation-builders" aria-label="Permalink to &quot;Expectation builders&quot;">​</a></h2><p><code>includes(string | RegExp)</code>, <code>equals(value)</code>, <code>matches(schema)</code>, and <code>satisfies(predicate, label)</code> are hard gates by default, and <code>similarity(expected)</code> is a soft score. <code>matches</code> accepts Standard Schema implementations such as Zod. <code>normalizedSimilarity(value, expected)</code> returns the same 0-to-1 value that <code>similarity</code> uses.</p><h2 id="severity-and-verdicts" tabindex="-1">Severity and verdicts <a class="header-anchor" href="#severity-and-verdicts" aria-label="Permalink to &quot;Severity and verdicts&quot;">​</a></h2><p>Every assertion returns a severity handle:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">calledTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;search&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">soft</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
28
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">check</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(t.reply, </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">similarity</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Expected answer&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">atLeast</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.8</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
29
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">closedQA</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;names the failing step&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gate</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><ul><li><code>.gate(threshold?)</code> fails the case on a miss.</li><li><code>.soft(threshold?)</code> records a value and never fails the case.</li><li><code>.atLeast(threshold)</code> sets a soft bar, and a miss gives the case a <code>scored</code> verdict.</li></ul><p>Case verdicts are <code>passed</code>, <code>failed</code>, <code>scored</code>, or <code>skipped</code>. A <code>scored</code> case fails the run only under <code>--strict</code>.</p><h2 id="judges" tabindex="-1">Judges <a class="header-anchor" href="#judges" aria-label="Permalink to &quot;Judges&quot;">​</a></h2><p>Judges grade what deterministic checks can&#39;t express:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">factuality</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(expected).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">atLeast</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.8</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
30
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">summarizes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(expected).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">atLeast</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.8</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
31
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">closedQA</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;names the root cause&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gate</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
32
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sql</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(expected).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">atLeast</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.9</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>Each judge grades <code>t.reply</code> unless you pass <code>{ on }</code> with another value. Set judge options in the project config, the eval, the case, or the call, and the nearest value wins.</p><p><code>t.judge.model(prompt)</code> returns a raw model reply for custom grading. Agent output is untrusted input, so wrap it with <code>fenceUntrusted</code> and include <code>EVAL_JUDGE_INJECTION_GUARD</code> in the judge prompt.</p><h2 id="judge-host" tabindex="-1">Judge host <a class="header-anchor" href="#judge-host" aria-label="Permalink to &quot;Judge host&quot;">​</a></h2><p>A judge needs a judge model and a Cursor credential from <code>agent-sdk login</code>, <code>CURSOR_API_KEY</code>, or <code>CURSOR_SERVICE_ACCOUNT_KEY</code>. Without a usable credential the runner skips the case, and without a judge model it fails the case and names where to set one.</p><h2 id="datasets-and-fixtures" tabindex="-1">Datasets and fixtures <a class="header-anchor" href="#datasets-and-fixtures" aria-label="Permalink to &quot;Datasets and fixtures&quot;">​</a></h2><p>Load committed JSON, JSONL, or YAML relative to the project root:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineEval, includes } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@grok/agent-sdk/evals&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
33
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { loadYaml } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@grok/agent-sdk/evals/loaders&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
34
+ <span class="line"></span>
35
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> rows</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> loadYaml</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Array</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;{ </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">prompt</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">; </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">expected</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }&gt;&gt;(</span></span>
36
+ <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;evals/data/cases.yaml&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
37
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
38
+ <span class="line"></span>
39
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> rows.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">map</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">row</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =&gt;</span></span>
40
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
41
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> test</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
42
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(row.prompt);</span></span>
43
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">check</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(t.reply, </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">includes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(row.expected));</span></span>
44
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
45
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> })</span></span>
46
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><h2 id="reporters-and-results" tabindex="-1">Reporters and results <a class="header-anchor" href="#reporters-and-results" aria-label="Permalink to &quot;Reporters and results&quot;">​</a></h2><p>Built-in reporters include <code>JUnit({ filePath, suiteName? })</code> and <code>Artifacts({ dir })</code>. A custom reporter can implement <code>onRunStart</code>, <code>onEvalComplete</code>, and <code>onRunComplete</code>.</p><p>JSON output has run totals and one result per case. Each result has the case ID, verdict, assertions, session ID, inputs, final text, tool calls, metrics, logs, duration, metadata, tags, and any error or skip reason.</p><p>Each local run writes <code>summary.json</code>, <code>results.jsonl</code>, and <code>evals/&lt;case-id&gt;.json</code> under <code>evals/&lt;stamp&gt;/</code> in the project state directory. <code>--state-root</code> doesn&#39;t move them, and <code>--artifacts &lt;dir&gt;</code> or <code>--no-artifacts</code> does.</p><h2 id="select-cases" tabindex="-1">Select cases <a class="header-anchor" href="#select-cases" aria-label="Permalink to &quot;Select cases&quot;">​</a></h2><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agent-sdk eval --dir . --list</span></span>
47
+ <span class="line"><span>agent-sdk eval --dir .</span></span>
48
+ <span class="line"><span>agent-sdk eval --dir . builds/checkout</span></span>
49
+ <span class="line"><span>agent-sdk eval --dir . --tag smoke</span></span></code></pre></div><p>An ID matches itself and its descendants. Repeated IDs or tags combine with OR, and a case must match both groups when you pass both. <a href="./cli.html#eval">Run evals</a> covers runs on a server.</p><h2 id="suite-summary-cases" tabindex="-1">Suite summary cases <a class="header-anchor" href="#suite-summary-cases" aria-label="Permalink to &quot;Suite summary cases&quot;">​</a></h2><p>A case tagged <code>EVAL_SUMMARY_TAG</code> aggregates its file, so selecting it by ID or with <code>--tag summary</code> also runs every other case in that file.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineEval, EVAL_SUMMARY_TAG } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@grok/agent-sdk/evals&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
50
+ <span class="line"></span>
51
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
52
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cases: [</span></span>
53
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
54
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;checkout&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
55
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> test</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
56
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Review checkout PR 42.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
57
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">succeeded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
58
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
59
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
60
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
61
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;overall&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
62
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tags: [</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">EVAL_SUMMARY_TAG</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
63
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> test</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
64
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Summarize the checkout review.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
65
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">succeeded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
66
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
67
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
68
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
69
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div>`,54)])])}const E=a(n,[["render",l]]);export{c as __pageData,E as default};
@@ -1 +1 @@
1
- import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function d(l,s,h,r,o,p){return i(),a("div",null,[...s[0]||(s[0]=[t("",63)])])}const E=e(n,[["render",d]]);export{k as __pageData,E as default};
1
+ import{_ as a,c as i,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function l(h,s,d,p,r,o){return e(),i("div",null,[...s[0]||(s[0]=[t("",54)])])}const E=a(n,[["render",l]]);export{c as __pageData,E as default};