@cursor/july 0.1.92 → 0.1.93

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 (324) hide show
  1. package/README.md +117 -162
  2. package/dist/channels/deployments/deployments-channel.d.ts +7 -0
  3. package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
  4. package/dist/channels/deployments/deployments-channel.js +26 -2
  5. package/dist/channels/deployments/types.d.ts +8 -0
  6. package/dist/channels/deployments/types.d.ts.map +1 -1
  7. package/dist/channels/github/github-channel.d.ts +3 -0
  8. package/dist/channels/github/github-channel.d.ts.map +1 -1
  9. package/dist/channels/github/github-channel.js +28 -56
  10. package/dist/continuation.d.ts +1 -1
  11. package/dist/continuation.js +1 -1
  12. package/dist/docs/404.html +2 -2
  13. package/dist/docs/ab.html +8 -8
  14. package/dist/docs/ab.md +7 -13
  15. package/dist/docs/assets/{ab.md.CVzWxLoB.js → ab.md.DJo5r4R-.js} +4 -4
  16. package/dist/docs/assets/{ab.md.CVzWxLoB.lean.js → ab.md.DJo5r4R-.lean.js} +1 -1
  17. package/dist/docs/assets/{app.Bci6CM9E.js → app.CjWU-x0z.js} +1 -1
  18. package/dist/docs/assets/building-with-agents.md.DI4mEzlt.js +13 -0
  19. package/dist/docs/assets/{building-with-agents.md.DH8A_cHA.lean.js → building-with-agents.md.DI4mEzlt.lean.js} +1 -1
  20. package/dist/docs/assets/chunks/@localSearchIndexroot.ChpIC3Zy.js +1 -0
  21. package/dist/docs/assets/chunks/{VPLocalSearchBox.BCPT6xA-.js → VPLocalSearchBox.Cxy8ySFQ.js} +1 -1
  22. package/dist/docs/assets/chunks/{theme.BEA8BF3c.js → theme.Dvq1Bktu.js} +2 -2
  23. package/dist/docs/assets/concepts.md.F6AiPorA.js +1 -0
  24. package/dist/docs/assets/{concepts.md.CRfU3bVg.lean.js → concepts.md.F6AiPorA.lean.js} +1 -1
  25. package/dist/docs/assets/{deployment.md.DX_hc3ze.js → deployment.md.DoLFAzfm.js} +6 -6
  26. package/dist/docs/assets/{evals.md.a0SMN6r9.js → evals.md.lfJoEVc8.js} +6 -6
  27. package/dist/docs/assets/{evals.md.a0SMN6r9.lean.js → evals.md.lfJoEVc8.lean.js} +1 -1
  28. package/dist/docs/assets/{example-agents_approval-buddy.md.DNL83puR.js → example-agents_approval-buddy.md.DmezILPg.js} +1 -1
  29. package/dist/docs/assets/{example-agents_benny.md.C40vHRLc.js → example-agents_benny.md.B0kwY7D_.js} +2 -4
  30. package/dist/docs/assets/{example-agents_benny.md.C40vHRLc.lean.js → example-agents_benny.md.B0kwY7D_.lean.js} +1 -1
  31. package/dist/docs/assets/{example-agents_codebase-wiki.md.Dftj_tPp.js → example-agents_codebase-wiki.md.BBNw9Ekr.js} +3 -3
  32. package/dist/docs/assets/{example-agents_codebase-wiki.md.Dftj_tPp.lean.js → example-agents_codebase-wiki.md.BBNw9Ekr.lean.js} +1 -1
  33. package/dist/docs/assets/{example-agents_concierge.md.MrKpQndp.js → example-agents_concierge.md.BzB2b20R.js} +2 -3
  34. package/dist/docs/assets/example-agents_index.md.ChBp0AX6.js +2 -0
  35. package/dist/docs/assets/example-agents_index.md.ChBp0AX6.lean.js +1 -0
  36. package/dist/docs/assets/{example-agents_knowledge-base.md.DqKqHQ9u.js → example-agents_knowledge-base.md.CrA85ig-.js} +1 -1
  37. package/dist/docs/assets/{example-agents_security-reviewer.md.Bai6D0Ee.js → example-agents_security-reviewer.md.74pPpWYj.js} +1 -1
  38. package/dist/docs/assets/{example-agents_weather-agent.md.lVEAbWFf.js → example-agents_weather-agent.md.CaGpmw3Y.js} +2 -2
  39. package/dist/docs/assets/{guides_agent-to-agent.md.BCeVdJRJ.js → guides_agent-to-agent.md.B3JIaAqz.js} +1 -1
  40. package/dist/docs/assets/{guides_cloud-runtime.md.BSMLIBHr.js → guides_cloud-runtime.md.BnvjPiia.js} +2 -2
  41. package/dist/docs/assets/{guides_cloud-runtime.md.BSMLIBHr.lean.js → guides_cloud-runtime.md.BnvjPiia.lean.js} +1 -1
  42. package/dist/docs/assets/{guides_convert-automation.md.D06eIzea.js → guides_convert-automation.md.Bboisykk.js} +1 -1
  43. package/dist/docs/assets/{guides_github.md.Cdt1s2QC.js → guides_github.md.DqJhuaN1.js} +5 -5
  44. package/dist/docs/assets/{guides_github.md.Cdt1s2QC.lean.js → guides_github.md.DqJhuaN1.lean.js} +1 -1
  45. package/dist/docs/assets/{guides_mcp-oauth.md.Du0f7pGU.js → guides_mcp-oauth.md.CJvrXtkN.js} +2 -2
  46. package/dist/docs/assets/{guides_slack.md.DiUmk_Oi.js → guides_slack.md.mqeNKs84.js} +2 -2
  47. package/dist/docs/assets/{guides_webhooks.md.BpnIdO0i.js → guides_webhooks.md.DKdA43Qm.js} +2 -2
  48. package/dist/docs/assets/{hillclimbing.md.ywF3yDAd.js → hillclimbing.md.DhESf3OO.js} +1 -1
  49. package/dist/docs/assets/{index.md.BAaMXLFd.js → index.md.B-lVR4wT.js} +3 -3
  50. package/dist/docs/assets/{index.md.BAaMXLFd.lean.js → index.md.B-lVR4wT.lean.js} +1 -1
  51. package/dist/docs/assets/{quickstart.md.DsrarzEg.js → quickstart.md.BrmfrrIr.js} +1 -1
  52. package/dist/docs/assets/{reference_agent-config.md.Bqylgw50.js → reference_agent-config.md.Cp_x38Nl.js} +3 -3
  53. package/dist/docs/assets/{reference_channels.md.DQZjCnyh.js → reference_channels.md.Cd2f2iyV.js} +2 -2
  54. package/dist/docs/assets/{reference_channels.md.DQZjCnyh.lean.js → reference_channels.md.Cd2f2iyV.lean.js} +1 -1
  55. package/dist/docs/assets/{reference_cli.md.B7GkAJRC.js → reference_cli.md.D9KESDsD.js} +10 -11
  56. package/dist/docs/assets/{reference_cli.md.B7GkAJRC.lean.js → reference_cli.md.D9KESDsD.lean.js} +1 -1
  57. package/dist/docs/assets/{reference_connections.md.DYidrb-j.js → reference_connections.md.DB6SsN6U.js} +3 -3
  58. package/dist/docs/assets/reference_hooks.md.BxN87gCw.js +14 -0
  59. package/dist/docs/assets/{reference_hooks.md.B9FSgdDe.lean.js → reference_hooks.md.BxN87gCw.lean.js} +1 -1
  60. package/dist/docs/assets/reference_http-api.md.C68BERYr.js +11 -0
  61. package/dist/docs/assets/reference_http-api.md.C68BERYr.lean.js +1 -0
  62. package/dist/docs/assets/{reference_instructions.md.DhNCOl7r.js → reference_instructions.md.CR7XSsGk.js} +3 -3
  63. package/dist/docs/assets/{reference_instructions.md.DhNCOl7r.lean.js → reference_instructions.md.CR7XSsGk.lean.js} +1 -1
  64. package/dist/docs/assets/reference_playground.md.DnX5nL-B.js +1 -0
  65. package/dist/docs/assets/reference_playground.md.DnX5nL-B.lean.js +1 -0
  66. package/dist/docs/assets/{reference_project-layout.md.CwkSbEWT.js → reference_project-layout.md.WN9nwJht.js} +2 -2
  67. package/dist/docs/assets/{reference_prompt.md.DZUMtLPD.js → reference_prompt.md.DnaD5dNK.js} +1 -1
  68. package/dist/docs/assets/{reference_schedules.md.DNipebiG.js → reference_schedules.md.DI_JrHgq.js} +1 -1
  69. package/dist/docs/assets/reference_sessions.md.D0mIh4KK.js +1 -0
  70. package/dist/docs/assets/{reference_sessions.md.tUFzz98S.lean.js → reference_sessions.md.D0mIh4KK.lean.js} +1 -1
  71. package/dist/docs/assets/{reference_skills.md.B5ZEuHfG.js → reference_skills.md.BFW9retM.js} +1 -1
  72. package/dist/docs/assets/{reference_tools.md.wpaJtHn6.js → reference_tools.md.DuKvkYWG.js} +4 -4
  73. package/dist/docs/assets/{reference_tools.md.wpaJtHn6.lean.js → reference_tools.md.DuKvkYWG.lean.js} +1 -1
  74. package/dist/docs/assets/scaffolding-agents.md.D7UUkWw0.js +1 -0
  75. package/dist/docs/assets/{scaffolding-agents.md.CRDDUtYJ.lean.js → scaffolding-agents.md.D7UUkWw0.lean.js} +1 -1
  76. package/dist/docs/assets/{storage.md.JbjlHWZ6.js → storage.md.BOHeqk2M.js} +5 -5
  77. package/dist/docs/assets/{storage.md.JbjlHWZ6.lean.js → storage.md.BOHeqk2M.lean.js} +1 -1
  78. package/dist/docs/assets/{templates_agentic-owners.md.DSJSIpWU.js → templates_agentic-owners.md.DqtPdm6f.js} +2 -2
  79. package/dist/docs/assets/{templates_pr-autofixer.md.1HAR3RXE.js → templates_pr-autofixer.md.R4K_qytS.js} +2 -2
  80. package/dist/docs/assets/{templates_pr-autofixer.md.1HAR3RXE.lean.js → templates_pr-autofixer.md.R4K_qytS.lean.js} +1 -1
  81. package/dist/docs/assets/troubleshooting.md.vCWwvqcJ.js +1 -0
  82. package/dist/docs/assets/{troubleshooting.md.DYECCZiJ.lean.js → troubleshooting.md.vCWwvqcJ.lean.js} +1 -1
  83. package/dist/docs/building-with-agents.html +7 -7
  84. package/dist/docs/building-with-agents.md +5 -11
  85. package/dist/docs/concepts.html +5 -8
  86. package/dist/docs/concepts.md +12 -17
  87. package/dist/docs/deployment.html +11 -11
  88. package/dist/docs/deployment.md +8 -10
  89. package/dist/docs/evals.html +10 -10
  90. package/dist/docs/evals.md +16 -37
  91. package/dist/docs/example-agents/approval-buddy.html +5 -5
  92. package/dist/docs/example-agents/approval-buddy.md +1 -1
  93. package/dist/docs/example-agents/benny.html +5 -7
  94. package/dist/docs/example-agents/benny.md +4 -13
  95. package/dist/docs/example-agents/bugbot.html +4 -4
  96. package/dist/docs/example-agents/codebase-wiki.html +6 -6
  97. package/dist/docs/example-agents/codebase-wiki.md +5 -8
  98. package/dist/docs/example-agents/codeowners-review.html +4 -4
  99. package/dist/docs/example-agents/concierge.html +7 -8
  100. package/dist/docs/example-agents/concierge.md +2 -3
  101. package/dist/docs/example-agents/index.html +6 -6
  102. package/dist/docs/example-agents/index.md +5 -8
  103. package/dist/docs/example-agents/knowledge-base.html +6 -6
  104. package/dist/docs/example-agents/knowledge-base.md +2 -2
  105. package/dist/docs/example-agents/oncall.html +4 -4
  106. package/dist/docs/example-agents/security-reviewer.html +7 -7
  107. package/dist/docs/example-agents/security-reviewer.md +5 -5
  108. package/dist/docs/example-agents/slack-agent.html +4 -4
  109. package/dist/docs/example-agents/weather-agent.html +7 -7
  110. package/dist/docs/example-agents/weather-agent.md +4 -3
  111. package/dist/docs/guides/agent-to-agent.html +5 -5
  112. package/dist/docs/guides/agent-to-agent.md +1 -1
  113. package/dist/docs/guides/cloud-runtime.html +6 -6
  114. package/dist/docs/guides/cloud-runtime.md +8 -25
  115. package/dist/docs/guides/convert-automation.html +6 -6
  116. package/dist/docs/guides/convert-automation.md +3 -3
  117. package/dist/docs/guides/github.html +9 -9
  118. package/dist/docs/guides/github.md +11 -23
  119. package/dist/docs/guides/human-in-the-loop.html +4 -4
  120. package/dist/docs/guides/mcp-oauth.html +6 -6
  121. package/dist/docs/guides/mcp-oauth.md +4 -4
  122. package/dist/docs/guides/opentelemetry.html +4 -4
  123. package/dist/docs/guides/slack.html +7 -7
  124. package/dist/docs/guides/slack.md +4 -4
  125. package/dist/docs/guides/webhooks.html +6 -6
  126. package/dist/docs/guides/webhooks.md +3 -3
  127. package/dist/docs/hashmap.json +1 -1
  128. package/dist/docs/hillclimbing.html +6 -6
  129. package/dist/docs/hillclimbing.md +1 -1
  130. package/dist/docs/index.html +6 -6
  131. package/dist/docs/index.md +2 -10
  132. package/dist/docs/llms-full.txt +300 -850
  133. package/dist/docs/llms.txt +2 -3
  134. package/dist/docs/quickstart.html +5 -5
  135. package/dist/docs/quickstart.md +1 -1
  136. package/dist/docs/reference/agent-config.html +8 -8
  137. package/dist/docs/reference/agent-config.md +10 -15
  138. package/dist/docs/reference/artifacts.html +4 -4
  139. package/dist/docs/reference/channels.html +6 -6
  140. package/dist/docs/reference/channels.md +20 -31
  141. package/dist/docs/reference/cli.html +14 -15
  142. package/dist/docs/reference/cli.md +27 -37
  143. package/dist/docs/reference/connections.html +8 -8
  144. package/dist/docs/reference/connections.md +9 -14
  145. package/dist/docs/reference/hooks.html +6 -6
  146. package/dist/docs/reference/hooks.md +10 -14
  147. package/dist/docs/reference/http-api.html +7 -7
  148. package/dist/docs/reference/http-api.md +17 -37
  149. package/dist/docs/reference/instructions.html +6 -6
  150. package/dist/docs/reference/instructions.md +1 -1
  151. package/dist/docs/reference/playground.html +5 -5
  152. package/dist/docs/reference/playground.md +14 -19
  153. package/dist/docs/reference/project-layout.html +7 -7
  154. package/dist/docs/reference/project-layout.md +2 -2
  155. package/dist/docs/reference/prompt.html +6 -6
  156. package/dist/docs/reference/prompt.md +1 -1
  157. package/dist/docs/reference/schedules.html +6 -6
  158. package/dist/docs/reference/schedules.md +1 -2
  159. package/dist/docs/reference/sessions.html +5 -12
  160. package/dist/docs/reference/sessions.md +8 -19
  161. package/dist/docs/reference/skills.html +6 -6
  162. package/dist/docs/reference/skills.md +3 -3
  163. package/dist/docs/reference/subagents.html +4 -4
  164. package/dist/docs/reference/tools.html +8 -8
  165. package/dist/docs/reference/tools.md +12 -17
  166. package/dist/docs/scaffolding-agents.html +5 -5
  167. package/dist/docs/scaffolding-agents.md +4 -5
  168. package/dist/docs/storage.html +9 -9
  169. package/dist/docs/storage.md +37 -80
  170. package/dist/docs/templates/agentic-owners.html +7 -7
  171. package/dist/docs/templates/agentic-owners.md +2 -2
  172. package/dist/docs/templates/demo.html +4 -4
  173. package/dist/docs/templates/pr-autofixer.html +6 -6
  174. package/dist/docs/templates/pr-autofixer.md +3 -6
  175. package/dist/docs/templates/security-reviewer.html +4 -4
  176. package/dist/docs/templates/triage.html +4 -4
  177. package/dist/docs/troubleshooting.html +5 -5
  178. package/dist/docs/troubleshooting.md +6 -6
  179. package/dist/internal/authored-alias-hooks.d.ts +14 -11
  180. package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
  181. package/dist/internal/authored-alias-hooks.js +14 -11
  182. package/dist/internal/authored-loaders.d.ts +7 -6
  183. package/dist/internal/authored-loaders.d.ts.map +1 -1
  184. package/dist/internal/authored-loaders.js +14 -10
  185. package/dist/internal/cli-deploy.d.ts +1 -1
  186. package/dist/internal/cli-deploy.js +5 -5
  187. package/dist/internal/continuation-channel.d.ts +6 -3
  188. package/dist/internal/continuation-channel.d.ts.map +1 -1
  189. package/dist/internal/continuation-channel.js +44 -40
  190. package/dist/internal/continuation-identity.d.ts +17 -16
  191. package/dist/internal/continuation-identity.d.ts.map +1 -1
  192. package/dist/internal/continuation-identity.js +109 -36
  193. package/dist/internal/deploy-manifest.d.ts +2 -2
  194. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  195. package/dist/internal/deploy-manifest.js +4 -9
  196. package/dist/internal/discovery.d.ts.map +1 -1
  197. package/dist/internal/discovery.js +3 -0
  198. package/dist/internal/distribution.d.ts +4 -3
  199. package/dist/internal/distribution.d.ts.map +1 -1
  200. package/dist/internal/distribution.js +4 -3
  201. package/dist/internal/hosted-delivery-protocol.d.ts +38 -0
  202. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -0
  203. package/dist/internal/hosted-delivery-protocol.js +70 -0
  204. package/dist/internal/hosted-delivery.d.ts +35 -0
  205. package/dist/internal/hosted-delivery.d.ts.map +1 -0
  206. package/dist/internal/hosted-delivery.js +226 -0
  207. package/dist/internal/http-channel.d.ts.map +1 -1
  208. package/dist/internal/http-channel.js +1 -1
  209. package/dist/internal/review-comments.d.ts +186 -63
  210. package/dist/internal/review-comments.d.ts.map +1 -1
  211. package/dist/internal/review-comments.js +350 -168
  212. package/dist/internal/server.d.ts.map +1 -1
  213. package/dist/internal/server.js +21 -3
  214. package/dist/internal/session-engine.d.ts +5 -0
  215. package/dist/internal/session-engine.d.ts.map +1 -1
  216. package/dist/internal/session-engine.js +13 -3
  217. package/dist/internal/shallow-clone.d.ts +8 -2
  218. package/dist/internal/shallow-clone.d.ts.map +1 -1
  219. package/dist/internal/shallow-clone.js +17 -10
  220. package/dist/playground/assets/{index-DDvyC2z6.js → index-D9MFzhNE.js} +1 -1
  221. package/dist/playground/index.html +1 -1
  222. package/dist/types.d.ts +9 -17
  223. package/dist/types.d.ts.map +1 -1
  224. package/docs/README.md +2 -10
  225. package/docs/ab.md +7 -13
  226. package/docs/building-with-agents.md +5 -11
  227. package/docs/concepts.md +12 -17
  228. package/docs/deployment.md +8 -10
  229. package/docs/evals.md +16 -37
  230. package/docs/example-agents/approval-buddy.md +1 -1
  231. package/docs/example-agents/benny.md +4 -13
  232. package/docs/example-agents/codebase-wiki.md +5 -8
  233. package/docs/example-agents/concierge.md +2 -3
  234. package/docs/example-agents/index.md +6 -9
  235. package/docs/example-agents/knowledge-base.md +2 -2
  236. package/docs/example-agents/security-reviewer.md +5 -5
  237. package/docs/example-agents/weather-agent.md +4 -3
  238. package/docs/guides/agent-to-agent.md +1 -1
  239. package/docs/guides/cloud-runtime.md +8 -25
  240. package/docs/guides/convert-automation.md +3 -3
  241. package/docs/guides/github.md +11 -23
  242. package/docs/guides/mcp-oauth.md +4 -4
  243. package/docs/guides/slack.md +4 -4
  244. package/docs/guides/webhooks.md +3 -3
  245. package/docs/hillclimbing.md +1 -1
  246. package/docs/quickstart.md +1 -1
  247. package/docs/reference/agent-config.md +10 -15
  248. package/docs/reference/channels.md +20 -31
  249. package/docs/reference/cli.md +27 -37
  250. package/docs/reference/connections.md +9 -14
  251. package/docs/reference/hooks.md +10 -14
  252. package/docs/reference/http-api.md +18 -38
  253. package/docs/reference/instructions.md +1 -1
  254. package/docs/reference/playground.md +14 -19
  255. package/docs/reference/project-layout.md +2 -2
  256. package/docs/reference/prompt.md +1 -1
  257. package/docs/reference/schedules.md +1 -2
  258. package/docs/reference/sessions.md +8 -19
  259. package/docs/reference/skills.md +3 -3
  260. package/docs/reference/tools.md +12 -17
  261. package/docs/scaffolding-agents.md +4 -5
  262. package/docs/storage.md +37 -80
  263. package/docs/templates/agentic-owners.md +2 -2
  264. package/docs/templates/pr-autofixer.md +3 -6
  265. package/docs/troubleshooting.md +6 -6
  266. package/package.json +8 -1
  267. package/src/channels/deployments/deployments-channel.ts +32 -2
  268. package/src/channels/deployments/types.ts +8 -0
  269. package/src/channels/github/github-channel.ts +71 -21
  270. package/src/continuation.ts +1 -1
  271. package/src/internal/authored-alias-hooks.ts +14 -11
  272. package/src/internal/authored-loaders.ts +14 -10
  273. package/src/internal/cli-deploy.ts +5 -5
  274. package/src/internal/continuation-channel.ts +62 -45
  275. package/src/internal/continuation-identity.ts +123 -38
  276. package/src/internal/deploy-manifest.ts +5 -9
  277. package/src/internal/discovery.ts +3 -0
  278. package/src/internal/distribution.ts +4 -3
  279. package/src/internal/hosted-delivery-protocol.ts +114 -0
  280. package/src/internal/hosted-delivery.ts +327 -0
  281. package/src/internal/http-channel.ts +0 -2
  282. package/src/internal/review-comments.ts +542 -229
  283. package/src/internal/server.ts +29 -2
  284. package/src/internal/session-engine.ts +25 -1
  285. package/src/internal/shallow-clone.ts +30 -16
  286. package/src/types.ts +9 -17
  287. package/dist/docs/assets/building-with-agents.md.DH8A_cHA.js +0 -13
  288. package/dist/docs/assets/chunks/@localSearchIndexroot.Dv-Q0XtU.js +0 -1
  289. package/dist/docs/assets/concepts.md.CRfU3bVg.js +0 -4
  290. package/dist/docs/assets/example-agents_fsd.md.ZWHWWZPE.js +0 -15
  291. package/dist/docs/assets/example-agents_fsd.md.ZWHWWZPE.lean.js +0 -1
  292. package/dist/docs/assets/example-agents_index.md.QZ8mhr6n.js +0 -2
  293. package/dist/docs/assets/example-agents_index.md.QZ8mhr6n.lean.js +0 -1
  294. package/dist/docs/assets/reference_hooks.md.B9FSgdDe.js +0 -14
  295. package/dist/docs/assets/reference_http-api.md.CSHVobzG.js +0 -11
  296. package/dist/docs/assets/reference_http-api.md.CSHVobzG.lean.js +0 -1
  297. package/dist/docs/assets/reference_playground.md.Dfb92yQf.js +0 -1
  298. package/dist/docs/assets/reference_playground.md.Dfb92yQf.lean.js +0 -1
  299. package/dist/docs/assets/reference_sessions.md.tUFzz98S.js +0 -8
  300. package/dist/docs/assets/scaffolding-agents.md.CRDDUtYJ.js +0 -1
  301. package/dist/docs/assets/troubleshooting.md.DYECCZiJ.js +0 -1
  302. package/dist/docs/example-agents/fsd.html +0 -41
  303. package/dist/docs/example-agents/fsd.md +0 -329
  304. package/docs/example-agents/fsd.md +0 -334
  305. /package/dist/docs/assets/{deployment.md.DX_hc3ze.lean.js → deployment.md.DoLFAzfm.lean.js} +0 -0
  306. /package/dist/docs/assets/{example-agents_approval-buddy.md.DNL83puR.lean.js → example-agents_approval-buddy.md.DmezILPg.lean.js} +0 -0
  307. /package/dist/docs/assets/{example-agents_concierge.md.MrKpQndp.lean.js → example-agents_concierge.md.BzB2b20R.lean.js} +0 -0
  308. /package/dist/docs/assets/{example-agents_knowledge-base.md.DqKqHQ9u.lean.js → example-agents_knowledge-base.md.CrA85ig-.lean.js} +0 -0
  309. /package/dist/docs/assets/{example-agents_security-reviewer.md.Bai6D0Ee.lean.js → example-agents_security-reviewer.md.74pPpWYj.lean.js} +0 -0
  310. /package/dist/docs/assets/{example-agents_weather-agent.md.lVEAbWFf.lean.js → example-agents_weather-agent.md.CaGpmw3Y.lean.js} +0 -0
  311. /package/dist/docs/assets/{guides_agent-to-agent.md.BCeVdJRJ.lean.js → guides_agent-to-agent.md.B3JIaAqz.lean.js} +0 -0
  312. /package/dist/docs/assets/{guides_convert-automation.md.D06eIzea.lean.js → guides_convert-automation.md.Bboisykk.lean.js} +0 -0
  313. /package/dist/docs/assets/{guides_mcp-oauth.md.Du0f7pGU.lean.js → guides_mcp-oauth.md.CJvrXtkN.lean.js} +0 -0
  314. /package/dist/docs/assets/{guides_slack.md.DiUmk_Oi.lean.js → guides_slack.md.mqeNKs84.lean.js} +0 -0
  315. /package/dist/docs/assets/{guides_webhooks.md.BpnIdO0i.lean.js → guides_webhooks.md.DKdA43Qm.lean.js} +0 -0
  316. /package/dist/docs/assets/{hillclimbing.md.ywF3yDAd.lean.js → hillclimbing.md.DhESf3OO.lean.js} +0 -0
  317. /package/dist/docs/assets/{quickstart.md.DsrarzEg.lean.js → quickstart.md.BrmfrrIr.lean.js} +0 -0
  318. /package/dist/docs/assets/{reference_agent-config.md.Bqylgw50.lean.js → reference_agent-config.md.Cp_x38Nl.lean.js} +0 -0
  319. /package/dist/docs/assets/{reference_connections.md.DYidrb-j.lean.js → reference_connections.md.DB6SsN6U.lean.js} +0 -0
  320. /package/dist/docs/assets/{reference_project-layout.md.CwkSbEWT.lean.js → reference_project-layout.md.WN9nwJht.lean.js} +0 -0
  321. /package/dist/docs/assets/{reference_prompt.md.DZUMtLPD.lean.js → reference_prompt.md.DnaD5dNK.lean.js} +0 -0
  322. /package/dist/docs/assets/{reference_schedules.md.DNipebiG.lean.js → reference_schedules.md.DI_JrHgq.lean.js} +0 -0
  323. /package/dist/docs/assets/{reference_skills.md.B5ZEuHfG.lean.js → reference_skills.md.BFW9retM.lean.js} +0 -0
  324. /package/dist/docs/assets/{templates_agentic-owners.md.DSJSIpWU.lean.js → templates_agentic-owners.md.DqtPdm6f.lean.js} +0 -0
