# Cargo AI agent builder skill

> Builds and deploys Cargo AI agents for sales and marketing work.

- **What it does:** Helps you create and manage Cargo AI agents for sales and marketing data: choosing the AI model, writing instructions, adding your docs for it to reference, and connecting tools. You end up with a deployed agent.
- **Agents:** Claude Code and Codex (through orbit-connect), Claude and ChatGPT (through the Orbit connector)
- **Install:** `npx -y --loglevel=error orbit-connect@0.3.33 install skl_295c3954ba41d31db371d61e`
- **Author:** getcargohq on GitHub (https://github.com/getcargohq/cargo-skills), MIT license, found on skills.sh (https://www.skills.sh/getcargohq/cargo-skills/cargo-ai)
- **Safety:** Checked by Orbit: use with care. Global npm install of unpinned @cargo-ai/cli@latest; requires account login
- **Last updated:** 2026-11-25
- **Page:** https://orbitinbox.app/s/cargo-ai-agent-builder

## Skill

The text getcargohq on GitHub published, as they wrote it:

---
name: cargo-ai
description: "Builds Cargo AI agents that work on GTM data: picks the model, writes the prompt, attaches docs for retrieval (RAG), connects MCP tools, manages memories, and deploys releases. Triggers: \"create an agent\", \"make an agent that\", \"give the agent our docs\", \"attach this knowledge base\", \"attach this library to the agent\", \"add resources to the agent release\", \"connect an MCP server\", \"expose our tools as an MCP server\", \"use Cargo from Claude Desktop or ChatGPT\", \"change the agent model\", \"what does the agent remember\", \"deploy the agent\", \"the agent is answering wrong\". Skip when: uploading the knowledge files themselves, use cargo-content; sending the agent a message or running it over records, use cargo-orchestration."
version: "3.0.0"
compatibility: Requires @cargo-ai/cli (npm). Sign in or create an account with `cargo-ai login --email` (emailed code, no browser), `--oauth`, or an API token
homepage: https://github.com/getcargohq/cargo-skills
metadata:
  author: getcargo
  openclaw:
    requires:
      bins:
        - cargo-ai
    install:
      - kind: node
        package: "@cargo-ai/cli@latest"
        bins:
          - cargo-ai
    homepage: https://github.com/getcargohq/cargo-skills
---

# Cargo CLI — AI

Agent resource management: creating and configuring agents, attaching knowledge for retrieval-augmented generation (RAG), connecting MCP servers, and managing agent memories.

> For *using* agents (sending messages, multi-turn chat, polling), use `cargo-orchestration`.
> For uploading knowledge **files** and building knowledge **libraries** (the `content` domain), use [`cargo-content`](../cargo-content/SKILL.md). This skill covers how that knowledge attaches to an agent.
> For workspace administration — folders (used to organize agents and files), users, API tokens, roles, and submitting reports when the CLI fails — use [`cargo-workspace-management`](../cargo-workspace-management/SKILL.md).

> See `references/response-shapes.md` for full JSON response structures.
> See `references/troubleshooting.md` for common errors and how to fix them.
> See `references/examples/agents.md` for agent CRUD and configuration examples.
> See `references/examples/mcp-servers.md` for MCP server creation and management examples.

## Bootstrap

Already signed in (`cargo-ai whoami` returns a workspace)? Skip to the next section.

```bash
npm install -g @cargo-ai/cli            # no global install? prefix every command with `npx @cargo-ai/cli`
cargo-ai login --email you@company.com  # emailed code, no browser; creates the account on first use
                                        # alternatives: --oauth (browser) · --token <api-token> (CI)
cargo-ai whoami                         # confirm the active workspace before any write
```

Every command prints JSON to stdout; failures exit non-zero with `{"errorMessage": "..."}`. Anything that creates a run or a batch is async — pass `--wait-until-finished` or poll the matching `get`. When the full skill bundle is installed, [`../cargo/references/prerequisites.md`](../cargo/references/prerequisites.md) adds the CLI version pin, token scopes, and the admin-only surface.

## Discover resources first

```bash
cargo-ai ai agent list                     # all agents (uuid, name, description)
cargo-ai ai template list                  # all AI agent templates (slug, name)
cargo-ai ai mcp-server list                # all MCP servers (uuid, name)
cargo-ai ai memory list --scope agent --agent-uuid <uuid>  # agent memories
# Knowledge files & libraries live in the content domain — see cargo-content:
#   cargo-ai content file list   /   cargo-ai content library list
```

**Retrieve in the UI:** agents live at `app.getcargo.io/workspaces/<WORKSPACE_UUID>/agents/<AGENT_UUID>`. Get `<WORKSPACE_UUID>` from `cargo-ai whoami` under `workspace.uuid`.

## Quick reference

```bash
cargo-ai ai agent list
cargo-ai ai agent get <agent-uuid>
cargo-ai ai agent create --name <name> --icon-color blue --icon-face 🤖
cargo-ai ai agent update --uuid <agent-uuid> --name <name>
cargo-ai ai agent remove <agent-uuid>
cargo-ai ai release list --agent-uuid <uuid>
cargo-ai ai release get <release-uuid>
cargo-ai ai release get-draft --agent-uuid <uuid>
cargo-ai ai release update-draft --agent-uuid <uuid> --language-model-slug gpt-4o
cargo-ai ai release deploy-draft --agent-uuid <uuid>
cargo-ai ai template list                  # full detail; there is no `template get`
cargo-ai ai mcp-server list
cargo-ai ai mcp-server get <mcp-server-uuid>
cargo-ai ai mcp-server create --name "Internal Tools"
cargo-ai ai mcp-server update --uuid <mcp-server-uuid> --name "Updated Name"
cargo-ai ai mcp-server remove <mcp-server-uuid>
cargo-ai ai mcp-client connect --name "My MCP" --url https://mcp.example.com/sse
cargo-ai mcp                               # serve the platform MCP over stdio
cargo-ai mcp --server <mcp-server-uuid>    # serve a curated workspace MCP server instead
cargo-ai ai memory list --scope agent --agent-uuid <uuid>
cargo-ai ai memory update --mem0-id <id> --scope agent --agent-uuid <uuid> --content "Updated memory"
cargo-ai ai memory remove --mem0-id <id> --scope agent --agent-uuid <uuid>
```

## Agents

Agents are AI resources with configured instructions, a language model, actions, and optional resources.

**Before creating an agent from scratch, check existing templates — they capture proven patterns for common use cases (lead research, classification, email drafting) and give you a ready-made system prompt, model, and temperature to start from:**

```bash
cargo-ai ai template list          # browse patterns — full detail, not a summary
# there is no `template get`: `list` already returns systemPrompt, temperature,
# languageModelSlug, actions and resources, so select the one you want
cargo-ai ai template list | jq '.templates[] | select(.slug == "<slug>")' 
```

```bash
# List all agents
cargo-ai ai agent list

# Get a single agent (includes deployed release details)
cargo-ai ai agent get <agent-uuid>

# Create an agent
cargo-ai ai agent create \
  --name "Lead Researcher" \
  --icon-color blue --icon-face 🤖 \
  --description "Researches leads and enriches data"

# Update an agent
cargo-ai ai agent update --uuid <agent-uuid> \
  --name "Senior Lead Researcher" \
  --description "Updated description"

# Move to a folder (find folder UUIDs via cargo-workspace-management)
cargo-ai ai agent update --uuid <agent-uuid> --folder-uuid <folder-uuid>

# Remove an agent
cargo-ai ai agent remove <agent-uuid>
```

**Agent icon:** `--icon-color` must be one of: `grey`, `green`, `purple`, `yellow`, `blue`, `red`. `--icon-face` is an emoji string.

**Folders:** Folder creation, listing, and management lives in [`cargo-workspace-management`](../cargo-workspace-management/SKILL.md) (`cargo-ai workspaceManagement folder list/create/...`). Use that skill to discover or create the `<folder-uuid>` you pass to `--folder-uuid` here.

## Releases

Releases are versioned snapshots of an agent's configuration (system prompt, actions, resources, model, temperature). Agents execute against their deployed release.

```bash
# List releases for an agent
cargo-ai ai release list --agent-uuid <uuid>

# Get a specific release
cargo-ai ai release get <release-uuid>

# Get the current draft release (editable)
cargo-ai ai release get-draft --agent-uuid <uuid>

# Update the draft release
cargo-ai ai release update-draft --agent-uuid <uuid> \
  --system-prompt "You are a lead research assistant..." \
  --language-model-slug gpt-4o \
  --temperature 0.3 \
  --max-steps 10

# Deploy the draft release (makes it live)
cargo-ai ai release deploy-draft --agent-uuid <uuid> \
  --integration-slug openAi \
  --language-model-slug gpt-4o \
  --actions '[]' \
  --mcp-clients '[]' \
  --resources '[]' \
  --capabilities '[]' \
  --suggested-actions '[]' \
  --description "Added research actions"
```

`--with-reasoning [true|false]` on `update-draft` / `deploy-draft` turns reasoning mode on (bare flag = `true`) for models that support it.

### Coding agents (`--harness-slug`, `--state-uuid`)

A release with a **harness** runs as a coding agent: each turn works in a sandbox with a git checkout instead of a plain chat loop. Harness slugs: `claudeCode`, `codex`, `openCode`, `deepAgents`.

```bash
cargo-ai ai release deploy-draft --agent-uuid <uuid> \
  --harness-slug claudeCode --integration-slug anthropic --language-model-slug <model-slug> \
  --state-uuid <state-uuid> \
  --actions '[]' --mcp-clients '[]' --resources '[]' --capabilities '[]' --suggested-actions '[]'
```

- **`--state-uuid`**: the **project** (a deploy state of the workspace) the harness clones. The state carries the repository, its directory and its production branch, and must be **connected**. The uuid is not checked when written: a state that is missing, disconnected or from another workspace is saved, then refused at every turn, so pass a connected one. Omitted, the agent is **unbound**: an empty sandbox. List the workspace's states with `cargo-ai project state list` (a project's own is the `stateUuid` in its `cargo.state.json`).
- **`--env-vars`** (JSON array): `[{key, type:"public", value}]` or `{key, type:"secret", secretValue}`, on top of the workspace's env-var catalog, which the sandbox inherits. Applies only with a project: an unbound agent gets no env vars.
- **`--run-as-user-uuid`**: a **service user** whose temporary `CARGO_API_TOKEN` the sandbox gets (see [`../cargo-workspace-management/SKILL.md`](../cargo-workspace-management/SKILL.md) → "Service users"; your permissions must cover it or the call fails 403 `runAsUserNotFound` / `runAsUserNotPermitted`). Applies bound or unbound.
- **`--repository` is gone (CLI 1.0.154).** It took `{connectorUuid, repository, defaultBranch, rootDirectory, env, runAsUserUuid}`; a client that still sends `repository` gets a 400 (`ai release`: `repository is no longer accepted: upgrade @cargo-ai/cdk to 1.0.150 or later and set state, env and runAs on the agent.`; `ai chat` / `ai message`: `Unrecognized key: "repository"`). The branch is now the state's production branch, not a `defaultBranch` you name. On `update-draft` / `deploy-draft`, an omitted flag keeps the draft's value; the API also takes `null` to clear `stateUuid`, `envVars` or `runAsUserUuid`.
- **The agent acts as the Cargo GitHub app**, never as the connected user: it clones, pushes, comments and opens PRs as the app's installation. **Install the app on the repo first** — without it the turn fails. The sandbox's GitHub token is scoped to that one repository — any other repository is refused — lasts 1 hour, and is refreshed each turn; it is redacted from chat output but readable by the agent.
- It works on a branch `cargo/<short-name>`, never pushes to the default branch, never force-pushes, and opens or updates the PR through its own PR tool, which links the PR to the chat.
- **A mention of the app on a PR the agent's chat opened continues that same chat** — no trigger needed (skipped if the chat's project is no longer connected to that repository, or another agent opened the PR). Close the chat to stop it. The GitHub trigger adds `allPullRequests` (answer mentions on any PR in the repo), `fixFailedChecks` (+ `maxCheckFixAttempts` 1–10, reset when someone mentions or reviews) and `addressReviews`, all default `false`.

