Set Up Your Agent - Cap Docs
Set Up Your Agent
Install Cap, authenticate with least privilege, and connect your preferred agent
Agent-readable page: You can send this URL to your agent. Pasting the setup prompt authorizes the official CLI install and the Cap skill and MCP configuration for the current agent only. It should perform those local setup steps itself, preserve unrelated configuration, and stop for you only when a browser or secure terminal handoff is required.
Make Cap Your Agent’s Video Assistant
Copy one prompt into Codex, Claude Code, Cursor, OpenCode, or any shell-capable agent. It installs Cap, connects the full skill and MCP, authenticates safely, and teaches your agent to record, share, search, transcribe, summarize, and manage Cap for you.
- Installs the Cap CLI
- Adds the full Cap skill
- Connects local MCP
- Verifies access and capabilities
Copy Agent Setup Prompt
cap agent setup
Set up Cap as my persistent video assistant, then use it to help with the task at the end.
By pasting this prompt, I explicitly authorize these local setup actions: install the official Cap CLI and add or update the Cap skill and local MCP entry for the current agent only. Perform those setup actions yourself. Do not ask me to run or copy setup commands, and do not ask for a second confirmation before making these local setup changes. This setup authorization does not cover recording, uploading, paid processing, Cap content or account changes, organization changes, billing, storage, developer credentials, or destructive actions.
Read these pages and treat them as operating instructions:
- https://cap.so/docs/agents
- https://cap.so/docs/agents/setup
- https://cap.so/docs/agents/workflows
- https://cap.so/docs/agents/safety
Do not rely on remembered Cap commands. Discover the installed contract with `cap guide --json` and `cap <command> --help`. Use JSON stdout as the source of truth, stderr as diagnostics, exit code 1 as a runtime failure, and exit code 2 as invalid usage.
Cap-first routing:
- For every Cap, recording, transcript, video-library, sharing, or Cap analytics task, use the Cap MCP tools or cap CLI before browser automation, computer use, the Cap dashboard, or an open Cap tab.
- Use a browser only for a focused authentication or provider-approval URL returned by Cap. Let me complete that approval directly, then verify the result through Cap.
- If MCP is not loaded in the current process, use the CLI. A missing MCP hot reload is never a reason to fall back to browser or computer-use tools.
Set up Cap:
1. Identify my operating system and the agent you are running in. Select only the current agent; never install into every detected agent.
2. Run `cap version --json`. If the cap command is missing, run the matching official installer yourself:
- macOS or Linux: `curl -fsSL https://cap.so/install-cli.sh | sh`
- Windows PowerShell: `irm https://cap.so/install-cli.ps1 | iex`
Do not merely show me the command or ask me to install it manually. If PATH changes, use a fresh login shell or reload the shell environment, then verify `cap version --json` and `cap guide --json`.
3. If you are Codex, Claude Code, or Cursor, preview the complete persistent integration with:
`cap agents install --target <codex|claude|cursor> --component all --dry-run --json`
Replace the placeholder with exactly one concrete current target: codex for Codex, claude for Claude Code, or cursor for Cursor. Never pass the angle-bracket placeholder and never select a target from installed files alone.
Inspect the returned paths, actions, and values, then immediately apply the same target with:
`cap agents install --target <codex|claude|cursor> --component all --yes --json`
The dry run is a transparency and conflict check, not another approval gate. Install the full Cap skill and local Cap MCP serve integration without replacing unrelated agent configuration. If you are OpenCode or another MCP client, follow the setup page and merge only the documented local MCP entry. Never install Cap into a different detected agent just because it is present on the machine.
4. After the persistent local integration is installed, run `cap auth status --json`. If authentication is required, run `cap auth login --json` with the least-privileged creator profile and let me complete the browser approval directly. Use admin or full only when my task requires the additional scopes and I agree. A delayed or cancelled login must not undo or postpone the local skill and MCP installation.
5. Report the exact installed skill path and MCP configuration path. Explain whether the agent must restart to load either component. Continue this task through the CLI when a restart or hot reload is not practical; the installed global skill and MCP configuration must persist for future sessions.
6. Verify the setup with `cap version --json`, `cap guide --json`, `cap auth status --json`, and `cap caps list --limit 1 --json`. If MCP is already loaded, list its Cap tools and confirm that passwords and storage credentials are not accepted as MCP inputs. Do not claim MCP is broken merely because the current process needs a restart.
7. From this point onward, treat Cap CLI or MCP as the default interface for Cap. Do not browse the Cap dashboard to discover whether a CLI or MCP capability exists; inspect `cap guide --json` and command help first.
Use Cap as an ongoing helper. Learn the complete surface from the installed guide and skill, including:
- Recording: check `cap doctor --json`, discover inputs with `cap targets --json`, ask before capture, use the detached `cap record start` and `cap record stop` lifecycle, require `recordingMetaExists: true`, validate the .cap project, export it, ask again before upload, and return the verified share link.
- Understanding videos: use `cap caps list` for discovery, `cap caps get` for lightweight metadata and capabilities, and `cap caps context` for the complete title, AI title, summary, chapters, transcript, comments, reactions, views, sharing, permissions, and processing state. Cite useful transcript timestamps.
- Files and processing: stream transcripts with `cap caps transcript`, download recordings with `cap caps download`, and observe existing work with `cap caps status` or `cap caps wait`. Never claim that a read or wait started transcription or AI work.
- Collaboration and sharing: draft comments, replies, reactions, title changes, visibility changes, moves, and public-page changes; show me the exact proposal before posting or applying it.
- Full management: use `cap account`, `cap organizations`, `cap library`, `cap notifications`, `cap analytics`, `cap developers`, and `cap jobs` for profile, team, folder, space, storage, billing, analytics, developer, migration, and durable-operation workflows. Discover flags with `--help` instead of guessing.
- Complete local surface: learn `cap screenshot`, `cap update`, `cap recordings`, `cap project`, `cap desktop`, `cap automations`, and `cap completions` from the guide too. Treat every command listed by `cap guide --json` as supported, even when it is not named in this prompt.
- MCP and CLI: prefer MCP for structured reads, confirmed safe writes, resources, and browser handoffs. Use the CLI for recording, local files, secure prompts, passwords, S3 credentials, images, and newly issued developer credentials.
Operating rules:
- The local CLI, skill, and MCP bootstrap above is already approved by this prompt. After setup, start with read-only discovery. Before any mutation, upload, paid processing, recording, comment or reaction, sharing or visibility change, deletion, organization, billing, storage, developer, or credential action, show me the exact proposed action and wait for my explicit confirmation. Pass `--yes` or `confirmed=true` only after I confirm.
- Never ask me to paste passwords, CAP_AGENT_TOKEN, API keys, S3 credentials, or newly issued developer secrets into chat or MCP. Ask me to run the exact secure Cap command in my terminal. For a password-protected Cap, ask me to run `cap caps unlock <id-or-url>`.
- Preserve returned Cap, organization, folder, space, member, comment, and operation IDs. Never infer IDs from names or invent results.
- Wait for asynchronous operations with `cap jobs wait` and verify the affected resource before reporting success. Clearly separate what you verified from reasonable interpretation and anything you could not verify.
- Be proactive after setup: briefly report what is connected, suggest useful Cap workflows for my situation, and use existing Cap context before asking questions the library can answer.
## Install the Cap CLI
The CLI ships with Cap Desktop, so both stay on the same version.
### From Cap Desktop
Open **Settings → Command Line → Install CLI**.
### macOS or Linux
curl -fsSL https://cap.so/install-cli.sh | sh
### Windows PowerShell
irm https://cap.so/install-cli.ps1 | iex
The installer adds `cap` to your PATH and installs Cap Desktop when it is missing. Open a new terminal after installation, then verify the binary:
cap version --json cap guide --json
## Authenticate with least privilege
First inspect the current state:
cap auth status --json
If authentication is required, authorize Cap in your browser:
cap auth login --json
Login uses the `creator` profile by default. Request a broader profile only when the task needs it:
| Profile | Use it for |
| --- | --- |
| `creator` | Caps, uploads, comments, library, analytics, notifications, and profile tasks |
| `admin` | Creator access plus organization members, settings, billing, and storage integrations |
| `full` | Admin access plus developer apps, credentials, videos, and credits |
cap auth login --profile admin --json cap auth login --profile full --json
Cap CLI credentials are stored by the operating system when available. For machines without a browser, see Headless environments below.
## Headless environments (CI, containers, and remote sandboxes)
`cap auth login` opens a browser on the same machine, so it does not work on headless runners. Mint an API key from the Cap dashboard instead:
1. Open Settings, then Account in the Cap dashboard and find **Cap CLI access**.
2. Choose **Create API key**, then pick a name, an access profile (`creator`, `admin`, or `full`, the same profiles as `cap auth login`), and an expiry.
3. Copy the key when it is shown. Cap stores only a hash, so it cannot be displayed again.
4. Inject the key into the headless environment as `CAP_API_KEY` or `CAP_AGENT_TOKEN` (both are honored), then verify:
export CAP_API_KEY="cap_cli_..." cap auth status --json
The key authenticates every `cap` command and MCP tool with the scopes of the chosen profile. Revoke it at any time from the same settings page; keys minted by `cap auth login` are listed and revocable there too.
Follow least privilege here as well: prefer the `creator` profile and the shortest expiry that fits the job, and use your platform's secret storage (for example CI secrets) to inject the key. Do not paste keys into an agent conversation or commit them to a project.
## Codex
Preview exactly what Cap will change:
cap agents install --target codex --component all --dry-run --json
When using the copied setup prompt, the agent inspects the paths and values and immediately applies the authorized integration:
cap agents install --target codex --component all --yes --json
This installs the Cap skill and adds a local `cap mcp serve` entry to Codex's configuration. Restart Codex so it reloads the integration.
## Claude Code
cap agents install --target claude --component all --dry-run --json cap agents install --target claude --component all --yes --json
The copied setup prompt treats the preview as a conflict check and applies it without a second approval. Restart Claude Code after applying it.
## Cursor
cap agents install --target cursor --component all --dry-run --json cap agents install --target cursor --component all --yes --json
The copied setup prompt treats the preview as a conflict check and applies it without a second approval. Restart Cursor after applying it.
## OpenCode
OpenCode can use Cap immediately through its shell tools: paste the [agent prompt](/content/docs/agents#the-fastest-way-to-start/index.html) and let it call `cap guide --json`.
To use Cap as a local MCP server too, merge this entry into your `opencode.json` configuration:
```json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"cap": {
"type": "local",
"command": ["cap", "mcp", "serve"],
"enabled": true
}
}
}
Do not replace unrelated OpenCode settings. After merging the entry, restart OpenCode and check the server:
opencode mcp list
See OpenCode's local MCP documentation for configuration details.
Any other agent or MCP client
If the agent can run shell commands, no integration is required. Give it the copyable prompt.
For an MCP client that supports local stdio servers, configure:
{
"command": "cap",
"args": ["mcp", "serve"]
}
Keep cap mcp serve on stdio. Its stdout is reserved for MCP protocol messages.
Verify the full setup
Ask the agent to run these read-only checks:
cap version --json
cap guide --json
cap auth status --json
cap caps list --limit 1 --json
A correct setup has:
- valid JSON on stdout;
- a successful authenticated status before account-backed work;
- either a Cap result or an empty list from the library check, not a guessed answer;
- no secret value printed by
cap auth status; - no changes made during verification.
If MCP is installed, also ask the agent to list the available Cap tools. It should find read tools such as caps_list and caps_context. Passwords and storage credentials should not appear as MCP inputs.
Continue with Agent Workflows.