@@ -9,18 +9,18 @@
9
9
  <link rel="preload stylesheet" href="/docs/assets/style.BRuM8477.css" as="style">
10
10
  <link rel="preload stylesheet" href="/docs/vp-icons.css" as="style">
11
11
 
12
- <script type="module" src="/docs/assets/app.Bci6CM9E.js"></script>
12
+ <script type="module" src="/docs/assets/app.CjWU-x0z.js"></script>
13
13
  <link rel="preload" href="/docs/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
14
- <link rel="modulepreload" href="/docs/assets/chunks/theme.BEA8BF3c.js">
14
+ <link rel="modulepreload" href="/docs/assets/chunks/theme.Dvq1Bktu.js">
15
15
  <link rel="modulepreload" href="/docs/assets/chunks/framework.BCISBCiQ.js">
16
- <link rel="modulepreload" href="/docs/assets/storage.md.JbjlHWZ6.lean.js">
16
+ <link rel="modulepreload" href="/docs/assets/storage.md.BOHeqk2M.lean.js">
17
17
  <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
18
18
  <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
19
19
  <link rel="alternate" type="text/plain" href="/docs/llms.txt">
20
20
  <link rel="alternate" type="text/markdown" href="/docs/storage.md">
21
21
  </head>
22
22
  <body>
