{"id":17891,"plugin_id":"plugins_6a7d29277df08191a68f23401570b188","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:14:27.195Z","digest":"45b8a1e2add21c17880ab059cc50e4f0e659c43b41b3bd9c98bc9a9024fadcf1","against":null,"payload":{"name":"cargo-ai","description":"Build and configure AI agents inside Cargo — create an agent, choose its model and temperature, write its prompt, attach knowledge for retrieval (RAG), connect MCP tool servers, manage memories, and deploy 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.","included_files":[{"relative_path":"references/examples/agents.md","size_in_bytes":3288},{"relative_path":"references/examples/mcp-servers.md","size_in_bytes":2099},{"relative_path":"references/examples/templates.md","size_in_bytes":4741},{"relative_path":"references/response-shapes.md","size_in_bytes":7401},{"relative_path":"references/troubleshooting.md","size_in_bytes":3908},{"relative_path":"skill-metadata.json","size_in_bytes":1020}],"skill_md_contents":"---\nname: cargo-ai\ndescription: \"Build and configure AI agents inside Cargo — create an agent, choose its model and temperature, write its prompt, attach knowledge for retrieval (RAG), connect MCP tool servers, manage memories, and deploy 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.\"\nversion: \"2.3.0\"\ncompatibility: 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\nhomepage: https://github.com/getcargohq/cargo-skills\n---\n\n# Cargo CLI — AI\n\nAgent resource management: creating and configuring agents, attaching knowledge for retrieval-augmented generation (RAG), connecting MCP servers, and managing agent memories.\n\n> For *using* agents (sending messages, multi-turn chat, polling), use `cargo-orchestration`.\n> 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.\n> 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).\n\n> See `references/response-shapes.md` for full JSON response structures.\n> See `references/troubleshooting.md` for common errors and how to fix them.\n> See `references/examples/agents.md` for agent CRUD and configuration examples.\n> See `references/examples/mcp-servers.md` for MCP server creation and management examples.\n\n## Bootstrap\n\nAlready signed in (`cargo-ai whoami` returns a workspace)? Skip to the next section.\n\n```bash\nnpm install -g @cargo-ai/cli            # no global install? prefix every command with `npx @cargo-ai/cli`\ncargo-ai login --email you@company.com  # emailed code, no browser; creates the account on first use\n                                        # alternatives: --oauth (browser) · --token <api-token> (CI)\ncargo-ai whoami                         # confirm the active workspace before any write\n```\n\nEvery 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.\n\n## Discover resources first\n\n```bash\ncargo-ai ai agent list                     # all agents (uuid, name, description)\ncargo-ai ai template list                  # all AI agent templates (slug, name)\ncargo-ai ai mcp-server list                # all MCP servers (uuid, name)\ncargo-ai ai memory list --scope agent --agent-uuid <uuid>  # agent memories\n# Knowledge files & libraries live in the content domain — see cargo-content:\n#   cargo-ai content file list   /   cargo-ai content library list\n```\n\n**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`.\n\n## Quick reference\n\n```bash\ncargo-ai ai agent list\ncargo-ai ai agent get <agent-uuid>\ncargo-ai ai agent create --name <name> --icon-color blue --icon-face 🤖\ncargo-ai ai agent update --uuid <agent-uuid> --name <name>\ncargo-ai ai agent remove <agent-uuid>\ncargo-ai ai release list --agent-uuid <uuid>\ncargo-ai ai release get <release-uuid>\ncargo-ai ai release get-draft --agent-uuid <uuid>\ncargo-ai ai release update-draft --agent-uuid <uuid> --language-model-slug gpt-4o\ncargo-ai ai release deploy-draft --agent-uuid <uuid>\ncargo-ai ai template list\ncargo-ai ai template get <slug>\ncargo-ai ai mcp-server list\ncargo-ai ai mcp-server create --name \"Internal Tools\"\ncargo-ai ai mcp-server update --uuid <mcp-server-uuid> --name \"Updated Name\"\ncargo-ai ai mcp-server remove <mcp-server-uuid>\ncargo-ai ai mcp-client connect --name \"My MCP\" --url https://mcp.example.com/sse\ncargo-ai mcp                               # serve the platform MCP over stdio\ncargo-ai mcp --server <mcp-server-uuid>    # serve a curated workspace MCP server instead\ncargo-ai ai memory list --scope agent --agent-uuid <uuid>\ncargo-ai ai memory update --mem0-id <id> --scope agent --agent-uuid <uuid> --content \"Updated memory\"\ncargo-ai ai memory remove --mem0-id <id> --scope agent --agent-uuid <uuid>\n```\n\n## Agents\n\nAgents are AI resources with configured instructions, a language model, actions, and optional resources.\n\n**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:**\n\n```bash\ncargo-ai ai template list          # browse available patterns\ncargo-ai ai template get <slug>    # inspect system prompt, model, and actions\n```\n\n```bash\n# List all agents\ncargo-ai ai agent list\n\n# Get a single agent (includes deployed release details)\ncargo-ai ai agent get <agent-uuid>\n\n# Create an agent\ncargo-ai ai agent create \\\n  --name \"Lead Researcher\" \\\n  --icon-color blue --icon-face 🤖 \\\n  --description \"Researches leads and enriches data\"\n\n# Update an agent\ncargo-ai ai agent update --uuid <agent-uuid> \\\n  --name \"Senior Lead Researcher\" \\\n  --description \"Updated description\"\n\n# Move to a folder (find folder UUIDs via cargo-workspace-management)\ncargo-ai ai agent update --uuid <agent-uuid> --folder-uuid <folder-uuid>\n\n# Remove an agent\ncargo-ai ai agent remove <agent-uuid>\n```\n\n**Agent icon:** `--icon-color` must be one of: `grey`, `green`, `purple`, `yellow`, `blue`, `red`. `--icon-face` is an emoji string.\n\n**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.\n\n## Releases\n\nReleases are versioned snapshots of an agent's configuration (system prompt, actions, resources, model, temperature). Agents execute against their deployed release.\n\n```bash\n# List releases for an agent\ncargo-ai ai release list --agent-uuid <uuid>\n\n# Get a specific release\ncargo-ai ai release get <release-uuid>\n\n# Get the current draft release (editable)\ncargo-ai ai release get-draft --agent-uuid <uuid>\n\n# Update the draft release\ncargo-ai ai release update-draft --agent-uuid <uuid> \\\n  --system-prompt \"You are a lead research assistant...\" \\\n  --language-model-slug gpt-4o \\\n  --temperature 0.3 \\\n  --max-steps 10\n\n# Deploy the draft release (makes it live)\ncargo-ai ai release deploy-draft --agent-uuid <uuid> \\\n  --integration-slug openai \\\n  --language-model-slug gpt-4o \\\n  --actions '[]' \\\n  --mcp-clients '[]' \\\n  --resources '[]' \\\n  --capabilities '[]' \\\n  --suggested-actions '[]' \\\n  --description \"Added research actions\"\n```\n\n### Structured output & heartbeat — not yet exposed as CLI flags\n\nThe 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`):\n\n| Field | Shape | Purpose |\n|---|---|---|\n| `output` | `{\"type\":\"text\"}` **or** `{\"type\":\"jsonSchema\",\"jsonSchema\": <standard JSON Schema object>}` | Force the agent to return structured output matching a JSON Schema. |\n| `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\"). |\n\nThe 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:\n\n```bash\n# Structured (JSON Schema) output on the draft release\ncurl -sS -X PUT \"$CARGO_API_BASE/v1/ai/releases/draft/update\" \\\n  -H \"Authorization: Bearer $CARGO_TOKEN\" -H \"Content-Type: application/json\" \\\n  -d '{\"agentUuid\":\"<uuid>\",\"output\":{\"type\":\"jsonSchema\",\"jsonSchema\":{\"type\":\"object\",\"properties\":{\"score\":{\"type\":\"number\"}},\"required\":[\"score\"]}}}'\n# Deploy carries the same fields — POST .../v1/ai/releases/draft/deploy\n```\n\nSend these payloads alongside the other fields you're updating (the endpoint replaces the draft config). **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.\n\n**Agent configuration workflow:**\n\n1. **Browse templates for inspiration**: `cargo-ai ai template list` — find a template close to your use case, then `cargo-ai ai template get <slug>` to see its system prompt, model, and temperature\n2. Create the agent: `cargo-ai ai agent create --name \"...\" --icon-color blue --icon-face 🤖`\n3. Get the draft release: `cargo-ai ai release get-draft --agent-uuid <uuid>`\n4. Update the draft with configured actions, resources, prompt, model: `cargo-ai ai release update-draft --agent-uuid <uuid> ...`\n5. Deploy: `cargo-ai ai release deploy-draft --agent-uuid <uuid> ...`\n\n## Templates\n\nTemplates 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.\n\n```bash\n# List available agent templates\ncargo-ai ai template list\n\n# Get a template by slug — inspect its system prompt, model, and settings\ncargo-ai ai template get <slug>\n```\n\nTemplates 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.\n\n## Model and temperature guidance\n\n| Use case | Recommended model | Temperature |\n|---|---|---|\n| Classification, extraction, scoring | `gpt-4o-mini` or `claude-3-5-haiku` | `0.0` – `0.2` |\n| Research, summarization, analysis | `gpt-4o` or `claude-3-5-sonnet` | `0.2` – `0.5` |\n| Copywriting, personalization | `gpt-4o` or `claude-3-5-sonnet` | `0.5` – `0.8` |\n| Brainstorming, creative ideation | `gpt-4o` or `claude-opus` | `0.7` – `1.0` |\n\nLow 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.\n\n## Knowledge for RAG (files & libraries)\n\nKnowledge that grounds agent responses (retrieval-augmented generation, RAG) comes from the **`content`** domain — see [`cargo-content`](../cargo-content/SKILL.md):\n\n- **Files** — uploaded binaries (PDFs, CSVs, text).\n- **Libraries** — collections that group files, either `native` (workspace-managed) or `connector`-backed (synced from an external source via an unstructured-data extractor).\n\n> 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).\n\n### Attaching knowledge to an agent\n\nA 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.\n\n## MCP — two directions, don't mix them up\n\nMCP (Model Context Protocol) runs both ways in Cargo, and the two surfaces are unrelated:\n\n| | **Publish** — `ai mcp-server` | **Consume** — `ai mcp-client` |\n|---|---|---|\n| What it is | A server **your workspace exposes**: the tools, agents, and data you choose to make callable | A connection **to someone else's** MCP server |\n| Who calls it | Any MCP client — Claude Code, Claude Desktop, Cursor, ChatGPT | Your Cargo agents, during a chat or a workflow run |\n| Wired via | `cargo-ai mcp --server <uuid>` (stdio bridge, below) | `release update-draft --mcp-clients …` |\n\n**Before building one, check whether the platform MCP already covers it.** Cargo now serves a first-party MCP at `https://mcp.getcargo.io/mcp` — every workspace member, nothing to deploy — with a small fixed toolset for operating the workspace (`whoami`, `get_usage`, `search_actions`, `get_action_schema`, `autocomplete_action`, `execute_action`, `execute_action_batch`, `get_run`, `get_batch`, `list_runs`, `list_models`, `describe_model`, `query_models`). Hosted clients (ChatGPT connectors, Claude.ai, Cursor over HTTP) point at that URL and sign in with OAuth; the consent screen picks the workspace when the user belongs to several. `ai mcp-server` is for the other job: a **curated, named** subset — this tool, that agent, this filtered model — for a client that should see exactly that and nothing else.\n\n### Publishing a workspace MCP server\n\n```bash\ncargo-ai ai mcp-server list\ncargo-ai ai mcp-server create --name \"CRM tools\" \\\n  --actions '[{\"slug\":\"<tool-uuid>\",\"kind\":\"tool\",\"name\":null,\"description\":null,\"isBulkAllowed\":false,\"config\":{}}]' \\\n  --resources '[{\"kind\":\"model\",\"slug\":\"<slug>\",\"name\":\"Accounts\",\"description\":null,\"integrationSlug\":\"hubspot\",\"modelUuid\":null,\"filter\":null,\"selectedColumnSlugs\":null,\"limit\":null,\"prompt\":null,\"isReadOnly\":true}]'\ncargo-ai ai mcp-server update --uuid <mcp-server-uuid> --name \"Updated name\"\ncargo-ai ai mcp-server remove <mcp-server-uuid>\n```\n\n- **Actions** take `kind: \"tool\"` **or** `kind: \"agent\"` — an agent can be exposed as a callable MCP tool, not just a tool. `waitUntilFinished` controls whether the call blocks on the run.\n- **Resources** take `kind: \"model\"` (a filtered, column-selected view of a model — keep `isReadOnly: true` unless the client is meant to write) or `kind: \"file\"` (workspace files by UUID, see [`../cargo-content/SKILL.md`](../cargo-content/SKILL.md)).\n- `update` replaces `--actions` / `--resources` wholesale rather than merging — read the current server with `mcp-server list` and pass the full array back.\n\n### Serving it to a coding agent — `cargo-ai mcp`\n\nEither server reaches any stdio MCP client through the CLI, using the credentials already on the machine. **No token is copied into client config.**\n\n```bash\nclaude mcp add cargo -- cargo-ai mcp                     # the platform MCP (no setup)\ncargo-ai ai mcp-server list                              # find a curated server's UUID\nclaude mcp add cargo -- cargo-ai mcp --server <uuid>     # that curated server instead\n# Cursor, Windsurf, and other stdio clients: same command as the server entry\n```\n\nWith no `--server`, the bridge uses `CARGO_MCP_SERVER_UUID` when set, otherwise the platform `/mcp`. **This changed:** older CLIs resolved \"the workspace's only MCP server\" and failed with `InvalidUsage` when the workspace had none or several — a bare `cargo-ai mcp` now always has something to serve. stdout carries the MCP protocol and all logs go to stderr, so never print anything to stdout around it.\n\n**When to reach for this instead of the skills:** the skills give an agent the whole CLI; an MCP surface gives it a bounded set with no shell. Use the bridge for in-conversation lookups and one-off actions, and the CLI for batches, workflows, schema changes, and anything with a cost gate. Full routing rule: [`../cargo/SKILL.md`](../cargo/SKILL.md) → \"These skills vs Cargo's MCP surfaces\".\n\n### Consuming an external MCP server\n\n```bash\ncargo-ai ai mcp-client connect --name \"My MCP\" --url https://mcp.example.com/sse\ncargo-ai ai mcp-client connect --name \"My MCP\" --url https://mcp.example.com/sse \\\n  --disabled-tool-slugs \"dangerous_tool,other_tool\"\n```\n\n`--authentication` takes `{\"issuedAt\": \"...\", \"accessToken\": \"...\"}` or `\"null\"`. Connected clients are attached to an agent through its release: `release update-draft --mcp-clients …`, then `release deploy-draft`.\n\n## Memories\n\nMemories are pieces of information an agent stores from conversations for future reference. They can be scoped to a workspace, user, or specific agent.\n\n```bash\n# List agent memories\ncargo-ai ai memory list --scope agent --agent-uuid <uuid>\n\n# List workspace-wide memories\ncargo-ai ai memory list --scope workspace\n\n# List user-scoped memories\ncargo-ai ai memory list --scope user\n\n# Update a memory\ncargo-ai ai memory update \\\n  --mem0-id <id> \\\n  --scope agent --agent-uuid <uuid> \\\n  --content \"Updated memory content\"\n\n# Remove a memory\ncargo-ai ai memory remove \\\n  --mem0-id <id> \\\n  --scope agent --agent-uuid <uuid>\n```\n\n## Help\n\nEvery command supports `--help`:\n\n```bash\ncargo-ai ai agent create --help\ncargo-ai ai release update-draft --help\ncargo-ai ai mcp-server create --help\ncargo-ai ai memory list --help\n```\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}