@cursor/july 0.1.113 → 0.1.114

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 (229) hide show
  1. package/dist/docs/404.html +2 -2
  2. package/dist/docs/assets/{app.CAeK13eM.js → app.BqkJwOZ-.js} +4 -4
  3. package/dist/docs/assets/chunks/@localSearchIndexroot.BnSgidYE.js +1 -0
  4. package/dist/docs/assets/chunks/{VPLocalSearchBox.C9LbPHod.js → VPLocalSearchBox.BJAi2KiV.js} +1 -1
  5. package/dist/docs/assets/chunks/{arc.CmMq2zmS.js → arc.BZpXTgvV.js} +1 -1
  6. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CCXB8Uj5.js → architectureDiagram-Q4EWVU46.WYI-7F-Y.js} +1 -1
  7. package/dist/docs/assets/chunks/{baseUniq.CyQo6eLe.js → baseUniq.CZaUPpg0.js} +1 -1
  8. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.JYq6w91N.js → blockDiagram-DXYQGD6D.D6UES2pD.js} +1 -1
  9. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BRV8GPJJ.js → c4Diagram-AHTNJAMY.cwebIe4i.js} +1 -1
  10. package/dist/docs/assets/chunks/channel.DdM5EfNW.js +1 -0
  11. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.Bv4ooYQR.js → chunk-4BX2VUAB.fVyFnjxg.js} +1 -1
  12. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.t4JtKPcj.js → chunk-4TB4RGXK.BanufG1c.js} +1 -1
  13. package/dist/docs/assets/chunks/{chunk-55IACEB6.34lCHj9Y.js → chunk-55IACEB6.VaSMz5-2.js} +1 -1
  14. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.BSwrPNrt.js → chunk-EDXVE4YY.CN2diZOM.js} +1 -1
  15. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.Beeun-R-.js → chunk-FMBD7UC4.g4ivypu3.js} +1 -1
  16. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.BUUFUcJc.js → chunk-OYMX7WX6.GZXKn9JJ.js} +1 -1
  17. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.B2XjHzN_.js → chunk-QZHKN3VN.itXxJZCd.js} +1 -1
  18. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.CLYG8znk.js → chunk-YZCP3GAM.-rw2GfvX.js} +1 -1
  19. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CjfGHeg2.js +1 -0
  20. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CjfGHeg2.js +1 -0
  21. package/dist/docs/assets/chunks/clone.wSOICb_f.js +1 -0
  22. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.DVEa6fZp.js → cose-bilkent-S5V4N54A.CmaI5br0.js} +1 -1
  23. package/dist/docs/assets/chunks/{dagre-KV5264BT.C9PZQK-S.js → dagre-KV5264BT.4wY9S4Kt.js} +1 -1
  24. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DoN0uv3Y.js → diagram-5BDNPKRD.Pc3c0u9W.js} +1 -1
  25. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Czv3duqx.js → diagram-G4DWMVQ6.CYrWz-nj.js} +1 -1
  26. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BinJ5kWb.js → diagram-MMDJMWI5.Bgj5hukb.js} +1 -1
  27. package/dist/docs/assets/chunks/{diagram-TYMM5635.DW326M4K.js → diagram-TYMM5635.DGMEXalS.js} +1 -1
  28. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.U2pR_OA7.js → erDiagram-SMLLAGMA.GepTV9Im.js} +1 -1
  29. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.ByWJXeYK.js → flowDiagram-DWJPFMVM.DVKywg3j.js} +1 -1
  30. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.OquF0Rtg.js → ganttDiagram-T4ZO3ILL.C7qt9Mlo.js} +1 -1
  31. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.Bpn01P7X.js → gitGraphDiagram-UUTBAWPF.U30_r82P.js} +1 -1
  32. package/dist/docs/assets/chunks/{graph.CNRB6ETL.js → graph.CyyMyAWv.js} +1 -1
  33. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.CqhknMWi.js → infoDiagram-42DDH7IO.Dn9ACW3y.js} +1 -1
  34. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.C6xpR2af.js → ishikawaDiagram-UXIWVN3A.DlIdIGOA.js} +1 -1
  35. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.Cg5f7oB3.js → journeyDiagram-VCZTEJTY.DZj4vy4E.js} +1 -1
  36. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.Cx9YTwlU.js → kanban-definition-6JOO6SKY.Dl63eMUV.js} +1 -1
  37. package/dist/docs/assets/chunks/{layout.ljS-wFtK.js → layout.BLHZLWPH.js} +1 -1
  38. package/dist/docs/assets/chunks/{linear.jSxNrsFC.js → linear.aXKGKaNw.js} +1 -1
  39. package/dist/docs/assets/chunks/{min.Cum8AlQw.js → min.zWnFcpcc.js} +1 -1
  40. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.BLiysLpe.js → mindmap-definition-QFDTVHPH.Qs4MQBea.js} +1 -1
  41. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.BoIDyuKF.js → pieDiagram-DEJITSTG.BmPHgsk7.js} +1 -1
  42. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DLkpDytR.js → quadrantDiagram-34T5L4WZ.D5MQ3gwA.js} +1 -1
  43. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.DqTVqSu2.js → requirementDiagram-MS252O5E.CkdUFrO7.js} +1 -1
  44. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.CG_6FF7j.js → sankeyDiagram-XADWPNL6.KZrljrAV.js} +1 -1
  45. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BIp9602K.js → sequenceDiagram-FGHM5R23.XMoEW-Lx.js} +1 -1
  46. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.COSXsD9I.js → stateDiagram-FHFEXIEX.BmTzePLj.js} +1 -1
  47. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.Cu5X28zZ.js +1 -0
  48. package/dist/docs/assets/chunks/{theme.CXJ7PNwy.js → theme.BfQzpxsg.js} +2 -2
  49. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.CXdVqkLq.js → timeline-definition-GMOUNBTQ.Dug0oamp.js} +1 -1
  50. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.CZxGuc4r.js → vennDiagram-DHZGUBPP.BOTHrEFu.js} +1 -1
  51. package/dist/docs/assets/chunks/{wardley-RL74JXVD.3oVgfqQk.js → wardley-RL74JXVD.DXy2i1LS.js} +1 -1
  52. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.6_irCgGJ.js → wardleyDiagram-NUSXRM2D.CoXKdfi6.js} +1 -1
  53. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.TRPe92m3.js → xychartDiagram-5P7HB3ND.DXoSCjAW.js} +1 -1
  54. package/dist/docs/assets/{deployment.md.D2jQZuFx.js → deployment.md.D2YX7u_I.js} +1 -1
  55. package/dist/docs/assets/{guides_agent-to-agent.md.CD4T5FIl.js → guides_agent-to-agent.md.C6kPY8nu.js} +2 -2
  56. package/dist/docs/assets/{guides_cloud-agents.md.Cp1O3u-X.js → guides_cloud-agents.md.BPJqTZjT.js} +1 -1
  57. package/dist/docs/assets/{guides_grokbot-agents.md.CMhZNdEU.js → guides_grokbot-agents.md.CzV715v8.js} +1 -1
  58. package/dist/docs/assets/guides_hooks.md.BT9GLwEp.js +50 -0
  59. package/dist/docs/assets/guides_hooks.md.BT9GLwEp.lean.js +1 -0
  60. package/dist/docs/assets/{guides_jev.md.F5fAkkfN.js → guides_jev.md.DeSCqMaO.js} +6 -44
  61. package/dist/docs/assets/guides_jev.md.DeSCqMaO.lean.js +1 -0
  62. package/dist/docs/assets/reference_agent-config.md.BRxAlnRy.js +36 -0
  63. package/dist/docs/assets/{reference_agent-config.md.DGPyw7ms.lean.js → reference_agent-config.md.BRxAlnRy.lean.js} +1 -1
  64. package/dist/docs/assets/reference_artifacts.md.KRX0sAdt.js +18 -0
  65. package/dist/docs/assets/reference_artifacts.md.KRX0sAdt.lean.js +1 -0
  66. package/dist/docs/assets/reference_channels.md.DZr14vm7.js +23 -0
  67. package/dist/docs/assets/reference_channels.md.DZr14vm7.lean.js +1 -0
  68. package/dist/docs/assets/{reference_connections.md.Je9dMsdd.js → reference_connections.md.DJGUCxrr.js} +18 -30
  69. package/dist/docs/assets/{reference_connections.md.Je9dMsdd.lean.js → reference_connections.md.DJGUCxrr.lean.js} +1 -1
  70. package/dist/docs/assets/{reference_evals.md.DNJzM_yf.js → reference_evals.md.C6umwNC6.js} +6 -7
  71. package/dist/docs/assets/reference_evals.md.C6umwNC6.lean.js +1 -0
  72. package/dist/docs/assets/{reference_extensions.md.Cv5aLCz_.js → reference_extensions.md.DbNYu-DP.js} +3 -3
  73. package/dist/docs/assets/{reference_extensions.md.Cv5aLCz_.lean.js → reference_extensions.md.DbNYu-DP.lean.js} +1 -1
  74. package/dist/docs/assets/reference_hooks.md.BfOkhTU0.js +45 -0
  75. package/dist/docs/assets/{reference_hooks.md.B7uzNENk.lean.js → reference_hooks.md.BfOkhTU0.lean.js} +1 -1
  76. package/dist/docs/assets/reference_http-api.md.DdwtBeCj.js +11 -0
  77. package/dist/docs/assets/{reference_http-api.md.CduHavZ2.lean.js → reference_http-api.md.DdwtBeCj.lean.js} +1 -1
  78. package/dist/docs/assets/reference_instructions.md.B2mcIzT6.js +14 -0
  79. package/dist/docs/assets/reference_instructions.md.B2mcIzT6.lean.js +1 -0
  80. package/dist/docs/assets/reference_playground.md.CyrQD_n3.js +1 -0
  81. package/dist/docs/assets/reference_playground.md.CyrQD_n3.lean.js +1 -0
  82. package/dist/docs/assets/reference_project-layout.md.BEMzxAkq.js +19 -0
  83. package/dist/docs/assets/{reference_project-layout.md.BGhgpy9V.lean.js → reference_project-layout.md.BEMzxAkq.lean.js} +1 -1
  84. package/dist/docs/assets/reference_prompt.md.BFrqjHFL.js +9 -0
  85. package/dist/docs/assets/reference_prompt.md.BFrqjHFL.lean.js +1 -0
  86. package/dist/docs/assets/reference_schedules.md.BB9N3tRR.js +47 -0
  87. package/dist/docs/assets/reference_schedules.md.BB9N3tRR.lean.js +1 -0
  88. package/dist/docs/assets/reference_sessions.md.BBp-GIt-.js +1 -0
  89. package/dist/docs/assets/{reference_sessions.md.1_6Vyv7x.lean.js → reference_sessions.md.BBp-GIt-.lean.js} +1 -1
  90. package/dist/docs/assets/reference_skills.md.BVmi3UJ_.js +15 -0
  91. package/dist/docs/assets/{reference_skills.md.DjQkRefx.lean.js → reference_skills.md.BVmi3UJ_.lean.js} +1 -1
  92. package/dist/docs/assets/reference_subagents.md.DRoRy2Uj.js +10 -0
  93. package/dist/docs/assets/{reference_subagents.md.Dl16gcBj.lean.js → reference_subagents.md.DRoRy2Uj.lean.js} +1 -1
  94. package/dist/docs/assets/{reference_tools.md.B1dH1lpa.js → reference_tools.md.CgocLDX1.js} +9 -6
  95. package/dist/docs/assets/{reference_tools.md.B1dH1lpa.lean.js → reference_tools.md.CgocLDX1.lean.js} +1 -1
  96. package/dist/docs/assets/troubleshooting.md.HY95rCCz.js +1 -0
  97. package/dist/docs/building-with-agents.html +35 -35
  98. package/dist/docs/deployment.html +37 -37
  99. package/dist/docs/deployment.md +1 -1
  100. package/dist/docs/evals.html +35 -35
  101. package/dist/docs/guides/agent-to-agent.html +38 -38
  102. package/dist/docs/guides/agent-to-agent.md +11 -12
  103. package/dist/docs/guides/bitbucket.html +35 -35
  104. package/dist/docs/guides/cloud-agents.html +36 -36
  105. package/dist/docs/guides/cloud-agents.md +1 -1
  106. package/dist/docs/guides/convert-automation.html +35 -35
  107. package/dist/docs/guides/github.html +35 -35
  108. package/dist/docs/guides/gitlab.html +35 -35
  109. package/dist/docs/guides/grokbot-agents.html +37 -37
  110. package/dist/docs/guides/grokbot-agents.md +1 -1
  111. package/dist/docs/guides/hooks.html +109 -0
  112. package/dist/docs/guides/hooks.md +111 -0
  113. package/dist/docs/guides/improve.html +35 -35
  114. package/dist/docs/guides/jev.html +42 -80
  115. package/dist/docs/guides/jev.md +22 -79
  116. package/dist/docs/guides/mcp-oauth.html +36 -36
  117. package/dist/docs/guides/opentelemetry.html +35 -35
  118. package/dist/docs/guides/slack.html +35 -35
  119. package/dist/docs/guides/webhooks.html +35 -35
  120. package/dist/docs/hashmap.json +1 -1
  121. package/dist/docs/hillclimbing.html +35 -35
  122. package/dist/docs/index.html +35 -35
  123. package/dist/docs/llms-full.txt +993 -1303
  124. package/dist/docs/llms.txt +8 -7
  125. package/dist/docs/quickstart.html +35 -35
  126. package/dist/docs/reference/agent-config.html +42 -46
  127. package/dist/docs/reference/agent-config.md +48 -81
  128. package/dist/docs/reference/artifacts.html +39 -40
  129. package/dist/docs/reference/artifacts.md +71 -70
  130. package/dist/docs/reference/channels.html +41 -61
  131. package/dist/docs/reference/channels.md +134 -201
  132. package/dist/docs/reference/cli.html +35 -35
  133. package/dist/docs/reference/connections.html +54 -66
  134. package/dist/docs/reference/connections.md +92 -128
  135. package/dist/docs/reference/evals.html +42 -43
  136. package/dist/docs/reference/evals.md +42 -50
  137. package/dist/docs/reference/extensions.html +38 -38
  138. package/dist/docs/reference/extensions.md +9 -13
  139. package/dist/docs/reference/hooks.html +39 -67
  140. package/dist/docs/reference/hooks.md +72 -146
  141. package/dist/docs/reference/http-api.html +39 -39
  142. package/dist/docs/reference/http-api.md +137 -161
  143. package/dist/docs/reference/instructions.html +39 -39
  144. package/dist/docs/reference/instructions.md +21 -36
  145. package/dist/docs/reference/playground.html +36 -36
  146. package/dist/docs/reference/playground.md +26 -43
  147. package/dist/docs/reference/project-layout.html +38 -38
  148. package/dist/docs/reference/project-layout.md +12 -17
  149. package/dist/docs/reference/prompt.html +42 -42
  150. package/dist/docs/reference/prompt.md +18 -13
  151. package/dist/docs/reference/schedules.html +56 -91
  152. package/dist/docs/reference/schedules.md +52 -99
  153. package/dist/docs/reference/sessions.html +36 -36
  154. package/dist/docs/reference/sessions.md +36 -40
  155. package/dist/docs/reference/skills.html +38 -38
  156. package/dist/docs/reference/skills.md +15 -26
  157. package/dist/docs/reference/subagents.html +38 -38
  158. package/dist/docs/reference/subagents.md +20 -30
  159. package/dist/docs/reference/tools.html +44 -41
  160. package/dist/docs/reference/tools.md +45 -64
  161. package/dist/docs/templates/agentic-owners.html +35 -35
  162. package/dist/docs/templates/pr-autofixer.html +35 -35
  163. package/dist/docs/templates/security-reviewer.html +35 -35
  164. package/dist/docs/templates/thermo-quality-review.html +35 -35
  165. package/dist/docs/templates/thermo-review.html +35 -35
  166. package/dist/docs/templates/triage.html +35 -35
  167. package/dist/docs/troubleshooting.html +36 -36
  168. package/dist/docs/troubleshooting.md +1 -1
  169. package/dist/playground/assets/{index-DSMAewbx.css → index-C61EWMBK.css} +1 -1
  170. package/dist/playground/index.html +2 -2
  171. package/docs/deployment.md +1 -1
  172. package/docs/guides/agent-to-agent.md +11 -12
  173. package/docs/guides/cloud-agents.md +1 -1
  174. package/docs/guides/grokbot-agents.md +1 -1
  175. package/docs/guides/hooks.md +116 -0
  176. package/docs/guides/jev.md +23 -80
  177. package/docs/reference/agent-config.md +48 -81
  178. package/docs/reference/artifacts.md +72 -71
  179. package/docs/reference/channels.md +135 -202
  180. package/docs/reference/connections.md +93 -129
  181. package/docs/reference/evals.md +43 -51
  182. package/docs/reference/extensions.md +9 -13
  183. package/docs/reference/hooks.md +72 -146
  184. package/docs/reference/http-api.md +137 -161
  185. package/docs/reference/instructions.md +22 -37
  186. package/docs/reference/playground.md +26 -43
  187. package/docs/reference/project-layout.md +12 -17
  188. package/docs/reference/prompt.md +20 -15
  189. package/docs/reference/schedules.md +52 -99
  190. package/docs/reference/sessions.md +36 -40
  191. package/docs/reference/skills.md +15 -26
  192. package/docs/reference/subagents.md +20 -30
  193. package/docs/reference/tools.md +45 -64
  194. package/docs/troubleshooting.md +1 -1
  195. package/package.json +1 -1
  196. package/dist/docs/assets/chunks/@localSearchIndexroot.Ck9E52Ls.js +0 -1
  197. package/dist/docs/assets/chunks/channel.BHiYmnZ4.js +0 -1
  198. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.Degh8l90.js +0 -1
  199. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.Degh8l90.js +0 -1
  200. package/dist/docs/assets/chunks/clone.BIywbczV.js +0 -1
  201. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.qrxrbFsX.js +0 -1
  202. package/dist/docs/assets/guides_jev.md.F5fAkkfN.lean.js +0 -1
  203. package/dist/docs/assets/reference_agent-config.md.DGPyw7ms.js +0 -40
  204. package/dist/docs/assets/reference_artifacts.md.Bu_4HmsD.js +0 -19
  205. package/dist/docs/assets/reference_artifacts.md.Bu_4HmsD.lean.js +0 -1
  206. package/dist/docs/assets/reference_channels.md.nFWbzAic.js +0 -43
  207. package/dist/docs/assets/reference_channels.md.nFWbzAic.lean.js +0 -1
  208. package/dist/docs/assets/reference_evals.md.DNJzM_yf.lean.js +0 -1
  209. package/dist/docs/assets/reference_hooks.md.B7uzNENk.js +0 -73
  210. package/dist/docs/assets/reference_http-api.md.CduHavZ2.js +0 -11
  211. package/dist/docs/assets/reference_instructions.md.CU1My5My.js +0 -14
  212. package/dist/docs/assets/reference_instructions.md.CU1My5My.lean.js +0 -1
  213. package/dist/docs/assets/reference_playground.md.Ch2d0Iqi.js +0 -1
  214. package/dist/docs/assets/reference_playground.md.Ch2d0Iqi.lean.js +0 -1
  215. package/dist/docs/assets/reference_project-layout.md.BGhgpy9V.js +0 -19
  216. package/dist/docs/assets/reference_prompt.md.Ccp0R53H.js +0 -1
  217. package/dist/docs/assets/reference_prompt.md.Ccp0R53H.lean.js +0 -1
  218. package/dist/docs/assets/reference_schedules.md.B2Nm6FaD.js +0 -82
  219. package/dist/docs/assets/reference_schedules.md.B2Nm6FaD.lean.js +0 -1
  220. package/dist/docs/assets/reference_sessions.md.1_6Vyv7x.js +0 -1
  221. package/dist/docs/assets/reference_skills.md.DjQkRefx.js +0 -15
  222. package/dist/docs/assets/reference_subagents.md.Dl16gcBj.js +0 -10
  223. package/dist/docs/assets/troubleshooting.md.mnfFG2Em.js +0 -1
  224. /package/dist/docs/assets/{deployment.md.D2jQZuFx.lean.js → deployment.md.D2YX7u_I.lean.js} +0 -0
  225. /package/dist/docs/assets/{guides_agent-to-agent.md.CD4T5FIl.lean.js → guides_agent-to-agent.md.C6kPY8nu.lean.js} +0 -0
  226. /package/dist/docs/assets/{guides_cloud-agents.md.Cp1O3u-X.lean.js → guides_cloud-agents.md.BPJqTZjT.lean.js} +0 -0
  227. /package/dist/docs/assets/{guides_grokbot-agents.md.CMhZNdEU.lean.js → guides_grokbot-agents.md.CzV715v8.lean.js} +0 -0
  228. /package/dist/docs/assets/{troubleshooting.md.mnfFG2Em.lean.js → troubleshooting.md.HY95rCCz.lean.js} +0 -0
  229. /package/dist/playground/assets/{index-De_lpFxE.js → index-CrMWlgUU.js} +0 -0
