SuperAPI AI 工具集

cargo-content

数据与分析

查看项目

更新于 10-15 21:51

技能介绍

Cargo CLI 的 content 域用于管理工作区的知识资源,即支撑智能体回答的文件与库(RAG)。自 CLI 1.0.19 起,文件与库从 ai 域迁至 content 域,命令为 cargo-ai content file … 与 cargo-ai content library …;旧的 cargo-ai ai file … 已不存在。

用途:上传 PDF、CSV、文本等文件,供智能体基于特定知识作答;库把文件聚合成一个智能体可引用的资源。

主要能力:file 支持 list/get/upload/update/remove,可指定 --folder-uuid 归入文件夹、用 --name 重命名;library 支持 list/get/create/update/remove,分 native(工作区托管)与 connector(经非结构化数据提取器 --extractor-slug 从外部同步,connectorUuid 来自 cargo-connection)两类。上传的文件也可在上下文运行时沙箱的 .files/ 下只读访问,例如 cargo-ai context runtime execute --command ls --args '["-1",".files"]'。

使用方式:先安装并登录。npm install -g @cargo-ai/cli 或前置 npx @cargo-ai/cli;cargo-ai login --email you@company.com(也支持 --oauth、--token);用 cargo-ai whoami 确认工作区。上传示例:cargo-ai content file upload --file ./knowledge-base.pdf。所有命令向 stdout 输出 JSON,失败以非零退出并返回 {"errorMessage": "..."};创建运行或批处理为异步,可用 --wait-until-finished 或轮询 get。

限制与注意:文件和库需通过 cargo-ai 中智能体草稿发布的 resources 数组挂载并部署后才起作用;文件夹管理应使用 cargo-workspace-management;批处理输入文件属于 cargo-ai workspaceManagement file upload,由 cargo-workspace-management 记录;完整技能包安装后,../cargo/references/prerequisites.md 补充 CLI 版本固定、token 作用域与管理员专属面。每条命令支持 --help。其他细节资料暂未提供。