@cursor/july 0.1.112 → 0.1.113

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 (211) hide show
  1. package/README.md +4 -0
  2. package/dist/bin/agent-serve.js +2 -3
  3. package/dist/channels/checks.d.ts +10 -0
  4. package/dist/channels/checks.d.ts.map +1 -1
  5. package/dist/channels/origin/checks.d.ts +1 -1
  6. package/dist/channels/origin/checks.d.ts.map +1 -1
  7. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  8. package/dist/channels/slack/dispatch.js +6 -2
  9. package/dist/docs/404.html +2 -2
  10. package/dist/docs/assets/{app.DxTdhphC.js → app.CAeK13eM.js} +4 -4
  11. package/dist/docs/assets/chunks/@localSearchIndexroot.Ck9E52Ls.js +1 -0
  12. package/dist/docs/assets/chunks/{VPLocalSearchBox.CR3KTF0X.js → VPLocalSearchBox.C9LbPHod.js} +1 -1
  13. package/dist/docs/assets/chunks/{arc.CVVqBOdS.js → arc.CmMq2zmS.js} +1 -1
  14. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CJHGP4ki.js → architectureDiagram-Q4EWVU46.CCXB8Uj5.js} +1 -1
  15. package/dist/docs/assets/chunks/{baseUniq.r7UVVRBP.js → baseUniq.CyQo6eLe.js} +1 -1
  16. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.DKmMaTre.js → blockDiagram-DXYQGD6D.JYq6w91N.js} +1 -1
  17. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.DDJsntUO.js → c4Diagram-AHTNJAMY.BRV8GPJJ.js} +1 -1
  18. package/dist/docs/assets/chunks/channel.BHiYmnZ4.js +1 -0
  19. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.BK2rKt6W.js → chunk-4BX2VUAB.Bv4ooYQR.js} +1 -1
  20. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.DRLV8RnF.js → chunk-4TB4RGXK.t4JtKPcj.js} +1 -1
  21. package/dist/docs/assets/chunks/{chunk-55IACEB6.DaKjxtb7.js → chunk-55IACEB6.34lCHj9Y.js} +1 -1
  22. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.C5sPCIT1.js → chunk-EDXVE4YY.BSwrPNrt.js} +1 -1
  23. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.CSGWyNTB.js → chunk-FMBD7UC4.Beeun-R-.js} +1 -1
  24. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.D5tK9XEr.js → chunk-OYMX7WX6.BUUFUcJc.js} +1 -1
  25. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BeZGd1UZ.js → chunk-QZHKN3VN.B2XjHzN_.js} +1 -1
  26. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.U_tfWwQR.js → chunk-YZCP3GAM.CLYG8znk.js} +1 -1
  27. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.Degh8l90.js +1 -0
  28. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.Degh8l90.js +1 -0
  29. package/dist/docs/assets/chunks/clone.BIywbczV.js +1 -0
  30. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.DVeRXIb6.js → cose-bilkent-S5V4N54A.DVEa6fZp.js} +1 -1
  31. package/dist/docs/assets/chunks/{dagre-KV5264BT.BpKJAeRZ.js → dagre-KV5264BT.C9PZQK-S.js} +1 -1
  32. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.BQOtrd1Z.js → diagram-5BDNPKRD.DoN0uv3Y.js} +1 -1
  33. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.CSDAhjPI.js → diagram-G4DWMVQ6.Czv3duqx.js} +1 -1
  34. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.Dpztst2S.js → diagram-MMDJMWI5.BinJ5kWb.js} +1 -1
  35. package/dist/docs/assets/chunks/{diagram-TYMM5635.qJHRizHR.js → diagram-TYMM5635.DW326M4K.js} +1 -1
  36. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.vbDotH3l.js → erDiagram-SMLLAGMA.U2pR_OA7.js} +1 -1
  37. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.CqS_ZQr4.js → flowDiagram-DWJPFMVM.ByWJXeYK.js} +1 -1
  38. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.DTLdR4pN.js → ganttDiagram-T4ZO3ILL.OquF0Rtg.js} +1 -1
  39. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.D04lnbnr.js → gitGraphDiagram-UUTBAWPF.Bpn01P7X.js} +1 -1
  40. package/dist/docs/assets/chunks/{graph.BlfqLJsM.js → graph.CNRB6ETL.js} +1 -1
  41. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.tAooImWA.js → infoDiagram-42DDH7IO.CqhknMWi.js} +1 -1
  42. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.ClUsVqnJ.js → ishikawaDiagram-UXIWVN3A.C6xpR2af.js} +1 -1
  43. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.C3tUgyCg.js → journeyDiagram-VCZTEJTY.Cg5f7oB3.js} +1 -1
  44. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CtD9-QCe.js → kanban-definition-6JOO6SKY.Cx9YTwlU.js} +1 -1
  45. package/dist/docs/assets/chunks/{layout.D38U-LnT.js → layout.ljS-wFtK.js} +1 -1
  46. package/dist/docs/assets/chunks/{linear.BJmssyhN.js → linear.jSxNrsFC.js} +1 -1
  47. package/dist/docs/assets/chunks/{min.DNgXoouU.js → min.Cum8AlQw.js} +1 -1
  48. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.Dcp6cxeu.js → mindmap-definition-QFDTVHPH.BLiysLpe.js} +1 -1
  49. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.CLDw6zIs.js → pieDiagram-DEJITSTG.BoIDyuKF.js} +1 -1
  50. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.CYaeeY4c.js → quadrantDiagram-34T5L4WZ.DLkpDytR.js} +1 -1
  51. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.gMYuRpq2.js → requirementDiagram-MS252O5E.DqTVqSu2.js} +1 -1
  52. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.CZqyHFbc.js → sankeyDiagram-XADWPNL6.CG_6FF7j.js} +1 -1
  53. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BTsCjUDN.js → sequenceDiagram-FGHM5R23.BIp9602K.js} +1 -1
  54. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.CftT9mLJ.js → stateDiagram-FHFEXIEX.COSXsD9I.js} +1 -1
  55. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.qrxrbFsX.js +1 -0
  56. package/dist/docs/assets/chunks/{theme.B_7J9ZsV.js → theme.CXJ7PNwy.js} +2 -2
  57. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.DbU3WUNw.js → timeline-definition-GMOUNBTQ.CXdVqkLq.js} +1 -1
  58. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.ixsq-q2u.js → vennDiagram-DHZGUBPP.CZxGuc4r.js} +1 -1
  59. package/dist/docs/assets/chunks/wardley-RL74JXVD.3oVgfqQk.js +162 -0
  60. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.C0ewvgbp.js → wardleyDiagram-NUSXRM2D.6_irCgGJ.js} +1 -1
  61. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.nAEhF4bO.js → xychartDiagram-5P7HB3ND.TRPe92m3.js} +1 -1
  62. package/dist/docs/assets/{evals.md.BYvfZ-PO.js → evals.md.D3Y3Aixt.js} +2 -2
  63. package/dist/docs/assets/{evals.md.BYvfZ-PO.lean.js → evals.md.D3Y3Aixt.lean.js} +1 -1
  64. package/dist/docs/assets/guides_agent-to-agent.md.CD4T5FIl.js +41 -0
  65. package/dist/docs/assets/guides_agent-to-agent.md.CD4T5FIl.lean.js +1 -0
  66. package/dist/docs/assets/guides_jev.md.F5fAkkfN.js +189 -0
  67. package/dist/docs/assets/guides_jev.md.F5fAkkfN.lean.js +1 -0
  68. package/dist/docs/assets/{reference_connections.md.CmyrlXfY.js → reference_connections.md.Je9dMsdd.js} +1 -1
  69. package/dist/docs/assets/{reference_extensions.md.Ceq-qT8d.js → reference_extensions.md.Cv5aLCz_.js} +1 -1
  70. package/dist/docs/assets/{reference_subagents.md.BHsSMMyO.js → reference_subagents.md.Dl16gcBj.js} +2 -2
  71. package/dist/docs/assets/{reference_subagents.md.BHsSMMyO.lean.js → reference_subagents.md.Dl16gcBj.lean.js} +1 -1
  72. package/dist/docs/assets/{reference_tools.md.BYzUTeVA.js → reference_tools.md.B1dH1lpa.js} +2 -2
  73. package/dist/docs/assets/{reference_tools.md.BYzUTeVA.lean.js → reference_tools.md.B1dH1lpa.lean.js} +1 -1
  74. package/dist/docs/building-with-agents.html +35 -35
  75. package/dist/docs/deployment.html +36 -36
  76. package/dist/docs/evals.html +36 -36
  77. package/dist/docs/evals.md +3 -0
  78. package/dist/docs/guides/agent-to-agent.html +65 -54
  79. package/dist/docs/guides/agent-to-agent.md +73 -68
  80. package/dist/docs/guides/bitbucket.html +35 -35
  81. package/dist/docs/guides/cloud-agents.html +35 -35
  82. package/dist/docs/guides/convert-automation.html +35 -35
  83. package/dist/docs/guides/github.html +35 -35
  84. package/dist/docs/guides/gitlab.html +35 -35
  85. package/dist/docs/guides/grokbot-agents.html +35 -35
  86. package/dist/docs/guides/improve.html +36 -36
  87. package/dist/docs/guides/jev.html +248 -0
  88. package/dist/docs/guides/jev.md +348 -0
  89. package/dist/docs/guides/mcp-oauth.html +36 -36
  90. package/dist/docs/guides/opentelemetry.html +35 -35
  91. package/dist/docs/guides/slack.html +35 -35
  92. package/dist/docs/guides/webhooks.html +35 -35
  93. package/dist/docs/hashmap.json +1 -1
  94. package/dist/docs/hillclimbing.html +35 -35
  95. package/dist/docs/index.html +35 -35
  96. package/dist/docs/llms-full.txt +434 -68
  97. package/dist/docs/llms.txt +2 -1
  98. package/dist/docs/quickstart.html +35 -35
  99. package/dist/docs/reference/agent-config.html +35 -35
  100. package/dist/docs/reference/artifacts.html +35 -35
  101. package/dist/docs/reference/channels.html +35 -35
  102. package/dist/docs/reference/cli.html +35 -35
  103. package/dist/docs/reference/connections.html +37 -37
  104. package/dist/docs/reference/connections.md +1 -1
  105. package/dist/docs/reference/evals.html +35 -35
  106. package/dist/docs/reference/extensions.html +37 -37
  107. package/dist/docs/reference/extensions.md +1 -0
  108. package/dist/docs/reference/hooks.html +35 -35
  109. package/dist/docs/reference/http-api.html +35 -35
  110. package/dist/docs/reference/instructions.html +35 -35
  111. package/dist/docs/reference/playground.html +35 -35
  112. package/dist/docs/reference/project-layout.html +35 -35
  113. package/dist/docs/reference/prompt.html +35 -35
  114. package/dist/docs/reference/schedules.html +35 -35
  115. package/dist/docs/reference/sessions.html +35 -35
  116. package/dist/docs/reference/skills.html +35 -35
  117. package/dist/docs/reference/subagents.html +37 -37
  118. package/dist/docs/reference/subagents.md +1 -1
  119. package/dist/docs/reference/tools.html +37 -37
  120. package/dist/docs/reference/tools.md +4 -0
  121. package/dist/docs/templates/agentic-owners.html +35 -35
  122. package/dist/docs/templates/pr-autofixer.html +35 -35
  123. package/dist/docs/templates/security-reviewer.html +35 -35
  124. package/dist/docs/templates/thermo-quality-review.html +35 -35
  125. package/dist/docs/templates/thermo-review.html +35 -35
  126. package/dist/docs/templates/triage.html +35 -35
  127. package/dist/docs/troubleshooting.html +35 -35
  128. package/dist/extensions/jev/extension.d.ts +43 -0
  129. package/dist/extensions/jev/extension.d.ts.map +1 -0
  130. package/dist/extensions/jev/extension.js +47 -0
  131. package/dist/extensions/jev/lib/evaluate.d.ts +101 -0
  132. package/dist/extensions/jev/lib/evaluate.d.ts.map +1 -0
  133. package/dist/extensions/jev/lib/evaluate.js +167 -0
  134. package/dist/extensions/jev/skills/gated-write.md +25 -0
  135. package/dist/extensions/jev/skills/questions.md +33 -0
  136. package/dist/extensions/jev/tools/evaluate.d.ts +4 -0
  137. package/dist/extensions/jev/tools/evaluate.d.ts.map +1 -0
  138. package/dist/extensions/jev/tools/evaluate.js +88 -0
  139. package/dist/extensions.d.ts +1 -1
  140. package/dist/extensions.d.ts.map +1 -1
  141. package/dist/extensions.js +2 -0
  142. package/dist/internal/advertise-tools.d.ts.map +1 -1
  143. package/dist/internal/advertise-tools.js +6 -0
  144. package/dist/internal/discovery/connections.d.ts.map +1 -1
  145. package/dist/internal/discovery/connections.js +18 -0
  146. package/dist/internal/discovery/extensions.d.ts.map +1 -1
  147. package/dist/internal/discovery/extensions.js +8 -4
  148. package/dist/internal/discovery/info.d.ts.map +1 -1
  149. package/dist/internal/discovery/info.js +1 -0
  150. package/dist/internal/hosted-delivery-protocol.d.ts +3 -0
  151. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  152. package/dist/internal/hosted-delivery-protocol.js +1 -0
  153. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  154. package/dist/internal/hosted-delivery.js +15 -25
  155. package/dist/internal/hosted-execution-diag.d.ts +12 -4
  156. package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
  157. package/dist/internal/hosted-execution-diag.js +26 -4
  158. package/dist/internal/hosted-execution-flush.d.ts +1 -0
  159. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  160. package/dist/internal/hosted-execution-flush.js +4 -2
  161. package/dist/internal/server.d.ts.map +1 -1
  162. package/dist/internal/server.js +17 -9
  163. package/dist/internal/session-engine.d.ts +4 -1
  164. package/dist/internal/session-engine.d.ts.map +1 -1
  165. package/dist/internal/session-engine.js +28 -4
  166. package/dist/playground/assets/index-DSMAewbx.css +1 -0
  167. package/dist/playground/assets/{index-B1c1LeIf.js → index-De_lpFxE.js} +43 -43
  168. package/dist/playground/index.html +2 -2
  169. package/dist/types.d.ts +23 -3
  170. package/dist/types.d.ts.map +1 -1
  171. package/docs/evals.md +3 -0
  172. package/docs/guides/agent-to-agent.md +74 -69
  173. package/docs/guides/jev.md +353 -0
  174. package/docs/reference/connections.md +1 -1
  175. package/docs/reference/extensions.md +1 -0
  176. package/docs/reference/subagents.md +1 -1
  177. package/docs/reference/tools.md +4 -0
  178. package/package.json +8 -1
  179. package/src/bin/agent-serve.ts +2 -3
  180. package/src/channels/checks.ts +8 -0
  181. package/src/channels/origin/checks.ts +3 -1
  182. package/src/channels/slack/dispatch.ts +7 -2
  183. package/src/extensions/jev/extension.ts +95 -0
  184. package/src/extensions/jev/lib/evaluate.ts +289 -0
  185. package/src/extensions/jev/skills/gated-write.md +25 -0
  186. package/src/extensions/jev/skills/questions.md +33 -0
  187. package/src/extensions/jev/tools/evaluate.ts +90 -0
  188. package/src/extensions.ts +2 -0
  189. package/src/internal/advertise-tools.ts +6 -0
  190. package/src/internal/discovery/connections.ts +21 -0
  191. package/src/internal/discovery/extensions.ts +12 -4
  192. package/src/internal/discovery/info.ts +1 -0
  193. package/src/internal/hosted-delivery-protocol.ts +4 -0
  194. package/src/internal/hosted-delivery.ts +15 -0
  195. package/src/internal/hosted-execution-diag.ts +33 -4
  196. package/src/internal/hosted-execution-flush.ts +4 -0
  197. package/src/internal/server.ts +26 -12
  198. package/src/internal/session-engine.ts +30 -4
  199. package/src/types.ts +24 -3
  200. package/dist/docs/assets/chunks/@localSearchIndexroot.QmjDU6Jh.js +0 -1
  201. package/dist/docs/assets/chunks/channel.BjpoSbz_.js +0 -1
  202. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BgxOlMHw.js +0 -1
  203. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BgxOlMHw.js +0 -1
  204. package/dist/docs/assets/chunks/clone.DRuGBKZC.js +0 -1
  205. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.-43J68xB.js +0 -1
  206. package/dist/docs/assets/chunks/wardley-RL74JXVD.WRXz-Dux.js +0 -162
  207. package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.js +0 -30
  208. package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.lean.js +0 -1
  209. package/dist/playground/assets/index-CK2LX3iD.css +0 -1
  210. /package/dist/docs/assets/{reference_connections.md.CmyrlXfY.lean.js → reference_connections.md.Je9dMsdd.lean.js} +0 -0
  211. /package/dist/docs/assets/{reference_extensions.md.Ceq-qT8d.lean.js → reference_extensions.md.Cv5aLCz_.lean.js} +0 -0
