@cursor/july 0.1.1
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.
- package/AGENTS.md +290 -0
- package/LICENSE.md +3 -0
- package/README.md +1233 -0
- package/dist/ab.d.ts +290 -0
- package/dist/ab.d.ts.map +1 -0
- package/dist/ab.js +386 -0
- package/dist/bin/agent-serve.d.ts +15 -0
- package/dist/bin/agent-serve.d.ts.map +1 -0
- package/dist/bin/agent-serve.js +754 -0
- package/dist/channels/github/api.d.ts +101 -0
- package/dist/channels/github/api.d.ts.map +1 -0
- package/dist/channels/github/api.js +229 -0
- package/dist/channels/github/auth.d.ts +67 -0
- package/dist/channels/github/auth.d.ts.map +1 -0
- package/dist/channels/github/auth.js +239 -0
- package/dist/channels/github/binding.d.ts +73 -0
- package/dist/channels/github/binding.d.ts.map +1 -0
- package/dist/channels/github/binding.js +114 -0
- package/dist/channels/github/defaults.d.ts +24 -0
- package/dist/channels/github/defaults.d.ts.map +1 -0
- package/dist/channels/github/defaults.js +100 -0
- package/dist/channels/github/events.d.ts +18 -0
- package/dist/channels/github/events.d.ts.map +1 -0
- package/dist/channels/github/events.js +59 -0
- package/dist/channels/github/forward.d.ts +137 -0
- package/dist/channels/github/forward.d.ts.map +1 -0
- package/dist/channels/github/forward.js +271 -0
- package/dist/channels/github/github-channel.d.ts +127 -0
- package/dist/channels/github/github-channel.d.ts.map +1 -0
- package/dist/channels/github/github-channel.js +1688 -0
- package/dist/channels/github/index.d.ts +52 -0
- package/dist/channels/github/index.d.ts.map +1 -0
- package/dist/channels/github/index.js +51 -0
- package/dist/channels/github/replay.d.ts +115 -0
- package/dist/channels/github/replay.d.ts.map +1 -0
- package/dist/channels/github/replay.js +282 -0
- package/dist/channels/github/state.d.ts +26 -0
- package/dist/channels/github/state.d.ts.map +1 -0
- package/dist/channels/github/state.js +50 -0
- package/dist/channels/github/types.d.ts +385 -0
- package/dist/channels/github/types.d.ts.map +1 -0
- package/dist/channels/github/types.js +1 -0
- package/dist/channels/slack/api.d.ts +117 -0
- package/dist/channels/slack/api.d.ts.map +1 -0
- package/dist/channels/slack/api.js +437 -0
- package/dist/channels/slack/approvals.d.ts +32 -0
- package/dist/channels/slack/approvals.d.ts.map +1 -0
- package/dist/channels/slack/approvals.js +157 -0
- package/dist/channels/slack/assistant.d.ts +23 -0
- package/dist/channels/slack/assistant.d.ts.map +1 -0
- package/dist/channels/slack/assistant.js +67 -0
- package/dist/channels/slack/auth.d.ts +40 -0
- package/dist/channels/slack/auth.d.ts.map +1 -0
- package/dist/channels/slack/auth.js +71 -0
- package/dist/channels/slack/channel-watch.d.ts +46 -0
- package/dist/channels/slack/channel-watch.d.ts.map +1 -0
- package/dist/channels/slack/channel-watch.js +180 -0
- package/dist/channels/slack/constants.d.ts +17 -0
- package/dist/channels/slack/constants.d.ts.map +1 -0
- package/dist/channels/slack/constants.js +27 -0
- package/dist/channels/slack/credentials.d.ts +35 -0
- package/dist/channels/slack/credentials.d.ts.map +1 -0
- package/dist/channels/slack/credentials.js +88 -0
- package/dist/channels/slack/cursor-account.d.ts +76 -0
- package/dist/channels/slack/cursor-account.d.ts.map +1 -0
- package/dist/channels/slack/cursor-account.js +88 -0
- package/dist/channels/slack/defaults.d.ts +32 -0
- package/dist/channels/slack/defaults.d.ts.map +1 -0
- package/dist/channels/slack/defaults.js +380 -0
- package/dist/channels/slack/dispatch.d.ts +43 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -0
- package/dist/channels/slack/dispatch.js +185 -0
- package/dist/channels/slack/doctor.d.ts +24 -0
- package/dist/channels/slack/doctor.d.ts.map +1 -0
- package/dist/channels/slack/doctor.js +115 -0
- package/dist/channels/slack/event-id-dedupe.d.ts +10 -0
- package/dist/channels/slack/event-id-dedupe.d.ts.map +1 -0
- package/dist/channels/slack/event-id-dedupe.js +23 -0
- package/dist/channels/slack/inbound.d.ts +41 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -0
- package/dist/channels/slack/inbound.js +166 -0
- package/dist/channels/slack/index.d.ts +45 -0
- package/dist/channels/slack/index.d.ts.map +1 -0
- package/dist/channels/slack/index.js +44 -0
- package/dist/channels/slack/init.d.ts +32 -0
- package/dist/channels/slack/init.d.ts.map +1 -0
- package/dist/channels/slack/init.js +82 -0
- package/dist/channels/slack/interactive.d.ts +19 -0
- package/dist/channels/slack/interactive.d.ts.map +1 -0
- package/dist/channels/slack/interactive.js +142 -0
- package/dist/channels/slack/links.d.ts +10 -0
- package/dist/channels/slack/links.d.ts.map +1 -0
- package/dist/channels/slack/links.js +19 -0
- package/dist/channels/slack/live-delivery.d.ts +75 -0
- package/dist/channels/slack/live-delivery.d.ts.map +1 -0
- package/dist/channels/slack/live-delivery.js +143 -0
- package/dist/channels/slack/log.d.ts +25 -0
- package/dist/channels/slack/log.d.ts.map +1 -0
- package/dist/channels/slack/log.js +47 -0
- package/dist/channels/slack/manifest.d.ts +57 -0
- package/dist/channels/slack/manifest.d.ts.map +1 -0
- package/dist/channels/slack/manifest.js +110 -0
- package/dist/channels/slack/pr-ref.d.ts +18 -0
- package/dist/channels/slack/pr-ref.d.ts.map +1 -0
- package/dist/channels/slack/pr-ref.js +36 -0
- package/dist/channels/slack/setup.d.ts +14 -0
- package/dist/channels/slack/setup.d.ts.map +1 -0
- package/dist/channels/slack/setup.js +86 -0
- package/dist/channels/slack/slack-channel.d.ts +15 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -0
- package/dist/channels/slack/slack-channel.js +281 -0
- package/dist/channels/slack/socket-mode.d.ts +26 -0
- package/dist/channels/slack/socket-mode.d.ts.map +1 -0
- package/dist/channels/slack/socket-mode.js +116 -0
- package/dist/channels/slack/stream.d.ts +26 -0
- package/dist/channels/slack/stream.d.ts.map +1 -0
- package/dist/channels/slack/stream.js +39 -0
- package/dist/channels/slack/tool-approval-events.d.ts +33 -0
- package/dist/channels/slack/tool-approval-events.d.ts.map +1 -0
- package/dist/channels/slack/tool-approval-events.js +129 -0
- package/dist/channels/slack/types.d.ts +326 -0
- package/dist/channels/slack/types.d.ts.map +1 -0
- package/dist/channels/slack/types.js +4 -0
- package/dist/channels.d.ts +116 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/channels.js +294 -0
- package/dist/connections.d.ts +75 -0
- package/dist/connections.d.ts.map +1 -0
- package/dist/connections.js +75 -0
- package/dist/docs/404.html +22 -0
- package/dist/docs/ab.html +87 -0
- package/dist/docs/assets/ab.md.COdXkces.js +63 -0
- package/dist/docs/assets/ab.md.COdXkces.lean.js +1 -0
- package/dist/docs/assets/app.DqfFEmJd.js +1 -0
- package/dist/docs/assets/building-with-agents.md.CJCtZCyi.js +13 -0
- package/dist/docs/assets/building-with-agents.md.CJCtZCyi.lean.js +1 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.CcVk1uKq.js +1 -0
- package/dist/docs/assets/chunks/VPLocalSearchBox.BaLEdS15.js +9 -0
- package/dist/docs/assets/chunks/framework.CAZyNGu9.js +19 -0
- package/dist/docs/assets/chunks/theme.CZRvu_0q.js +2 -0
- package/dist/docs/assets/concepts.md.Cfb9b-k1.js +4 -0
- package/dist/docs/assets/concepts.md.Cfb9b-k1.lean.js +1 -0
- package/dist/docs/assets/deployment.md.Dx1TYNk5.js +14 -0
- package/dist/docs/assets/deployment.md.Dx1TYNk5.lean.js +1 -0
- package/dist/docs/assets/evals.md.DPZ_MAnI.js +85 -0
- package/dist/docs/assets/evals.md.DPZ_MAnI.lean.js +1 -0
- package/dist/docs/assets/guides_agent-to-agent.md.CrtrsySy.js +10 -0
- package/dist/docs/assets/guides_agent-to-agent.md.CrtrsySy.lean.js +1 -0
- package/dist/docs/assets/guides_cloud-runtime.md.CYlNMTNp.js +9 -0
- package/dist/docs/assets/guides_cloud-runtime.md.CYlNMTNp.lean.js +1 -0
- package/dist/docs/assets/guides_github.md.DwbKhCeS.js +20 -0
- package/dist/docs/assets/guides_github.md.DwbKhCeS.lean.js +1 -0
- package/dist/docs/assets/guides_human-in-the-loop.md.Dvuctx7s.js +28 -0
- package/dist/docs/assets/guides_human-in-the-loop.md.Dvuctx7s.lean.js +1 -0
- package/dist/docs/assets/guides_slack.md.bv41fHfW.js +37 -0
- package/dist/docs/assets/guides_slack.md.bv41fHfW.lean.js +1 -0
- package/dist/docs/assets/guides_webhooks.md.hFTik3lf.js +50 -0
- package/dist/docs/assets/guides_webhooks.md.hFTik3lf.lean.js +1 -0
- package/dist/docs/assets/hillclimbing.md.DHNast08.js +4 -0
- package/dist/docs/assets/hillclimbing.md.DHNast08.lean.js +1 -0
- package/dist/docs/assets/index.md.BPKcj5AI.js +20 -0
- package/dist/docs/assets/index.md.BPKcj5AI.lean.js +1 -0
- package/dist/docs/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
- package/dist/docs/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
- package/dist/docs/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
- package/dist/docs/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
- package/dist/docs/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
- package/dist/docs/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
- package/dist/docs/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
- package/dist/docs/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
- package/dist/docs/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
- package/dist/docs/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
- package/dist/docs/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
- package/dist/docs/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
- package/dist/docs/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
- package/dist/docs/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
- package/dist/docs/assets/quickstart.md.tVPiGK_L.js +35 -0
- package/dist/docs/assets/quickstart.md.tVPiGK_L.lean.js +1 -0
- package/dist/docs/assets/reference_agent-config.md.Bpd7HQwf.js +34 -0
- package/dist/docs/assets/reference_agent-config.md.Bpd7HQwf.lean.js +1 -0
- package/dist/docs/assets/reference_channels.md.D7JTR03W.js +53 -0
- package/dist/docs/assets/reference_channels.md.D7JTR03W.lean.js +1 -0
- package/dist/docs/assets/reference_cli.md.DA730zCu.js +33 -0
- package/dist/docs/assets/reference_cli.md.DA730zCu.lean.js +1 -0
- package/dist/docs/assets/reference_connections.md.C3vNH_DE.js +26 -0
- package/dist/docs/assets/reference_connections.md.C3vNH_DE.lean.js +1 -0
- package/dist/docs/assets/reference_hooks.md.BCEc3MyM.js +12 -0
- package/dist/docs/assets/reference_hooks.md.BCEc3MyM.lean.js +1 -0
- package/dist/docs/assets/reference_http-api.md.DBAahtdz.js +11 -0
- package/dist/docs/assets/reference_http-api.md.DBAahtdz.lean.js +1 -0
- package/dist/docs/assets/reference_instructions.md.BC05LEQ8.js +12 -0
- package/dist/docs/assets/reference_instructions.md.BC05LEQ8.lean.js +1 -0
- package/dist/docs/assets/reference_playground.md.CPZhfYaO.js +1 -0
- package/dist/docs/assets/reference_playground.md.CPZhfYaO.lean.js +1 -0
- package/dist/docs/assets/reference_project-layout.md.Bd_CKtNS.js +31 -0
- package/dist/docs/assets/reference_project-layout.md.Bd_CKtNS.lean.js +1 -0
- package/dist/docs/assets/reference_schedules.md.D7qijxLk.js +82 -0
- package/dist/docs/assets/reference_schedules.md.D7qijxLk.lean.js +1 -0
- package/dist/docs/assets/reference_sessions.md.DdjWabnN.js +8 -0
- package/dist/docs/assets/reference_sessions.md.DdjWabnN.lean.js +1 -0
- package/dist/docs/assets/reference_skills.md.VQnlBT3Q.js +15 -0
- package/dist/docs/assets/reference_skills.md.VQnlBT3Q.lean.js +1 -0
- package/dist/docs/assets/reference_subagents.md.CIRAVcPK.js +10 -0
- package/dist/docs/assets/reference_subagents.md.CIRAVcPK.lean.js +1 -0
- package/dist/docs/assets/reference_tools.md.DF5kwlt0.js +46 -0
- package/dist/docs/assets/reference_tools.md.DF5kwlt0.lean.js +1 -0
- package/dist/docs/assets/scaffolding-agents.md.CyYfWGdc.js +1 -0
- package/dist/docs/assets/scaffolding-agents.md.CyYfWGdc.lean.js +1 -0
- package/dist/docs/assets/style.Bj-IXa5W.css +1 -0
- package/dist/docs/assets/troubleshooting.md.DkovjS7h.js +1 -0
- package/dist/docs/assets/troubleshooting.md.DkovjS7h.lean.js +1 -0
- package/dist/docs/building-with-agents.html +37 -0
- package/dist/docs/concepts.html +28 -0
- package/dist/docs/deployment.html +38 -0
- package/dist/docs/evals.html +109 -0
- package/dist/docs/guides/agent-to-agent.html +34 -0
- package/dist/docs/guides/cloud-runtime.html +33 -0
- package/dist/docs/guides/github.html +44 -0
- package/dist/docs/guides/human-in-the-loop.html +52 -0
- package/dist/docs/guides/slack.html +61 -0
- package/dist/docs/guides/webhooks.html +74 -0
- package/dist/docs/hashmap.json +1 -0
- package/dist/docs/hillclimbing.html +28 -0
- package/dist/docs/index.html +44 -0
- package/dist/docs/quickstart.html +59 -0
- package/dist/docs/reference/agent-config.html +58 -0
- package/dist/docs/reference/channels.html +77 -0
- package/dist/docs/reference/cli.html +57 -0
- package/dist/docs/reference/connections.html +50 -0
- package/dist/docs/reference/hooks.html +36 -0
- package/dist/docs/reference/http-api.html +35 -0
- package/dist/docs/reference/instructions.html +36 -0
- package/dist/docs/reference/playground.html +25 -0
- package/dist/docs/reference/project-layout.html +55 -0
- package/dist/docs/reference/schedules.html +106 -0
- package/dist/docs/reference/sessions.html +32 -0
- package/dist/docs/reference/skills.html +39 -0
- package/dist/docs/reference/subagents.html +34 -0
- package/dist/docs/reference/tools.html +70 -0
- package/dist/docs/scaffolding-agents.html +25 -0
- package/dist/docs/troubleshooting.html +25 -0
- package/dist/docs/vp-icons.css +0 -0
- package/dist/evals.d.ts +312 -0
- package/dist/evals.d.ts.map +1 -0
- package/dist/evals.js +254 -0
- package/dist/hooks.d.ts +23 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +23 -0
- package/dist/index.d.ts +71 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +101 -0
- package/dist/internal/ab-collector.d.ts +42 -0
- package/dist/internal/ab-collector.d.ts.map +1 -0
- package/dist/internal/ab-collector.js +153 -0
- package/dist/internal/ab-fold.d.ts +36 -0
- package/dist/internal/ab-fold.d.ts.map +1 -0
- package/dist/internal/ab-fold.js +171 -0
- package/dist/internal/ab-snapshot.d.ts +70 -0
- package/dist/internal/ab-snapshot.d.ts.map +1 -0
- package/dist/internal/ab-snapshot.js +208 -0
- package/dist/internal/approval-gate.d.ts +34 -0
- package/dist/internal/approval-gate.d.ts.map +1 -0
- package/dist/internal/approval-gate.js +85 -0
- package/dist/internal/auth.d.ts +8 -0
- package/dist/internal/auth.d.ts.map +1 -0
- package/dist/internal/auth.js +27 -0
- package/dist/internal/authored-alias-hooks.d.ts +31 -0
- package/dist/internal/authored-alias-hooks.d.ts.map +1 -0
- package/dist/internal/authored-alias-hooks.js +43 -0
- package/dist/internal/authored-loaders.d.ts +25 -0
- package/dist/internal/authored-loaders.d.ts.map +1 -0
- package/dist/internal/authored-loaders.js +129 -0
- package/dist/internal/bounded-int.d.ts +11 -0
- package/dist/internal/bounded-int.d.ts.map +1 -0
- package/dist/internal/bounded-int.js +13 -0
- package/dist/internal/brand.d.ts +6 -0
- package/dist/internal/brand.d.ts.map +1 -0
- package/dist/internal/brand.js +17 -0
- package/dist/internal/chat-client.d.ts +19 -0
- package/dist/internal/chat-client.d.ts.map +1 -0
- package/dist/internal/chat-client.js +327 -0
- package/dist/internal/cli-ax.d.ts +58 -0
- package/dist/internal/cli-ax.d.ts.map +1 -0
- package/dist/internal/cli-ax.js +345 -0
- package/dist/internal/cli-cursor.d.ts +20 -0
- package/dist/internal/cli-cursor.d.ts.map +1 -0
- package/dist/internal/cli-cursor.js +227 -0
- package/dist/internal/cli-github.d.ts +47 -0
- package/dist/internal/cli-github.d.ts.map +1 -0
- package/dist/internal/cli-github.js +644 -0
- package/dist/internal/cli-slack.d.ts +18 -0
- package/dist/internal/cli-slack.d.ts.map +1 -0
- package/dist/internal/cli-slack.js +144 -0
- package/dist/internal/cloud-merge.d.ts +23 -0
- package/dist/internal/cloud-merge.d.ts.map +1 -0
- package/dist/internal/cloud-merge.js +28 -0
- package/dist/internal/cron.d.ts +17 -0
- package/dist/internal/cron.d.ts.map +1 -0
- package/dist/internal/cron.js +60 -0
- package/dist/internal/cursor/account-mcp.d.ts +95 -0
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -0
- package/dist/internal/cursor/account-mcp.js +342 -0
- package/dist/internal/cursor/backend-client.d.ts +118 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -0
- package/dist/internal/cursor/backend-client.js +477 -0
- package/dist/internal/cursor/credentials.d.ts +112 -0
- package/dist/internal/cursor/credentials.d.ts.map +1 -0
- package/dist/internal/cursor/credentials.js +329 -0
- package/dist/internal/cursor-event-relay.d.ts +111 -0
- package/dist/internal/cursor-event-relay.d.ts.map +1 -0
- package/dist/internal/cursor-event-relay.js +181 -0
- package/dist/internal/cursor-relay-core.d.ts +113 -0
- package/dist/internal/cursor-relay-core.d.ts.map +1 -0
- package/dist/internal/cursor-relay-core.js +364 -0
- package/dist/internal/cursor-slack-relay.d.ts +94 -0
- package/dist/internal/cursor-slack-relay.d.ts.map +1 -0
- package/dist/internal/cursor-slack-relay.js +171 -0
- package/dist/internal/describe-error.d.ts +3 -0
- package/dist/internal/describe-error.d.ts.map +1 -0
- package/dist/internal/describe-error.js +4 -0
- package/dist/internal/dev-mode.d.ts +13 -0
- package/dist/internal/dev-mode.d.ts.map +1 -0
- package/dist/internal/dev-mode.js +17 -0
- package/dist/internal/discovery.d.ts +55 -0
- package/dist/internal/discovery.d.ts.map +1 -0
- package/dist/internal/discovery.js +1427 -0
- package/dist/internal/distribution.d.ts +47 -0
- package/dist/internal/distribution.d.ts.map +1 -0
- package/dist/internal/distribution.js +82 -0
- package/dist/internal/docs-site.d.ts +28 -0
- package/dist/internal/docs-site.d.ts.map +1 -0
- package/dist/internal/docs-site.js +169 -0
- package/dist/internal/duration.d.ts +8 -0
- package/dist/internal/duration.d.ts.map +1 -0
- package/dist/internal/duration.js +35 -0
- package/dist/internal/eval-run-store.d.ts +81 -0
- package/dist/internal/eval-run-store.d.ts.map +1 -0
- package/dist/internal/eval-run-store.js +396 -0
- package/dist/internal/eval-runner.d.ts +76 -0
- package/dist/internal/eval-runner.d.ts.map +1 -0
- package/dist/internal/eval-runner.js +336 -0
- package/dist/internal/event-log.d.ts +51 -0
- package/dist/internal/event-log.d.ts.map +1 -0
- package/dist/internal/event-log.js +167 -0
- package/dist/internal/event-mapper.d.ts +46 -0
- package/dist/internal/event-mapper.d.ts.map +1 -0
- package/dist/internal/event-mapper.js +226 -0
- package/dist/internal/frontmatter.d.ts +12 -0
- package/dist/internal/frontmatter.d.ts.map +1 -0
- package/dist/internal/frontmatter.js +61 -0
- package/dist/internal/github-fanout.d.ts +32 -0
- package/dist/internal/github-fanout.d.ts.map +1 -0
- package/dist/internal/github-fanout.js +122 -0
- package/dist/internal/handleAgentServeTrigger.d.ts +59 -0
- package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -0
- package/dist/internal/handleAgentServeTrigger.js +115 -0
- package/dist/internal/host-platforms.d.ts +40 -0
- package/dist/internal/host-platforms.d.ts.map +1 -0
- package/dist/internal/host-platforms.js +113 -0
- package/dist/internal/http-channel.d.ts +54 -0
- package/dist/internal/http-channel.d.ts.map +1 -0
- package/dist/internal/http-channel.js +382 -0
- package/dist/internal/ids.d.ts +19 -0
- package/dist/internal/ids.d.ts.map +1 -0
- package/dist/internal/ids.js +34 -0
- package/dist/internal/init-project.d.ts +22 -0
- package/dist/internal/init-project.d.ts.map +1 -0
- package/dist/internal/init-project.js +125 -0
- package/dist/internal/json-dir-store.d.ts +32 -0
- package/dist/internal/json-dir-store.d.ts.map +1 -0
- package/dist/internal/json-dir-store.js +100 -0
- package/dist/internal/json-schema.d.ts +18 -0
- package/dist/internal/json-schema.d.ts.map +1 -0
- package/dist/internal/json-schema.js +53 -0
- package/dist/internal/log-ring.d.ts +23 -0
- package/dist/internal/log-ring.d.ts.map +1 -0
- package/dist/internal/log-ring.js +42 -0
- package/dist/internal/map-pool.d.ts +6 -0
- package/dist/internal/map-pool.d.ts.map +1 -0
- package/dist/internal/map-pool.js +41 -0
- package/dist/internal/mcp-endpoint.d.ts +59 -0
- package/dist/internal/mcp-endpoint.d.ts.map +1 -0
- package/dist/internal/mcp-endpoint.js +355 -0
- package/dist/internal/mcp-host.d.ts +28 -0
- package/dist/internal/mcp-host.d.ts.map +1 -0
- package/dist/internal/mcp-host.js +162 -0
- package/dist/internal/net.d.ts +5 -0
- package/dist/internal/net.d.ts.map +1 -0
- package/dist/internal/net.js +30 -0
- package/dist/internal/peer-connections.d.ts +44 -0
- package/dist/internal/peer-connections.d.ts.map +1 -0
- package/dist/internal/peer-connections.js +67 -0
- package/dist/internal/playground/static.d.ts +35 -0
- package/dist/internal/playground/static.d.ts.map +1 -0
- package/dist/internal/playground/static.js +162 -0
- package/dist/internal/playground/toolchain.d.ts +57 -0
- package/dist/internal/playground/toolchain.d.ts.map +1 -0
- package/dist/internal/playground/toolchain.js +226 -0
- package/dist/internal/reminder-runner.d.ts +62 -0
- package/dist/internal/reminder-runner.d.ts.map +1 -0
- package/dist/internal/reminder-runner.js +582 -0
- package/dist/internal/reminder-schedule.d.ts +22 -0
- package/dist/internal/reminder-schedule.d.ts.map +1 -0
- package/dist/internal/reminder-schedule.js +82 -0
- package/dist/internal/reminder-store.d.ts +58 -0
- package/dist/internal/reminder-store.d.ts.map +1 -0
- package/dist/internal/reminder-store.js +106 -0
- package/dist/internal/resolved-connections.d.ts +41 -0
- package/dist/internal/resolved-connections.d.ts.map +1 -0
- package/dist/internal/resolved-connections.js +73 -0
- package/dist/internal/review-comments.d.ts +50 -0
- package/dist/internal/review-comments.d.ts.map +1 -0
- package/dist/internal/review-comments.js +194 -0
- package/dist/internal/router.d.ts +33 -0
- package/dist/internal/router.d.ts.map +1 -0
- package/dist/internal/router.js +93 -0
- package/dist/internal/run-client.d.ts +49 -0
- package/dist/internal/run-client.d.ts.map +1 -0
- package/dist/internal/run-client.js +208 -0
- package/dist/internal/schedule-runner.d.ts +31 -0
- package/dist/internal/schedule-runner.d.ts.map +1 -0
- package/dist/internal/schedule-runner.js +126 -0
- package/dist/internal/sdk-runner.d.ts +41 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -0
- package/dist/internal/sdk-runner.js +221 -0
- package/dist/internal/server.d.ts +25 -0
- package/dist/internal/server.d.ts.map +1 -0
- package/dist/internal/server.js +1374 -0
- package/dist/internal/session-engine.d.ts +287 -0
- package/dist/internal/session-engine.d.ts.map +1 -0
- package/dist/internal/session-engine.js +1377 -0
- package/dist/internal/session-store.d.ts +29 -0
- package/dist/internal/session-store.d.ts.map +1 -0
- package/dist/internal/session-store.js +140 -0
- package/dist/internal/session-urls.d.ts +10 -0
- package/dist/internal/session-urls.d.ts.map +1 -0
- package/dist/internal/session-urls.js +25 -0
- package/dist/internal/stream-progress.d.ts +14 -0
- package/dist/internal/stream-progress.d.ts.map +1 -0
- package/dist/internal/stream-progress.js +195 -0
- package/dist/internal/tool-result.d.ts +20 -0
- package/dist/internal/tool-result.d.ts.map +1 -0
- package/dist/internal/tool-result.js +45 -0
- package/dist/internal/trajectory.d.ts +56 -0
- package/dist/internal/trajectory.d.ts.map +1 -0
- package/dist/internal/trajectory.js +248 -0
- package/dist/internal/workspace.d.ts +42 -0
- package/dist/internal/workspace.d.ts.map +1 -0
- package/dist/internal/workspace.js +199 -0
- package/dist/playground/assets/cursor-icons-outline-oY2V_mvK.woff2 +0 -0
- package/dist/playground/assets/index-1K-hG-7p.css +1 -0
- package/dist/playground/assets/index-FlWjhg3x.js +79 -0
- package/dist/playground/index.html +17 -0
- package/dist/reminders.d.ts +23 -0
- package/dist/reminders.d.ts.map +1 -0
- package/dist/reminders.js +22 -0
- package/dist/schedules.d.ts +23 -0
- package/dist/schedules.d.ts.map +1 -0
- package/dist/schedules.js +26 -0
- package/dist/skills.d.ts +22 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +22 -0
- package/dist/tools.d.ts +92 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +68 -0
- package/dist/types.d.ts +1609 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +80 -0
- package/docs/README.md +174 -0
- package/docs/ab.md +355 -0
- package/docs/building-with-agents.md +129 -0
- package/docs/concepts.md +177 -0
- package/docs/deployment.md +218 -0
- package/docs/evals.md +383 -0
- package/docs/guides/agent-to-agent.md +118 -0
- package/docs/guides/cloud-runtime.md +122 -0
- package/docs/guides/github.md +172 -0
- package/docs/guides/human-in-the-loop.md +131 -0
- package/docs/guides/slack.md +245 -0
- package/docs/guides/webhooks.md +201 -0
- package/docs/hillclimbing.md +93 -0
- package/docs/quickstart.md +183 -0
- package/docs/reference/agent-config.md +154 -0
- package/docs/reference/channels.md +206 -0
- package/docs/reference/cli.md +257 -0
- package/docs/reference/connections.md +137 -0
- package/docs/reference/hooks.md +74 -0
- package/docs/reference/http-api.md +219 -0
- package/docs/reference/instructions.md +77 -0
- package/docs/reference/playground.md +67 -0
- package/docs/reference/project-layout.md +119 -0
- package/docs/reference/schedules.md +220 -0
- package/docs/reference/sessions.md +165 -0
- package/docs/reference/skills.md +79 -0
- package/docs/reference/subagents.md +74 -0
- package/docs/reference/tools.md +203 -0
- package/docs/scaffolding-agents.md +113 -0
- package/docs/troubleshooting.md +95 -0
- package/package.json +185 -0
- package/skills/ab/SKILL.md +139 -0
- package/skills/create-agent/SKILL.md +219 -0
- package/skills/debug/SKILL.md +71 -0
- package/skills/evals/SKILL.md +217 -0
- package/skills/framework-map/SKILL.md +142 -0
- package/skills/github/SKILL.md +144 -0
- package/skills/hillclimb/SKILL.md +162 -0
- package/skills/setup-slack/SKILL.md +180 -0
- package/src/ab.ts +675 -0
- package/src/bin/agent-serve.ts +949 -0
- package/src/channels/github/api.ts +374 -0
- package/src/channels/github/auth.ts +275 -0
- package/src/channels/github/binding.ts +223 -0
- package/src/channels/github/defaults.ts +111 -0
- package/src/channels/github/events.ts +72 -0
- package/src/channels/github/forward.ts +381 -0
- package/src/channels/github/github-channel.ts +2270 -0
- package/src/channels/github/index.ts +52 -0
- package/src/channels/github/replay.ts +387 -0
- package/src/channels/github/state.ts +95 -0
- package/src/channels/github/types.ts +490 -0
- package/src/channels/slack/api.ts +580 -0
- package/src/channels/slack/approvals.ts +198 -0
- package/src/channels/slack/assistant.ts +76 -0
- package/src/channels/slack/auth.ts +112 -0
- package/src/channels/slack/channel-watch.ts +219 -0
- package/src/channels/slack/constants.ts +30 -0
- package/src/channels/slack/credentials.ts +90 -0
- package/src/channels/slack/cursor-account.ts +166 -0
- package/src/channels/slack/defaults.ts +450 -0
- package/src/channels/slack/dispatch.ts +293 -0
- package/src/channels/slack/doctor.ts +135 -0
- package/src/channels/slack/event-id-dedupe.ts +30 -0
- package/src/channels/slack/inbound.ts +219 -0
- package/src/channels/slack/index.ts +45 -0
- package/src/channels/slack/init.ts +133 -0
- package/src/channels/slack/interactive.ts +194 -0
- package/src/channels/slack/links.ts +23 -0
- package/src/channels/slack/live-delivery.ts +201 -0
- package/src/channels/slack/log.ts +83 -0
- package/src/channels/slack/manifest.ts +179 -0
- package/src/channels/slack/pr-ref.ts +50 -0
- package/src/channels/slack/setup.ts +97 -0
- package/src/channels/slack/slack-channel.ts +374 -0
- package/src/channels/slack/socket-mode.ts +154 -0
- package/src/channels/slack/stream.ts +63 -0
- package/src/channels/slack/tool-approval-events.ts +136 -0
- package/src/channels/slack/types.ts +349 -0
- package/src/channels.ts +385 -0
- package/src/connections.ts +89 -0
- package/src/evals.ts +501 -0
- package/src/hooks.ts +33 -0
- package/src/index.ts +184 -0
- package/src/internal/ab-collector.ts +210 -0
- package/src/internal/ab-fold.ts +228 -0
- package/src/internal/ab-snapshot.ts +335 -0
- package/src/internal/approval-gate.ts +115 -0
- package/src/internal/auth.ts +39 -0
- package/src/internal/authored-alias-hooks.ts +69 -0
- package/src/internal/authored-loaders.ts +138 -0
- package/src/internal/bounded-int.ts +27 -0
- package/src/internal/brand.ts +29 -0
- package/src/internal/chat-client.ts +407 -0
- package/src/internal/cli-ax.ts +474 -0
- package/src/internal/cli-cursor.ts +275 -0
- package/src/internal/cli-github.ts +849 -0
- package/src/internal/cli-slack.ts +175 -0
- package/src/internal/cloud-merge.ts +41 -0
- package/src/internal/cron.ts +78 -0
- package/src/internal/cursor/account-mcp.ts +472 -0
- package/src/internal/cursor/backend-client.ts +614 -0
- package/src/internal/cursor/credentials.ts +401 -0
- package/src/internal/cursor-event-relay.ts +281 -0
- package/src/internal/cursor-relay-core.ts +444 -0
- package/src/internal/cursor-slack-relay.ts +242 -0
- package/src/internal/describe-error.ts +4 -0
- package/src/internal/dev-mode.ts +20 -0
- package/src/internal/discovery.ts +1709 -0
- package/src/internal/distribution.ts +97 -0
- package/src/internal/docs-site.ts +191 -0
- package/src/internal/duration.ts +39 -0
- package/src/internal/eval-run-store.ts +519 -0
- package/src/internal/eval-runner.ts +522 -0
- package/src/internal/event-log.ts +175 -0
- package/src/internal/event-mapper.ts +272 -0
- package/src/internal/frontmatter.ts +77 -0
- package/src/internal/github-fanout.ts +159 -0
- package/src/internal/handleAgentServeTrigger.ts +156 -0
- package/src/internal/host-platforms.ts +144 -0
- package/src/internal/http-channel.ts +546 -0
- package/src/internal/ids.ts +44 -0
- package/src/internal/init-project.ts +165 -0
- package/src/internal/json-dir-store.ts +109 -0
- package/src/internal/json-schema.ts +69 -0
- package/src/internal/log-ring.ts +59 -0
- package/src/internal/map-pool.ts +32 -0
- package/src/internal/mcp-endpoint.ts +518 -0
- package/src/internal/mcp-host.ts +211 -0
- package/src/internal/net.ts +31 -0
- package/src/internal/peer-connections.ts +100 -0
- package/src/internal/playground/static.ts +189 -0
- package/src/internal/playground/toolchain.ts +277 -0
- package/src/internal/reminder-runner.ts +756 -0
- package/src/internal/reminder-schedule.ts +106 -0
- package/src/internal/reminder-store.ts +145 -0
- package/src/internal/resolved-connections.ts +145 -0
- package/src/internal/review-comments.ts +268 -0
- package/src/internal/router.ts +145 -0
- package/src/internal/run-client.ts +320 -0
- package/src/internal/schedule-runner.ts +161 -0
- package/src/internal/sdk-runner.ts +315 -0
- package/src/internal/server.ts +1737 -0
- package/src/internal/session-engine.ts +1810 -0
- package/src/internal/session-store.ts +147 -0
- package/src/internal/session-urls.ts +40 -0
- package/src/internal/stream-progress.ts +254 -0
- package/src/internal/tool-result.ts +54 -0
- package/src/internal/trajectory.ts +306 -0
- package/src/internal/workspace.ts +223 -0
- package/src/reminders.ts +35 -0
- package/src/schedules.ts +37 -0
- package/src/skills.ts +27 -0
- package/src/tools.ts +127 -0
- package/src/types.ts +1848 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Building agents with agents"
|
|
3
|
+
description: "Use the built-in skills to have a coding agent create, verify, and improve your agent."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Building agents with agents
|
|
7
|
+
|
|
8
|
+
Give a coding agent the goal. The built-in skills guide it through
|
|
9
|
+
scaffolding, channels, verification, evals, and measured improvement.
|
|
10
|
+
|
|
11
|
+
## What can a coding agent build for me?
|
|
12
|
+
|
|
13
|
+
A coding agent can take a agentkit project from an idea to a
|
|
14
|
+
verified first version. It can:
|
|
15
|
+
|
|
16
|
+
- Create the project and choose the smallest useful surface
|
|
17
|
+
- Add tools, skills, channels, MCP connections, and approval gates
|
|
18
|
+
- Run a real turn and inspect its trace
|
|
19
|
+
- Add evals for the behavior you want to keep
|
|
20
|
+
- Improve the agent against fixed inputs
|
|
21
|
+
|
|
22
|
+
This works because the project surface lives in files. The CLI also
|
|
23
|
+
returns structured JSON and records each run as an NDJSON trace. Your
|
|
24
|
+
coding agent can inspect what the framework discovered, run the agent,
|
|
25
|
+
and verify the result without reading terminal prose.
|
|
26
|
+
|
|
27
|
+
## How do I create an agent with the built-in skill?
|
|
28
|
+
|
|
29
|
+
Have the coding agent read
|
|
30
|
+
[`skills/create-agent/SKILL.md`](../skills/create-agent/SKILL.md) (in the
|
|
31
|
+
monorepo: `packages/agent-serve/skills/create-agent/SKILL.md`) and follow
|
|
32
|
+
it.
|
|
33
|
+
|
|
34
|
+
The skill asks about your agent's purpose, runtime, model, channels, MCP
|
|
35
|
+
connections, and capabilities. It then shows you a plan, writes the
|
|
36
|
+
project, and verifies the result.
|
|
37
|
+
|
|
38
|
+
For example:
|
|
39
|
+
|
|
40
|
+
> Use the agent-serve create-agent skill to build a PR triage agent
|
|
41
|
+
> reachable through GitHub. It should summarize failed checks, require
|
|
42
|
+
> approval before posting a review, and include one smoke eval.
|
|
43
|
+
|
|
44
|
+
The skill starts with a small surface: short instructions, one or two
|
|
45
|
+
tools, the channels you chose, and a smoke eval. You can add more after
|
|
46
|
+
the first end-to-end turn works.
|
|
47
|
+
|
|
48
|
+
## Which built-in skill should I use?
|
|
49
|
+
|
|
50
|
+
The package ships task-specific guides under [`skills/`](../skills/):
|
|
51
|
+
|
|
52
|
+
| What you want to do | Skill |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| Understand the project layout and runtimes | [`framework-map`](../skills/framework-map/SKILL.md) |
|
|
55
|
+
| Create and verify a new agent | [`create-agent`](../skills/create-agent/SKILL.md) |
|
|
56
|
+
| Write fixtures and regression checks | [`evals`](../skills/evals/SKILL.md) |
|
|
57
|
+
| Live A/B metrics on traffic (`defineAB`) | [`ab`](../skills/ab/SKILL.md) |
|
|
58
|
+
| Improve an agent against fixed inputs | [`hillclimb`](../skills/hillclimb/SKILL.md) |
|
|
59
|
+
| Add GitHub webhooks and replay events | [`github`](../skills/github/SKILL.md) |
|
|
60
|
+
| Connect an agent to Slack | [`setup-slack`](../skills/setup-slack/SKILL.md) |
|
|
61
|
+
| Diagnose a local run | [`debug`](../skills/debug/SKILL.md) |
|
|
62
|
+
|
|
63
|
+
Point your coding agent at the matching `SKILL.md`. The guide contains
|
|
64
|
+
the workflow, commands, and common mistakes for that task.
|
|
65
|
+
|
|
66
|
+
> [!NOTE]
|
|
67
|
+
> The skill bodies use the current `agent-serve` CLI names. This guide
|
|
68
|
+
> uses the upcoming `agentkit` names. See
|
|
69
|
+
> [Run the CLI](./README.md#run-the-cli) for the full rename table.
|
|
70
|
+
|
|
71
|
+
## How does a coding agent verify its work?
|
|
72
|
+
|
|
73
|
+
The coding agent should discover the project, test each server tool,
|
|
74
|
+
run a real turn, and finish with evals:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
agentkit validate --dir .
|
|
78
|
+
agentkit info --dir . --json
|
|
79
|
+
|
|
80
|
+
agentkit call inspect_pr --dir . \
|
|
81
|
+
--input '{"prUrl":"https://github.com/acme/checkout/pull/42"}'
|
|
82
|
+
|
|
83
|
+
agentkit run --dir . \
|
|
84
|
+
--message "Is https://github.com/acme/checkout/pull/42 ready to approve?"
|
|
85
|
+
|
|
86
|
+
agentkit trajectory --events .agentkit/traces/<sessionId>.ndjson
|
|
87
|
+
|
|
88
|
+
agentkit eval --dir . --list
|
|
89
|
+
agentkit eval --dir . --json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`serve` boots without an API key, which is enough to check channel
|
|
93
|
+
mounts and the playground shell. Model turns need a credential. When the
|
|
94
|
+
environment lacks one, finish every key-free check, then hand the `run`
|
|
95
|
+
and `eval` commands to the operator.
|
|
96
|
+
|
|
97
|
+
Test server tools with `call` before tuning the prompt. It runs a tool
|
|
98
|
+
in-process with schema validation and no model turn. If the tool returns
|
|
99
|
+
the wrong data, a prompt change won't fix it.
|
|
100
|
+
|
|
101
|
+
`validate` and `run` don't type-check the project because tsx strips
|
|
102
|
+
types. Run the project's TypeScript check before shipping. Tool results
|
|
103
|
+
must also be JSON-shaped. Use object literals or `type` aliases for
|
|
104
|
+
`execute` return types instead of `interface` types.
|
|
105
|
+
|
|
106
|
+
## How do I improve the agent after its first run?
|
|
107
|
+
|
|
108
|
+
Scaffolding proves the agent runs. It says nothing about quality. Once a
|
|
109
|
+
smoke turn passes, give the hillclimb skill:
|
|
110
|
+
|
|
111
|
+
1. **Fixtures**: one to three fixed inputs, such as a PR URL, a
|
|
112
|
+
canonical question, or a saved webhook payload
|
|
113
|
+
2. **Success criteria**: correct tool choice, fewer tool calls, lower
|
|
114
|
+
wall time, or better output
|
|
115
|
+
3. **The freeze line**: the API contract, output shape, and existing
|
|
116
|
+
evals that must stay unchanged
|
|
117
|
+
|
|
118
|
+
Have the coding agent read
|
|
119
|
+
[`skills/hillclimb/SKILL.md`](../skills/hillclimb/SKILL.md). It measures
|
|
120
|
+
the current run, proposes one change, remeasures the same fixtures, and
|
|
121
|
+
adds an eval for each kept improvement.
|
|
122
|
+
|
|
123
|
+
## Related
|
|
124
|
+
|
|
125
|
+
- [Create your first agent](./quickstart.md)
|
|
126
|
+
- [Scaffold an agent with Cursor](./scaffolding-agents.md)
|
|
127
|
+
- [Evals](./evals.md)
|
|
128
|
+
- [Hillclimbing](./hillclimbing.md)
|
|
129
|
+
- [CLI reference](./reference/cli.md)
|
package/docs/concepts.md
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "How agentkit works"
|
|
3
|
+
description: "Understand projects, sessions, event streams, channels, and runtimes in plain language."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# How agentkit works
|
|
7
|
+
|
|
8
|
+
An agent is a folder of instructions and capabilities. agentkit
|
|
9
|
+
discovers those files, runs conversations, and records what happened.
|
|
10
|
+
|
|
11
|
+
## What happens when someone sends a message?
|
|
12
|
+
|
|
13
|
+
Follow one message through the system:
|
|
14
|
+
|
|
15
|
+
1. A channel receives the message from HTTP, Slack, GitHub, or another
|
|
16
|
+
webhook.
|
|
17
|
+
2. The channel starts a session or continues an existing one.
|
|
18
|
+
3. The runtime gives the model its instructions, tools, and workspace.
|
|
19
|
+
4. The model replies and can call tools along the way.
|
|
20
|
+
5. agentkit appends every message and tool call to the session's
|
|
21
|
+
event stream.
|
|
22
|
+
|
|
23
|
+
The channel is the front door. The runtime does the work. The event
|
|
24
|
+
stream is the record you inspect later.
|
|
25
|
+
|
|
26
|
+
## How do files become an agent?
|
|
27
|
+
|
|
28
|
+
Each capability has a home in the project. The path tells
|
|
29
|
+
agentkit what to load. The filename becomes the capability's
|
|
30
|
+
name. For example, `agent/tools/get_weather.ts` creates a tool named
|
|
31
|
+
`get_weather`.
|
|
32
|
+
|
|
33
|
+
| Path | What it is |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `agent/agent.ts` | Model and runtime settings |
|
|
36
|
+
| `agent/instructions.md` | The always-on system prompt |
|
|
37
|
+
| `agent/tools/<name>.ts` | Typed actions the model can call |
|
|
38
|
+
| `agent/skills/*` | Procedures loaded when needed |
|
|
39
|
+
| `agent/mcp-connections/<name>.ts` | Tools from external MCP servers |
|
|
40
|
+
| `agent/channels/*.ts` | HTTP, Slack, and GitHub entry points |
|
|
41
|
+
| `agent/ab.ts` or `agent/ab/*.ts` | Sticky variants and live performance metrics |
|
|
42
|
+
| `evals/**/*.eval.ts` | Repeatable checks at the project root |
|
|
43
|
+
|
|
44
|
+
Other folders add subagents, hooks, schedules, and workspace files. You
|
|
45
|
+
don't register them elsewhere. Run `agentkit validate` to catch
|
|
46
|
+
invalid files before serving the project.
|
|
47
|
+
|
|
48
|
+
See [Project layout](./reference/project-layout.md) for every supported
|
|
49
|
+
path.
|
|
50
|
+
|
|
51
|
+
## How does agentkit identify a conversation?
|
|
52
|
+
|
|
53
|
+
A session is one durable conversation. It has two identifiers:
|
|
54
|
+
|
|
55
|
+
- **`continuationToken`** tells a channel which conversation to resume.
|
|
56
|
+
A Slack channel can use its thread ID. A GitHub channel can use the
|
|
57
|
+
pull request. The built-in HTTP API returns an opaque token and
|
|
58
|
+
rotates it after each accepted follow-up.
|
|
59
|
+
- **`sessionId`** identifies the stored session. Use it to stream
|
|
60
|
+
events, inspect the session, resolve approvals, or bind a tool call to
|
|
61
|
+
the session.
|
|
62
|
+
|
|
63
|
+
Use the continuation token to keep talking. Use the session ID to
|
|
64
|
+
observe or manage the conversation.
|
|
65
|
+
|
|
66
|
+
## How do I see what an agent did?
|
|
67
|
+
|
|
68
|
+
Each session writes an append-only NDJSON file:
|
|
69
|
+
`sessions/<id>/events.ndjson`. It includes:
|
|
70
|
+
|
|
71
|
+
- Messages and streamed text
|
|
72
|
+
- Requested tool calls and their results
|
|
73
|
+
- Approval requests and decisions
|
|
74
|
+
- Turn completion and token usage
|
|
75
|
+
|
|
76
|
+
Sessions and their event streams survive server restarts. The
|
|
77
|
+
playground renders the stream. Evals assert against it. The
|
|
78
|
+
`agentkit trajectory` command turns a saved stream into a short
|
|
79
|
+
summary.
|
|
80
|
+
|
|
81
|
+
When a run surprises you, inspect its event stream first. See
|
|
82
|
+
[Sessions and streaming](./reference/sessions.md) for every event.
|
|
83
|
+
|
|
84
|
+
## What does a channel control?
|
|
85
|
+
|
|
86
|
+
A channel connects the agent to a surface such as HTTP, Slack, GitHub,
|
|
87
|
+
or a custom webhook. It controls:
|
|
88
|
+
|
|
89
|
+
- Routes and input schemas
|
|
90
|
+
- Authentication
|
|
91
|
+
- Conversation identity
|
|
92
|
+
- How replies return to the user
|
|
93
|
+
|
|
94
|
+
The built-in HTTP session API is always available. Custom routes accept
|
|
95
|
+
loopback callers by default. Add an auth policy before sharing them over
|
|
96
|
+
a network.
|
|
97
|
+
|
|
98
|
+
Channels should also prepare deterministic input for the model. For
|
|
99
|
+
example, a GitHub channel can fetch the pull request, collect the diff,
|
|
100
|
+
and seed the workspace before the turn starts. The model can then focus
|
|
101
|
+
on the review instead of gathering files.
|
|
102
|
+
|
|
103
|
+
See [Channels](./reference/channels.md) for route and authentication
|
|
104
|
+
details.
|
|
105
|
+
|
|
106
|
+
## Where does a turn run?
|
|
107
|
+
|
|
108
|
+
Choose a runtime in `agent/agent.ts`:
|
|
109
|
+
|
|
110
|
+
| | Local (default) | Cloud |
|
|
111
|
+
| --- | --- | --- |
|
|
112
|
+
| Turn runs on | The server host | A Cursor cloud agent |
|
|
113
|
+
| Server tools and approvals | Supported | Not supported |
|
|
114
|
+
| Agent tool scripts | Supported | Supported |
|
|
115
|
+
| Skills and seeded files | Added to the session workspace | Must exist in the cloud repository |
|
|
116
|
+
| Repository | You provide it | The cloud agent checks it out |
|
|
117
|
+
|
|
118
|
+
Use the local runtime when the host has the tools and files the agent
|
|
119
|
+
needs. Use the cloud runtime when each turn needs an isolated repository
|
|
120
|
+
checkout. `agentkit validate` warns when a cloud agent uses a
|
|
121
|
+
local-only capability.
|
|
122
|
+
|
|
123
|
+
See [Cloud runtime](./guides/cloud-runtime.md) for setup and trade-offs.
|
|
124
|
+
|
|
125
|
+
## What files can a local session access?
|
|
126
|
+
|
|
127
|
+
Each local session gets its own workspace. agentkit writes the
|
|
128
|
+
instructions as `AGENTS.md`, installs authored skills, copies sandbox
|
|
129
|
+
files, and adds agent tool scripts.
|
|
130
|
+
|
|
131
|
+
The workspace is a real Cursor project. It can inherit `AGENTS.md` and
|
|
132
|
+
`.cursor` settings from parent directories. If your agent lives inside
|
|
133
|
+
a large monorepo, set `defineAgent({ local: { cwd } })` to a clean
|
|
134
|
+
directory or pass a separate `--state-root`. The `run` and `eval`
|
|
135
|
+
commands already use temporary state.
|
|
136
|
+
|
|
137
|
+
Durable local state uses this shape:
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
<project>/.agentkit/
|
|
141
|
+
sessions/<id>/events.ndjson
|
|
142
|
+
sessions/<id>/workspace/
|
|
143
|
+
traces/<sessionId>.ndjson
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## How can one agent call another?
|
|
147
|
+
|
|
148
|
+
Every mounted agent also serves MCP at `/<slug>/v1/mcp`. Another agent
|
|
149
|
+
or MCP client can use `ask`, `check`, and `call_tool` to delegate work.
|
|
150
|
+
A peer MCP connection such as
|
|
151
|
+
`defineConnection({ agent: "weather-agent" })` adds those tools to the
|
|
152
|
+
calling agent.
|
|
153
|
+
|
|
154
|
+
See [Agent-to-agent](./guides/agent-to-agent.md) for a complete example.
|
|
155
|
+
|
|
156
|
+
## Which rules prevent common setup problems?
|
|
157
|
+
|
|
158
|
+
- Use Node 22.13 or newer. Bun isn't supported.
|
|
159
|
+
- Put evals under the project-root `evals/` directory, not
|
|
160
|
+
`agent/evals/`.
|
|
161
|
+
- Run a TypeScript check before shipping. `validate` and `run` execute
|
|
162
|
+
TypeScript but don't type-check it.
|
|
163
|
+
- Return JSON-shaped values from tool `execute` functions.
|
|
164
|
+
- Keep local session workspaces away from parent rules you don't want
|
|
165
|
+
the agent to inherit.
|
|
166
|
+
- Sign in or set `CURSOR_API_KEY` before starting a model turn.
|
|
167
|
+
Discovery, validation, direct tool calls, and server startup work
|
|
168
|
+
without a credential.
|
|
169
|
+
|
|
170
|
+
## Related
|
|
171
|
+
|
|
172
|
+
- [Quickstart](./quickstart.md)
|
|
173
|
+
- [Project layout](./reference/project-layout.md)
|
|
174
|
+
- [Sessions and streaming](./reference/sessions.md)
|
|
175
|
+
- [Channels](./reference/channels.md)
|
|
176
|
+
- [Live A/B metrics](./ab.md)
|
|
177
|
+
- [Cloud runtime](./guides/cloud-runtime.md)
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Deployment"
|
|
3
|
+
description: "Run agentkit on a real host: the auth model, credentials, durable state, single-box and Docker setups, and the production flags."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deployment
|
|
7
|
+
|
|
8
|
+
agentkit is a plain Node HTTP server. It runs anywhere Node
|
|
9
|
+
22.13+ runs: a VM, a container platform, ECS. This page covers the parts
|
|
10
|
+
that matter beyond local development: who can reach the server, where
|
|
11
|
+
credentials and state live, and the flags that change meaning in
|
|
12
|
+
production.
|
|
13
|
+
|
|
14
|
+
## The security model in one minute
|
|
15
|
+
|
|
16
|
+
Everything defaults to loopback-only. Until you change something, no
|
|
17
|
+
route is reachable from another machine. `serve` binds `127.0.0.1`
|
|
18
|
+
unless you pass `--host`. Every route runs an auth-policy chain whose
|
|
19
|
+
default, `localDevStrict()`, admits direct loopback callers only, rejects
|
|
20
|
+
requests carrying proxy-forwarding headers (`X-Forwarded-For`,
|
|
21
|
+
`X-Real-IP`, `Forwarded`, `X-Forwarded-Host`), and requires a loopback
|
|
22
|
+
`Host` header. A same-host reverse proxy, a tunnel, or a DNS-rebinding
|
|
23
|
+
page can't silently re-expose the API.
|
|
24
|
+
|
|
25
|
+
Three ways to open it up, in order of preference:
|
|
26
|
+
|
|
27
|
+
1. **`--bearer-token <secret>`** replaces the default with
|
|
28
|
+
`bearerAuth(secret)` on every channel that doesn't author its own
|
|
29
|
+
auth. Clients send `Authorization: Bearer <secret>`; the playground
|
|
30
|
+
has a token field. Use this for anything shared.
|
|
31
|
+
2. **Authored auth.** Channels declare their own `auth` chains:
|
|
32
|
+
`bearerAuth`, signature verification, custom policies. Authored
|
|
33
|
+
chains always win over serve-level flags. The GitHub channel is the
|
|
34
|
+
model: `allowAll()` at the route plus HMAC verification in the
|
|
35
|
+
channel.
|
|
36
|
+
3. **`--allow-anonymous`** replaces the default with `allowAll()`, and
|
|
37
|
+
every caller shares one `anonymous` principal. Only behind a trusted
|
|
38
|
+
network boundary. The server refuses to start when
|
|
39
|
+
`--allow-anonymous` is combined with Cursor account MCP connections,
|
|
40
|
+
because any admitted caller could drive the signed-in account's
|
|
41
|
+
connectors. Mutually exclusive with `--bearer-token`.
|
|
42
|
+
|
|
43
|
+
Session routes also bind to the principal that created the session
|
|
44
|
+
(other principals get `403`). A single static bearer token maps every
|
|
45
|
+
holder to one shared principal. So it isolates the host, not the users
|
|
46
|
+
on it. For per-user isolation, pass a verifier function to `bearerAuth`
|
|
47
|
+
that returns a distinct principal per presented token.
|
|
48
|
+
|
|
49
|
+
## Credentials
|
|
50
|
+
|
|
51
|
+
A host reads at most five kinds of credentials.
|
|
52
|
+
|
|
53
|
+
| Credential | Used for | Provide it as |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| Cursor API key | model turns, cloud runtime, Cursor account MCP connections | `agentkit login` (stores a revocable key), `CURSOR_API_KEY`, or `--api-key` / `serve({ apiKey })` |
|
|
56
|
+
| Slack tokens | Slack channels | `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent |
|
|
57
|
+
| GitHub webhook secret | delivery signature verification | `GITHUB_WEBHOOK_SECRET`, same value on server and signer |
|
|
58
|
+
| GitHub API | outbound API calls | a GitHub App (`GITHUB_APP_ID` + `GITHUB_APP_PRIVATE_KEY` + installation id) or `GITHUB_TOKEN` / `gh auth login` |
|
|
59
|
+
| MCP connection tokens | authored MCP connections | whatever env vars your `mcp-connections/*.ts` read |
|
|
60
|
+
|
|
61
|
+
The Cursor credential resolves in one order everywhere: an explicit
|
|
62
|
+
`apiKey` option or `--api-key`, then `CURSOR_API_KEY`, then the key
|
|
63
|
+
stored by `agentkit login`. `agentkit whoami` shows which
|
|
64
|
+
one is active and why. `logout` removes the stored key, and revoking it
|
|
65
|
+
in the Cursor dashboard invalidates it immediately. Mint a dedicated key
|
|
66
|
+
per host. `login` names it after the hostname, so you can revoke each one
|
|
67
|
+
independently.
|
|
68
|
+
|
|
69
|
+
## State
|
|
70
|
+
|
|
71
|
+
Durable state lives under `--state-root` (default
|
|
72
|
+
`<project>/.agentkit`): sessions, event streams, session
|
|
73
|
+
workspaces, the SDK conversation store, channel buffers, cursor-events
|
|
74
|
+
offsets.
|
|
75
|
+
|
|
76
|
+
Put it on a persistent volume. Sessions survive restarts and streams
|
|
77
|
+
replay only if the directory does. Put it outside any repository, to keep
|
|
78
|
+
ambient `AGENTS.md` or `.cursor` rules out of session workspaces.
|
|
79
|
+
`/var/lib/agentkit` is a good home. Back it up like the
|
|
80
|
+
conversation history it is. Deleting a session directory removes that
|
|
81
|
+
session from the server. The SDK conversation store under `runner/` keeps
|
|
82
|
+
its own copy until you delete it too.
|
|
83
|
+
|
|
84
|
+
## A single box
|
|
85
|
+
|
|
86
|
+
The minimum production host is two processes and a private network:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# the server: all agents under one port
|
|
90
|
+
CURSOR_API_KEY=… GITHUB_WEBHOOK_SECRET=… \
|
|
91
|
+
agentkit serve --dir /srv/agents --port 3000 --host 127.0.0.1 \
|
|
92
|
+
--state-root /var/lib/agentkit --bearer-token "$CURSOR_AGENT_KIT_TOKEN"
|
|
93
|
+
|
|
94
|
+
# GitHub agents only: ONE forwarder relaying live deliveries to loopback
|
|
95
|
+
GITHUB_TOKEN= GH_TOKEN= GITHUB_WEBHOOK_SECRET=… \
|
|
96
|
+
agentkit github forward --dir /srv/agents --repo owner/repo
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Run both under a supervisor. systemd is the durable choice. tmux
|
|
100
|
+
survives SSH disconnects but not reboots. On a TTY, `serve` restarts on
|
|
101
|
+
Enter (it reloads agent code). Under a supervisor, restart the process.
|
|
102
|
+
Sessions and streams are durable either way.
|
|
103
|
+
|
|
104
|
+
Inbound network requirements are small. Slack needs none at all: Socket
|
|
105
|
+
Mode dials out. Prefer GitHub via `--cursor-events` so the host pulls
|
|
106
|
+
events with no inbound network (see
|
|
107
|
+
[Pull events from Cursor](./guides/github.md#pull-events-from-cursor)).
|
|
108
|
+
A public HTTPS webhook endpoint with the secret on both ends, or the
|
|
109
|
+
forwarder above, is the fallback when you terminate GitHub deliveries
|
|
110
|
+
yourself. Humans reach the playground through your private network or a
|
|
111
|
+
tunnel.
|
|
112
|
+
Keep `--bearer-token` on, because tunneled requests arrive from loopback
|
|
113
|
+
and IP-based policies can't tell them apart.
|
|
114
|
+
|
|
115
|
+
Health checks: `GET /v1/health` at the host level (made for ALB and ECS
|
|
116
|
+
checks), and each agent also serves `/<slug>/v1/health`.
|
|
117
|
+
|
|
118
|
+
## Docker
|
|
119
|
+
|
|
120
|
+
The repository includes a [`Dockerfile`](../Dockerfile) used for an
|
|
121
|
+
internal deployment. It builds the workspace deps and the playground
|
|
122
|
+
bundle and runs multi-agent serve as a non-root user. But its `CMD`
|
|
123
|
+
passes `--allow-anonymous`, because that deployment sits behind an
|
|
124
|
+
authenticating proxy. Don't copy that flag without one. That image also
|
|
125
|
+
enables `--cursor-events` to pull GitHub events (see the
|
|
126
|
+
[GitHub guide](./guides/github.md#pull-events-from-cursor)).
|
|
127
|
+
|
|
128
|
+
Until the package rename ships, the real image paths are still
|
|
129
|
+
`dist/bin/agent-serve.js` and `/var/lib/agent-serve` (see the
|
|
130
|
+
[rename table](./README.md#run-the-cli)). The baseline shape to copy,
|
|
131
|
+
shown with post-rename names:
|
|
132
|
+
|
|
133
|
+
```dockerfile
|
|
134
|
+
# build: pnpm install + pnpm --filter @cursor/july run build
|
|
135
|
+
# run (today: agent-serve.js and /var/lib/agent-serve):
|
|
136
|
+
CMD ["node", "--import", "tsx", "dist/bin/agentkit.js", "serve", \
|
|
137
|
+
"--dir", "examples", "--mode", "multi", \
|
|
138
|
+
"--host", "0.0.0.0", "--port", "3000", \
|
|
139
|
+
"--state-root", "/var/lib/agentkit"]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Inside a container, `--host 0.0.0.0` is required. Pair it with real auth
|
|
143
|
+
(`--bearer-token`, or authored auth per channel), or keep the container
|
|
144
|
+
on a private network. Mount the state root as a volume, install `git` and
|
|
145
|
+
`gh` in the image when channels do host-side GitHub work (the shipped
|
|
146
|
+
Dockerfile does), and inject secrets as env vars at start. Nothing secret
|
|
147
|
+
belongs in the image.
|
|
148
|
+
|
|
149
|
+
## Serve many agents from one process
|
|
150
|
+
|
|
151
|
+
Point `serve` at a folder of agent projects and every child mounts under
|
|
152
|
+
its directory name on one port. One process, one state root, one
|
|
153
|
+
credential:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
agentkit serve --dir /srv/agents
|
|
157
|
+
# index at /, each agent at /<slug>/v1/*, /<slug>/playground
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
`GET /` is a web index of every agent and `GET /v1/agents` is the JSON
|
|
161
|
+
equivalent. Sessions are isolated per agent under `<stateRoot>/<slug>/`.
|
|
162
|
+
Each agent needs its own Slack app and token pair. Agents without tokens
|
|
163
|
+
mount with their Slack channel idle.
|
|
164
|
+
|
|
165
|
+
Only mount what you mean to run. Every mounted agent's channels are live,
|
|
166
|
+
and webhook-driven agents spend model budget on every wake. `--mode
|
|
167
|
+
single` serves exactly one agent at the unslugged `/v1/*` when that agent
|
|
168
|
+
is the whole host.
|
|
169
|
+
|
|
170
|
+
## The production flags
|
|
171
|
+
|
|
172
|
+
These flags change meaning between a laptop and production.
|
|
173
|
+
|
|
174
|
+
| Flag | In production |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| `--dev` | Off. Dev mode admits unsigned loopback GitHub deliveries, widens playground session listing on loopback, and never auto-fires schedules. |
|
|
177
|
+
| `--bearer-token` | On for anything shared. Rotate it like any secret. |
|
|
178
|
+
| `--allow-anonymous` | Only behind a trusted network boundary (e.g. an SSO-authenticating load balancer). Also widens playground session listing/streaming so Slack and webhook sessions appear. Never with account-level connectors. |
|
|
179
|
+
| `--state-root` | A persistent volume, outside any repo. |
|
|
180
|
+
| `--public-url` | Set when cloud-runtime turns must call back into peers on this host. |
|
|
181
|
+
| `--no-playground` | Optional hardening when no human needs the UI. Also removes the `/` and `/v1/agents` index routes. |
|
|
182
|
+
| `--no-docs` | Removes the documentation site at `/docs`. |
|
|
183
|
+
| `--no-schedules` | Disable cron firing on secondary hosts so schedules run exactly once. |
|
|
184
|
+
|
|
185
|
+
Schedules fire on their cron cadence (UTC) in production mode. They have
|
|
186
|
+
no cross-host coordination, so enable them on exactly one serving process
|
|
187
|
+
per project.
|
|
188
|
+
|
|
189
|
+
## Restarts and upgrades
|
|
190
|
+
|
|
191
|
+
Restarts are safe by design: sessions, event streams, and the SDK
|
|
192
|
+
conversation store are durable under the state root. Two caveats. Parked
|
|
193
|
+
tool approvals don't survive a restart. They resolve as interrupted, and
|
|
194
|
+
you re-run the turn. And reminders created with in-memory `run` handlers
|
|
195
|
+
are disarmed after a restart (`handler_lost_on_restart`). Re-arm them
|
|
196
|
+
from the code path that created them, or use prompt-form reminders.
|
|
197
|
+
|
|
198
|
+
## Observability
|
|
199
|
+
|
|
200
|
+
`GET /v1/logs` (per agent) exposes recent server log lines: the same ring
|
|
201
|
+
buffer the playground's Logs tab polls. For structured export, author a
|
|
202
|
+
[hook](./reference/hooks.md). Subscribe to `turn.completed`,
|
|
203
|
+
`turn.failed`, and `action.result`, then forward to your metrics system.
|
|
204
|
+
Hook errors are logged, never fatal. For any incident, the session
|
|
205
|
+
streams under the state root are the source of truth:
|
|
206
|
+
`agentkit trajectory --events <file>` summarizes one, and the
|
|
207
|
+
playground renders it.
|
|
208
|
+
|
|
209
|
+
## What's next
|
|
210
|
+
|
|
211
|
+
Continue with these pages:
|
|
212
|
+
|
|
213
|
+
- [Channels](./reference/channels.md#auth-policies): the auth policies
|
|
214
|
+
in detail
|
|
215
|
+
- [GitHub guide](./guides/github.md): delivery paths that don't need a
|
|
216
|
+
public URL
|
|
217
|
+
- [Troubleshooting](./troubleshooting.md): the symptom table for when a
|
|
218
|
+
deploy misbehaves
|