@@ -3,34 +3,33 @@ title: "HTTP API"
3
3
  description: "Public session, discovery, and channel routes callers use."
4
4
  ---
5
5
 
6
- # HTTP API reference
7
-
8
- Agent SDK hosts expose the same public HTTP surface. In the default
9
- multi-agent layout each agent is namespaced under its slug
10
- (`/<slug>/v1/session`, `/<slug>/playground`), with host-level routes at
11
- the root. With `--mode single`, one agent serves the same surface
12
- unslugged (`/v1/*`).
13
-
14
- Unless noted otherwise, routes run the agent's HTTP auth chain: the
15
- default is `localDevStrict()` (loopback only), replaced by `bearerAuth` under
16
- `--bearer-token` or `allowAll()` under `--allow-anonymous`. Session
17
- routes also require the caller to be the session's owner (`403`
18
- otherwise). Errors return JSON
19
- `{ ok: false, error: "<code>", message? }` with a matching HTTP status.
20
-
21
- ## Host-level routes (multi-agent mode)
22
-
23
- These routes live at the host root, above any agent. The two index
24
- routes exist only while the playground is enabled (`--no-playground`
25
- removes them) and run no auth. The documentation site is mounted in
26
- both layouts and removed by `--no-docs`.
27
-
28
- | Route | What it does |
29
- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
30
- | `GET /` | A web index of every mounted agent, linking to playgrounds (playground only) |
31
- | `GET /v1/agents` | The JSON index of mounted agents (playground only, no auth) |
32
- | `GET /docs`, `GET /docs/*` | This documentation, served as a static site (both layouts, no auth) |
33
- | `GET /v1/health` | Host-level liveness, no auth |
6
+ # HTTP API
7
+
8
+ Agent SDK hosts expose one public HTTP surface. In the default
9
+ multi-agent layout, each agent uses `/<slug>/v1/*`; `--mode single`
10
+ serves the same routes at `/v1/*`. Routes use the agent's HTTP auth
11
+ chain, and session-owned resources return `403` to another principal.
12
+
13
+ Unless a section says otherwise, the default auth policy is
14
+ `localDevStrict()`. `--bearer-token` replaces it with bearer auth, and
15
+ `--allow-anonymous` replaces it with anonymous access. Built-in JSON
16
+ routes use `{ ok: false, error: "<code>", message? }` for errors; MCP
17
+ uses JSON-RPC, and custom channel handlers define their own responses.
18
+
19
+ ## Host routes
20
+
21
+ These routes live at the host root in multi-agent mode. The index routes
22
+ exist only when the playground is enabled.
23
+
24
+ | Route | Contract |
25
+ | --- | --- |
26
+ | `GET /` | HTML index of mounted agents; no auth |
27
+ | `GET /v1/agents` | JSON index of mounted agents; no auth |
28
+ | `GET /docs`, `GET /docs/*` | Documentation site in either layout; no auth |
29
+ | `GET /v1/health` | Host liveness; no auth |
30
+
31
+ `--no-playground` removes the two index routes. `--no-docs` removes the
32
+ documentation site.
34
33
 
