@cursor/july 0.1.21 → 0.1.23
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/README.md +5 -5
- package/dist/bin/agent-serve.d.ts +1 -0
- package/dist/bin/agent-serve.d.ts.map +1 -1
- package/dist/bin/agent-serve.js +21 -3
- package/dist/channels/slack/bot-mentions.d.ts +2 -0
- package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
- package/dist/channels/slack/bot-mentions.js +29 -8
- package/dist/channels/slack/types.d.ts +13 -2
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +3 -3
- package/dist/docs/assets/{app.jDxLzWv4.js → app.DYcC9FY-.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BQTzJjR_.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.Y6bDR1-a.js → VPLocalSearchBox.o4N_knTV.js} +1 -1
- package/dist/docs/assets/chunks/{theme.CLazCWlJ.js → theme.DQ-njyo0.js} +2 -2
- package/dist/docs/assets/index.md.Dfv5ic9t.js +20 -0
- package/dist/docs/assets/{index.md.t0TM2Qzz.lean.js → index.md.Dfv5ic9t.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.DnYfr5V2.js → reference_cli.md.ccoKOoXt.js} +4 -3
- package/dist/docs/assets/{reference_cli.md.DnYfr5V2.lean.js → reference_cli.md.ccoKOoXt.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +3 -3
- package/dist/docs/concepts.html +3 -3
- package/dist/docs/deployment.html +3 -3
- package/dist/docs/evals.html +3 -3
- package/dist/docs/example-agents/approval-buddy.html +3 -3
- package/dist/docs/example-agents/benny.html +3 -3
- package/dist/docs/example-agents/bugbot.html +3 -3
- package/dist/docs/example-agents/codebase-wiki.html +3 -3
- package/dist/docs/example-agents/codeowners-review.html +3 -3
- package/dist/docs/example-agents/concierge.html +3 -3
- package/dist/docs/example-agents/fsd.html +3 -3
- package/dist/docs/example-agents/index.html +3 -3
- package/dist/docs/example-agents/knowledge-base.html +3 -3
- package/dist/docs/example-agents/oncall.html +3 -3
- package/dist/docs/example-agents/security-reviewer.html +3 -3
- package/dist/docs/example-agents/slack-agent.html +3 -3
- package/dist/docs/example-agents/weather-agent.html +3 -3
- package/dist/docs/guides/agent-to-agent.html +3 -3
- package/dist/docs/guides/cloud-runtime.html +3 -3
- package/dist/docs/guides/github.html +3 -3
- package/dist/docs/guides/human-in-the-loop.html +3 -3
- package/dist/docs/guides/mcp-oauth.html +3 -3
- package/dist/docs/guides/slack.html +3 -3
- package/dist/docs/guides/webhooks.html +3 -3
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +3 -3
- package/dist/docs/index.html +6 -6
- package/dist/docs/quickstart.html +3 -3
- package/dist/docs/reference/agent-config.html +3 -3
- package/dist/docs/reference/channels.html +3 -3
- package/dist/docs/reference/cli.html +7 -6
- package/dist/docs/reference/connections.html +3 -3
- package/dist/docs/reference/hooks.html +3 -3
- package/dist/docs/reference/http-api.html +3 -3
- package/dist/docs/reference/instructions.html +3 -3
- package/dist/docs/reference/playground.html +3 -3
- package/dist/docs/reference/project-layout.html +3 -3
- package/dist/docs/reference/prompt.html +3 -3
- package/dist/docs/reference/schedules.html +3 -3
- package/dist/docs/reference/sessions.html +3 -3
- package/dist/docs/reference/skills.html +3 -3
- package/dist/docs/reference/subagents.html +3 -3
- package/dist/docs/reference/tools.html +3 -3
- package/dist/docs/scaffolding-agents.html +3 -3
- package/dist/docs/storage.html +3 -3
- package/dist/docs/troubleshooting.html +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/internal/cli-docs.d.ts +34 -0
- package/dist/internal/cli-docs.d.ts.map +1 -0
- package/dist/internal/cli-docs.js +162 -0
- package/dist/internal/distribution.d.ts +2 -1
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +3 -1
- package/dist/internal/docs-site.d.ts +4 -2
- package/dist/internal/docs-site.d.ts.map +1 -1
- package/dist/internal/docs-site.js +15 -11
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +19 -0
- package/dist/internal/local-env.d.ts +6 -4
- package/dist/internal/local-env.d.ts.map +1 -1
- package/dist/internal/local-env.js +14 -6
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +5 -0
- package/dist/internal/workspace.d.ts +9 -0
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +52 -5
- package/dist/memory.d.ts +79 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +164 -0
- package/dist/playground/assets/index-DqXdAFGa.js +85 -0
- package/dist/playground/index.html +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +8 -1
- package/docs/reference/cli.md +20 -4
- package/package.json +9 -1
- package/src/bin/agent-serve.ts +23 -3
- package/src/bin/agent-serve.version.test.ts +2 -0
- package/src/channels/slack/bot-mentions.test.ts +50 -0
- package/src/channels/slack/bot-mentions.ts +26 -2
- package/src/channels/slack/types.ts +13 -2
- package/src/index.ts +2 -0
- package/src/internal/cli-docs.test.ts +161 -0
- package/src/internal/cli-docs.ts +191 -0
- package/src/internal/distribution.ts +3 -1
- package/src/internal/docs-site.ts +19 -11
- package/src/internal/init-project.test.ts +1 -0
- package/src/internal/init-project.ts +22 -0
- package/src/internal/local-env.test.ts +20 -0
- package/src/internal/local-env.ts +14 -6
- package/src/internal/session-engine.ts +5 -0
- package/src/internal/workspace.test.ts +127 -1
- package/src/internal/workspace.ts +81 -5
- package/src/memory.ts +215 -0
- package/src/types.ts +11 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.DoJHJjqF.js +0 -1
- package/dist/docs/assets/index.md.t0TM2Qzz.js +0 -20
- package/dist/playground/assets/index-dshZQJCp.js +0 -85
package/dist/docs/index.html
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/docs/assets/style.Bj-IXa5W.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.
|
|
12
|
+
<script type="module" src="/docs/assets/app.DYcC9FY-.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.
|
|
14
|
+
<link rel="modulepreload" href="/docs/assets/chunks/theme.DQ-njyo0.js">
|
|
15
15
|
<link rel="modulepreload" href="/docs/assets/chunks/framework.CAZyNGu9.js">
|
|
16
|
-
<link rel="modulepreload" href="/docs/assets/index.md.
|
|
16
|
+
<link rel="modulepreload" href="/docs/assets/index.md.Dfv5ic9t.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
|
</head>
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
<span class="line"><span>│ ├── schedules/ # cron-driven runs</span></span>
|
|
35
35
|
<span class="line"><span>│ ├── sandbox/workspace/ # files seeded into each session workspace</span></span>
|
|
36
36
|
<span class="line"><span>│ └── lib/ # shared code (import-only, never discovered)</span></span>
|
|
37
|
-
<span class="line"><span>└── evals/ # filesystem evals (regression checks)</span></span></code></pre></div><p>Every running serve host also mounts this documentation at <code>/docs</code> (disable it with <code>--no-docs</code>).</p><h2 id="where-to-start" tabindex="-1">Where to start <a class="header-anchor" href="#where-to-start" aria-label="Permalink to "Where to start""></a></h2><p>Pick your entry point based on your goal.</p><table tabindex="0"><thead><tr><th>You are...</th><th>Start with</th></tr></thead><tbody><tr><td>New to agentkit</td><td><a href="./quickstart.html">Quickstart</a> (PR approver), then <a href="./concepts.html">Concepts</a></td></tr><tr><td>Building a new agent with Cursor</td><td><a href="./scaffolding-agents.html">Scaffold an agent with Cursor</a></td></tr><tr><td>Learning from working agents</td><td><a href="./example-agents/">Example agents</a></td></tr><tr><td>Wiring an agent to Slack</td><td><a href="./guides/slack.html">Slack guide</a></td></tr><tr><td>Wiring an agent to GitHub webhooks</td><td><a href="./guides/github.html">GitHub guide</a></td></tr><tr><td>Making an existing agent measurably better</td><td><a href="./evals.html">Evals</a>, then <a href="./hillclimbing.html">Hillclimbing</a></td></tr><tr><td>Comparing variants on live traffic</td><td><a href="./ab.html">Live A/B metrics</a></td></tr><tr><td>Deploying with Cursor or on your own infrastructure</td><td><a href="./deployment.html">Deployment</a></td></tr><tr><td>Debugging something that misbehaves</td><td><a href="./troubleshooting.html">Fix common agent problems</a></td></tr></tbody></table><h2 id="the-documentation" tabindex="-1">The documentation <a class="header-anchor" href="#the-documentation" aria-label="Permalink to "The documentation""></a></h2><p><strong>Core</strong></p><ul><li><a href="./quickstart.html">Quickstart</a>: build a PR approver that reviews by complexity and wakes from webhooks.</li><li><a href="./scaffolding-agents.html">Scaffold an agent with Cursor</a>: use the bundled skill for a guided build.</li><li><a href="./concepts.html">Concepts</a>: the mental model behind the framework.</li></ul><p><strong>Self-improving Agents</strong></p><ul><li><a href="./building-with-agents.html">Building agents with agents</a>: use a coding agent to scaffold, run, and iterate on your agent.</li><li><a href="./evals.html">Evals</a>: author <code>defineEval</code> cases, pick fixtures, and use evals as regression checks.</li><li><a href="./ab.html">Live A/B metrics</a>: assign sticky variants and compare cumulative metrics on live sessions.</li><li><a href="./hillclimbing.html">Hillclimbing</a>: make an agent better one measured round at a time.</li></ul><p><strong>Guides</strong></p><ul><li><a href="./guides/webhooks.html">Webhooks and custom channels</a>: give the agent its own HTTP surface.</li><li><a href="./guides/github.html">GitHub</a>: wake the agent from pull requests, CI, and comments.</li><li><a href="./guides/slack.html">Slack</a>: put the agent in Slack over Socket Mode.</li><li><a href="./guides/human-in-the-loop.html">Human-in-the-loop approvals</a>: park a tool call until a person signs off.</li><li><a href="./guides/mcp-oauth.html">Host MCP OAuth</a>: authorize <code>oauth: true</code> connections, store tokens locally, and <code>--store</code> them on hosted deployments.</li><li><a href="./guides/agent-to-agent.html">Agent-to-agent</a>: every agent is an MCP server; agents can delegate to each other.</li><li><a href="./guides/cloud-runtime.html">Cloud runtime</a>: run turns on Cursor cloud agents instead of the local harness.</li></ul><p><strong>Example agents</strong></p><ul><li><a href="./example-agents/">Choose the right example</a>: compare all eleven agents by runtime, channels, tools, state, and architecture.</li><li><a href="./example-agents/weather-agent.html">Weather agent</a>: explore tools, MCP, approvals, skills, subagents, schedules, hooks, A/B metrics, and evals.</li><li><a href="./example-agents/slack-agent.html">Slack agent</a>: put a minimal agent in Slack through an account-linked transport.</li><li><a href="./example-agents/concierge.html">Concierge</a>: delegate work to a peer agent with its own context and sessions.</li><li><a href="./example-agents/benny.html">Playbook router</a>: route Slack intake through inherited repository playbooks.</li><li><a href="./example-agents/bugbot.html">PR evidence reviewer</a>: review a host-prepared, diff-first pull-request evidence tree.</li><li><a href="./example-agents/approval-buddy.html">Approval Buddy</a>: keep approval policy in code while subagents supply review findings.</li><li><a href="./example-agents/security-reviewer.html">Security Reviewer</a>: run a staged, parallel security pipeline with live playground progress.</li><li><a href="./example-agents/fsd.html">Remote PR coordinator</a>: hand PR triage from local chat and webhooks to durable remote sessions.</li><li><a href="./example-agents/knowledge-base.html">Knowledge base</a>: turn conversations about people, systems, decisions, and preferences into shared markdown.</li><li><a href="./example-agents/codebase-wiki.html">Codebase wiki</a>: ingest merged PRs into per-feature pages with a daily digest schedule.</li><li><a href="./example-agents/codeowners-review.html">Codeowners review</a>: route PR reviews by ownership to per-area playbooks and aggregate verdicts.</li></ul><p><strong>Operating</strong></p><ul><li><a href="./deployment.html">Deployment</a>: Cursor-managed hosting, self-hosting, auth, state, and operations.</li><li><a href="./troubleshooting.html">Fix common agent problems</a>: symptom to cause, in plain language.</li></ul><p><strong>Reference</strong></p><ul><li><a href="./reference/project-layout.html">Project layout</a>: the full folder structure.</li><li><a href="./reference/agent-config.html">Agent config</a> · <a href="./reference/instructions.html">Instructions</a> · <a href="./reference/tools.html">Tools</a> · <a href="./reference/prompt.html"><code>prompt</code></a> · <a href="./reference/skills.html">Skills</a> · <a href="./reference/connections.html">MCP connections</a> · <a href="./reference/subagents.html">Subagents</a></li><li><a href="./reference/channels.html">Channels</a> · <a href="./reference/schedules.html">Schedules and reminders</a> · <a href="./reference/hooks.html">Hooks</a> · <a href="./reference/sessions.html">Sessions and streaming</a> · <a href="./reference/playground.html">Playground</a></li><li><a href="./reference/cli.html">CLI</a> · <a href="./reference/http-api.html">HTTP API</a></li></ul><h2 id="run-the-cli" tabindex="-1">Run the CLI <a class="header-anchor" href="#run-the-cli" aria-label="Permalink to "Run the CLI""></a></h2><p>The docs write commands as <code>agentkit <command></code>. Where that command comes from depends on where you run.</p><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>When running from a source checkout there is no installed bin. Alias it from the package directory:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> packages/agent-serve</span></span>
|
|
38
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">alias</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> agentkit</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"pnpm exec tsx </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$PWD</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/src/bin/agent-serve.ts"</span></span></code></pre></div><p>When <code>@cursor/july</code> is installed as a dependency, the <code>agentkit</code> bin is on your package manager's path (<code>pnpm exec agentkit</code>, <code>npx agentkit</code>).</p></div><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>The framework is being renamed from agent-serve to agentkit, and CLI examples use the new <code>agentkit</code> name. Paths, package imports, and environment variables keep their current names until the code rename ships:</p><table tabindex="0"><thead><tr><th>Docs say</th><th>Current name</th></tr></thead><tbody><tr><td><code>@cursor/july</code> imports and dependency</td><td><code>@cursor/july</code></td></tr><tr><td><code>agentkit</code> bin</td><td><code>agent-serve</code></td></tr><tr><td><code>dist/bin/agentkit.js</code></td><td><code>dist/bin/agent-serve.js</code></td></tr><tr><td><code>.agentkit/</code> state directory</td><td><code>.agent-serve/</code></td></tr><tr><td><code>/var/lib/agentkit</code> (deploy state root)</td><td><code>/var/lib/agent-serve</code></td></tr><tr><td><code>CURSOR_AGENT_KIT_*</code> env vars</td><td><code>AGENT_SERVE_*</code></td></tr><tr><td><code>agentkit (<hostname>)</code> API key name</td><td><code>agent-serve (<hostname>)</code></td></tr><tr><td>Package path <code>packages/agentkit</code></td><td><code>packages/agent-serve</code></td></tr><tr><td>Package skills <code>packages/agentkit/skills/</code></td><td><code>packages/agent-serve/skills/</code></td></tr></tbody></table></div><div class="warning custom-block github-alert"><p class="custom-block-title">WARNING</p><p>Run agentkit with Node 22.13 or newer, and never with Bun. Bun's HTTP/2 client corrupts the Cursor SDK's tool-result streams (<code>NGHTTP2_FRAME_SIZE_ERROR</code>), so every built-in read or grep the model makes fails and turns degrade into minutes-long retry loops.</p></div><h2 id="credentials" tabindex="-1">Credentials <a class="header-anchor" href="#credentials" aria-label="Permalink to "Credentials""></a></h2><p>Model turns run on the Cursor harness, so the serving host needs a Cursor credential. Sign in once, or export an API key:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> login</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # browser sign-in; mints + stores a revocable API key</span></span>
|
|
37
|
+
<span class="line"><span>└── evals/ # filesystem evals (regression checks)</span></span></code></pre></div><p>Browse it locally without serving an agent:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npx</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @cursor/july</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docs</span></span></code></pre></div><p>Every running serve host also mounts this documentation at <code>/docs</code> (disable it with <code>--no-docs</code>).</p><h2 id="where-to-start" tabindex="-1">Where to start <a class="header-anchor" href="#where-to-start" aria-label="Permalink to "Where to start""></a></h2><p>Pick your entry point based on your goal.</p><table tabindex="0"><thead><tr><th>You are...</th><th>Start with</th></tr></thead><tbody><tr><td>New to agentkit</td><td><a href="./quickstart.html">Quickstart</a> (PR approver), then <a href="./concepts.html">Concepts</a></td></tr><tr><td>Building a new agent with Cursor</td><td><a href="./scaffolding-agents.html">Scaffold an agent with Cursor</a></td></tr><tr><td>Learning from working agents</td><td><a href="./example-agents/">Example agents</a></td></tr><tr><td>Wiring an agent to Slack</td><td><a href="./guides/slack.html">Slack guide</a></td></tr><tr><td>Wiring an agent to GitHub webhooks</td><td><a href="./guides/github.html">GitHub guide</a></td></tr><tr><td>Making an existing agent measurably better</td><td><a href="./evals.html">Evals</a>, then <a href="./hillclimbing.html">Hillclimbing</a></td></tr><tr><td>Comparing variants on live traffic</td><td><a href="./ab.html">Live A/B metrics</a></td></tr><tr><td>Deploying with Cursor or on your own infrastructure</td><td><a href="./deployment.html">Deployment</a></td></tr><tr><td>Debugging something that misbehaves</td><td><a href="./troubleshooting.html">Fix common agent problems</a></td></tr></tbody></table><h2 id="the-documentation" tabindex="-1">The documentation <a class="header-anchor" href="#the-documentation" aria-label="Permalink to "The documentation""></a></h2><p><strong>Core</strong></p><ul><li><a href="./quickstart.html">Quickstart</a>: build a PR approver that reviews by complexity and wakes from webhooks.</li><li><a href="./scaffolding-agents.html">Scaffold an agent with Cursor</a>: use the bundled skill for a guided build.</li><li><a href="./concepts.html">Concepts</a>: the mental model behind the framework.</li></ul><p><strong>Self-improving Agents</strong></p><ul><li><a href="./building-with-agents.html">Building agents with agents</a>: use a coding agent to scaffold, run, and iterate on your agent.</li><li><a href="./evals.html">Evals</a>: author <code>defineEval</code> cases, pick fixtures, and use evals as regression checks.</li><li><a href="./ab.html">Live A/B metrics</a>: assign sticky variants and compare cumulative metrics on live sessions.</li><li><a href="./hillclimbing.html">Hillclimbing</a>: make an agent better one measured round at a time.</li></ul><p><strong>Guides</strong></p><ul><li><a href="./guides/webhooks.html">Webhooks and custom channels</a>: give the agent its own HTTP surface.</li><li><a href="./guides/github.html">GitHub</a>: wake the agent from pull requests, CI, and comments.</li><li><a href="./guides/slack.html">Slack</a>: put the agent in Slack over Socket Mode.</li><li><a href="./guides/human-in-the-loop.html">Human-in-the-loop approvals</a>: park a tool call until a person signs off.</li><li><a href="./guides/mcp-oauth.html">Host MCP OAuth</a>: authorize <code>oauth: true</code> connections, store tokens locally, and <code>--store</code> them on hosted deployments.</li><li><a href="./guides/agent-to-agent.html">Agent-to-agent</a>: every agent is an MCP server; agents can delegate to each other.</li><li><a href="./guides/cloud-runtime.html">Cloud runtime</a>: run turns on Cursor cloud agents instead of the local harness.</li></ul><p><strong>Example agents</strong></p><ul><li><a href="./example-agents/">Choose the right example</a>: compare all eleven agents by runtime, channels, tools, state, and architecture.</li><li><a href="./example-agents/weather-agent.html">Weather agent</a>: explore tools, MCP, approvals, skills, subagents, schedules, hooks, A/B metrics, and evals.</li><li><a href="./example-agents/slack-agent.html">Slack agent</a>: put a minimal agent in Slack through an account-linked transport.</li><li><a href="./example-agents/concierge.html">Concierge</a>: delegate work to a peer agent with its own context and sessions.</li><li><a href="./example-agents/benny.html">Playbook router</a>: route Slack intake through inherited repository playbooks.</li><li><a href="./example-agents/bugbot.html">PR evidence reviewer</a>: review a host-prepared, diff-first pull-request evidence tree.</li><li><a href="./example-agents/approval-buddy.html">Approval Buddy</a>: keep approval policy in code while subagents supply review findings.</li><li><a href="./example-agents/security-reviewer.html">Security Reviewer</a>: run a staged, parallel security pipeline with live playground progress.</li><li><a href="./example-agents/fsd.html">Remote PR coordinator</a>: hand PR triage from local chat and webhooks to durable remote sessions.</li><li><a href="./example-agents/knowledge-base.html">Knowledge base</a>: turn conversations about people, systems, decisions, and preferences into shared markdown.</li><li><a href="./example-agents/codebase-wiki.html">Codebase wiki</a>: ingest merged PRs into per-feature pages with a daily digest schedule.</li><li><a href="./example-agents/codeowners-review.html">Codeowners review</a>: route PR reviews by ownership to per-area playbooks and aggregate verdicts.</li></ul><p><strong>Operating</strong></p><ul><li><a href="./deployment.html">Deployment</a>: Cursor-managed hosting, self-hosting, auth, state, and operations.</li><li><a href="./troubleshooting.html">Fix common agent problems</a>: symptom to cause, in plain language.</li></ul><p><strong>Reference</strong></p><ul><li><a href="./reference/project-layout.html">Project layout</a>: the full folder structure.</li><li><a href="./reference/agent-config.html">Agent config</a> · <a href="./reference/instructions.html">Instructions</a> · <a href="./reference/tools.html">Tools</a> · <a href="./reference/prompt.html"><code>prompt</code></a> · <a href="./reference/skills.html">Skills</a> · <a href="./reference/connections.html">MCP connections</a> · <a href="./reference/subagents.html">Subagents</a></li><li><a href="./reference/channels.html">Channels</a> · <a href="./reference/schedules.html">Schedules and reminders</a> · <a href="./reference/hooks.html">Hooks</a> · <a href="./reference/sessions.html">Sessions and streaming</a> · <a href="./reference/playground.html">Playground</a></li><li><a href="./reference/cli.html">CLI</a> · <a href="./reference/http-api.html">HTTP API</a></li></ul><h2 id="run-the-cli" tabindex="-1">Run the CLI <a class="header-anchor" href="#run-the-cli" aria-label="Permalink to "Run the CLI""></a></h2><p>The docs write commands as <code>agentkit <command></code>. Where that command comes from depends on where you run.</p><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>When running from a source checkout there is no installed bin. Alias it from the package directory:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> packages/agent-serve</span></span>
|
|
38
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">alias</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> agentkit</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"pnpm exec tsx </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$PWD</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/src/bin/agent-serve.ts"</span></span></code></pre></div><p>When <code>@cursor/july</code> is installed as a dependency, the <code>agentkit</code> bin is on your package manager's path (<code>pnpm exec agentkit</code>, <code>npx agentkit</code>). <code>npx @cursor/july docs</code> runs the <code>july</code> bin with that command (no local install required).</p></div><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>The framework is being renamed from agent-serve to agentkit, and CLI examples use the new <code>agentkit</code> name. Paths, package imports, and environment variables keep their current names until the code rename ships:</p><table tabindex="0"><thead><tr><th>Docs say</th><th>Current name</th></tr></thead><tbody><tr><td><code>@cursor/july</code> imports and dependency</td><td><code>@cursor/july</code></td></tr><tr><td><code>agentkit</code> bin</td><td><code>agent-serve</code></td></tr><tr><td><code>dist/bin/agentkit.js</code></td><td><code>dist/bin/agent-serve.js</code></td></tr><tr><td><code>.agentkit/</code> state directory</td><td><code>.agent-serve/</code></td></tr><tr><td><code>/var/lib/agentkit</code> (deploy state root)</td><td><code>/var/lib/agent-serve</code></td></tr><tr><td><code>CURSOR_AGENT_KIT_*</code> env vars</td><td><code>AGENT_SERVE_*</code></td></tr><tr><td><code>agentkit (<hostname>)</code> API key name</td><td><code>agent-serve (<hostname>)</code></td></tr><tr><td>Package path <code>packages/agentkit</code></td><td><code>packages/agent-serve</code></td></tr><tr><td>Package skills <code>packages/agentkit/skills/</code></td><td><code>packages/agent-serve/skills/</code></td></tr></tbody></table></div><div class="warning custom-block github-alert"><p class="custom-block-title">WARNING</p><p>Run agentkit with Node 22.13 or newer, and never with Bun. Bun's HTTP/2 client corrupts the Cursor SDK's tool-result streams (<code>NGHTTP2_FRAME_SIZE_ERROR</code>), so every built-in read or grep the model makes fails and turns degrade into minutes-long retry loops.</p></div><h2 id="credentials" tabindex="-1">Credentials <a class="header-anchor" href="#credentials" aria-label="Permalink to "Credentials""></a></h2><p>Model turns run on the Cursor harness, so the serving host needs a Cursor credential. Sign in once, or export an API key:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> login</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # browser sign-in; mints + stores a revocable API key</span></span>
|
|
39
39
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># or: export CURSOR_API_KEY=key_...</span></span>
|
|
40
40
|
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> whoami</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # which account powers this host, and why</span></span></code></pre></div><h2 id="related-documentation" tabindex="-1">Related documentation <a class="header-anchor" href="#related-documentation" aria-label="Permalink to "Related documentation""></a></h2><p>These docs describe behavior. The package <a href="./../README.html"><code>README.md</code></a> is the compact reference, and <a href="./../AGENTS.html"><code>AGENTS.md</code></a> is the coding-agent cheat sheet. Task-shaped guides that ship with the package live under <a href="./../skills/"><code>skills/</code></a>; point a coding agent working on a agentkit project at them first. When the docs and the code disagree, the code is authoritative. Fix the doc.</p></div></div></main><footer class="VPDocFooter" data-v-53b9fda6 data-v-3958cc3f><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-3958cc3f><span class="visually-hidden" id="doc-footer-aria-label" data-v-3958cc3f>Pager</span><div class="pager" data-v-3958cc3f><!----></div><div class="pager" data-v-3958cc3f><a class="VPLink link pager-link next" href="/docs/quickstart.html" data-v-3958cc3f><!--[--><span class="desc" data-v-3958cc3f>Next page</span><span class="title" data-v-3958cc3f>Quickstart</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
|
41
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"TecHo0_2\",\"evals.md\":\"DYOjkRCX\",\"example-agents_approval-buddy.md\":\"DFGBYLcc\",\"example-agents_benny.md\":\"B0gjhI-p\",\"example-agents_bugbot.md\":\"DelIdhxB\",\"example-agents_codebase-wiki.md\":\"DC6sgwn0\",\"example-agents_codeowners-review.md\":\"Ku_tG2RY\",\"example-agents_concierge.md\":\"4rQTSMXt\",\"example-agents_fsd.md\":\"CzgUrDfi\",\"example-agents_index.md\":\"D2PEVSXl\",\"example-agents_knowledge-base.md\":\"BPJiVueF\",\"example-agents_oncall.md\":\"BG_sUMly\",\"example-agents_security-reviewer.md\":\"Dhj_m7_B\",\"example-agents_slack-agent.md\":\"buLbgvBf\",\"example-agents_weather-agent.md\":\"C9Qv-W0o\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_mcp-oauth.md\":\"Dd8EgSem\",\"guides_slack.md\":\"D_xFKlnF\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"
|
|
41
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"TecHo0_2\",\"evals.md\":\"DYOjkRCX\",\"example-agents_approval-buddy.md\":\"DFGBYLcc\",\"example-agents_benny.md\":\"B0gjhI-p\",\"example-agents_bugbot.md\":\"DelIdhxB\",\"example-agents_codebase-wiki.md\":\"DC6sgwn0\",\"example-agents_codeowners-review.md\":\"Ku_tG2RY\",\"example-agents_concierge.md\":\"4rQTSMXt\",\"example-agents_fsd.md\":\"CzgUrDfi\",\"example-agents_index.md\":\"D2PEVSXl\",\"example-agents_knowledge-base.md\":\"BPJiVueF\",\"example-agents_oncall.md\":\"BG_sUMly\",\"example-agents_security-reviewer.md\":\"Dhj_m7_B\",\"example-agents_slack-agent.md\":\"buLbgvBf\",\"example-agents_weather-agent.md\":\"C9Qv-W0o\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_mcp-oauth.md\":\"Dd8EgSem\",\"guides_slack.md\":\"D_xFKlnF\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"Dfv5ic9t\",\"quickstart.md\":\"BU6Iwi_9\",\"reference_agent-config.md\":\"DrW2JUM8\",\"reference_channels.md\":\"DdmiKgqf\",\"reference_cli.md\":\"ccoKOoXt\",\"reference_connections.md\":\"B9Q3TOve\",\"reference_hooks.md\":\"DyLVfE1O\",\"reference_http-api.md\":\"BncLd3PZ\",\"reference_instructions.md\":\"CgoV-YEb\",\"reference_playground.md\":\"CPZhfYaO\",\"reference_project-layout.md\":\"Bd_CKtNS\",\"reference_prompt.md\":\"BaiweQxE\",\"reference_schedules.md\":\"w_F2mXB6\",\"reference_sessions.md\":\"DLd6mvbv\",\"reference_skills.md\":\"B_jHN7JL\",\"reference_subagents.md\":\"zWAMNfi1\",\"reference_tools.md\":\"BRSDnTbN\",\"scaffolding-agents.md\":\"C3pTrmoE\",\"storage.md\":\"DRTdnFvd\",\"troubleshooting.md\":\"CmQkmnzC\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"agentkit\",\"description\":\"Filesystem-first framework for building and serving Cursor agents.\",\"base\":\"/docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"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\":\"Concepts\",\"link\":\"/concepts\"}]},{\"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\":\"Cloud runtime\",\"link\":\"/guides/cloud-runtime\"}]},{\"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\":\"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>
|
|
42
42
|
|
|
43
43
|
</body>
|
|
44
44
|
</html>
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/docs/assets/style.Bj-IXa5W.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.
|
|
12
|
+
<script type="module" src="/docs/assets/app.DYcC9FY-.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.
|
|
14
|
+
<link rel="modulepreload" href="/docs/assets/chunks/theme.DQ-njyo0.js">
|
|
15
15
|
<link rel="modulepreload" href="/docs/assets/chunks/framework.CAZyNGu9.js">
|
|
16
16
|
<link rel="modulepreload" href="/docs/assets/quickstart.md.BU6Iwi_9.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>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> github</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> replay</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/acme/checkout/pull/42</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
|
|
223
223
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --action</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> opened</span></span></code></pre></div><p>The replay prints the delivery, and the serve terminal shows the wake:</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>[agentkit] replaying acme/checkout#42 (pull_request) → 1 channel</span></span>
|
|
224
224
|
<span class="line"><span>[agentkit] pull_request.opened → pr-approver/github 200</span></span></code></pre></div><p>The agent runs the same inspect-then-submit loop, unprompted this time. Replay the same PR again and the channel resumes that PR's session instead of starting a new one: each pull request keeps one running conversation.</p><h2 id="open-the-playground" tabindex="-1">Open the playground <a class="header-anchor" href="#open-the-playground" aria-label="Permalink to "Open the playground""></a></h2><p>Keep <code>agentkit dev</code> running and open the playground URL it printed. The webhook session is in the session list, titled <code>Review acme/checkout#42</code>, with the trigger message, both tool calls, and the verdict laid out. Start a new chat there and ask for another review to watch a turn stream live.</p><h2 id="go-live" tabindex="-1">Go live <a class="header-anchor" href="#go-live" aria-label="Permalink to "Go live""></a></h2><p>Replay is for development. For real deliveries, serve with <code>--cursor-events --repo owner/repo</code> to pull events for repositories connected to Cursor with no public URL, or run <code>agentkit github forward</code> to relay webhooks to your dev server. The <a href="./guides/github.html">GitHub guide</a> compares the options. In production, give the host GitHub App credentials so reviews post as your app's bot identity instead of a personal account.</p><h2 id="where-to-go-next" tabindex="-1">Where to go next <a class="header-anchor" href="#where-to-go-next" aria-label="Permalink to "Where to go next""></a></h2><ul><li><a href="./../examples/approval-buddy/"><code>examples/approval-buddy</code></a>: the production-shaped sibling, with commit statuses, review subagents, and a deterministic stamp policy</li><li><a href="./evals.html">Evals</a>: freeze these two PRs as regression checks so prompt changes can't flip a verdict</li><li><a href="./reference/tools.html">Tools</a>: more on typed tools, approvals, and direct calls</li><li><a href="./guides/github.html">GitHub</a>: fixtures, forwarding, and pulling events from Cursor</li><li><a href="./building-with-agents.html">Building agents with agents</a>: have a coding agent extend the project for you</li></ul></div></div></main><footer class="VPDocFooter" data-v-53b9fda6 data-v-3958cc3f><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-3958cc3f><span class="visually-hidden" id="doc-footer-aria-label" data-v-3958cc3f>Pager</span><div class="pager" data-v-3958cc3f><a class="VPLink link pager-link prev" href="/docs/" data-v-3958cc3f><!--[--><span class="desc" data-v-3958cc3f>Previous page</span><span class="title" data-v-3958cc3f>Overview</span><!--]--></a></div><div class="pager" data-v-3958cc3f><a class="VPLink link pager-link next" href="/docs/scaffolding-agents.html" data-v-3958cc3f><!--[--><span class="desc" data-v-3958cc3f>Next page</span><span class="title" data-v-3958cc3f>Scaffold an agent with Cursor</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
|
225
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"TecHo0_2\",\"evals.md\":\"DYOjkRCX\",\"example-agents_approval-buddy.md\":\"DFGBYLcc\",\"example-agents_benny.md\":\"B0gjhI-p\",\"example-agents_bugbot.md\":\"DelIdhxB\",\"example-agents_codebase-wiki.md\":\"DC6sgwn0\",\"example-agents_codeowners-review.md\":\"Ku_tG2RY\",\"example-agents_concierge.md\":\"4rQTSMXt\",\"example-agents_fsd.md\":\"CzgUrDfi\",\"example-agents_index.md\":\"D2PEVSXl\",\"example-agents_knowledge-base.md\":\"BPJiVueF\",\"example-agents_oncall.md\":\"BG_sUMly\",\"example-agents_security-reviewer.md\":\"Dhj_m7_B\",\"example-agents_slack-agent.md\":\"buLbgvBf\",\"example-agents_weather-agent.md\":\"C9Qv-W0o\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_mcp-oauth.md\":\"Dd8EgSem\",\"guides_slack.md\":\"D_xFKlnF\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"
|
|
225
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"TecHo0_2\",\"evals.md\":\"DYOjkRCX\",\"example-agents_approval-buddy.md\":\"DFGBYLcc\",\"example-agents_benny.md\":\"B0gjhI-p\",\"example-agents_bugbot.md\":\"DelIdhxB\",\"example-agents_codebase-wiki.md\":\"DC6sgwn0\",\"example-agents_codeowners-review.md\":\"Ku_tG2RY\",\"example-agents_concierge.md\":\"4rQTSMXt\",\"example-agents_fsd.md\":\"CzgUrDfi\",\"example-agents_index.md\":\"D2PEVSXl\",\"example-agents_knowledge-base.md\":\"BPJiVueF\",\"example-agents_oncall.md\":\"BG_sUMly\",\"example-agents_security-reviewer.md\":\"Dhj_m7_B\",\"example-agents_slack-agent.md\":\"buLbgvBf\",\"example-agents_weather-agent.md\":\"C9Qv-W0o\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_mcp-oauth.md\":\"Dd8EgSem\",\"guides_slack.md\":\"D_xFKlnF\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"Dfv5ic9t\",\"quickstart.md\":\"BU6Iwi_9\",\"reference_agent-config.md\":\"DrW2JUM8\",\"reference_channels.md\":\"DdmiKgqf\",\"reference_cli.md\":\"ccoKOoXt\",\"reference_connections.md\":\"B9Q3TOve\",\"reference_hooks.md\":\"DyLVfE1O\",\"reference_http-api.md\":\"BncLd3PZ\",\"reference_instructions.md\":\"CgoV-YEb\",\"reference_playground.md\":\"CPZhfYaO\",\"reference_project-layout.md\":\"Bd_CKtNS\",\"reference_prompt.md\":\"BaiweQxE\",\"reference_schedules.md\":\"w_F2mXB6\",\"reference_sessions.md\":\"DLd6mvbv\",\"reference_skills.md\":\"B_jHN7JL\",\"reference_subagents.md\":\"zWAMNfi1\",\"reference_tools.md\":\"BRSDnTbN\",\"scaffolding-agents.md\":\"C3pTrmoE\",\"storage.md\":\"DRTdnFvd\",\"troubleshooting.md\":\"CmQkmnzC\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"agentkit\",\"description\":\"Filesystem-first framework for building and serving Cursor agents.\",\"base\":\"/docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"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\":\"Concepts\",\"link\":\"/concepts\"}]},{\"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\":\"Cloud runtime\",\"link\":\"/guides/cloud-runtime\"}]},{\"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\":\"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>
|
|
226
226
|
|
|
227
227
|
</body>
|
|
228
228
|
</html>
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/docs/assets/style.Bj-IXa5W.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.
|
|
12
|
+
<script type="module" src="/docs/assets/app.DYcC9FY-.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.
|
|
14
|
+
<link rel="modulepreload" href="/docs/assets/chunks/theme.DQ-njyo0.js">
|
|
15
15
|
<link rel="modulepreload" href="/docs/assets/chunks/framework.CAZyNGu9.js">
|
|
16
16
|
<link rel="modulepreload" href="/docs/assets/reference_agent-config.md.DrW2JUM8.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>
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`listening on ${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">handle</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">url</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
53
53
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// handle.callTool(...), handle.dispatchSchedule("heartbeat"),</span></span>
|
|
54
54
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// handle.createReminder(...), handle.project, await handle.close()</span></span></code></pre></div><p><code>ServeOptions</code> mirrors the CLI flags: <code>port</code>, <code>host</code>, <code>dev</code>, <code>stateRoot</code>, <code>apiKey</code>, <code>schedules</code>, <code>reminders</code>, <code>playground</code>, <code>authToken</code> (the <code>--bearer-token</code> equivalent), <code>allowAnonymous</code>, <code>publicUrl</code>, <code>cursorEvents</code>, and <code>mode: "single" | "multi"</code>. The Cursor credential resolves in one order everywhere: explicit <code>apiKey</code>, then <code>CURSOR_API_KEY</code>, then the key stored by <code>agentkit login</code>.</p><h2 id="what-s-next" tabindex="-1">What's next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to "What's next""></a></h2><p>Continue with these pages:</p><ul><li><a href="./instructions.html">Instructions</a>: the required half of a minimal agent</li><li><a href="./../guides/cloud-runtime.html">Cloud runtime</a>: when and how to leave the host</li><li><a href="./cli.html">CLI</a>: the flags <code>ServeOptions</code> mirrors</li></ul></div></div></main><footer class="VPDocFooter" data-v-53b9fda6 data-v-3958cc3f><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-3958cc3f><span class="visually-hidden" id="doc-footer-aria-label" data-v-3958cc3f>Pager</span><div class="pager" data-v-3958cc3f><a class="VPLink link pager-link prev" href="/docs/reference/project-layout.html" data-v-3958cc3f><!--[--><span class="desc" data-v-3958cc3f>Previous page</span><span class="title" data-v-3958cc3f>Project layout</span><!--]--></a></div><div class="pager" data-v-3958cc3f><a class="VPLink link pager-link next" href="/docs/reference/instructions.html" data-v-3958cc3f><!--[--><span class="desc" data-v-3958cc3f>Next page</span><span class="title" data-v-3958cc3f>Instructions</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
|
55
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"TecHo0_2\",\"evals.md\":\"DYOjkRCX\",\"example-agents_approval-buddy.md\":\"DFGBYLcc\",\"example-agents_benny.md\":\"B0gjhI-p\",\"example-agents_bugbot.md\":\"DelIdhxB\",\"example-agents_codebase-wiki.md\":\"DC6sgwn0\",\"example-agents_codeowners-review.md\":\"Ku_tG2RY\",\"example-agents_concierge.md\":\"4rQTSMXt\",\"example-agents_fsd.md\":\"CzgUrDfi\",\"example-agents_index.md\":\"D2PEVSXl\",\"example-agents_knowledge-base.md\":\"BPJiVueF\",\"example-agents_oncall.md\":\"BG_sUMly\",\"example-agents_security-reviewer.md\":\"Dhj_m7_B\",\"example-agents_slack-agent.md\":\"buLbgvBf\",\"example-agents_weather-agent.md\":\"C9Qv-W0o\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_mcp-oauth.md\":\"Dd8EgSem\",\"guides_slack.md\":\"D_xFKlnF\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"
|
|
55
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"TecHo0_2\",\"evals.md\":\"DYOjkRCX\",\"example-agents_approval-buddy.md\":\"DFGBYLcc\",\"example-agents_benny.md\":\"B0gjhI-p\",\"example-agents_bugbot.md\":\"DelIdhxB\",\"example-agents_codebase-wiki.md\":\"DC6sgwn0\",\"example-agents_codeowners-review.md\":\"Ku_tG2RY\",\"example-agents_concierge.md\":\"4rQTSMXt\",\"example-agents_fsd.md\":\"CzgUrDfi\",\"example-agents_index.md\":\"D2PEVSXl\",\"example-agents_knowledge-base.md\":\"BPJiVueF\",\"example-agents_oncall.md\":\"BG_sUMly\",\"example-agents_security-reviewer.md\":\"Dhj_m7_B\",\"example-agents_slack-agent.md\":\"buLbgvBf\",\"example-agents_weather-agent.md\":\"C9Qv-W0o\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_mcp-oauth.md\":\"Dd8EgSem\",\"guides_slack.md\":\"D_xFKlnF\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"Dfv5ic9t\",\"quickstart.md\":\"BU6Iwi_9\",\"reference_agent-config.md\":\"DrW2JUM8\",\"reference_channels.md\":\"DdmiKgqf\",\"reference_cli.md\":\"ccoKOoXt\",\"reference_connections.md\":\"B9Q3TOve\",\"reference_hooks.md\":\"DyLVfE1O\",\"reference_http-api.md\":\"BncLd3PZ\",\"reference_instructions.md\":\"CgoV-YEb\",\"reference_playground.md\":\"CPZhfYaO\",\"reference_project-layout.md\":\"Bd_CKtNS\",\"reference_prompt.md\":\"BaiweQxE\",\"reference_schedules.md\":\"w_F2mXB6\",\"reference_sessions.md\":\"DLd6mvbv\",\"reference_skills.md\":\"B_jHN7JL\",\"reference_subagents.md\":\"zWAMNfi1\",\"reference_tools.md\":\"BRSDnTbN\",\"scaffolding-agents.md\":\"C3pTrmoE\",\"storage.md\":\"DRTdnFvd\",\"troubleshooting.md\":\"CmQkmnzC\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"agentkit\",\"description\":\"Filesystem-first framework for building and serving Cursor agents.\",\"base\":\"/docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"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\":\"Concepts\",\"link\":\"/concepts\"}]},{\"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\":\"Cloud runtime\",\"link\":\"/guides/cloud-runtime\"}]},{\"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\":\"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>
|
|
56
56
|
|
|
57
57
|
</body>
|
|
58
58
|
</html>
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/docs/assets/style.Bj-IXa5W.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.
|
|
12
|
+
<script type="module" src="/docs/assets/app.DYcC9FY-.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.
|
|
14
|
+
<link rel="modulepreload" href="/docs/assets/chunks/theme.DQ-njyo0.js">
|
|
15
15
|
<link rel="modulepreload" href="/docs/assets/chunks/framework.CAZyNGu9.js">
|
|
16
16
|
<link rel="modulepreload" href="/docs/assets/reference_channels.md.DdmiKgqf.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>
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
72
72
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // auth: [...], state: {...}, onStart(...), onStop(...)</span></span>
|
|
73
73
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>This example assumes <code>agent/tools/inspect_pr.ts</code> exists. The handler calls it before the model turn, so every review starts with validated PR data. It also derives a stable conversation key from the PR URL and writes the tool result to <code>pr.json</code>. Instructions can ask the model to inspect a PR, but host code guarantees it.</p><h2 id="route-verbs-and-schemas" tabindex="-1">Route verbs and schemas <a class="header-anchor" href="#route-verbs-and-schemas" aria-label="Permalink to "Route verbs and schemas""></a></h2><p><code>GET</code>, <code>POST</code>, <code>PUT</code>, <code>PATCH</code>, and <code>DELETE</code> helpers build routes. Their schemas are Zod, enforced at compile time:</p><table tabindex="0"><thead><tr><th>Verb</th><th>Required schema</th></tr></thead><tbody><tr><td><code>GET</code></td><td><code>querySchema</code></td></tr><tr><td><code>POST</code> / <code>PUT</code> / <code>PATCH</code></td><td><code>bodySchema</code> (optional <code>querySchema</code>)</td></tr><tr><td><code>DELETE</code></td><td>both optional</td></tr></tbody></table><p>Plain JSON Schema objects won't type-check; use <code>z.object({})</code> or <code>z.unknown()</code> for intentionally open surfaces. The host validates before the handler runs. Handlers receive typed <code>args.body</code> and <code>args.query</code>, and empty POST bodies are coerced to <code>{}</code> first. Declared schemas are projected on <code>GET /v1/info</code>, which powers the playground's <strong>Try</strong> buttons and composer <strong>slash commands</strong>.</p><h2 id="handler-arguments" tabindex="-1">Handler arguments <a class="header-anchor" href="#handler-arguments" aria-label="Permalink to "Handler arguments""></a></h2><p>Handlers receive the Fetch <code>Request</code> and an args object:</p><table tabindex="0"><thead><tr><th>Member</th><th>What it is</th></tr></thead><tbody><tr><td><code>send(message, options?)</code></td><td>Run a model turn on this channel; returns the session handle. Options: <code>continuationToken</code> (the conversation key), <code>workspaceFiles</code>, <code>workspaceDir</code>, <code>cloud</code> (attach cloud repos for this session), <code>auth</code> (defaults to the request principal), <code>sdkAgentId</code> (resume a specific SDK agent).</td></tr><tr><td><code>getSession(sessionId)</code></td><td>Look up an existing session on this channel</td></tr><tr><td><code>receive(channelDefinition, input)</code></td><td>Hand off to another channel (schedules use this)</td></tr><tr><td><code>callTool(name, input, options?)</code></td><td>Deterministic server-tool call (<a href="./tools.html#call-a-tool-without-a-model-turn">Tools</a>)</td></tr><tr><td><code>body</code>, <code>query</code>, <code>params</code></td><td>Validated payloads and <code>:param</code> path segments</td></tr><tr><td><code>auth</code></td><td>The <code>AuthContext</code> resolved by this route's auth chain</td></tr><tr><td><code>requestIp</code></td><td>The TCP peer address</td></tr><tr><td><code>host</code></td><td>Shared services: <code>host.mcp</code>, <code>host.github</code>, <code>host.slack</code>, <code>host.reminders</code></td></tr><tr><td><code>waitUntil(promise)</code></td><td>Background work that outlives the response</td></tr><tr><td><code>sessionUrls(request, sessionId)</code></td><td>Absolute playground + trace URLs for a session on this mount</td></tr></tbody></table><h2 id="events" tabindex="-1">Events <a class="header-anchor" href="#events" aria-label="Permalink to "Events""></a></h2><p>The <code>events</code> map subscribes the channel to stream events for the sessions it owns. Keys are event types from the <a href="./sessions.html#the-event-vocabulary">event vocabulary</a>, or <code>"*"</code>. Handlers receive <code>(event, channel, ctx)</code>, where <code>channel.state</code> is the per-session adapter state and <code>ctx</code> exposes session info and host services. This is where a channel delivers replies back to its surface.</p><h2 id="state-and-lifecycle" tabindex="-1">State and lifecycle <a class="header-anchor" href="#state-and-lifecycle" aria-label="Permalink to "State and lifecycle""></a></h2><p><code>state</code> declares the starting per-session adapter state (JSON), persisted on the session record. Routes and event handlers read and mutate it through <code>channel.state</code>. <code>onStart(args)</code> runs when the channel mounts. It receives <code>send</code>, <code>receive</code>, <code>callTool</code>, <code>host</code>, and friends; the Slack pack opens its Socket Mode connection here. <code>onStop()</code> runs when the server drains.</p><h2 id="auth-policies" tabindex="-1">Auth policies <a class="header-anchor" href="#auth-policies" aria-label="Permalink to "Auth policies""></a></h2><p>Every route runs an auth-policy chain: the channel's <code>auth</code> array, or <code>[localDevStrict()]</code> when unset. A policy is a function <code>(request, info) => AuthContext | null</code> (async allowed); the first non-null wins, and a request no policy admits gets <code>401</code>.</p><table tabindex="0"><thead><tr><th>Policy</th><th>Admits</th></tr></thead><tbody><tr><td><code>localDevStrict()</code></td><td>Direct loopback callers with no proxy-forwarding headers (<code>X-Forwarded-For</code>, <code>X-Real-IP</code>, <code>Forwarded</code>, and <code>X-Forwarded-Host</code> are all rejected, so tunnels and same-host reverse proxies don't silently re-expose the route), plus a loopback <code>Host</code> header, which rejects DNS-rebinding callers that reach 127.0.0.1 with a remote hostname.</td></tr><tr><td><code>localDev()</code></td><td>Like <code>localDevStrict()</code> but without the <code>Host</code> check. An explicit, weaker opt-in.</td></tr><tr><td><code>loopbackOnly()</code></td><td>A loopback TCP peer, ignoring forwarding headers; for dev relays that legitimately carry them, like <code>gh webhook forward</code>.</td></tr><tr><td><code>bearerAuth(token)</code></td><td><code>Authorization: Bearer <token></code>, compared in constant time. Also accepts a verifier function mapping a presented token to an <code>AuthContext</code>.</td></tr><tr><td><code>allowAll()</code></td><td>Everyone, as an <code>anonymous</code> principal. Only for surfaces protected upstream (an HMAC-verified webhook) or intentionally public.</td></tr></tbody></table><p>The resolved <code>AuthContext</code> (<code>{ authenticator, principalId, principalType, attributes? }</code>) becomes the request principal. Sessions bind to the principal that created them, and follow-up, stream, and list routes enforce ownership (<code>403</code> otherwise).</p><p>Server flags interact with authored auth: <code>--bearer-token</code> swaps the default <code>localDevStrict()</code> for <code>bearerAuth(...)</code> on channels that don't author their own chain, and <code>--allow-anonymous</code> swaps it for <code>allowAll()</code>. Authored <code>auth</code> arrays always win over both. A channel that declares <code>[localDevStrict()]</code> stays loopback-only even on an <code>--allow-anonymous</code> host.</p><h2 id="first-class-channels" tabindex="-1">First class channels <a class="header-anchor" href="#first-class-channels" aria-label="Permalink to "First class channels""></a></h2><p><strong>Slack</strong> (<code>@cursor/july/channels/slack</code>): Socket Mode transport, streaming replies, engagement rules, approval cards. Author <code>agent/channels/slack.ts</code> with <code>slackChannel()</code>. Guide: <a href="./../guides/slack.html">Slack</a>.</p><p><strong>GitHub</strong> (<code>@cursor/july/channels/github</code>): webhook dispatch with signature verification, per-event hooks returning <code>{ auth }</code> (a model turn), <code>{ task }</code> (host work), or <code>null</code>, and CLI tooling for replay and live forwarding. Author <code>agent/channels/github.ts</code> with <code>githubChannel()</code>. Guide: <a href="./../guides/github.html">GitHub</a>.</p><p>For other platforms like Discord or Teams, use the authored <code>defineChannel</code> webhook form.</p><h2 id="continuation-semantics" tabindex="-1">Continuation semantics <a class="header-anchor" href="#continuation-semantics" aria-label="Permalink to "Continuation semantics""></a></h2><p>Channels own their continuation-token format. The built-in HTTP channel mints opaque rotating tokens, Slack uses <code>channelId:threadTs</code>, and PR automations use keys like <code>pr:owner/repo#N</code>. Same token, same durable session; one active continuation per session; the HTTP channel returns <code>409</code> for stale tokens. For the full session model, see <a href="./sessions.html">Sessions</a>.</p><h2 id="what-s-next" tabindex="-1">What's next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to "What's next""></a></h2><p>Continue with these pages:</p><ul><li><a href="./../guides/webhooks.html">Webhooks guide</a>: the same API, walked through</li><li><a href="./http-api.html">HTTP API</a>: the built-in routes precisely</li><li><a href="./sessions.html">Sessions and streaming</a>: the events channels subscribe to</li></ul></div></div></main><footer class="VPDocFooter" data-v-53b9fda6 data-v-3958cc3f><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-3958cc3f><span class="visually-hidden" id="doc-footer-aria-label" data-v-3958cc3f>Pager</span><div class="pager" data-v-3958cc3f><a class="VPLink link pager-link prev" href="/docs/reference/subagents.html" data-v-3958cc3f><!--[--><span class="desc" data-v-3958cc3f>Previous page</span><span class="title" data-v-3958cc3f>Subagents</span><!--]--></a></div><div class="pager" data-v-3958cc3f><a class="VPLink link pager-link next" href="/docs/reference/schedules.html" data-v-3958cc3f><!--[--><span class="desc" data-v-3958cc3f>Next page</span><span class="title" data-v-3958cc3f>Schedules & reminders</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
|
74
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"TecHo0_2\",\"evals.md\":\"DYOjkRCX\",\"example-agents_approval-buddy.md\":\"DFGBYLcc\",\"example-agents_benny.md\":\"B0gjhI-p\",\"example-agents_bugbot.md\":\"DelIdhxB\",\"example-agents_codebase-wiki.md\":\"DC6sgwn0\",\"example-agents_codeowners-review.md\":\"Ku_tG2RY\",\"example-agents_concierge.md\":\"4rQTSMXt\",\"example-agents_fsd.md\":\"CzgUrDfi\",\"example-agents_index.md\":\"D2PEVSXl\",\"example-agents_knowledge-base.md\":\"BPJiVueF\",\"example-agents_oncall.md\":\"BG_sUMly\",\"example-agents_security-reviewer.md\":\"Dhj_m7_B\",\"example-agents_slack-agent.md\":\"buLbgvBf\",\"example-agents_weather-agent.md\":\"C9Qv-W0o\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_mcp-oauth.md\":\"Dd8EgSem\",\"guides_slack.md\":\"D_xFKlnF\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"
|
|
74
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"BMCZ6Hd7\",\"building-with-agents.md\":\"CJCtZCyi\",\"concepts.md\":\"Cfb9b-k1\",\"deployment.md\":\"TecHo0_2\",\"evals.md\":\"DYOjkRCX\",\"example-agents_approval-buddy.md\":\"DFGBYLcc\",\"example-agents_benny.md\":\"B0gjhI-p\",\"example-agents_bugbot.md\":\"DelIdhxB\",\"example-agents_codebase-wiki.md\":\"DC6sgwn0\",\"example-agents_codeowners-review.md\":\"Ku_tG2RY\",\"example-agents_concierge.md\":\"4rQTSMXt\",\"example-agents_fsd.md\":\"CzgUrDfi\",\"example-agents_index.md\":\"D2PEVSXl\",\"example-agents_knowledge-base.md\":\"BPJiVueF\",\"example-agents_oncall.md\":\"BG_sUMly\",\"example-agents_security-reviewer.md\":\"Dhj_m7_B\",\"example-agents_slack-agent.md\":\"buLbgvBf\",\"example-agents_weather-agent.md\":\"C9Qv-W0o\",\"guides_agent-to-agent.md\":\"Bpzgq2Pq\",\"guides_cloud-runtime.md\":\"gVzabdQL\",\"guides_github.md\":\"DOOCpqsW\",\"guides_human-in-the-loop.md\":\"DlUqsp1S\",\"guides_mcp-oauth.md\":\"Dd8EgSem\",\"guides_slack.md\":\"D_xFKlnF\",\"guides_webhooks.md\":\"B1EswtUu\",\"hillclimbing.md\":\"DHNast08\",\"index.md\":\"Dfv5ic9t\",\"quickstart.md\":\"BU6Iwi_9\",\"reference_agent-config.md\":\"DrW2JUM8\",\"reference_channels.md\":\"DdmiKgqf\",\"reference_cli.md\":\"ccoKOoXt\",\"reference_connections.md\":\"B9Q3TOve\",\"reference_hooks.md\":\"DyLVfE1O\",\"reference_http-api.md\":\"BncLd3PZ\",\"reference_instructions.md\":\"CgoV-YEb\",\"reference_playground.md\":\"CPZhfYaO\",\"reference_project-layout.md\":\"Bd_CKtNS\",\"reference_prompt.md\":\"BaiweQxE\",\"reference_schedules.md\":\"w_F2mXB6\",\"reference_sessions.md\":\"DLd6mvbv\",\"reference_skills.md\":\"B_jHN7JL\",\"reference_subagents.md\":\"zWAMNfi1\",\"reference_tools.md\":\"BRSDnTbN\",\"scaffolding-agents.md\":\"C3pTrmoE\",\"storage.md\":\"DRTdnFvd\",\"troubleshooting.md\":\"CmQkmnzC\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"agentkit\",\"description\":\"Filesystem-first framework for building and serving Cursor agents.\",\"base\":\"/docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"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\":\"Concepts\",\"link\":\"/concepts\"}]},{\"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\":\"Cloud runtime\",\"link\":\"/guides/cloud-runtime\"}]},{\"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\":\"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>
|
|
75
75
|
|
|
76
76
|
</body>
|
|
77
77
|
</html>
|