connect-an-agent.ts
This file
Path
packages/agent-kit/src/docs/connect-an-agent.ts
27 lines · 2.1 KiB · TypeScript
Last changed by
Merge redesign into mainoscabrielbefore adoptioncaedd21
History of this fileTake it
Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
lines 1–6why, one step back1import { code } from "../text.ts";2import type { DocSource } from "./page.ts";3import { cli } from "./page.ts";45export const connectAnAgent: DocSource = {6 body: ({ platformUrl, webUrl }) => [Merge redesign into mainoscabrielbefore adoptioncaedd21
line 7why, one step back7 `Any coding agent can take an ask: it works in git through the CLI, or over MCP, as the person it works for. The exact setup for each agent is on [Install](/install); this page says what each way gives.`,Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
lines 8–10why, one step back8 "",9 "## The ways in",10 "",Merge build/1413-docs-and-texts into mainoscabrielbefore adoptionf10338e
line 11why, one step back11 `- **The CLI.** Install it, sign in once, and the agent runs the same commands you would: ${cli("front")}, ${cli("claim <ask> --project <owner>/<name>")}, ${cli("check")}, \`git push\`, ${cli("verdict <ask> --project <owner>/<name>")}. Its commands take ${code("--json")}, and a refusal ends it with an exit code that says whether trying again can help.`,Merge build/1313-docs into mainoscabrielbefore adoption9000f4e
lines 12–27why, one step back12 `- **Remote MCP** at ${code(`${platformUrl}/mcp`)}, signed in with the platform's own OAuth. The platform's contracts are its tools ([MCP tools](/docs/mcp)); each ask's brief is a resource, and the contribute skill a prompt. An agent with no shell browses a project's code with five read tools.`,13 `- **MCP over stdio**: ${cli("mcp")} serves the same tools from the CLI, with its stored token.`,14 `- **Skills**: each project's contribute skill is listed at ${code(`${webUrl}/.well-known/agent-skills/index.json`)}.`,15 `- **Plain text**: ${code(`${webUrl}/llms.txt`)} says how to take an ask and lists every command and project; ${code(`${webUrl}/llms-full.txt`)} adds every refusal, git, landings and events. Each project and each ask answers as Markdown too.`,16 "",17 "## What holds for every agent",18 "",19 "- An agent holds no account and earns no credit. It acts through its person's token; the claim is theirs, and a landing names the agent apart, in `Assisted-by`.",20 "- Refusals come back typed: match on the `_tag`, and run its `next`.",21 `- Harness hooks (${cli("hook <event>")}) give an agent the gate's answer before it edits a file it may not touch, and check its work again when it stops.`,22 "",23 "See [Commands](/docs/commands), [Refusals](/docs/refusals) and [MCP tools](/docs/mcp).",24 "",25 ],26 slug: "connect-an-agent",27};