35
34
  ## Start a session
36
35
 
@@ -44,18 +43,18 @@ curl -X POST http://127.0.0.1:3000/<slug>/v1/session \
44
43
  # "playgroundUrl":"…?sessionId=ses_…","traceUrl":"…/v1/session/ses_…/events"}
45
44
  ```
46
45
 
47
- The response returns as soon as the message is accepted; follow the
48
- stream for progress. The continuation token is the follow-up credential,
49
- and `playgroundUrl` deep-links the session in the playground.
46
+ Once accepted, the response returns `sessionId` for inspection and
47
+ `continuationToken` for follow-ups; follow the stream for progress.
50
48
 
51
- | Body field | Meaning |
49
+ | Body field | Contract |
52
50
  | --- | --- |
53
51
  | `message` | Required user message |
54
- | `title` | Session title |
52
+ | `title` | Display title |
55
53
  | `dryRun` | Run read tools and stub write tools |
56
- | `asOf` | ISO-8601 instant with a timezone, frozen at create; the prompt states it, `ctx.now()` returns it, and tool calls with relative, later-than-`asOf`, or omitted schema-declared time bounds are refused. `400` when unusable |
57
- | `workspaceFiles` | UTF-8 files written into the session workspace |
54
+ | `asOf` | ISO-8601 instant with a timezone; sets `ctx.now()` and rejects omitted, relative, or later declared tool time arguments. Invalid values return `400` |
55
+ | `workspaceFiles` | Relative files added to the session workspace |
58
56
  | `cloud` | Per-session cloud options merged over the agent defaults |
57
+ | `purpose` | Use `"eval"` to mark regression traffic |
59
58
 
60
59
  ## Send a follow-up
61
60
 
@@ -67,15 +66,15 @@ curl -X POST http://127.0.0.1:3000/<slug>/v1/session/ses_… \
67
66
  -d '{"continuationToken":"http:…","message":"Make it shorter."}'
68
67
  ```