23
- <div id="app"><div class="Layout" data-v-282c430e><!--[--><!--]--><!--[--><span tabindex="-1" data-v-af8643bc></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-af8643bc>Skip to content</a><!--]--><!----><header class="VPNav" data-v-282c430e data-v-4751689a><div class="VPNavBar" data-v-4751689a data-v-d2a336f3><div class="wrapper" data-v-d2a336f3><div class="container" data-v-d2a336f3><div class="title" data-v-d2a336f3><div class="VPNavBarTitle has-sidebar" data-v-d2a336f3 data-v-3a787a7b><a class="title" href="/docs/" data-v-3a787a7b><!--[--><!--]--><!----><span data-v-3a787a7b>Agent SDK</span><!--[--><!--[--><!--[--><!--[--><span class="agent-sdk-version" title="@cursor/july 0.1.92" data-v-c26a5f4f>0.1.92</span><!--]--><!--]--><!--]--><!--]--></a></div></div><div class="content" data-v-d2a336f3><div class="content-body" data-v-d2a336f3><!--[--><!--]--><div class="VPNavBarSearch search" data-v-d2a336f3><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-d2a336f3 data-v-b60c0a58><span id="main-nav-aria-label" class="visually-hidden" data-v-b60c0a58> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/docs/quickstart.html" tabindex="0" data-v-b60c0a58 data-v-74de87b9><!--[--><span data-v-74de87b9>Quickstart</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/docs/guides/webhooks.html" tabindex="0" data-v-b60c0a58 data-v-74de87b9><!--[--><span data-v-74de87b9>Guides</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/docs/example-agents/" tabindex="0" data-v-b60c0a58 data-v-74de87b9><!--[--><span data-v-74de87b9>Examples</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/docs/reference/project-layout.html" tabindex="0" data-v-b60c0a58 data-v-74de87b9><!--[--><span data-v-74de87b9>Reference</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-d2a336f3 data-v-d559fc20><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-d559fc20 data-v-deaafa36 data-v-88da49d2><span class="check" data-v-88da49d2><span class="icon" data-v-88da49d2><!--[--><span class="vpi-sun sun" data-v-deaafa36></span><span class="vpi-moon moon" data-v-deaafa36></span><!--]--></span></span></button></div><!----><div class="VPFlyout VPNavBarExtra extra" data-v-d2a336f3 data-v-75b97eb1 data-v-ed271fd4><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-ed271fd4><span class="vpi-more-horizontal icon" data-v-ed271fd4></span></button><div class="menu" data-v-ed271fd4><div class="VPMenu" data-v-ed271fd4 data-v-505057d2><!----><!--[--><!--[--><!----><div class="group" data-v-75b97eb1><div class="item appearance" data-v-75b97eb1><p class="label" data-v-75b97eb1>Appearance</p><div class="appearance-action" data-v-75b97eb1><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-75b97eb1 data-v-deaafa36 data-v-88da49d2><span class="check" data-v-88da49d2><span class="icon" data-v-88da49d2><!--[--><span class="vpi-sun sun" data-v-deaafa36></span><span class="vpi-moon moon" data-v-deaafa36></span><!--]--></span></span></button></div></div></div><!----><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-d2a336f3 data-v-966f1ac7><span class="container" data-v-966f1ac7><span class="top" data-v-966f1ac7></span><span class="middle" data-v-966f1ac7></span><span class="bottom" data-v-966f1ac7></span></span></button></div></div></div></div><div class="divider" data-v-d2a336f3><div class="divider-line" data-v-d2a336f3></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-282c430e data-v-f96f8409><div class="container" data-v-f96f8409><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-f96f8409><span class="vpi-align-left menu-icon" data-v-f96f8409></span><span class="menu-text" data-v-f96f8409>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-f96f8409 data-v-1bc67f4b><button data-v-1bc67f4b>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-282c430e data-v-3d1258d2><div class="curtain" data-v-3d1258d2></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-3d1258d2><span class="visually-hidden" id="sidebar-aria-label" data-v-3d1258d2> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Getting started</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Overview</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/quickstart.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Quickstart</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/scaffolding-agents.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Scaffold an agent with Cursor</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/convert-automation.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Convert a Cursor Automation</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/concepts.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Concepts</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Templates</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/templates/demo.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Demo agent</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/templates/security-reviewer.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Security reviewer</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/templates/agentic-owners.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Agentic Owners</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/templates/pr-autofixer.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>PR autofixer</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/templates/triage.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Triage agent</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0 has-active" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Improving agents</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/building-with-agents.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Building agents with agents</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/evals.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Evals</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/ab.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Live A/B metrics</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/storage.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Storage</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/hillclimbing.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Hillclimbing</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Guides</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/webhooks.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Webhooks & custom channels</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/github.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>GitHub</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/slack.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Slack</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/human-in-the-loop.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Human-in-the-loop approvals</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/agent-to-agent.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Agent-to-agent</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/mcp-oauth.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Host MCP OAuth</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/cloud-runtime.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Cloud runtime</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/opentelemetry.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>OpenTelemetry</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Example agents</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Choose an example</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/weather-agent.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Weather agent</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/slack-agent.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Slack agent</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/concierge.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Concierge</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/benny.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Playbook router</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/oncall.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Alert investigator</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/bugbot.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>PR evidence reviewer</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/approval-buddy.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Approval Buddy</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/security-reviewer.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Security Reviewer</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/fsd.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Remote PR coordinator</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/knowledge-base.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Knowledge base</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/codebase-wiki.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Codebase wiki</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/codeowners-review.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Codeowners review</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Operating</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/deployment.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Deployment</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/troubleshooting.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Fix common problems</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0 collapsible" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Reference</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-61fcdc7c><span class="vpi-chevron-right caret-icon" data-v-61fcdc7c></span></div></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/project-layout.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Project layout</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/agent-config.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Agent config</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/instructions.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Instructions</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/tools.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Tools</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/prompt.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>prompt</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/skills.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Skills</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/connections.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>MCP Connections</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/subagents.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Subagents</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/channels.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Channels</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/schedules.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Schedules & reminders</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/hooks.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Hooks</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/artifacts.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Artifacts</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/sessions.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Sessions & streaming</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/playground.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Playground</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/cli.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>CLI</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/http-api.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>HTTP API</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-282c430e data-v-3b8d81ee><div class="VPDoc has-sidebar has-aside" data-v-3b8d81ee data-v-2e506a34><!--[--><!--]--><div class="container" data-v-2e506a34><div class="aside" data-v-2e506a34><div class="aside-curtain" data-v-2e506a34></div><div class="aside-container" data-v-2e506a34><div class="aside-content" data-v-2e506a34><div class="VPDocAside" data-v-2e506a34 data-v-b485a79e><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-b485a79e data-v-cc6b345c><div class="content" data-v-cc6b345c><div class="outline-marker" data-v-cc6b345c></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-cc6b345c>On this page</div><ul class="VPDocOutlineItem root" data-v-cc6b345c data-v-4f0215bf><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-b485a79e></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-2e506a34><div class="content-container" data-v-2e506a34><!--[--><!--]--><main class="main" data-v-2e506a34><div style="position:relative;" class="vp-doc _docs_storage" data-v-2e506a34><div><h1 id="storage" tabindex="-1">Storage <a class="header-anchor" href="#storage" aria-label="Permalink to &quot;Storage&quot;">​</a></h1><p>The Agent SDK owns durable storage for sessions, continuation tokens, reminders, playground eval history, and live A/B samples. It chooses the keys (under <code>agentkit/v1/</code>), when to read and write, and how to restore after restart.</p><p>Keys have bounded length: caller-controlled segments (channel ids, continuation tokens) are URI-encoded, and any segment past 256 encoded bytes is replaced by its <code>sha256:…</code> digest — deterministically, so writes and lookups always agree. Backends can rely on this instead of imposing their own key-length caps (which would silently drop writes, since a throwing <code>put</code> is at-most-once).</p><p>By default that storage lives under <code>--state-root</code> on local disk. Fine for one machine; it does not survive replacing the host.</p><p>To keep the same framework storage across hosts, plug in a key-value backend with <code>agent/storage.ts</code>. You provide <code>put</code> / <code>get</code> / <code>delete</code> / <code>list</code>. The optional <code>cas</code> group adds conditional writes (see <a href="#conditional-writes-the-cas-group">Conditional writes</a>). The Agent SDK does the rest.</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;">// agent/storage.ts</span></span>
23
+ <div id="app"><div class="Layout" data-v-282c430e><!--[--><!--]--><!--[--><span tabindex="-1" data-v-af8643bc></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-af8643bc>Skip to content</a><!--]--><!----><header class="VPNav" data-v-282c430e data-v-4751689a><div class="VPNavBar" data-v-4751689a data-v-d2a336f3><div class="wrapper" data-v-d2a336f3><div class="container" data-v-d2a336f3><div class="title" data-v-d2a336f3><div class="VPNavBarTitle has-sidebar" data-v-d2a336f3 data-v-3a787a7b><a class="title" href="/docs/" data-v-3a787a7b><!--[--><!--]--><!----><span data-v-3a787a7b>Agent SDK</span><!--[--><!--[--><!--[--><!--[--><span class="agent-sdk-version" title="@cursor/july 0.1.93" data-v-c26a5f4f>0.1.93</span><!--]--><!--]--><!--]--><!--]--></a></div></div><div class="content" data-v-d2a336f3><div class="content-body" data-v-d2a336f3><!--[--><!--]--><div class="VPNavBarSearch search" data-v-d2a336f3><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-d2a336f3 data-v-b60c0a58><span id="main-nav-aria-label" class="visually-hidden" data-v-b60c0a58> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/docs/quickstart.html" tabindex="0" data-v-b60c0a58 data-v-74de87b9><!--[--><span data-v-74de87b9>Quickstart</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/docs/guides/webhooks.html" tabindex="0" data-v-b60c0a58 data-v-74de87b9><!--[--><span data-v-74de87b9>Guides</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/docs/example-agents/" tabindex="0" data-v-b60c0a58 data-v-74de87b9><!--[--><span data-v-74de87b9>Examples</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/docs/reference/project-layout.html" tabindex="0" data-v-b60c0a58 data-v-74de87b9><!--[--><span data-v-74de87b9>Reference</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-d2a336f3 data-v-d559fc20><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-d559fc20 data-v-deaafa36 data-v-88da49d2><span class="check" data-v-88da49d2><span class="icon" data-v-88da49d2><!--[--><span class="vpi-sun sun" data-v-deaafa36></span><span class="vpi-moon moon" data-v-deaafa36></span><!--]--></span></span></button></div><!----><div class="VPFlyout VPNavBarExtra extra" data-v-d2a336f3 data-v-75b97eb1 data-v-ed271fd4><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-ed271fd4><span class="vpi-more-horizontal icon" data-v-ed271fd4></span></button><div class="menu" data-v-ed271fd4><div class="VPMenu" data-v-ed271fd4 data-v-505057d2><!----><!--[--><!--[--><!----><div class="group" data-v-75b97eb1><div class="item appearance" data-v-75b97eb1><p class="label" data-v-75b97eb1>Appearance</p><div class="appearance-action" data-v-75b97eb1><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-75b97eb1 data-v-deaafa36 data-v-88da49d2><span class="check" data-v-88da49d2><span class="icon" data-v-88da49d2><!--[--><span class="vpi-sun sun" data-v-deaafa36></span><span class="vpi-moon moon" data-v-deaafa36></span><!--]--></span></span></button></div></div></div><!----><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-d2a336f3 data-v-966f1ac7><span class="container" data-v-966f1ac7><span class="top" data-v-966f1ac7></span><span class="middle" data-v-966f1ac7></span><span class="bottom" data-v-966f1ac7></span></span></button></div></div></div></div><div class="divider" data-v-d2a336f3><div class="divider-line" data-v-d2a336f3></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-282c430e data-v-f96f8409><div class="container" data-v-f96f8409><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-f96f8409><span class="vpi-align-left menu-icon" data-v-f96f8409></span><span class="menu-text" data-v-f96f8409>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-f96f8409 data-v-1bc67f4b><button data-v-1bc67f4b>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-282c430e data-v-3d1258d2><div class="curtain" data-v-3d1258d2></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-3d1258d2><span class="visually-hidden" id="sidebar-aria-label" data-v-3d1258d2> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Getting started</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Overview</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/quickstart.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Quickstart</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/scaffolding-agents.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Scaffold an agent with Cursor</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/convert-automation.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Convert a Cursor Automation</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/concepts.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Concepts</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Templates</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/templates/demo.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Demo agent</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/templates/security-reviewer.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Security reviewer</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/templates/agentic-owners.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Agentic Owners</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/templates/pr-autofixer.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>PR autofixer</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/templates/triage.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Triage agent</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0 has-active" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Improving agents</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/building-with-agents.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Building agents with agents</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/evals.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Evals</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/ab.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Live A/B metrics</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/storage.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Storage</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/hillclimbing.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Hillclimbing</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Guides</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/webhooks.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Webhooks & custom channels</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/github.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>GitHub</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/slack.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Slack</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/human-in-the-loop.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Human-in-the-loop approvals</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/agent-to-agent.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Agent-to-agent</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/mcp-oauth.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Host MCP OAuth</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/cloud-runtime.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Cloud runtime</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/guides/opentelemetry.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>OpenTelemetry</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Example agents</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Choose an example</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/weather-agent.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Weather agent</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/slack-agent.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Slack agent</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/concierge.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Concierge</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/benny.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Playbook router</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/oncall.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Alert investigator</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/bugbot.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>PR evidence reviewer</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/approval-buddy.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Approval Buddy</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/security-reviewer.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Security Reviewer</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/knowledge-base.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Knowledge base</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/codebase-wiki.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Codebase wiki</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/example-agents/codeowners-review.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Codeowners review</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Operating</h2><!----></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/deployment.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Deployment</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/troubleshooting.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Fix common problems</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-f2306e18><section class="VPSidebarItem level-0 collapsible" data-v-f2306e18 data-v-61fcdc7c><div class="item" role="button" tabindex="0" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><h2 class="text" data-v-61fcdc7c>Reference</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-61fcdc7c><span class="vpi-chevron-right caret-icon" data-v-61fcdc7c></span></div></div><div class="items" data-v-61fcdc7c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/project-layout.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Project layout</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/agent-config.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Agent config</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/instructions.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Instructions</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/tools.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Tools</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/prompt.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>prompt</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/skills.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Skills</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/connections.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>MCP Connections</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/subagents.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Subagents</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/channels.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Channels</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/schedules.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Schedules & reminders</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/hooks.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Hooks</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/artifacts.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Artifacts</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/sessions.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Sessions & streaming</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/playground.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>Playground</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/cli.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>CLI</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-61fcdc7c><div class="item" data-v-61fcdc7c><div class="indicator" data-v-61fcdc7c></div><a class="VPLink link link" href="/docs/reference/http-api.html" data-v-61fcdc7c><!--[--><p class="text" data-v-61fcdc7c>HTTP API</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-282c430e data-v-3b8d81ee><div class="VPDoc has-sidebar has-aside" data-v-3b8d81ee data-v-2e506a34><!--[--><!--]--><div class="container" data-v-2e506a34><div class="aside" data-v-2e506a34><div class="aside-curtain" data-v-2e506a34></div><div class="aside-container" data-v-2e506a34><div class="aside-content" data-v-2e506a34><div class="VPDocAside" data-v-2e506a34 data-v-b485a79e><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-b485a79e data-v-cc6b345c><div class="content" data-v-cc6b345c><div class="outline-marker" data-v-cc6b345c></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-cc6b345c>On this page</div><ul class="VPDocOutlineItem root" data-v-cc6b345c data-v-4f0215bf><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-b485a79e></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-2e506a34><div class="content-container" data-v-2e506a34><!--[--><!--]--><main class="main" data-v-2e506a34><div style="position:relative;" class="vp-doc _docs_storage" data-v-2e506a34><div><h1 id="storage" tabindex="-1">Storage <a class="header-anchor" href="#storage" aria-label="Permalink to &quot;Storage&quot;">​</a></h1><p>The Agent SDK owns durable storage for sessions, continuation tokens, reminders, playground eval history, and live A/B samples. It chooses the keys, when to read and write, and how to restore after restart.</p><p>The Agent SDK owns key encoding. Backends must accept the keys they are given. Do not fail <code>put</code> to enforce a shorter cap.</p><p>By default that storage lives under <code>--state-root</code> on local disk. Fine for one machine; it does not survive replacing the host.</p><p>To keep the same framework storage across hosts, plug in a key-value backend with <code>agent/storage.ts</code>. You provide <code>put</code> / <code>get</code> / <code>delete</code> / <code>list</code>. The optional <code>cas</code> group adds conditional writes (see <a href="#conditional-writes-the-cas-group">Conditional writes</a>).</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;">// agent/storage.ts</span></span>
24
24
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineStorage } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/storage&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
25
25
  <span class="line"></span>
26
26
  <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;"> defineStorage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
@@ -34,7 +34,7 @@
34
34
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> putIfVersion</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">key</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">value</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">expected</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;"> db.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">casUpdate</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(key, value, expected),</span></span>
35
35
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> listKeys</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">prefix</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;"> db.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">listKeysByPrefix</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(prefix),</span></span>
36
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><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>Import paths here use <code>@cursor/july/storage</code>. On projects still using <code>@anysphere/agent-serve</code>, swap the import. See <a href="/docs/#run-the-cli">Run the CLI</a> for the full rename table.</p></div><h2 id="which-fields-to-provide" tabindex="-1">Which fields to provide <a class="header-anchor" href="#which-fields-to-provide" aria-label="Permalink to &quot;Which fields to provide&quot;">​</a></h2><p>Implement the small KV core <code>put</code>/<code>get</code>/<code>delete</code>/<code>list</code> plus the <code>cas</code> group and you get <strong>full functionality</strong>: eval-run and A/B history are derived over the core automatically. The dedicated <code>evals</code> / <code>abs</code> groups are backend-native optimizations, not required-or-lose-history hooks.</p><table tabindex="0"><thead><tr><th>Field</th><th>Required</th><th>Role</th></tr></thead><tbody><tr><td><code>put</code></td><td>Yes</td><td>Write or update a value</td></tr><tr><td><code>cas</code></td><td>Optional</td><td>Conditional writes; see <a href="#conditional-writes-the-cas-group">Conditional writes</a></td></tr><tr><td><code>get</code></td><td>For restore</td><td>Look up one key (also: derived A/B snapshot backfill)</td></tr><tr><td><code>list</code></td><td>For restore</td><td>Return entries under a prefix, in key order (also: derived eval-runs hydrate)</td></tr><tr><td><code>delete</code></td><td>For cleanup</td><td>Remove a key (also: derived eval-runs pruning)</td></tr><tr><td><code>name</code></td><td>No</td><td>Label surfaced on <code>GET /v1/info</code> diagnostics</td></tr><tr><td><code>policy</code></td><td>No</td><td>Timing knobs; see <a href="#policy">Policy</a></td></tr><tr><td><code>evals</code></td><td>No</td><td>Backend-native eval-runs table; derived over the core when omitted see <a href="#eval-and-a-b-tables">Eval and A/B tables</a></td></tr><tr><td><code>abs</code></td><td>No</td><td>Backend-native A/B metrics table; derived over the core when omitted see <a href="#eval-and-a-b-tables">Eval and A/B tables</a></td></tr></tbody></table><p>A throwing <code>put</code> is logged and dropped. It never fails a turn. When resolving a missing continuation token, a throwing <code>get</code> fails the follow-up so a store outage does not open a new session. Return <code>undefined</code> only for a real miss.</p><h2 id="eval-and-a-b-tables" tabindex="-1">Eval and A/B tables <a class="header-anchor" href="#eval-and-a-b-tables" aria-label="Permalink to &quot;Eval and A/B tables&quot;">​</a></h2><p>Two dedicated table groups carry structured rows instead of opaque KV values. Both are <strong>optional optimizations</strong>: when a group is not authored, <code>defineStorage</code> derives it over the KV core, so a backend that implements only the core loses nothing. Author a group only when the backend has a better native shape (a real database table, an analytics pipeline) the built-in <code>fileKv</code> and <code>cursorHostedStorage</code> both do.</p><p><code>evals</code> keeps playground eval batches across restarts (<code>put</code>, <code>delete</code>, <code>list</code> over run snapshots keyed by <code>runId</code>). The Agent SDK upserts a snapshot as a batch starts, progresses, and finishes, prunes runs past the playground history window, and lists everything back at serve start. <strong>Derived form</strong>: one key per run under <code>agentkit/v1/{agent}/eval-runs/{runId}</code> — needs core <code>put</code> + <code>delete</code> + <code>list</code>. Only a core missing <code>delete</code> or <code>list</code> leaves eval history in process memory (cleared on restart). See <a href="./evals.html#configure-eval-runs">Evals</a>.</p><p><code>abs</code> exports live A/B metrics: <code>putSample</code> appends one cumulative metric sample per enrolled experiment on each completed or failed turn; optional <code>putSnapshot</code> / <code>getSnapshot</code> store and serve back the latest aggregate so a replacement host with no local sessions can still serve the A/Bs surface. <strong>Derived form</strong>: each sample lands as its own key (<code>agentkit/v1/{agent}/ab-samples/{experiment}/{sessionId}/{at}</code> — a blind append-only put, never a read-modify-write of one growing array) and the snapshot lives at the fixed <code>agentkit/v1/{agent}/ab-snapshot</code> key (last-write-wins is correct for &quot;latest aggregate&quot;). <code>putSample</code> and <code>putSnapshot</code> need only core <code>put</code>; <code>getSnapshot</code> needs core <code>get</code>. Session event logs remain the assignment source of truth either way. See <a href="./ab.html">Live A/B metrics</a>.</p><h2 id="policy" tabindex="-1">Policy <a class="header-anchor" href="#policy" aria-label="Permalink to &quot;Policy&quot;">​</a></h2><p>Two knobs change behavior:</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;"> defineStorage</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></code></pre></div><h2 id="which-fields-to-provide" tabindex="-1">Which fields to provide <a class="header-anchor" href="#which-fields-to-provide" aria-label="Permalink to &quot;Which fields to provide&quot;">​</a></h2><p>Implement the small KV core (<code>put</code>/<code>get</code>/<code>delete</code>/<code>list</code> plus the <code>cas</code> group) and you get <strong>full functionality</strong>: eval-run and A/B history are derived over the core automatically. The dedicated <code>evals</code> / <code>abs</code> groups are backend-native optimizations, not required-or-lose-history hooks.</p><table tabindex="0"><thead><tr><th>Field</th><th>Required</th><th>Role</th></tr></thead><tbody><tr><td><code>put</code></td><td>Yes</td><td>Write or update a value</td></tr><tr><td><code>cas</code></td><td>Optional</td><td>Conditional writes; see <a href="#conditional-writes-the-cas-group">Conditional writes</a></td></tr><tr><td><code>get</code></td><td>For restore</td><td>Look up one key</td></tr><tr><td><code>list</code></td><td>For restore</td><td>Return entries under a prefix, in key order</td></tr><tr><td><code>delete</code></td><td>For cleanup</td><td>Remove a key</td></tr><tr><td><code>name</code></td><td>No</td><td>Label surfaced on <code>GET /v1/info</code> diagnostics</td></tr><tr><td><code>policy</code></td><td>No</td><td>Timing knobs; see <a href="#policy">Policy</a></td></tr><tr><td><code>evals</code></td><td>No</td><td>Backend-native eval-runs table; derived over the core when omitted. See <a href="#eval-and-a-b-tables">Eval and A/B tables</a></td></tr><tr><td><code>abs</code></td><td>No</td><td>Backend-native A/B metrics table; derived over the core when omitted. See <a href="#eval-and-a-b-tables">Eval and A/B tables</a></td></tr></tbody></table><p>A throwing <code>put</code> is logged and dropped. It never fails a turn. When resolving a missing continuation token, a throwing <code>get</code> fails the follow-up so a store outage does not open a new session. Return <code>undefined</code> only for a real miss.</p><h2 id="eval-and-a-b-tables" tabindex="-1">Eval and A/B tables <a class="header-anchor" href="#eval-and-a-b-tables" aria-label="Permalink to &quot;Eval and A/B tables&quot;">​</a></h2><p>Two dedicated table groups carry structured rows instead of opaque KV values. Both are <strong>optional optimizations</strong>: when a group is not authored, <code>defineStorage</code> derives it over the KV core, so a backend that implements only the core loses nothing. Author a group only when the backend has a better native shape (a real database table, an analytics pipeline). The built-in <code>fileKv</code> and <code>cursorHostedStorage</code> both do.</p><p><code>evals</code> keeps playground eval batches across restarts (<code>put</code>, <code>delete</code>, <code>list</code> over run snapshots keyed by <code>runId</code>). A core missing <code>delete</code> or <code>list</code> leaves eval history in memory until restart. See <a href="./evals.html#configure-eval-runs">Evals</a>.</p><p><code>abs</code> exports live A/B metrics: <code>putSample</code> appends one cumulative metric sample per enrolled experiment on each completed or failed turn; optional <code>putSnapshot</code> / <code>getSnapshot</code> store and serve back the latest aggregate so a replacement host can still serve the A/Bs surface. <code>putSample</code> and <code>putSnapshot</code> need only core <code>put</code>; <code>getSnapshot</code> needs core <code>get</code>. Session event logs remain the assignment source of truth either way. See <a href="./ab.html">Live A/B metrics</a>.</p><h2 id="policy" tabindex="-1">Policy <a class="header-anchor" href="#policy" aria-label="Permalink to &quot;Policy&quot;">​</a></h2><p>Two knobs change behavior:</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;"> defineStorage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
38
38
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> policy: {</span></span>
39
39
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Batch event writes while the session is busy (default: once per turn)</span></span>
40
40
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> debounceMs: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">30_000</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@@ -42,15 +42,15 @@
42
42
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> restore: { maxSessions: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">500</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
43
43
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
44
44
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // put / get / delete / list …</span></span>
45
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Knob</th><th>Default</th><th>Meaning</th></tr></thead><tbody><tr><td><code>debounceMs</code></td><td>unset (once per turn)</td><td>Wait this long after activity before writing event batches</td></tr><tr><td><code>restore</code></td><td>caps below</td><td>How much to load at serve start</td></tr><tr><td><code>restore.maxSessions</code></td><td><code>1000</code></td><td>Max sessions loaded at serve start</td></tr><tr><td><code>restore.maxAgeMs</code></td><td>30 days</td><td>Skip older sessions at serve start</td></tr><tr><td><code>restore.maxTotalBytes</code></td><td>1 GiB</td><td>Stop loading once this budget is reached</td></tr></tbody></table><p>Set <code>restore: &quot;off&quot;</code> on high-traffic hosts. Sessions then load when a follow-up arrives instead of at startup.</p><h2 id="restore-after-restart" tabindex="-1">Restore after restart <a class="header-anchor" href="#restore-after-restart" aria-label="Permalink to &quot;Restore after restart&quot;">​</a></h2><p>With <code>get</code> and <code>list</code>, serve can rebuild local state from your store:</p><ul><li>At startup, the Agent SDK loads recent sessions up to the restore caps. Local disk wins when both sides have the same session. Reminders hydrate the same way into <code>--state-root/reminders</code>.</li><li>On demand, a missing continuation token resolves through the store and resumes that session.</li><li>Playground eval history and A/B aggregates can load from the same sink.</li></ul><p>A turn in flight at crash time is not replayed. The next follow-up resumes from the last flushed state.</p><h2 id="author-kv-ctx-host-kv" tabindex="-1">Author KV (<code>ctx.host.kv</code>) <a class="header-anchor" href="#author-kv-ctx-host-kv" aria-label="Permalink to &quot;Author KV (`ctx.host.kv`)&quot;">​</a></h2><p>Handlers can store their own JSON under the same sink without minting framework keys:</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;">await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ctx.host.kv.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">put</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;alert-memory/abc&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, { updated: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;…&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> });</span></span>
46
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> prior</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ctx.host.kv.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;alert-memory/abc&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>The Agent SDK prefixes author keys as <code>agentkit/v1/{agent}/kv/{key}</code> (same bounded encoding as continuation tokens). Writes <strong>await</strong> the sink and propagate errors unlike session mirrors, which are at-most-once.</p><p>Without <code>agent/storage.ts</code>, <code>host.kv</code> falls back to files under <code>--state-root/kv</code>. That is fine for local dogfood; it does <strong>not</strong> survive replacing the host. For Cursor-managed hosting, prefer <code>@cursor/july/storage/cursor-hosted</code> so sessions and author KV share the platform Bugbot tables through a control-plane HTTP proxy (authenticated as the deployment pod credential — engines never receive a database 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:#6A737D;--shiki-dark:#6A737D;">// agent/storage.ts Cursor-managed hosting</span></span>
45
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Knob</th><th>Default</th><th>Meaning</th></tr></thead><tbody><tr><td><code>debounceMs</code></td><td>unset (once per turn)</td><td>Wait this long after activity before writing event batches</td></tr><tr><td><code>restore</code></td><td>caps below</td><td>How much to load at serve start</td></tr><tr><td><code>restore.maxSessions</code></td><td><code>1000</code></td><td>Max sessions loaded at serve start</td></tr><tr><td><code>restore.maxAgeMs</code></td><td>30 days</td><td>Skip older sessions at serve start</td></tr><tr><td><code>restore.maxTotalBytes</code></td><td>1 GiB</td><td>Stop loading once this budget is reached</td></tr></tbody></table><p>Set <code>restore: &quot;off&quot;</code> on high-traffic hosts. Sessions then load when a follow-up arrives instead of at startup.</p><h2 id="restore-after-restart" tabindex="-1">Restore after restart <a class="header-anchor" href="#restore-after-restart" aria-label="Permalink to &quot;Restore after restart&quot;">​</a></h2><p>With <code>get</code> and <code>list</code>, serve can rebuild local state from your store:</p><ul><li>At startup, the Agent SDK loads recent sessions up to the restore caps.</li><li>On demand, a missing continuation token resolves through the store and resumes that session.</li><li>Playground eval history and A/B aggregates can load from the same sink.</li></ul><p>A turn in flight at crash time is not replayed. The next follow-up resumes from the last flushed state.</p><h2 id="author-kv-ctx-host-kv" tabindex="-1">Author KV (<code>ctx.host.kv</code>) <a class="header-anchor" href="#author-kv-ctx-host-kv" aria-label="Permalink to &quot;Author KV (`ctx.host.kv`)&quot;">​</a></h2><p>Handlers can store their own JSON under the same sink without minting framework keys:</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;">await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ctx.host.kv.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">put</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;alert-memory/abc&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, { updated: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;…&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> });</span></span>
46
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> prior</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ctx.host.kv.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;alert-memory/abc&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>Writes <strong>await</strong> the sink and propagate errors, unlike session mirrors, which are at-most-once.</p><p>Without <code>agent/storage.ts</code>, <code>host.kv</code> is local-only and does not survive replacing the host. Hosted agents should author <code>cursorHostedStorage()</code> so session and <code>host.kv</code> records survive replace.</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;">// agent/storage.ts: Cursor-managed hosting</span></span>
47
47
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineStorage } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/storage&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
48
48
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { cursorHostedStorage } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/storage/cursor-hosted&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
49
49
  <span class="line"></span>
50
50
  <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;"> defineStorage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
51
51
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ...</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cursorHostedStorage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(),</span></span>
52
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Built-in helpers:</p><table tabindex="0"><thead><tr><th>Import</th><th>Backend</th></tr></thead><tbody><tr><td><code>@cursor/july/storage/file-kv</code></td><td>File-per-key under <code>.agent-serve/kv</code></td></tr><tr><td><code>@cursor/july/storage/cursor-hosted</code></td><td>Platform Bugbot <code>agent_serve_*</code> via control-plane proxy</td></tr></tbody></table><h2 id="bring-your-own-backend" tabindex="-1">Bring your own backend <a class="header-anchor" href="#bring-your-own-backend" aria-label="Permalink to &quot;Bring your own backend&quot;">​</a></h2><p>There is no built-in Postgres backend on purpose. Cursor&#39;s internal <code>agent_serve_*</code> tables are owned by the backend and reachable only through the hosted proxy, and this doc does not prescribe a schema — what you back the KV with is your call. Any durable store works:</p><ul><li><strong>Local disk</strong> the built-in <code>fileKv</code> (single process only).</li><li><strong>Object storage (S3-class)</strong> — one object per key; conditional writes map directly onto the contract (<code>putIfAbsent</code> = put with <code>If-None-Match: *</code>, <code>putIfVersion</code> = put with <code>If-Match: &lt;etag&gt;</code>, the ETag is the version token, <code>listKeys</code> is a prefix listing).</li><li><strong>Redis, DynamoDB, a SQL table, …</strong> anything that can do an atomic compare-and-set and a prefix listing.</li></ul><p>Implement the <code>StorageConfig</code> methods (and the optional <code>cas</code> group) against that store. The contract, defined at <code>@cursor/july/kv</code>: version tokens are opaque strings that change on every successful write including plain <code>put</code>, so a stale token fences instead of clobbering; conditional writes are atomic; <code>listKeys</code> returns every key under the prefix. <code>@cursor/july/kv/memory</code> is a complete reference implementation to compare behavior against.</p><h2 id="conditional-writes-the-cas-group" tabindex="-1">Conditional writes (the <code>cas</code> group) <a class="header-anchor" href="#conditional-writes-the-cas-group" aria-label="Permalink to &quot;Conditional writes (the `cas` group)&quot;">​</a></h2><p>The <code>cas</code> group is compare-and-swap over the same keyspace: <code>getWithVersion</code> / <code>putIfAbsent</code> / <code>putIfVersion</code> / <code>listKeys</code>, defined backend-agnostically at <code>@cursor/july/kv</code>. Plain storage works without it, so an existing backend keeps working across a platform upgrade. <code>defineStorage</code> rejects a partial group implement all four methods or none. Version tokens are opaque strings that must change on every write (a counter column, a row version, a content hash). The built-in backends both include it: <code>fileKv</code> uses content-hash tokens (single-process correctness) and <code>cursorHostedStorage</code> the control-plane proxy (a <code>version</code> counter on the server). <code>memoryCasTable()</code> is for test fixtures and inert sinks only.</p></div></div></main><footer class="VPDocFooter" data-v-2e506a34 data-v-574f06fa><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-574f06fa><span class="visually-hidden" id="doc-footer-aria-label" data-v-574f06fa>Pager</span><div class="pager" data-v-574f06fa><a class="VPLink link pager-link prev" href="/docs/ab.html" data-v-574f06fa><!--[--><span class="desc" data-v-574f06fa>Previous page</span><span class="title" data-v-574f06fa>Live A/B metrics</span><!--]--></a></div><div class="pager" data-v-574f06fa><a class="VPLink link pager-link next" href="/docs/hillclimbing.html" data-v-574f06fa><!--[--><span class="desc" data-v-574f06fa>Next page</span><span class="title" data-v-574f06fa>Hillclimbing</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
53
- <script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"CVzWxLoB\",\"building-with-agents.md\":\"DH8A_cHA\",\"concepts.md\":\"CRfU3bVg\",\"deployment.md\":\"DX_hc3ze\",\"evals.md\":\"a0SMN6r9\",\"example-agents_approval-buddy.md\":\"DNL83puR\",\"example-agents_benny.md\":\"C40vHRLc\",\"example-agents_bugbot.md\":\"BRGMi9O2\",\"example-agents_codebase-wiki.md\":\"Dftj_tPp\",\"example-agents_codeowners-review.md\":\"Bfta-lBU\",\"example-agents_concierge.md\":\"MrKpQndp\",\"example-agents_fsd.md\":\"ZWHWWZPE\",\"example-agents_index.md\":\"QZ8mhr6n\",\"example-agents_knowledge-base.md\":\"DqKqHQ9u\",\"example-agents_oncall.md\":\"DK4XkYTd\",\"example-agents_security-reviewer.md\":\"Bai6D0Ee\",\"example-agents_slack-agent.md\":\"D7Kdj5BV\",\"example-agents_weather-agent.md\":\"lVEAbWFf\",\"guides_agent-to-agent.md\":\"BCeVdJRJ\",\"guides_cloud-runtime.md\":\"BSMLIBHr\",\"guides_convert-automation.md\":\"D06eIzea\",\"guides_github.md\":\"Cdt1s2QC\",\"guides_human-in-the-loop.md\":\"By1G2T3_\",\"guides_mcp-oauth.md\":\"Du0f7pGU\",\"guides_opentelemetry.md\":\"bmPmkvJu\",\"guides_slack.md\":\"DiUmk_Oi\",\"guides_webhooks.md\":\"BpnIdO0i\",\"hillclimbing.md\":\"ywF3yDAd\",\"index.md\":\"BAaMXLFd\",\"quickstart.md\":\"DsrarzEg\",\"reference_agent-config.md\":\"Bqylgw50\",\"reference_artifacts.md\":\"Dior32Qw\",\"reference_channels.md\":\"DQZjCnyh\",\"reference_cli.md\":\"B7GkAJRC\",\"reference_connections.md\":\"DYidrb-j\",\"reference_hooks.md\":\"B9FSgdDe\",\"reference_http-api.md\":\"CSHVobzG\",\"reference_instructions.md\":\"DhNCOl7r\",\"reference_playground.md\":\"Dfb92yQf\",\"reference_project-layout.md\":\"CwkSbEWT\",\"reference_prompt.md\":\"DZUMtLPD\",\"reference_schedules.md\":\"DNipebiG\",\"reference_sessions.md\":\"tUFzz98S\",\"reference_skills.md\":\"B5ZEuHfG\",\"reference_subagents.md\":\"Xoav0AII\",\"reference_tools.md\":\"wpaJtHn6\",\"scaffolding-agents.md\":\"CRDDUtYJ\",\"storage.md\":\"JbjlHWZ6\",\"templates_agentic-owners.md\":\"DSJSIpWU\",\"templates_demo.md\":\"DhFcWN6j\",\"templates_pr-autofixer.md\":\"1HAR3RXE\",\"templates_security-reviewer.md\":\"ByFyRta2\",\"templates_triage.md\":\"CVlpctKS\",\"troubleshooting.md\":\"DYECCZiJ\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Agent SDK\",\"description\":\"Filesystem-first framework for building and serving Cursor agents.\",\"base\":\"/docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"sdkVersion\":\"0.1.92\",\"nav\":[{\"text\":\"Quickstart\",\"link\":\"/quickstart\"},{\"text\":\"Guides\",\"link\":\"/guides/webhooks\"},{\"text\":\"Examples\",\"link\":\"/example-agents/\"},{\"text\":\"Reference\",\"link\":\"/reference/project-layout\"}],\"search\":{\"provider\":\"local\"},\"outline\":{\"level\":[2,3]},\"sidebar\":[{\"text\":\"Getting started\",\"items\":[{\"text\":\"Overview\",\"link\":\"/\"},{\"text\":\"Quickstart\",\"link\":\"/quickstart\"},{\"text\":\"Scaffold an agent with Cursor\",\"link\":\"/scaffolding-agents\"},{\"text\":\"Convert a Cursor Automation\",\"link\":\"/guides/convert-automation\"},{\"text\":\"Concepts\",\"link\":\"/concepts\"}]},{\"text\":\"Templates\",\"items\":[{\"text\":\"Demo agent\",\"link\":\"/templates/demo\"},{\"text\":\"Security reviewer\",\"link\":\"/templates/security-reviewer\"},{\"text\":\"Agentic Owners\",\"link\":\"/templates/agentic-owners\"},{\"text\":\"PR autofixer\",\"link\":\"/templates/pr-autofixer\"},{\"text\":\"Triage agent\",\"link\":\"/templates/triage\"}]},{\"text\":\"Improving agents\",\"items\":[{\"text\":\"Building agents with agents\",\"link\":\"/building-with-agents\"},{\"text\":\"Evals\",\"link\":\"/evals\"},{\"text\":\"Live A/B metrics\",\"link\":\"/ab\"},{\"text\":\"Storage\",\"link\":\"/storage\"},{\"text\":\"Hillclimbing\",\"link\":\"/hillclimbing\"}]},{\"text\":\"Guides\",\"items\":[{\"text\":\"Webhooks & custom channels\",\"link\":\"/guides/webhooks\"},{\"text\":\"GitHub\",\"link\":\"/guides/github\"},{\"text\":\"Slack\",\"link\":\"/guides/slack\"},{\"text\":\"Human-in-the-loop approvals\",\"link\":\"/guides/human-in-the-loop\"},{\"text\":\"Agent-to-agent\",\"link\":\"/guides/agent-to-agent\"},{\"text\":\"Host MCP OAuth\",\"link\":\"/guides/mcp-oauth\"},{\"text\":\"Cloud runtime\",\"link\":\"/guides/cloud-runtime\"},{\"text\":\"OpenTelemetry\",\"link\":\"/guides/opentelemetry\"}]},{\"text\":\"Example agents\",\"items\":[{\"text\":\"Choose an example\",\"link\":\"/example-agents/\"},{\"text\":\"Weather agent\",\"link\":\"/example-agents/weather-agent\"},{\"text\":\"Slack agent\",\"link\":\"/example-agents/slack-agent\"},{\"text\":\"Concierge\",\"link\":\"/example-agents/concierge\"},{\"text\":\"Playbook router\",\"link\":\"/example-agents/benny\"},{\"text\":\"Alert investigator\",\"link\":\"/example-agents/oncall\"},{\"text\":\"PR evidence reviewer\",\"link\":\"/example-agents/bugbot\"},{\"text\":\"Approval Buddy\",\"link\":\"/example-agents/approval-buddy\"},{\"text\":\"Security Reviewer\",\"link\":\"/example-agents/security-reviewer\"},{\"text\":\"Remote PR coordinator\",\"link\":\"/example-agents/fsd\"},{\"text\":\"Knowledge base\",\"link\":\"/example-agents/knowledge-base\"},{\"text\":\"Codebase wiki\",\"link\":\"/example-agents/codebase-wiki\"},{\"text\":\"Codeowners review\",\"link\":\"/example-agents/codeowners-review\"}]},{\"text\":\"Operating\",\"items\":[{\"text\":\"Deployment\",\"link\":\"/deployment\"},{\"text\":\"Fix common problems\",\"link\":\"/troubleshooting\"}]},{\"text\":\"Reference\",\"collapsed\":false,\"items\":[{\"text\":\"Project layout\",\"link\":\"/reference/project-layout\"},{\"text\":\"Agent config\",\"link\":\"/reference/agent-config\"},{\"text\":\"Instructions\",\"link\":\"/reference/instructions\"},{\"text\":\"Tools\",\"link\":\"/reference/tools\"},{\"text\":\"prompt\",\"link\":\"/reference/prompt\"},{\"text\":\"Skills\",\"link\":\"/reference/skills\"},{\"text\":\"MCP Connections\",\"link\":\"/reference/connections\"},{\"text\":\"Subagents\",\"link\":\"/reference/subagents\"},{\"text\":\"Channels\",\"link\":\"/reference/channels\"},{\"text\":\"Schedules & reminders\",\"link\":\"/reference/schedules\"},{\"text\":\"Hooks\",\"link\":\"/reference/hooks\"},{\"text\":\"Artifacts\",\"link\":\"/reference/artifacts\"},{\"text\":\"Sessions & streaming\",\"link\":\"/reference/sessions\"},{\"text\":\"Playground\",\"link\":\"/reference/playground\"},{\"text\":\"CLI\",\"link\":\"/reference/cli\"},{\"text\":\"HTTP API\",\"link\":\"/reference/http-api\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
52
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Built-in helpers:</p><table tabindex="0"><thead><tr><th>Import</th><th>Backend</th></tr></thead><tbody><tr><td><code>@cursor/july/storage/file-kv</code></td><td>File-per-key under the project state directory</td></tr><tr><td><code>@cursor/july/storage/cursor-hosted</code></td><td>Cursor-managed hosting; records survive replace</td></tr></tbody></table><h2 id="bring-your-own-backend" tabindex="-1">Bring your own backend <a class="header-anchor" href="#bring-your-own-backend" aria-label="Permalink to &quot;Bring your own backend&quot;">​</a></h2><p>Any durable store works if it can put, get, delete, list by prefix, and optionally compare-and-set. Implement the <code>StorageConfig</code> methods (and the optional <code>cas</code> group) against that store. The contract, defined at <code>@cursor/july/kv</code>: version tokens are opaque strings that change on every successful write, including plain <code>put</code>, so a stale token fences instead of clobbering; conditional writes are atomic; <code>listKeys</code> returns every key under the prefix.</p><h2 id="conditional-writes-the-cas-group" tabindex="-1">Conditional writes (the <code>cas</code> group) <a class="header-anchor" href="#conditional-writes-the-cas-group" aria-label="Permalink to &quot;Conditional writes (the `cas` group)&quot;">​</a></h2><p>The <code>cas</code> group is compare-and-swap over the same keyspace: <code>getWithVersion</code> / <code>putIfAbsent</code> / <code>putIfVersion</code> / <code>listKeys</code>, defined backend-agnostically at <code>@cursor/july/kv</code>. Plain storage works without it, so an existing backend keeps working across a platform upgrade. <code>defineStorage</code> rejects a partial group. Implement all four methods or none. Version tokens are opaque strings that must change on every write (a counter column, a row version, a content hash). The built-in backends both include the group.</p></div></div></main><footer class="VPDocFooter" data-v-2e506a34 data-v-574f06fa><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-574f06fa><span class="visually-hidden" id="doc-footer-aria-label" data-v-574f06fa>Pager</span><div class="pager" data-v-574f06fa><a class="VPLink link pager-link prev" href="/docs/ab.html" data-v-574f06fa><!--[--><span class="desc" data-v-574f06fa>Previous page</span><span class="title" data-v-574f06fa>Live A/B metrics</span><!--]--></a></div><div class="pager" data-v-574f06fa><a class="VPLink link pager-link next" href="/docs/hillclimbing.html" data-v-574f06fa><!--[--><span class="desc" data-v-574f06fa>Next page</span><span class="title" data-v-574f06fa>Hillclimbing</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
53
+ <script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"DJo5r4R-\",\"building-with-agents.md\":\"DI4mEzlt\",\"concepts.md\":\"F6AiPorA\",\"deployment.md\":\"DoLFAzfm\",\"evals.md\":\"lfJoEVc8\",\"example-agents_approval-buddy.md\":\"DmezILPg\",\"example-agents_benny.md\":\"B0kwY7D_\",\"example-agents_bugbot.md\":\"BRGMi9O2\",\"example-agents_codebase-wiki.md\":\"BBNw9Ekr\",\"example-agents_codeowners-review.md\":\"Bfta-lBU\",\"example-agents_concierge.md\":\"BzB2b20R\",\"example-agents_index.md\":\"ChBp0AX6\",\"example-agents_knowledge-base.md\":\"CrA85ig-\",\"example-agents_oncall.md\":\"DK4XkYTd\",\"example-agents_security-reviewer.md\":\"74pPpWYj\",\"example-agents_slack-agent.md\":\"D7Kdj5BV\",\"example-agents_weather-agent.md\":\"CaGpmw3Y\",\"guides_agent-to-agent.md\":\"B3JIaAqz\",\"guides_cloud-runtime.md\":\"BnvjPiia\",\"guides_convert-automation.md\":\"Bboisykk\",\"guides_github.md\":\"DqJhuaN1\",\"guides_human-in-the-loop.md\":\"By1G2T3_\",\"guides_mcp-oauth.md\":\"CJvrXtkN\",\"guides_opentelemetry.md\":\"bmPmkvJu\",\"guides_slack.md\":\"mqeNKs84\",\"guides_webhooks.md\":\"DKdA43Qm\",\"hillclimbing.md\":\"DhESf3OO\",\"index.md\":\"B-lVR4wT\",\"quickstart.md\":\"BrmfrrIr\",\"reference_agent-config.md\":\"Cp_x38Nl\",\"reference_artifacts.md\":\"Dior32Qw\",\"reference_channels.md\":\"Cd2f2iyV\",\"reference_cli.md\":\"D9KESDsD\",\"reference_connections.md\":\"DB6SsN6U\",\"reference_hooks.md\":\"BxN87gCw\",\"reference_http-api.md\":\"C68BERYr\",\"reference_instructions.md\":\"CR7XSsGk\",\"reference_playground.md\":\"DnX5nL-B\",\"reference_project-layout.md\":\"WN9nwJht\",\"reference_prompt.md\":\"DnaD5dNK\",\"reference_schedules.md\":\"DI_JrHgq\",\"reference_sessions.md\":\"D0mIh4KK\",\"reference_skills.md\":\"BFW9retM\",\"reference_subagents.md\":\"Xoav0AII\",\"reference_tools.md\":\"DuKvkYWG\",\"scaffolding-agents.md\":\"D7UUkWw0\",\"storage.md\":\"BOHeqk2M\",\"templates_agentic-owners.md\":\"DqtPdm6f\",\"templates_demo.md\":\"DhFcWN6j\",\"templates_pr-autofixer.md\":\"R4K_qytS\",\"templates_security-reviewer.md\":\"ByFyRta2\",\"templates_triage.md\":\"CVlpctKS\",\"troubleshooting.md\":\"vCWwvqcJ\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Agent SDK\",\"description\":\"Filesystem-first framework for building and serving Cursor agents.\",\"base\":\"/docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"sdkVersion\":\"0.1.93\",\"nav\":[{\"text\":\"Quickstart\",\"link\":\"/quickstart\"},{\"text\":\"Guides\",\"link\":\"/guides/webhooks\"},{\"text\":\"Examples\",\"link\":\"/example-agents/\"},{\"text\":\"Reference\",\"link\":\"/reference/project-layout\"}],\"search\":{\"provider\":\"local\"},\"outline\":{\"level\":[2,3]},\"sidebar\":[{\"text\":\"Getting started\",\"items\":[{\"text\":\"Overview\",\"link\":\"/\"},{\"text\":\"Quickstart\",\"link\":\"/quickstart\"},{\"text\":\"Scaffold an agent with Cursor\",\"link\":\"/scaffolding-agents\"},{\"text\":\"Convert a Cursor Automation\",\"link\":\"/guides/convert-automation\"},{\"text\":\"Concepts\",\"link\":\"/concepts\"}]},{\"text\":\"Templates\",\"items\":[{\"text\":\"Demo agent\",\"link\":\"/templates/demo\"},{\"text\":\"Security reviewer\",\"link\":\"/templates/security-reviewer\"},{\"text\":\"Agentic Owners\",\"link\":\"/templates/agentic-owners\"},{\"text\":\"PR autofixer\",\"link\":\"/templates/pr-autofixer\"},{\"text\":\"Triage agent\",\"link\":\"/templates/triage\"}]},{\"text\":\"Improving agents\",\"items\":[{\"text\":\"Building agents with agents\",\"link\":\"/building-with-agents\"},{\"text\":\"Evals\",\"link\":\"/evals\"},{\"text\":\"Live A/B metrics\",\"link\":\"/ab\"},{\"text\":\"Storage\",\"link\":\"/storage\"},{\"text\":\"Hillclimbing\",\"link\":\"/hillclimbing\"}]},{\"text\":\"Guides\",\"items\":[{\"text\":\"Webhooks & custom channels\",\"link\":\"/guides/webhooks\"},{\"text\":\"GitHub\",\"link\":\"/guides/github\"},{\"text\":\"Slack\",\"link\":\"/guides/slack\"},{\"text\":\"Human-in-the-loop approvals\",\"link\":\"/guides/human-in-the-loop\"},{\"text\":\"Agent-to-agent\",\"link\":\"/guides/agent-to-agent\"},{\"text\":\"Host MCP OAuth\",\"link\":\"/guides/mcp-oauth\"},{\"text\":\"Cloud runtime\",\"link\":\"/guides/cloud-runtime\"},{\"text\":\"OpenTelemetry\",\"link\":\"/guides/opentelemetry\"}]},{\"text\":\"Example agents\",\"items\":[{\"text\":\"Choose an example\",\"link\":\"/example-agents/\"},{\"text\":\"Weather agent\",\"link\":\"/example-agents/weather-agent\"},{\"text\":\"Slack agent\",\"link\":\"/example-agents/slack-agent\"},{\"text\":\"Concierge\",\"link\":\"/example-agents/concierge\"},{\"text\":\"Playbook router\",\"link\":\"/example-agents/benny\"},{\"text\":\"Alert investigator\",\"link\":\"/example-agents/oncall\"},{\"text\":\"PR evidence reviewer\",\"link\":\"/example-agents/bugbot\"},{\"text\":\"Approval Buddy\",\"link\":\"/example-agents/approval-buddy\"},{\"text\":\"Security Reviewer\",\"link\":\"/example-agents/security-reviewer\"},{\"text\":\"Knowledge base\",\"link\":\"/example-agents/knowledge-base\"},{\"text\":\"Codebase wiki\",\"link\":\"/example-agents/codebase-wiki\"},{\"text\":\"Codeowners review\",\"link\":\"/example-agents/codeowners-review\"}]},{\"text\":\"Operating\",\"items\":[{\"text\":\"Deployment\",\"link\":\"/deployment\"},{\"text\":\"Fix common problems\",\"link\":\"/troubleshooting\"}]},{\"text\":\"Reference\",\"collapsed\":false,\"items\":[{\"text\":\"Project layout\",\"link\":\"/reference/project-layout\"},{\"text\":\"Agent config\",\"link\":\"/reference/agent-config\"},{\"text\":\"Instructions\",\"link\":\"/reference/instructions\"},{\"text\":\"Tools\",\"link\":\"/reference/tools\"},{\"text\":\"prompt\",\"link\":\"/reference/prompt\"},{\"text\":\"Skills\",\"link\":\"/reference/skills\"},{\"text\":\"MCP Connections\",\"link\":\"/reference/connections\"},{\"text\":\"Subagents\",\"link\":\"/reference/subagents\"},{\"text\":\"Channels\",\"link\":\"/reference/channels\"},{\"text\":\"Schedules & reminders\",\"link\":\"/reference/schedules\"},{\"text\":\"Hooks\",\"link\":\"/reference/hooks\"},{\"text\":\"Artifacts\",\"link\":\"/reference/artifacts\"},{\"text\":\"Sessions & streaming\",\"link\":\"/reference/sessions\"},{\"text\":\"Playground\",\"link\":\"/reference/playground\"},{\"text\":\"CLI\",\"link\":\"/reference/cli\"},{\"text\":\"HTTP API\",\"link\":\"/reference/http-api\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
54
54
 
55
55
  </body>
56
56
  </html>
@@ -2,15 +2,10 @@
2
2
 
3
3
  The Agent SDK owns durable storage for sessions, continuation tokens,
4
4
  reminders, playground eval history, and live A/B samples. It chooses the
5
- keys (under `agentkit/v1/`), when to read and write, and how to restore
6
- after restart.
5
+ keys, when to read and write, and how to restore after restart.
7
6
 
8
- Keys have bounded length: caller-controlled segments (channel ids,
9
- continuation tokens) are URI-encoded, and any segment past 256 encoded
10
- bytes is replaced by its `sha256:…` digest — deterministically, so writes
11
- and lookups always agree. Backends can rely on this instead of imposing
12
- their own key-length caps (which would silently drop writes, since a
13
- throwing `put` is at-most-once).
7
+ The Agent SDK owns key encoding. Backends must accept the keys they are
8
+ given. Do not fail `put` to enforce a shorter cap.
14
9
 
15
10
  By default that storage lives under `--state-root` on local disk. Fine
16
11
  for one machine; it does not survive replacing the host.
@@ -18,8 +13,7 @@ for one machine; it does not survive replacing the host.
18
13
  To keep the same framework storage across hosts, plug in a key-value
19
14
  backend with `agent/storage.ts`. You provide `put` / `get` / `delete` /
20
15
  `list`. The optional `cas` group adds conditional writes (see
21
- [Conditional writes](#conditional-writes-the-cas-group)). The Agent SDK
22
- does the rest.
16
+ [Conditional writes](#conditional-writes-the-cas-group)).
23
17
 
24
18
  ```ts
25
19
  // agent/storage.ts
@@ -39,15 +33,10 @@ export default defineStorage({
39
33
  });
40
34
  ```
41
35
 
42
- > [!NOTE]
43
- > Import paths here use `@cursor/july/storage`. On projects still
44
- > using `@anysphere/agent-serve`, swap the import. See
45
- > [Run the CLI](/docs/index.md#run-the-cli) for the full rename table.
46
-
47
36
  ## Which fields to provide
48
37
 
49
- Implement the small KV core `put`/`get`/`delete`/`list` plus the `cas`
50
- group and you get **full functionality**: eval-run and A/B history are
38
+ Implement the small KV core (`put`/`get`/`delete`/`list` plus the `cas`
39
+ group) and you get **full functionality**: eval-run and A/B history are
51
40
  derived over the core automatically. The dedicated `evals` / `abs` groups
52
41
  are backend-native optimizations, not required-or-lose-history hooks.
53
42
 
@@ -55,13 +44,13 @@ are backend-native optimizations, not required-or-lose-history hooks.
55
44
  | --- | --- | --- |
56
45
  | `put` | Yes | Write or update a value |
57
46
  | `cas` | Optional | Conditional writes; see [Conditional writes](#conditional-writes-the-cas-group) |
58
- | `get` | For restore | Look up one key (also: derived A/B snapshot backfill) |
59
- | `list` | For restore | Return entries under a prefix, in key order (also: derived eval-runs hydrate) |
60
- | `delete` | For cleanup | Remove a key (also: derived eval-runs pruning) |
47
+ | `get` | For restore | Look up one key |
48
+ | `list` | For restore | Return entries under a prefix, in key order |
49
+ | `delete` | For cleanup | Remove a key |
61
50
  | `name` | No | Label surfaced on `GET /v1/info` diagnostics |
62
51
  | `policy` | No | Timing knobs; see [Policy](#policy) |
63
- | `evals` | No | Backend-native eval-runs table; derived over the core when omitted see [Eval and A/B tables](#eval-and-a-b-tables) |
64
- | `abs` | No | Backend-native A/B metrics table; derived over the core when omitted see [Eval and A/B tables](#eval-and-a-b-tables) |
52
+ | `evals` | No | Backend-native eval-runs table; derived over the core when omitted. See [Eval and A/B tables](#eval-and-a-b-tables) |
53
+ | `abs` | No | Backend-native A/B metrics table; derived over the core when omitted. See [Eval and A/B tables](#eval-and-a-b-tables) |
65
54
 
66
55
  A throwing `put` is logged and dropped. It never fails a turn. When
67
56
  resolving a missing continuation token, a throwing `get` fails the
@@ -75,30 +64,20 @@ values. Both are **optional optimizations**: when a group is not
75
64
  authored, `defineStorage` derives it over the KV core, so a backend that
76
65
  implements only the core loses nothing. Author a group only when the
77
66
  backend has a better native shape (a real database table, an analytics
78
- pipeline) the built-in `fileKv` and `cursorHostedStorage` both do.
67
+ pipeline). The built-in `fileKv` and `cursorHostedStorage` both do.
79
68
 
80
69
  `evals` keeps playground eval batches across restarts (`put`, `delete`,
81
- `list` over run snapshots keyed by `runId`). The Agent SDK upserts a
82
- snapshot as a batch starts, progresses, and finishes, prunes runs past
83
- the playground history window, and lists everything back at serve start.
84
- **Derived form**: one key per run under
85
- `agentkit/v1/{agent}/eval-runs/{runId}` — needs core `put` + `delete` +
86
- `list`. Only a core missing `delete` or `list` leaves eval history in
87
- process memory (cleared on restart). See
88
- [Evals](/docs/evals.md#configure-eval-runs).
70
+ `list` over run snapshots keyed by `runId`). A core missing `delete` or
71
+ `list` leaves eval history in memory until restart.
72
+ See [Evals](/docs/evals.md#configure-eval-runs).
89
73
 
90
74
  `abs` exports live A/B metrics: `putSample` appends one cumulative
91
75
  metric sample per enrolled experiment on each completed or failed turn;
92
76
  optional `putSnapshot` / `getSnapshot` store and serve back the latest
93
- aggregate so a replacement host with no local sessions can still serve
94
- the A/Bs surface. **Derived form**: each sample lands as its own key
95
- (`agentkit/v1/{agent}/ab-samples/{experiment}/{sessionId}/{at}` a
96
- blind append-only put, never a read-modify-write of one growing array)
97
- and the snapshot lives at the fixed `agentkit/v1/{agent}/ab-snapshot`
98
- key (last-write-wins is correct for "latest aggregate"). `putSample` and
99
- `putSnapshot` need only core `put`; `getSnapshot` needs core `get`.
100
- Session event logs remain the assignment source of truth either way. See
101
- [Live A/B metrics](/docs/ab.md).
77
+ aggregate so a replacement host can still serve the A/Bs surface.
78
+ `putSample` and `putSnapshot` need only core `put`; `getSnapshot` needs
79
+ core `get`. Session event logs remain the assignment source of truth
80
+ either way. See [Live A/B metrics](/docs/ab.md).
102
81
 
103
82
  ## Policy
104
83
 
@@ -132,8 +111,6 @@ follow-up arrives instead of at startup.
132
111
  With `get` and `list`, serve can rebuild local state from your store:
133
112
 
134
113
  - At startup, the Agent SDK loads recent sessions up to the restore caps.
135
- Local disk wins when both sides have the same session. Reminders
136
- hydrate the same way into `--state-root/reminders`.
137
114
  - On demand, a missing continuation token resolves through the store
138
115
  and resumes that session.
139
116
  - Playground eval history and A/B aggregates can load from the same
@@ -152,19 +129,16 @@ await ctx.host.kv.put("alert-memory/abc", { updated: "…" });
152
129
  const prior = await ctx.host.kv.get("alert-memory/abc");
153
130
  ```
154
131
 
155
- The Agent SDK prefixes author keys as `agentkit/v1/{agent}/kv/{key}` (same
156
- bounded encoding as continuation tokens). Writes **await** the sink and
157
- propagate errors — unlike session mirrors, which are at-most-once.
132
+ Writes **await** the sink and propagate errors, unlike session mirrors,
133
+ which are at-most-once.
158
134
 
159
- Without `agent/storage.ts`, `host.kv` falls back to files under
160
- `--state-root/kv`. That is fine for local dogfood; it does **not**
161
- survive replacing the host. For Cursor-managed hosting, prefer
162
- `@cursor/july/storage/cursor-hosted` so sessions and author KV share the
163
- platform Bugbot tables through a control-plane HTTP proxy (authenticated
164
- as the deployment pod credential — engines never receive a database URL).
135
+ Without `agent/storage.ts`, `host.kv` is local-only and does not
136
+ survive replacing the host. Hosted agents should author
137
+ `cursorHostedStorage()` so session and `host.kv` records survive
138
+ replace.
165
139
 
166
140
  ```ts
167
- // agent/storage.ts Cursor-managed hosting
141
+ // agent/storage.ts: Cursor-managed hosting
168
142
  import { defineStorage } from "@cursor/july/storage";
169
143
  import { cursorHostedStorage } from "@cursor/july/storage/cursor-hosted";
170
144
 
@@ -177,32 +151,18 @@ Built-in helpers:
177
151
 
178
152
  | Import | Backend |
179
153
  | --- | --- |
180
- | `@cursor/july/storage/file-kv` | File-per-key under `.agent-serve/kv` |
181
- | `@cursor/july/storage/cursor-hosted` | Platform Bugbot `agent_serve_*` via control-plane proxy |
154
+ | `@cursor/july/storage/file-kv` | File-per-key under the project state directory |
155
+ | `@cursor/july/storage/cursor-hosted` | Cursor-managed hosting; records survive replace |
182
156
 
183
157
  ## Bring your own backend
184
158
 
185
- There is no built-in Postgres backend on purpose. Cursor's internal
186
- `agent_serve_*` tables are owned by the backend and reachable only
187
- through the hosted proxy, and this doc does not prescribe a schema —
188
- what you back the KV with is your call. Any durable store works:
189
-
190
- - **Local disk** the built-in `fileKv` (single process only).
191
- - **Object storage (S3-class)** one object per key; conditional
192
- writes map directly onto the contract (`putIfAbsent` = put with
193
- `If-None-Match: *`, `putIfVersion` = put with `If-Match: <etag>`,
194
- the ETag is the version token, `listKeys` is a prefix listing).
195
- - **Redis, DynamoDB, a SQL table, …** — anything that can do an
196
- atomic compare-and-set and a prefix listing.
197
-
198
- Implement the `StorageConfig` methods (and the optional `cas` group)
199
- against that store. The
200
- contract, defined at `@cursor/july/kv`: version tokens are opaque
201
- strings that change on every successful write — including plain
202
- `put`, so a stale token fences instead of clobbering; conditional
203
- writes are atomic; `listKeys` returns every key under the prefix.
204
- `@cursor/july/kv/memory` is a complete reference implementation to
205
- compare behavior against.
159
+ Any durable store works if it can put, get, delete, list by prefix,
160
+ and optionally compare-and-set. Implement the `StorageConfig` methods
161
+ (and the optional `cas` group) against that store. The contract,
162
+ defined at `@cursor/july/kv`: version tokens are opaque strings that
163
+ change on every successful write, including plain `put`, so a stale
164
+ token fences instead of clobbering; conditional writes are atomic;
165
+ `listKeys` returns every key under the prefix.
206
166
 
207
167
  ## Conditional writes (the `cas` group)
208
168
 
@@ -210,10 +170,7 @@ The `cas` group is compare-and-swap over the same keyspace:
210
170
  `getWithVersion` / `putIfAbsent` / `putIfVersion` / `listKeys`, defined
211
171
  backend-agnostically at `@cursor/july/kv`. Plain storage works without
212
172
  it, so an existing backend keeps working across a platform upgrade.
213
- `defineStorage` rejects a partial group implement all four methods or
173
+ `defineStorage` rejects a partial group. Implement all four methods or
214
174
  none. Version tokens are opaque strings that must change on every write
215
175
  (a counter column, a row version, a content hash). The built-in backends
216
- both include it: `fileKv` uses content-hash tokens (single-process
217
- correctness) and `cursorHostedStorage` the control-plane proxy (a
218
- `version` counter on the server). `memoryCasTable()` is for test fixtures
219
- and inert sinks only.
176
+ both include the group.