**Per chat instead of per release.** `ai chat create` and `ai message create` (for the chat it auto-creates) take `--harness-slug`, `--state-uuid`, `--env-vars` and `--run-as-user-uuid`. Each one overrides the release's value **separately**: a chat that sets only `--state-uuid` keeps the release's env vars and run-as user. They are **set when the chat is created**: passing any of them with `--chat-uuid` is a 400 — `harnessSlug, stateUuid, envVars and runAsUserUuid are not allowed with chatUuid: they are set when the chat is created. Create a new chat to use another harness or project.`

A message sent to a chat that is still answering is **queued**: `202` with `userMessage` and no assistant message yet; the reply follows once the turn ahead finishes (`chatClosed` → 409, `chatNotFound` → 404). Sending and polling: [`../cargo-orchestration/SKILL.md`](../cargo-orchestration/SKILL.md). In a project: `defineAgent({ harness, state, env, runAs })` — [`../cargo-project/references/resources.md`](../cargo-project/references/resources.md).

### Structured output & heartbeat — not yet exposed as CLI flags

The release API payload (both `draft/update` and `draft/deploy`) accepts two fields that **`release update-draft` / `release deploy-draft` do not surface as flags** (verified against the CLI source — there is no `--output` / `--output-schema` or `--heartbeat`):