69
68
 
70
- Works for any chat session, including ones created by custom channels.
71
- Each accepted follow-up rotates the token, and the response carries the
72
- new one. Sending to a busy session interrupts the in-flight turn, waits
73
- for it to settle, then sends.
69
+ The route accepts any chat session, including one created by a custom
70
+ channel. Each accepted follow-up rotates the continuation token and
71
+ returns the replacement. A message sent to a busy session interrupts
72
+ the active turn before starting.
74
73
 
75
- Expect `409` on a stale token or a task session. Task sessions do not accept
76
- follow-ups. Expect `403` when the caller is not the session owner.
74
+ The route returns `409` for a stale token or task session, and `403`
75
+ when the caller doesn't own the session.
77
76
 
78
- ## Stream a session
77
+ ## Stream or replay session events
79
78
 
80
79
  `GET /v1/session/:sessionId/stream` is the live NDJSON feed.
81
80
 
@@ -83,44 +82,36 @@ follow-ups. Expect `403` when the caller is not the session owner.
83
82
  curl -N 'http://127.0.0.1:3000/<slug>/v1/session/ses_…/stream?startIndex=0'
84
83
  ```
85
84
 
86
- One NDJSON event per line, from `startIndex`, then following live. The
87
- default is `0`: omitting the parameter replays the entire recorded
88
- stream before following. Pass the last index you've seen plus one to
89
- resume without duplicates. The stream is durable and reconnectable. For
90
- the vocabulary, see
91
- [Sessions](./sessions.md#which-events-can-i-stream).
85
+ The route replays one event per line from `startIndex`, then follows new
86
+ events. The default `0` replays the full stream. To reconnect without
87
+ duplicates, pass the last index you received plus one.
92
88
 
93
89
  `GET /v1/session/:sessionId/events` returns a one-shot NDJSON dump.
94
- Pass `?format=json` for `{ sessionId, events, playgroundUrl }`.
95
-
96
- ## Stop and list
97
-
98
- `POST /v1/session/:sessionId/stop` interrupts the in-flight turn without
99
- sending a new message. `GET /v1/sessions` lists sessions owned by the
100
- calling principal. Under `serve --dev` on loopback it includes all
101
- sessions, which is how webhook and schedule sessions show up in the
102
- playground.
90
+ Pass `?format=json` for `{ sessionId, events, playgroundUrl }`. See
91
+ [Stream events](./sessions.md#stream-events) for the event vocabulary.
103
92
 
104
- ## Session cost
93
+ ## Manage sessions
105
94
 
106
- `GET /v1/session/:sessionId/cost` returns the session's cost report:
107
- per-turn token usage and the engine's estimated cost, folded from
108
- `turn.completed` events. It runs the same owner check as the other
109
- session routes and returns `404` for an unknown session. The
110
- [`agent-sdk cost`](./cli.md#cost) command reports the same data.
95
+ | Route | Contract |
96
+ | --- | --- |
97
+ | `POST /v1/session/:sessionId/stop` | Interrupt the active turn without sending another message |
98
+ | `GET /v1/sessions` | List sessions owned by the caller |
99
+ | `GET /v1/session/:sessionId/cost` | Return per-turn token usage and estimated cost |
111
100
 
112
- ## Approvals
101
+ On loopback under `serve --dev`, the session list includes every
102
+ principal so webhook and schedule sessions appear in the playground.
103
+ The cost route returns `404` for an unknown session.
113
104
 
114
- Two routes list and resolve parked tool calls.
105
+ ## Resolve tool approvals
115
106
 
116
- | Route | What it does |
117
- | ----------------------------------------------- | -------------------------------------------------------------- |
118
- | `GET /v1/session/:sessionId/approvals` | Pending human-in-the-loop tool approvals |
119
- | `POST /v1/session/:sessionId/approvals/:callId` | Resolve one: `{"decision":"approve"}` or `{"decision":"deny"}` |
107
+ | Route | Contract |
108
+ | --- | --- |
109
+ | `GET /v1/session/:sessionId/approvals` | List pending tool approvals |
110
+ | `POST /v1/session/:sessionId/approvals/:callId` | Resolve one with `{"decision":"approve"}` or `{"decision":"deny"}` |
120
111
 
121
112
  For the lifecycle, see [Gate a tool on human approval](./tools.md#gate-a-tool-on-human-approval).
122
113
 
123
- ## Call a tool directly
114
+ ## Call a tool without a model turn
124
115
 
125
116
  `POST /v1/tools/:toolName` runs a server tool with no model turn.
126
117
 
@@ -132,130 +123,115 @@ curl -X POST http://127.0.0.1:3000/<slug>/v1/tools/inspect_pr \
132
123
  # "isError":false,"result":{…},"durationMs":12}
133
124
  ```
