SuperAPI AI 工具集

nagent

智能体与模型

查看项目

更新于 10-15 20:34

技能介绍

用途:nagent 用于在 bb 中启动新的 worker 线程,适用于 nagent、启动 bb 会话或独立 bb 代理的场景。执行 bb thread spawn 前应先阅读本技能;其他线程操作使用 bb-cli。

主要能力:解析目标项目、provider 与模型,按用户要求设置推理等级、服务层级和权限模式,并生成聚焦的任务简报。默认使用 Codex gpt-5.6-sol、reasoning high、service tier fast;大型重构可用 xhigh,用户显式选择优先。

使用方式:先用 bb project list --json、bb provider list --json、bb provider models <provider-id> --json 查找目标,确认 sources[].path 与仓库匹配,始终传 --project,不硬编码 ID。模型使用目录 ID,并核对 displayName 与 supportedReasoningEfforts[].description。Pi Agent 需注意计费路由,例如 --provider pi --model openai-codex/gpt-6-astra --reasoning-level xhigh,且不得未经用户同意替换路由。

权限:默认 investigation/build worker 为 full,子线程不能超过父线程权限。可用 scripts/permission-mode.sh "$BB_THREAD_ID" 校验,模式包括 accept-edits、auto、full;只读简报必须禁止写入。

启动:使用 bb thread spawn --json,包含 --project、--new-environment worktree、--provider、--model、--reasoning-level、--service-tier、--permission-mode、--title 和完整 prompt。独立线程省略 parent 标志,协调或子任务用 --parent-self,嵌套用 --parent-thread <id>,两者不可同时使用。worktree 由 bb 管理,不手动创建;未跟踪文件如 .env 需通过 .worktreeinclude 或 .bb-env-setup.sh 处理。

任务简报:保留用户范围与约束,不编造需求、交付物、权限或批准。worker 看不到当前对话,需写明目标、约束、相关技能/文件、交付物、验证和回报要求;只读任务明确禁止代码、Git 和数据库写入。

验证与报告:启动后校验子线程权限模式,报告线程 ID、标题、项目、provider/model/reasoning/tier、是否 worktree、只读或实现范围,然后停止,不轮询或读取日志。遇到阻塞可用 bb thread interactions list <id> --json 查看,授权且安全时用 bb thread interactions approve <interactionId> <id> 批准;破坏性操作、生产访问或超出简报范围需询问用户。归档仅在用户要求时进行,删除需显式请求。

限制:资料未提供具体收费、价格、平台支持范围或效果数据;部分示例模型与路由需以当前目录为准,不应猜测 ID 或替换 provider。