| Field | Shape | Purpose |
|---|---|---|
| `output` | `{"type":"text"}` **or** `{"type":"jsonSchema","jsonSchema": <standard JSON Schema object>}` | Force the agent to return structured output matching a JSON Schema. |
| `heartbeat` | `{"intervalMinutes": number, "maxMessages": number, "prompt": string \| null}` | Periodically re-wake the chat (`intervalMinutes`) until it reaches `maxMessages`; `prompt` is the wake message (null = generic "continue"). |

The generic `--options` flag does **not** carry these — the API's `options` only holds `{connectorUuidsByIntegrationSlug, modelUuidsByIntegrationSlug}`. Until the flags ship, set these with a direct API call against the same endpoints the CLI uses:

```bash
# Structured (JSON Schema) output on the draft release
curl -sS -X PUT "$CARGO_BASE_URL/v1/ai/releases/draft/update" \
  -H "Authorization: Bearer $CARGO_API_TOKEN" -H "Content-Type: application/json" \
  -d '{"agentUuid":"<uuid>","output":{"type":"jsonSchema","jsonSchema":{"type":"object","properties":{"score":{"type":"number"}},"required":["score"]}}}'
# Deploy carries the same fields — POST .../v1/ai/releases/draft/deploy
```

`draft/update` is a partial update: fields you omit keep their current draft values. `draft/deploy` requires `actions`, `mcpClients`, `resources`, `capabilities` and `suggestedActions` in the body. **File a `workspaceManagement report`** (see [`../cargo-workspace-management/SKILL.md`](../cargo-workspace-management/SKILL.md)) to request first-class `--output` / `--heartbeat` flags — this is the documented feedback channel for CLI/UI parity gaps.