134
125
 
135
- It runs an authored server tool in-process: schema-validated, no model
136
- turn. An optional `"sessionId"` in the body runs it inside an existing
137
- session and records it on that session's stream (`409 session_busy`
138
- for a write-effect call while a turn runs; reads run alongside the
139
- turn). Agent-execution tools are rejected with `400`, and
140
- unknown tools with `404` and the list of available names. For the
141
- semantics, see [Tools](./tools.md#call-a-tool-without-a-model-turn).
126
+ | Body field | Contract |
127
+ | --- | --- |
128
+ | `input` | Tool input; defaults to `{}` |
129
+ | `sessionId` | Bind the call to an existing session |
130
+ | `continuationToken` | Bind the call by its wire continuation token; mutually exclusive with `sessionId` |
142
131
 
143
- An optional `"continuationToken"` (`<channelId>:<key>`, as
144
- `/v1/sessions` lists it; mutually exclusive with `sessionId`) addresses
145
- the session by continuation token instead; malformed tokens are
146
- rejected with `400 invalid_continuation_token`. For the semantics, see
147
- [Tools](./tools.md#call-a-tool-without-a-model-turn).
132
+ Omit both identifiers for an unbound call. Agent-execution tools return
133
+ `400`, and an unknown name returns `404` with the available names. See
134
+ [Tools](./tools.md#call-a-tool-without-a-model-turn) for session
135
+ binding, busy-session rules, and error codes.
148
136
 
149
- ## Discovery
137
+ ## Discovery routes
150
138
 
151
139
  These read-only routes describe the running agent.
152
140
 
153
- | Route | What it does |
154
- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
155
- | `GET /v1/info` | The discovered surface: model, tools, skills, MCP connections, subagents, channels and routes (with schemas), schedules, hooks, diagnostics |
156
- | `GET /v1/tools` | The live tool catalog: authored server tools plus advertised MCP passthroughs under model-facing names, as light `{ name, title?, source? }` entries. `session` / `continuationToken` query parameters bind the listing to a session identity (advertised inventories can be tenant-scoped); a connection whose listing fails is skipped and reported in `connectionErrors` |
157
- | `GET /v1/tools/:name` | One catalog tool's full description: description, execution, `needsApproval`, `effect`, input and output schemas, source connection. Same session binding as the listing; unknown names get `404` with the available names |
158
- | `GET /v1/health` | Per-agent liveness, no auth |
159
- | `GET /v1/logs?after=N` | Recent server log lines, with a polling cursor |
141
+ | Route | Contract |
142
+ | --- | --- |
143
+ | `GET /v1/info` | Return the discovered model, tools, skills, connections, subagents, channels, schedules, hooks, and diagnostics |
144
+ | `GET /v1/tools` | Return live server tools and advertised MCP tools as `{ name, title?, source? }`; bind tenant-scoped listings with `session` or `continuationToken` |
145
+ | `GET /v1/tools/:name` | Return one tool's description, execution mode, approval and effect rules, schemas, and source |
146
+ | `GET /v1/health` | Return per-agent liveness; no auth |
147
+ | `GET /v1/logs?after=N` | Return recent server logs and the next polling cursor |
160
148
 
161
- ## Artifacts
149
+ An unknown tool name returns `404` with available names. If an MCP
150
+ connection can't list its tools, the catalog skips that connection and
151
+ includes it in `connectionErrors`.
162
152
 
163
- Two routes read durable artifacts tagged by `ctx.artifacts` or
164
- `tag_artifact`. See [Artifacts](./artifacts.md).
153
+ ## List and download artifacts
165
154
 
166
- | Route | What it does |
167
- | -------------------------------- | ------------------------------------------------------------------------------------------------------ |
168
- | `GET /v1/artifacts` | List artifacts as `{ artifacts }`, newest-updated first. Filter with `?kind=`, `?sessionId=`, and `?limit=` (a positive integer) |
169
- | `GET /v1/artifacts/:id/content` | Download one artifact's file or blob payload. Served as an attachment, never rendered inline; `404` when the artifact is unknown or carries no content |
155
+ | Route | Contract |
156
+ | --- | --- |
157
+ | `GET /v1/artifacts` | Return `{ artifacts }`, newest-updated first; filter with `kind`, `sessionId`, and a positive `limit` |
158
+ | `GET /v1/artifacts/:id/content` | Download an artifact's file or blob as an attachment; return `404` when no content exists |
170
159
 
171
- Session ownership applies the same way as `GET /v1/sessions`: under
172
- `serve --dev` on loopback (or `--allow-anonymous`) the list spans all
173
- principals, while bearer or custom channel auth keeps strict
174
- per-principal isolation.
160
+ The list follows the same ownership rules as `GET /v1/sessions`. See
161
+ [Artifacts](./artifacts.md) for tagging and record fields.
175
162
 
176
- ## Custom channel routes
163
+ ## Call custom channel routes
177
164
 
178
- Authored routes mount under `/v1/channels/<id>` with the methods, paths,
179
- and Zod schemas the channel declared (a
180
- `POST /<slug>/v1/channels/drive` route, say). Bodies are validated before
181
- handlers run (`400` on schema violations), and each channel's auth chain
182
- applies. The GitHub channel verifies `X-Hub-Signature-256` when a
183
- secret is configured. See [Channels](./channels.md).
165
+ Authored routes mount under `/v1/channels/<id>` with their declared
166
+ methods and paths. The host validates their Zod body and query schemas
167
+ before calling the handler, returning `400` on failure. Each channel's
168
+ auth chain applies. See [Channels](./channels.md).
184
169
 
185
170
  ## MCP endpoint
186
171
 
187
- `/v1/mcp` serves the Model Context Protocol over streamable HTTP
188
- (stateless; POST carries the protocol, and GET/DELETE return
189
- spec-compliant 405s). The tools are `ask` (delegate a message, bounded
190
- waits), `check` (poll a running session), and `call_tool` (deterministic
191
- server-tool passthrough, present when the agent has server tools). The
192
- route runs the same auth chain as the session API. Peer wiring:
193
- [MCP connections](./connections.md#peer-mcp-connection).
172
+ Both MCP routes use stateless streamable HTTP. Send protocol requests
173
+ with `POST`; `GET` and `DELETE` return `405`.
194
174
 
195
- `/v1/mcp/tools` is a second stateless MCP endpoint exposing only the
196
- agent's deterministic server tools. Hosted cloud turns call back into
197
- it through the URL configured by `serve --cloud-tools-url`. Unlike
198
- `/v1/mcp`, it runs the CLI-level auth chain (loopback, bearer, or
199
- anonymous), not any authored channel auth.
175
+ | Route | Tools and auth |
176
+ | --- | --- |
177
+ | `/v1/mcp` | `ask`, `check`, and `call_tool` when server tools exist; uses the session API auth chain |
178
+ | `/v1/mcp/tools` | Deterministic server tools only; uses the CLI-level loopback, bearer, or anonymous auth chain |
179
+
180
+ See [MCP connections](./connections.md#peer-mcp-connection) to connect
181
+ one agent to another.
200
182
 
201
183
  ## Playground eval routes
202
184
 
203
- The playground Evals tab and `agent-sdk eval --prod` / `--url` use these:
185
+ The playground Evals tab and remote eval commands use these routes:
204
186
 
205
- | Route | What it does |
206
- | ------------------------------- | ---------------------------------------------------------------------------------------------------------- |
207
- | `GET /v1/dev/evals` | List discovered eval datapoints and project config |
208
- | `GET /v1/dev/evals/runs` | List recent run snapshots, newest first |
209
- | `POST /v1/dev/evals/runs` | Start an eval run (`{filterIds?, tags?}`); `202` with a snapshot (`runId` is the Eval ID), `404` when nothing matches, `409` when one is running |
210
- | `GET /v1/dev/evals/runs/:runId` | Poll a run's progress |
211
- | `POST /v1/dev/evals/runs/:runId/cancel` | Cancel a running batch; `200` with snapshot, `404` unknown, `409` when not running |
187
+ | Route | Contract |
188
+ | --- | --- |
189
+ | `GET /v1/dev/evals` | List discovered cases and eval config |
190
+ | `GET /v1/dev/evals/runs` | List recent run snapshots, newest first |
191
+ | `POST /v1/dev/evals/runs` | Start `{ filterIds?, tags?, timeoutMs?, verbose? }`; return `202`, `404` for no match, or `409` while another run is active |
192
+ | `GET /v1/dev/evals/runs/:runId` | Return progress and the final snapshot |
193
+ | `POST /v1/dev/evals/runs/:runId/cancel` | Cancel an active run; return `404` when unknown or `409` when no longer running |
212
194
 
213
- Eval runs are asynchronous. Poll the run route for case progress and
214
- the final `completed` or `failed` status. Batch errors appear on the
215
- snapshot returned by the poll. Entries within `filterIds` and `tags`
216
- use OR semantics. When both fields are present, a case must match one
217
- entry from each field. Listed runs persist across restarts when
218
- durable storage is configured. Otherwise they are
219
- process-memory only.
195
+ Poll the run route until its status is `completed`, `failed`, or
196
+ `cancelled`. Entries within `filterIds` and `tags` use OR semantics;
197
+ when both fields are present, a case must match each group.
220
198
 
221
199
  ## Dev-mode routes
222
200
 
223
201
  These routes exist only under `serve --dev`.
224
202
 
225
- | Route | What it does |
226
- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
203
+ | Route | Contract |
204
+ | --- | --- |
227
205
  | `POST /v1/dev/schedules/:scheduleId` | Dispatch a schedule by hand, exactly once. Returns `{scheduleId, sessionIds}` |
228
- | `GET /v1/dev/reminders` | List reminders |
229
- | `POST /v1/dev/reminders/:reminderId` | Fire a reminder by hand |
206
+ | `GET /v1/dev/reminders` | List reminders |
207
+ | `POST /v1/dev/reminders/:reminderId` | Fire a reminder by hand |
230
208
 
231
209
  Schedules and reminders never fire automatically in dev mode. These
232
- routes are the only way they run, which keeps iteration deterministic.
210
+ routes run them manually.
233
211
 
234
212
  ## Playground assets
235
213
 
236
214
  `GET /playground` and `GET /playground/assets/:file` serve the
237
- playground (omitted with `--no-playground`). It calls the JSON API
238
- above and has no privileged surface.
215
+ playground. `--no-playground` removes both routes.
239
216
 
240
217
  ## Status codes
241
218
 
242
- Error responses use a small, consistent set of status codes.
243
-
244
- | Code | Meaning here |
245
- | ----- | -------------------------------------------------------------------------------------------------------------------------- |
246
- | `400` | Schema-invalid body or query, agent-execution tool called on the host, malformed request |
247
- | `401` | No auth policy admitted the request |
248
- | `403` | Authenticated, but not the session owner |
249
- | `404` | Unknown session, tool, schedule, reminder, or eval run; no eval datapoints match a run request |
250
- | `405` | Wrong method (GET on the MCP endpoint, say) |
251
- | `409` | Stale continuation token, a busy session-bound tool call, a non-followable task session, or an eval run already in progress |
252
- | `202` | Accepted for background work (GitHub `{ task }` hooks, eval runs) |
253
-
254
- ## What's next
219
+ Built-in routes use these common status codes.
255
220
 
256
- Continue with these pages:
257
-
258
- - [Sessions and streaming](./sessions.md): the handles and events these
259
- routes traffic in
260
- - [Channels](./channels.md): authoring your own routes
261
- - [Deployment](../deployment.md): auth on real hosts
221
+ | Code | Meaning |
222
+ | --- | --- |
223
+ | `400` | Invalid body, query, tool input, or request shape |
224
+ | `401` | No auth policy admitted the request |
225
+ | `403` | The caller is authenticated but doesn't own the resource |
226
+ | `404` | A named resource doesn't exist, or an eval selection matches no cases |
227
+ | `405` | The route doesn't accept this method |
228
+ | `409` | The resource state rejects the request, such as a stale token or busy write |
229
+ | `202` | The request was accepted for asynchronous work |
230
+ | `500` | A write-effect tool can't create its session workspace (`workspace_unavailable`) |
231
+
232
+ ## Related
233
+
234
+ - [Sessions](./sessions.md)
235
+ - [Channels](./channels.md)
236
+ - [Tools](./tools.md)
237
+ - [Deployment](../deployment.md)
@@ -1,23 +1,21 @@
1
1
  ---
2
2
  title: "Instructions"
3
- description: "The always-on system prompt: authoring forms, how it reaches the model on each runtime, and what makes instructions hold up."
3
+ description: "The always-on system prompt: authoring forms, how it reaches each runtime, and what belongs in it."
4
4
  ---
5
5
 
6
6
  # Instructions
7
7
 
8
- `agent/instructions.md` is the always-on system prompt. It's the one
9
- piece of prose the model sees on every turn. It's required on the root
10
- agent; subagents may inline `instructions` in their `agent.ts` instead.
8
+ Agent instructions form the always-on system prompt and reach the model
9
+ on every turn. A root agent requires them; a subagent may inline
10
+ `instructions` in `agent.ts` instead.
11
11
 
12
12
  ## Authoring forms
13
13
 
14
- Three forms cover every case.
15
-
16
- | Form | Reach for it when |
14
+ | Form | Use it when |
17
15
  | --- | --- |
18
- | `agent/instructions.md` | Plain Markdown for most agents. |
19
- | `agent/instructions.ts` | Generated prompts. Default-export `defineInstructions({ markdown })` or a plain string. |
20
- | `agent/instructions/` directory | A long prompt split across files, composed in filename order. |
16
+ | `agent/instructions.md` | Plain Markdown for most agents |
17
+ | `agent/instructions.ts` | Generated prompts. Default-export `defineInstructions({ markdown })` or a plain string |
18
+ | `agent/instructions/` directory | A long prompt split across files, composed in filename order |
21
19
 
22
20
  ```ts
23
21
  // agent/instructions.ts
@@ -28,22 +26,17 @@ export default defineInstructions({
28
26
  });
29
27
  ```
30
28
 
31
- ## How instructions reach the model
32
-
33
- On the local runtime, instructions land in the session workspace as
34
- `AGENTS.md`, and the harness loads them natively. On the cloud runtime,
35
- they're prepended to the first prompt, because the cloud VM doesn't
36
- share the local session workspace.
29
+ ## Delivery
37
30
 
38
- The local workspace is a real Cursor project directory, so the harness
39
- may also load ambient `AGENTS.md` and `.cursor` config from ancestor
40
- directories. [Agent config Local cwd](./agent-config.md#local-cwd)
41
- covers controlling that.
31
+ Local and cloud turns receive the composed instructions. They aren't
32
+ written into the session workspace. Parent directories can still
33
+ contribute ambient `AGENTS.md` and `.cursor` settings; [Agent config:
34
+ local cwd](./agent-config.md#local-cwd) covers how to control that.
42
35
 
43
- ## What to put in instructions
36
+ ## Contents
44
37
 
45
- Keep them a few lines: identity, when to use which tool, output shape.
46
- The [quickstart PR approver](../quickstart.md) is the pattern:
38
+ Keep them a few lines: identity, when to use which tool, and the output
39
+ shape. The [quickstart PR approver](../quickstart.md) is the pattern:
47
40
 
48
41
  ```md
49
42
  # PR approver
@@ -57,21 +50,13 @@ You review GitHub pull requests. Be specific and brief.
57
50
  End with one sentence: the verdict and why.
58
51
  ```
59
52
 
60
- - Name the tools and the decision rule ("use X before answering about
61
- Y"), not general encouragement.
62
- - State the output contract: length, format, fences. That contract is
63
- what your [evals](../evals.md) gate.
64
- - Move procedures to [skills](./skills.md). A multi-step workflow the
65
- model only sometimes needs belongs in `agent/skills/`, where it loads
66
- on demand and keeps the always-on prompt small.
67
-
68
- Instructions are the third lever in the
69
- [hillclimbing loop](../hillclimbing.md), after host preparation and evidence
70
- shape. If a fixture keeps failing, look there before rewriting prose.
71
-
72
- ## What's next
53
+ Name the tools and the decision rule ("use X before answering about
54
+ Y"), not general encouragement. State the output contract, including
55
+ length, format, and fences, so your [evals](../evals.md) can gate it.
56
+ Put multi-step workflows the model only sometimes needs in
57
+ `agent/skills/`; they load on demand and keep the always-on prompt small.
73
58
 
74
- Continue with these pages:
59
+ ## Related
75
60
 
76
61
  - [Skills](./skills.md): procedures the model loads only when relevant
77
62
  - [Agent config](./agent-config.md): the file next to this one
@@ -5,55 +5,38 @@ description: "The built-in web UI: chat with streaming, Try buttons and slash co
5
5
 
6
6
  # Playground
7
7
 
8
- Every served agent ships with a web playground at
8
+ `agent-sdk serve` enables a web playground at
9
9
  `http://127.0.0.1:3000/<slug>/playground` (or `/playground` in single
10
- mode). Anything you can do there you can also do with curl.
11
-
12
- ## What it does
13
-
14
- Use the playground to chat, try channel routes, and inspect sessions.
15
-
16
- - **Chat** with the agent. Text and reasoning stream live, and tool
17
- calls appear inline with their arguments, output, and error state.
18
- - **Slash commands**: custom channel routes become composer commands
19
- (a `drive` route becomes `/drive <pr-url>`), with `/help` and
20
- autocomplete.
21
- - **Try** any channel route from the Agent surface. The modal remembers
22
- your last body per endpoint and has Copy curl, and a successful Try
23
- opens the created session.
24
- - **Sessions**: browse the sessions you own (chat, custom-channel,
25
- schedule tasks) and replay their event streams. In `--dev` on
26
- loopback, or with `--allow-anonymous`, the list includes every
27
- principal. Search by session ID to filter the list, or press Enter
28
- to open an ID directly. "Open trace" renders a saved event stream.
29
- - **Approvals**: parked `needsApproval` tool calls render Approve /
30
- Deny buttons.
31
- - **Evals**: list and run filesystem evals from the browser (backed by
32
- `/v1/dev/evals`). Schedule hand-dispatch still requires `--dev`.
33
- - **The surface**: inspect the discovered tools, skills, subagents, MCP
34
- connections, channels, and hooks.
35
- - **Custom tool chips**: drop `agent/playground/tools/<toolName>.tsx` to
36
- change how that tool renders. Chips compile from the agent tree;
37
- an [extension](./extensions.md) cannot contribute them.
38
- - **Raw events pane**: flip it on to inspect the event stream.
39
- - **Logs tab**: recent server log lines, polled from `GET /v1/logs`.
40
-
41
- In multi-agent mode each agent has its own playground at
42
- `/<slug>/playground`, and `/` is an index of them all.
43
-
44
- ## Share it beyond localhost
10
+ mode). In multi-agent mode, each agent has its own playground, and `/`
11
+ lists them all.
12
+
13
+ ## Playground surfaces
14
+
15
+ | Surface | What you can do |
16
+ | --- | --- |
17
+ | Chat | Talk to the agent. Text and reasoning stream live, and tool calls appear inline with their arguments, output, and error state |
18
+ | Slash commands | Custom channel routes without path parameters become composer commands; GitHub and Slack ingress routes are excluded. A `drive` route becomes `/drive <pr-url>`, with `/help` and autocomplete |
19
+ | Try | Invoke a custom channel route from the Agent tab. The modal remembers your last body per endpoint, copies curl, and opens a session when the route creates one |
20
+ | Runs | Browse the sessions you own and eval runs. Search by title or identifier; open sessions in Chat, Trace, or Raw and eval runs in Evals |
21
+ | Approvals | Parked `needsApproval` tool calls render Approve / Deny buttons |
22
+ | Evals | List and run filesystem evals from the browser |
23
+ | Agent | Inspect the discovered tools, skills, subagents, MCP connections, channels, and hooks |
24
+ | Raw | Inspect the selected session's event stream |
25
+ | Logs | Recent server log lines, polled from `GET /v1/logs` |
26
+
27
+ In `--dev` on loopback, or with `--allow-anonymous`, the session list
28
+ includes every principal.
29
+
30
+ ## Remote access
45
31
 
46
32
  The default `localDevStrict()` auth admits direct loopback calls only
47
33
  and rejects proxy-forwarding headers, so a tunnel or LAN address won't
48
- work
49
- until you pass `--bearer-token <secret>` (or
34
+ work until you pass `--bearer-token <secret>` (or
50
35
  `serve(dir, { authToken })`). Open the playground on the remote device
51
- and paste the token into the token field in the navbar. `--allow-anonymous` is the
52
- demo-only alternative for trusted networks.
53
-
54
- ## What's next
36
+ and paste the token into the token field in the navbar.
37
+ `--allow-anonymous` is the demo-only alternative for trusted networks.
55
38
 
56
- Continue with these pages:
39
+ ## Related
57
40
 
58
41
  - [HTTP API](./http-api.md): the HTTP surface the playground uses
59
42
  - [Sessions and streaming](./sessions.md): the streams it renders