跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 cargo-ai

Cargo Ai

在"货物"内部构建并配置AI代理——创建代理,选择其模型和温度,写出其快取,附加知识进行检索(RAG),连接MCP工具服务器,管理记忆,并部署发布. 触发器 :\"创建代理\",\"制造代理\","将代理我们docs\","将这个知识库\","将这个库连接到代理\",\"将资源添加到代理释放\","连接一个MCP服务器\","将我们的工具作为MCP服务器\","使用来自克洛德桌面或ChatGPT\","改变代理模型\","代理记忆\","调用代理\","代理回答错误". 跳过时:上传知识文件本身——使用货物内容;发送消息或运行在记录上——使用货物操作.

10693 安装量

官方网址:作者主页

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

在"货物"内部构建并配置AI代理——创建代理,选择其模型和温度,写出其快取,附加知识进行检索(RAG),连接MCP工具服务器,管理记忆,并部署发布. 触发器 :\"创建代理\",\"制造代理\","将代理我们docs\","将这个知识库\","将这个库连接到代理\",\"将资源添加到代理释放\","连接一个MCP服务器\","将我们的工具作为MCP服务器\","使用来自克洛德桌面或ChatGPT\","改变代理模型\","代理记忆\","调用代理\","代理回答错误". 跳过时:上传知识文件本身——使用货物内容;发送消息或运行在记录上——使用货物操作.

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Cargo CLI — AI、Bootstrap、Discover resources first、Knowledge files & libraries live in the content domain — see cargo-content:、cargo-ai content file list / cargo-ai content library list、Quick reference。 其中含规范建议的小节:边界情况。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/response-shapes.md、references/troubleshooting.md、references/examples/agents.md、references/examples/mcp-servers.md、references/prerequisites.md、references/resources.md,属于带资源的技能包,这些文件按需再读。

官方 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.

Cargo CLI — AIBootstrapDiscover resources firstKnowledge files & libraries live in the content domain — see cargo-content:cargo-ai content file list / cargo-ai content library listQuick referenceAgentsthere is no `template get`: `list` already returns systemPrompt, temperature,languageModelSlug, actions and resources, so select the one you wantList all agentsGet a single agent (includes deployed release details)Create an agent

兼容: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

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
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.
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
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 8
  • references/response-shapes.md
  • references/troubleshooting.md
  • references/examples/agents.md
  • references/examples/mcp-servers.md
  • references/prerequisites.md
  • references/resources.md
  • references/examples/templates.md
  • references/examples/files.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「cargo-ai」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-1e9095274713aa71-Cargo-Ai.html
请存为 .cursor/skills/cargo-ai/SKILL.md 或 .claude/skills/cargo-ai/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/getcargohq/cargo-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/getcargohq/cargo-skills' --list

