iiRecord
Agentic AI Atlas · Remote bootstrap
page:docs-adapters-tutorials-remote-bootstrapa5c.ai
II.
Page JSON

page:docs-adapters-tutorials-remote-bootstrap

Structured · live

Remote bootstrap json

Inspect the normalized record payload exactly as the atlas UI reads it.

File · wiki/docs/adapters/tutorials/remote-bootstrap.mdCluster · wiki
Record JSON
{
  "id": "page:docs-adapters-tutorials-remote-bootstrap",
  "_kind": "Page",
  "_file": "wiki/docs/adapters/tutorials/remote-bootstrap.md",
  "_cluster": "wiki",
  "attributes": {
    "nodeKind": "Page",
    "sourcePath": "docs/adapters/tutorials/remote-bootstrap.md",
    "sourceKind": "repo-docs",
    "title": "Remote bootstrap",
    "displayName": "Remote bootstrap",
    "slug": "docs/adapters/tutorials/remote-bootstrap",
    "articlePath": "wiki/docs/adapters/tutorials/remote-bootstrap.md",
    "article": "\n# Remote bootstrap\n\nThe `adapters-remote` adapter lets you drive a coding agent that runs on a\nremote host — over SSH, in a container, or behind a gateway. \"Bootstrap\" is\nthe process of getting the remote side ready: installing `adapters`, wiring\ncredentials, and establishing a session channel.\n\n## 1. Install on the remote host\n\n```bash\n# On the remote machine\ncurl -fsSL https://nodejs.org/dist/v22.x/node-v22.x-linux-x64.tar.xz | tar -xJ\nnpm i -g @a5c-ai/adapters-cli\n```\n\nOr use the built-in bootstrap command, which copies an install script over\nSSH and runs it:\n\n```bash\nadapters remote bootstrap user@host --agent claude\n```\n\nThis installs the CLI, ensures the target harness (e.g. `@anthropic-ai/claude-code`)\nis present, and writes a minimal `~/.adapters/config.json` on the remote.\n\n## 2. Configure credentials\n\nThe remote host needs the same env vars (or config files) that the local\nsetup would need. Options:\n\n- **env-forward** (default): `adapters` forwards `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` /\n  etc. from the local shell into the SSH session for the lifetime of the run.\n- **config-file**: pre-seed `~/.claude/auth.json` (or equivalent) on the remote\n  so the harness authenticates without env vars.\n- **per-call**: pass `env: { ANTHROPIC_API_KEY: '…' }` to `run()`.\n\n## 3. Running against the remote\n\n```ts\nimport { AgentMuxClient } from '@a5c-ai/adapters';\n\nconst client = new AgentMuxClient();\nconst handle = await client.run({\n  agent: 'adapters-remote',\n  remote: { host: 'user@host', agent: 'claude' },\n  prompt: 'Summarize the repository in two paragraphs.',\n});\n\nfor await (const ev of handle.events()) {\n  if (ev.type === 'text_delta') process.stdout.write(ev.text);\n}\n```\n\nFrom the CLI:\n\n```bash\nadapters run adapters-remote \\\n  --remote-host user@host \\\n  --remote-agent claude \\\n  \"Summarize the repository.\"\n```\n\n## 4. Invocation modes\n\nThe remote adapter respects adapters's invocation modes:\n\n- `mode: 'host'` — spawn the remote CLI directly (SSH exec).\n- `mode: 'docker'` — run the remote CLI inside a container on the remote host.\n- `mode: 'k8s'` — submit the remote CLI as an ephemeral pod.\n\nSee [docker-mode](./docker-mode.md) and [k8s-mode](./k8s-mode.md) for the\ncontainer flavors — the same flags apply to `adapters-remote`.\n\n## 5. Tearing down\n\n`adapters remote teardown user@host` removes `~/.adapters/`, the installed harness\n(if you used `bootstrap`), and any cached sessions. Use `--keep-sessions` to\npreserve the history directory.\n",
    "documents": []
  },
  "outgoingEdges": [],
  "incomingEdges": [
    {
      "from": "page:docs-adapters-tutorials",
      "to": "page:docs-adapters-tutorials-remote-bootstrap",
      "kind": "contains_page"
    }
  ]
}