SuperAPI AI 工具集

create-agent

智能体与模型

查看项目

更新于 10-15 20:13

技能介绍

用途:在新建 Atlas 智能体项目时进行脚手架化,生成标准项目结构。

主要能力:创建 <agent-name>/ 目录,包含 agent.yaml(externalId、model、instructions、tools)、README.md(快速开始与工具参考)以及 eval/cases.yaml(单轮、多轮、正确性与忠实度评分器的起始评测用例)。

使用方式:先收集可选字段(显示名 --display-name、描述 --description、模型 --model、指令 --instructions、工具创建后编辑),再运行 npx @cognite/cli@latest agents create <agent-name> --display-name "..." --description "..." --model <model> --instructions "..." --no-prompt。未指定时模型默认 azure/gpt-5.4-mini,指令使用默认提示词;始终传 --no-prompt。多行指令可直接加引号传入,若 shell 引号不便则跳过 --instructions 后手动编辑 agent.yaml。

工具:如需工具,编辑 agent.yaml 添加 tools 数组;无工具时完全省略该键,不要写 tools: []。可用类型包括 analyzeData、analyzeImage、analyzeTimeSeries、askDocument、callFunction、callRestApi、callWebhook、examineDataSemantically、query、queryKnowledgeGraph、queryTimeSeriesDatapoints、runPythonCode、summarizeDocument、timeSeriesAnalysis。

后续步骤:编辑 agent.yaml 完善工具与指令;用 npx @cognite/cli@latest agents push <externalId> 推送到 CDF 测试;用 npx @cognite/cli@latest agents open 在 Fusion 中打开;编辑 eval/cases.yaml 并运行 npx @cognite/cli@latest agents eval <externalId>,脚手架用例为占位符,需按实际行为更新输入、参考与上下文。

限制:智能体名称必须为 kebab-case(仅小写字母、数字和连字符);若同名目录已存在则警告并停止;不得虚构未列出的工具类型。