@@ -1,30 +0,0 @@
1
- import{_ as e,c as a,o as t,a3 as i}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Agent-to-agent","description":"Let one Agent SDK agent consult an independent specialist, continue its session, or call its deterministic tools.","frontmatter":{"title":"Agent-to-agent","description":"Let one Agent SDK agent consult an independent specialist, continue its session, or call its deterministic tools."},"headers":[],"relativePath":"guides/agent-to-agent.md","filePath":"guides/agent-to-agent.md"}'),n={name:"guides/agent-to-agent.md"};function l(o,s,h,p,r,d){return t(),a("div",null,[...s[0]||(s[0]=[i(`<h1 id="agent-to-agent" tabindex="-1">Agent-to-agent <a class="header-anchor" href="#agent-to-agent" aria-label="Permalink to &quot;Agent-to-agent&quot;">​</a></h1><p>A peer connection lets one agent ask another agent on the same host for help. The specialist keeps its own instructions, tools, and session, while the caller decides when to delegate and returns the answer to the user.</p><h2 id="how-do-i-wire-two-agents" tabindex="-1">How do I wire two agents? <a class="header-anchor" href="#how-do-i-wire-two-agents" aria-label="Permalink to &quot;How do I wire two agents?&quot;">​</a></h2><p>Put both projects under one directory, then point the concierge at the specialist&#39;s mount slug. When a user asks about weather, the concierge calls the peer&#39;s <code>ask</code> tool, the weather agent runs in its own context, and the concierge returns that answer.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agents/</span></span>
2
- <span class="line"><span> concierge/</span></span>
3
- <span class="line"><span> agent/instructions.md</span></span>
4
- <span class="line"><span> agent/mcp-connections/weather.ts</span></span>
5
- <span class="line"><span> weather-agent/</span></span>
6
- <span class="line"><span> agent/agent.ts</span></span>
7
- <span class="line"><span> agent/instructions.md</span></span></code></pre></div><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agents/concierge/agent/mcp-connections/weather.ts</span></span>
8
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineConnection } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/connections&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
9
- <span class="line"></span>
10
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
11
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> agent: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;weather-agent&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
12
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Delegate weather questions to the weather specialist.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
13
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Give the concierge a narrow routing rule:</p><div class="language-md vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">When a request needs current weather, ask the </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\`weather\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> peer. Return its</span></span>
14
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">answer without delegating the same request again.</span></span></code></pre></div><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./agents</span></span>
15
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> chat</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --url</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> http://127.0.0.1:3000/concierge</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
16
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --message</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;What&#39;s the weather in Paris right now?&quot;</span></span></code></pre></div><p>The connection filename becomes the MCP server name. The <code>agent</code> value is the specialist&#39;s mount slug, normally its directory name.</p><h2 id="continue-the-specialist-s-conversation" tabindex="-1">Continue the specialist&#39;s conversation <a class="header-anchor" href="#continue-the-specialist-s-conversation" aria-label="Permalink to &quot;Continue the specialist&#39;s conversation&quot;">​</a></h2><p>The first <code>ask</code> returns a peer <code>sessionId</code>. Pass that ID into the next <code>ask</code> when the specialist should remember its earlier work instead of starting with fresh context.</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
17
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;How does that compare with tomorrow?&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
18
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;sessionId&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&lt;session-id&gt;&quot;</span></span>
19
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The peer owns this session. Follow-ups resume its instructions and tool history without merging them into the concierge&#39;s conversation.</p><h2 id="wait-for-long-running-specialist-work" tabindex="-1">Wait for long-running specialist work <a class="header-anchor" href="#wait-for-long-running-specialist-work" aria-label="Permalink to &quot;Wait for long-running specialist work&quot;">​</a></h2><p><code>ask</code> waits for a bounded time. If the specialist is still working, it returns <code>status: &quot;running&quot;</code> with the session ID, allowing the caller to do other work and check again later.</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
20
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;sessionId&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&lt;session-id&gt;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
21
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;waitSeconds&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">20</span></span>
22
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>Call the peer&#39;s <code>check</code> tool with that input. It returns the final reply when the turn settles, or another running status when more time is needed.</p><h2 id="call-a-deterministic-peer-tool" tabindex="-1">Call a deterministic peer tool <a class="header-anchor" href="#call-a-deterministic-peer-tool" aria-label="Permalink to &quot;Call a deterministic peer tool&quot;">​</a></h2><p>When the specialist has a server tool and no second model turn should make a decision, call its <code>call_tool</code> endpoint through the peer connection. This example runs <code>get_forecast</code> in the weather agent&#39;s workspace and returns its structured result to the concierge tool.</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;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> result</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.mcp.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">callTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;weather&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;call_tool&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
23
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> toolName: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;get_forecast&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
24
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> input: { city: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Paris&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
25
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span>
26
- <span class="line"></span>
27
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
28
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ok: result.isError </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
29
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> forecast: result.structuredContent </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">??</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
30
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span></code></pre></div><p><code>call_tool</code> appears only when the peer declares at least one deterministic server tool.</p><h2 id="peer-or-subagent" tabindex="-1">Peer or subagent? <a class="header-anchor" href="#peer-or-subagent" aria-label="Permalink to &quot;Peer or subagent?&quot;">​</a></h2><p>Use a <a href="./../reference/subagents.html">subagent</a> to split one agent&#39;s job into roles that share its project. Use a peer when the specialist is a complete agent you would also run, inspect, or expose on its own.</p><table tabindex="0"><thead><tr><th></th><th>Subagent</th><th>Peer</th></tr></thead><tbody><tr><td>Context</td><td>Child role inside one agent</td><td>Independent agent and session</td></tr><tr><td>Tools and connections</td><td>Inherits the parent project</td><td>Owns its project surface</td></tr><tr><td>Reachability</td><td>Parent only</td><td>Other co-hosted agents and MCP clients</td></tr></tbody></table><h2 id="peer-sessions" tabindex="-1">Peer sessions <a class="header-anchor" href="#peer-sessions" aria-label="Permalink to &quot;Peer sessions&quot;">​</a></h2><p>Calls through <code>ask</code> create sessions on the peer&#39;s <code>mcp</code> channel. They use the caller&#39;s authenticated principal and appear in the peer&#39;s playground, so the same authorization boundary applies to starts, follow-ups, and checks.</p><p>There is no automatic recursion guard between peers. Give each caller a one-way routing rule so agent A cannot delegate the same work to B and receive it back from B.</p><h2 id="run-peers-on-one-host" tabindex="-1">Run peers on one host <a class="header-anchor" href="#run-peers-on-one-host" aria-label="Permalink to &quot;Run peers on one host&quot;">​</a></h2><p>Peers require the default multi-agent layout and one shared <code>serve</code> process. Unknown slugs and self-references fail at startup. Cursor-managed hosting deploys one agent per slug, so use subagents there instead of peer connections.</p><p>For a self-hosted cloud-runtime caller, expose the shared process with <code>--public-url</code> and protect it with <code>--bearer-token</code>. The <a href="./../deployment.html">Deployment guide</a> owns that hosting setup.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./../reference/connections.html#peer-mcp-connection">MCP connections</a>: peer configuration and connection naming</li><li><a href="./../reference/http-api.html#mcp-endpoint">MCP endpoint</a>: exact <code>ask</code>, <code>check</code>, and <code>call_tool</code> schemas</li><li><a href="./../reference/subagents.html">Subagents</a>: specialists inside one agent</li><li><a href="./../deployment.html">Deployment</a>: secure shared-host setup</li></ul>`,33)])])}const g=e(n,[["render",l]]);export{k as __pageData,g as default};
@@ -1 +0,0 @@
1
- import{_ as e,c as a,o as t,a3 as i}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Agent-to-agent","description":"Let one Agent SDK agent consult an independent specialist, continue its session, or call its deterministic tools.","frontmatter":{"title":"Agent-to-agent","description":"Let one Agent SDK agent consult an independent specialist, continue its session, or call its deterministic tools."},"headers":[],"relativePath":"guides/agent-to-agent.md","filePath":"guides/agent-to-agent.md"}'),n={name:"guides/agent-to-agent.md"};function l(o,s,h,p,r,d){return t(),a("div",null,[...s[0]||(s[0]=[i("",33)])])}const g=e(n,[["render",l]]);export{k as __pageData,g as default};