**Agent configuration workflow:**

1. **Browse templates for inspiration**: `cargo-ai ai template list` — it returns each template in full (system prompt, model, temperature, actions), so pick the one closest to your use case straight out of that response
2. Create the agent: `cargo-ai ai agent create --name "..." --icon-color blue --icon-face 🤖`
3. Get the draft release: `cargo-ai ai release get-draft --agent-uuid <uuid>`
4. Update the draft with configured actions, resources, prompt, model: `cargo-ai ai release update-draft --agent-uuid <uuid> ...`
5. Deploy: `cargo-ai ai release deploy-draft --agent-uuid <uuid> ...`

## Templates

Templates are pre-built agent configurations that capture proven patterns for common use cases. **Always check templates before designing an agent from scratch** — they give you a ready-made system prompt, recommended language model, temperature, and tool configuration that you can adopt as-is or adapt.

```bash
# List available agent templates — each entry is complete, so this is the only
# call you need. There is no `template get` subcommand.
cargo-ai ai template list

# Inspect one by slug: filter the same response
cargo-ai ai template list | jq '.templates[] | select(.slug == "<slug>")' 
```

Templates include a system prompt, actions, resources, and recommended model settings. Use them as a starting point and customize via `release update-draft`. See `references/examples/templates.md` for the full guide including an end-to-end example of creating an agent from a template.

## Model and temperature guidance