npx skills add 'https://github.com/getcargohq/cargo-skills' --skill 'cargo-ai'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- 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." version: "2.8.1" 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 [email protected] # emailed code, no browser; creates the account on first use # alternatives: --oauth (browser) · --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 # 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//agents/`. Get `` from `cargo-ai whoami` under `workspace.uuid`. ## Quick reference ```bash cargo-ai ai agent list cargo-ai ai agent get cargo-ai ai agent create --name --icon-color blue --icon-face 🤖 cargo-ai ai agent update --uuid --name cargo-ai ai agent remove cargo-ai ai release list --agent-uuid cargo-ai ai release get cargo-ai ai release get-draft --agent-uuid cargo-ai ai release update-draft --agent-uuid --language-model-slug gpt-4o cargo-ai ai release deploy-draft --agent-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 cargo-ai ai mcp-server create --name "Internal Tools" cargo-ai ai mcp-server update --uuid --name "Updated Name" cargo-ai ai mcp-server remove 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 # serve a curated workspace MCP server instead cargo-ai ai memory list --scope agent --agent-uuid cargo-ai ai memory update --mem0-id --scope agent --agent-uuid --content "Updated memory" cargo-ai ai memory remove --mem0-id --scope agent --agent-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 == "")' ``` ```bash # List all agents cargo-ai ai agent list # Get a single agent (includes deployed release details) cargo-ai ai agent get # 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 \ --name "Senior Lead Researcher" \ --description "Updated description" # Move to a folder (find folder UUIDs via cargo-workspace-management) cargo-ai ai agent update --uuid --folder-uuid # Remove an agent cargo-ai ai agent remove ``` **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 `` 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 # Get a specific release cargo-ai ai release get # Get the current draft release (editable) cargo-ai ai release get-draft --agent-uuid # Update the draft release cargo-ai ai release update-draft --agent-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 \ --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`, `--repository`) 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 \ --harness-slug claudeCode --integration-slug anthropic --language-model-slug \ --repository '{"connectorUuid":"","repository":"acme/app","defaultBranch":"main","rootDirectory":null}' \ --actions '[]' --mcp-clients '[]' --resources '[]' --capabilities '[]' --suggested-actions '[]' ``` - **`--repository`** (JSON): `connectorUuid` (a GitHub connector — it identifies the user, it is not the identity the agent acts as), `repository` as `owner/name`, `defaultBranch`, `rootDirectory`, `env` (`[{key, type:"public", value}]` or `{key, type:"secret", secretValue}`), and `runAsUserUuid` — a **service user** whose temporary `CARGO_API_TOKEN` the sandbox gets (the help omits it; 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`). - **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/`, 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 moved to another 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 --harness-slug … --repository …` and `ai message create` (for the chat it auto-creates) take the same two flags; omitted, the agent's pinned release decides. They are **set when the chat is created**: passing either with `--chat-uuid` is a 400 — `harnessSlug and repository are not allowed with chatUuid: they are set when the chat is created. Create a new chat to use another harness or repository.` 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, repository })` — [`../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": }` | 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":"","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 ` 4. Update the draft with configured actions, resources, prompt, model: `cargo-ai ai release update-draft --agent-uuid ...` 5. Deploy: `cargo-ai ai release deploy-draft --agent-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 == "")' ``` 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 ` 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 ``` 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 \ --resources '[{"kind":"file","slug":"outputs","name":"Outputs","description":null,"prompt":"Save each report here.","isReadOnly":false,"items":[{"kind":"folder","folderUuid":""}]}]' ``` - 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 signed link anyone holding it can open. - A write **overwrites** the newest file of that name in that folder in place. Give the agent a dedicated output folder rather than one holding knowledge it reads. - In a project: `defineAgent({ files: [{ items: [folder], readOnly: false }] })` — see [`../cargo-project/references/resources.md`](../cargo-project/references/resources.md). ## MCP — two directions, don't mix them up MCP (Model Context Protocol) runs both ways in Cargo, and the two surfaces are unrelated: | | **Publish** — `ai mcp-server` | **Consume** — `ai mcp-client` | |---|---|---| | 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 | | Who calls it | Any MCP client — Claude Code, Claude Desktop, Cursor, ChatGPT | Your Cargo agents, during a chat or a workflow run | | Wired via | `cargo-ai mcp --server ` (stdio bridge, below) | `release update-draft --mcp-clients …` | **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`, plus the read-only context tools `map_context`, `search_context`, `browse_context`, `read_context`). 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. ### Publishing a workspace MCP server ```bash cargo-ai ai mcp-server list cargo-ai ai mcp-server create --name "CRM tools" \ --actions '[{"slug":"","kind":"tool","toolUuid":"","templateSlug":null,"waitUntilFinished":true,"name":null,"description":null,"isBulkAllowed":false,"config":{}}]' \ --resources '[{"kind":"model","slug":"","name":"Accounts","description":null,"integrationSlug":"hubspot","modelUuid":null,"filter":null,"selectedColumnSlugs":null,"limit":null,"prompt":null,"isReadOnly":true}]' cargo-ai ai mcp-server update --uuid --name "Updated name" cargo-ai ai mcp-server remove ``` - **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. - **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)). - **Capabilities** (`--capabilities`, CLI ≥ 1.0.86) expose Cargo's own built-in tools on the server, alongside your actions and resources. JSON array of `{slug, config}`: ```bash cargo-ai ai mcp-server create --name "Research" \ --capabilities '[{"slug":"webSearch","config":{}}]' ``` The eleven slugs are `sandbox`, `memory`, `context`, `app`, `document`, `webSearch`, `action`, `model`, `file`, `documentationSearch`, and `suggestedActions` — the same set an **agent** release takes in its own `--capabilities`, which is why the examples above pass `'[]'` rather than omitting it. In a project the same field accepts a bare slug (`capabilities: ["webSearch"]`). - `update` replaces `--actions` / `--resources` / `--capabilities` wholesale rather than merging — read the current server with `mcp-server get ` and pass the full array back. ### Serving it to a coding agent — `cargo-ai mcp` Either server reaches any stdio MCP client through the CLI, using the credentials already on the machine. **No token is copied into client config.** ```bash claude mcp add cargo -- cargo-ai mcp # the platform MCP (no setup) cargo-ai ai mcp-server list # find a curated server's UUID claude mcp add cargo -- cargo-ai mcp --server # that curated server instead # Cursor, Windsurf, and other stdio clients: same command as the server entry ``` With 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. **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". ### Consuming an external MCP server ```bash cargo-ai ai mcp-client connect --name "My MCP" --url https://mcp.example.com/sse cargo-ai ai mcp-client connect --name "My MCP" --url https://mcp.example.com/sse \ --disabled-tool-slugs "dangerous_tool,other_tool" ``` `--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`. ## Memories Memories are pieces of information an agent stores from conversations for future reference. They are scoped to a user or to a specific agent (`--scope user|agent`; there is no workspace scope). ```bash # List agent memories cargo-ai ai memory list --scope agent --agent-uuid # List user-scoped memories cargo-ai ai memory list --scope user # Update a memory cargo-ai ai memory update \ --mem0-id \ --scope agent --agent-uuid \ --content "Updated memory content" # Remove a memory cargo-ai ai memory remove \ --mem0-id \ --scope agent --agent-uuid ``` ## Chats, documents, votes, and prompt helpers Sending messages and polling them is `cargo-orchestration`'s job; these are the housekeeping commands around a chat, plus two prompt-authoring helpers. ```bash # Chats — list (filter by agent, release, user, or how the chat started), read, rename, delete cargo-ai ai chat list --agent-uuid --trigger-type schedule --limit 20 # --trigger-type: chat | connector | draft | web_extension | app | schedule | workflow cargo-ai ai chat get cargo-ai ai chat update --uuid --name "Q4 pipeline review" cargo-ai ai chat remove # Feedback on one assistant message, and the votes on a chat cargo-ai ai vote upsert --chat-uuid --message-uuid --is-upvoted false cargo-ai ai vote list --chat-uuid # Documents — the versioned text / code / image / sheet artifacts an agent writes in a chat cargo-ai ai document get # latest version cargo-ai ai document list --uuid --limit 10 # its versions cargo-ai ai document create --uuid --kind text --title "Brief" --content "…" # new version cargo-ai ai document reset --uuid --created-at # drop every later version # Suggested follow-ups for a message (cache with --cache-key to avoid regenerating) cargo-ai ai suggested-action generate --message-uuid --agent-uuid # Prompt helpers cargo-ai ai prompt optimize --prompt "find companies in SF and enrich them" cargo-ai ai prompt evaluate --prompt "" --actions '[...]' --resources '[...]' ``` - **`prompt optimize`** rewrites rough instructions into a structured system prompt (role, behavior, avoidances) with a fixed small model at temperature 0. Treat the result as a draft to edit, not a prompt to ship. - **`prompt evaluate` does not score anything** (its help said it did before CLI 1.0.128). It **renders** the prompt: template expressions in it are resolved against the `--actions`, `--resources` and `--capabilities` you pass, and the response is the prompt text the agent would actually receive. Use it to check that a system prompt's `{{…}}` references resolve before deploying a release. - **`document reset` is destructive** — every version created after the one you name is deleted. `list --uuid` first to pick the `createdAt`. - A downvote is feedback the workspace keeps; it does not change the agent. Fixing the answer is a release change (prompt, model, resources). ## Help Every command supports `--help`: ```bash cargo-ai ai agent create --help cargo-ai ai release update-draft --help cargo-ai ai mcp-server create --help cargo-ai ai memory list --help ```

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…