| Use case | Recommended model | Temperature |
|---|---|---|
| Classification, extraction, scoring | `gpt-6-luna` or `gpt-4o-mini` | `0.0` – `0.2` |
| Research, summarization, analysis | `gpt-6-sol` or `claude-sonnet-5` | `0.2` – `0.5` |
| Copywriting, personalization | `claude-sonnet-5` or `gpt-6-sol` | `0.5` – `0.8` |
| Brainstorming, hardest reasoning | `claude-opus-5-5` or `gpt-6-astra` (`claude-fable-5-1` at the top end) | `0.7` – `1.0` |

The slug must be on the connector's **live** list: `release update-draft` and `deploy-draft` fail with `languageModelNotFound` otherwise (checked whenever the release has a connector — the draft's default is the OpenAI one, so an Anthropic slug needs `--integration-slug anthropic --connector-uuid <uuid>` alongside it). List what a connector offers, with each model's credits per 1,000 tokens and `isReasoning`, for free:

```bash
cargo-ai connection connector get-language-models <connector-uuid>
```

Price spans three orders of magnitude (`gpt-6-luna` 0.003 / 1k tokens, `claude-sonnet-5` 0.2, `claude-opus-5-5` 1.6, `claude-fable-5-1` 4), so read it before picking a model for a high-volume agent. `claude-3-5-sonnet-latest` is marked deprecated in Cargo's Anthropic model list — move agents off it.

Low temperature (`0.0`–`0.2`) = deterministic, consistent outputs. High temperature (`0.7`+) = creative, varied outputs. For production workflows processing thousands of records, prefer low temperature.

## Knowledge for RAG (files & libraries)

Knowledge that grounds agent responses (retrieval-augmented generation, RAG) comes from the **`content`** domain — see [`cargo-content`](../cargo-content/SKILL.md):

- **Files** — uploaded binaries (PDFs, CSVs, text).
- **Libraries** — collections that group files, either `native` (workspace-managed) or `connector`-backed (synced from an external source via an unstructured-data extractor).

> Files and libraries moved out of `ai` into the top-level **`content`** domain in CLI ≥ 1.0.19 (`cargo-ai content file …` / `cargo-ai content library …`). The old `ai file …` commands are gone. Everything content-related now lives in [`cargo-content`](../cargo-content/SKILL.md).

### Attaching knowledge to an agent

A file or library is inert until attached to an agent via the draft release's `resources` array and deployed. Upload files / build libraries in [`cargo-content`](../cargo-content/SKILL.md), then wire them in here with `release update-draft --resources …` followed by `release deploy-draft`. See [`../cargo-content/references/examples/files.md`](../cargo-content/references/examples/files.md) for the full upload → attach → deploy sequence.

**Only indexed files are searchable.** A file stored with `indexMode: "none"` — the default for `content file put`, workers, the `writeFile` node and agent writes — can be listed and read but not searched: `capability_file_list` marks it `isSearchable: false`, `capability_file_search` skips it, and `capability_file_analyze` refuses it. Attach `upload`-ed files (indexed by default) for RAG, or re-write the file with `--index vectorStore`.

### Letting an agent write files

A file resource with `"isReadOnly": false` also grants **`capability_file_write`** on the **folders** it lists (`{"kind":"folder","folderUuid":"…"}` items; listed files stay read-only). Unset means read-only.

```bash
cargo-ai ai release update-draft --agent-uuid <agent-uuid> \
  --resources '[{"kind":"file","slug":"outputs","name":"Outputs","description":null,"prompt":"Save each report here.","isReadOnly":false,"items":[{"kind":"folder","folderUuid":"<folder-uuid>"}]}]'
```

- The agent writes text it produced, **≤ 1,000,000 characters**, to a relative path inside one of those folders (subfolders are created) — nowhere else in the workspace. With several writable folders it must name one.
- Every agent write is stored `private`, `indexMode: none` and `mirrorToContext: false`, even when it overwrites a file someone made public. It returns `{ fileUuid, path, size, url }`, where `url` is a 1-hour s

---

## License

getcargohq/cargo-skills is by getcargohq, used under the MIT license. The license file: https://github.com/getcargohq/cargo-skills/blob/main/LICENSE

```text
MIT License

Copyright (c) 2026 Cargo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

By getcargohq on GitHub (getcargohq/cargo-skills, MIT license), found on skills.sh, credited on Orbit.