name: aiq-deploy displayName: AI-Q Blueprint 部署与运维 description: | 当被要求安装、部署、运行、验证、排查或停止 NVIDIA AI-Q Blueprint 基础设施时使用。 license: Apache-2.0 compatibility: | Designed for Claude Code, OpenCode, Codex, and Agent Skills-compatible tools. Requires Git, network access to GitHub, and one selected runtime path: Docker Compose v2 for the default local deployment, Python 3.11+ and uv for local process or CLI mode, Node.js 20+ and npm for local web UI mode, or kubectl 1.28+ and Helm 3.12+ for Kubernetes and Helm mode. metadata: version: "2.1.0" author: "NVIDIA AI-Q Blueprint Team aiq-blueprint@nvidia.com" github-url: "https://github.com/NVIDIA-AI-Blueprints/aiq" tags: - nvidia - aiq - blueprint - deploy - operations - agent-skills allowed-tools: Read Bash
使用此技能让本地或自托管的 NVIDIA AI-Q Blueprint 服务器运行并通过验证,供 aiq-research 使用。
此技能负责安装配置、部署、运行检查、故障排查和关闭。它本身不运行深度研究。部署健康后,将验证通过的服务器 URL 移交给 aiq-research。工作流程保持显式,以确保部署验证和移交在支持的 agent 客户端间可重复。
用户需要:
https://github.com/NVIDIA-AI-Blueprints/aiq。uv(用于本地进程或 CLI 模式)。npm(用于本地浏览器 UI 开发模式)。kubectl 1.28+、Helm 3.12+ 及 Kubernetes 集群访问(用于 Helm 模式)。NVIDIA_API_KEY;网页研究需要至少一个支持的搜索提供方密钥,例如 TAVILY_API_KEY、SERPER_API_KEY 或 EXA_API_KEY。3000。自托管模型或 RAG 部署可能需要 GPU 资源。在写入密钥之前,验证 deploy/.env 已被忽略:
git check-ignore deploy/.env
预期输出:deploy/.env 或匹配的忽略规则。如果未被忽略,请停止并修复忽略规则后再将凭据放入文件。
deploy/.env,不覆盖用户密钥。AIQ_SERVER_URL 给 aiq-research。如果不存在 AI-Q 检出目录,请在克隆前阅读 references/locate-or-clone.md。在已有检出目录中,确认所需文件:
pwd
test -f pyproject.toml
test -f deploy/.env.example
test -d configs
预期输出:pwd 打印 AI-Q 仓库路径;test 命令以状态 0 退出且无输出。
如果用户要求安装、部署、配置或运行 AI-Q 但未指定模式,请询问:
How do you want to run AI-Q?
1. Skill backend - backend-only service for aiq-research w/o browser UI.
2. CLI - interactive terminal AI-Q.
3. UI - browser AI-Q app with backend and frontend.
4. Custom - choose an existing AI-Q config or review advanced customization docs before deployment.
等待用户回答后再启动服务。
当用户已经指定了模式(如 Docker Compose、Helm、UI、CLI 或 Agent Skill 后端)时,不要询问此问题。当 aiq-research 路由到此技能是因为深度研究请求需要后端时,也不要询问完整的模式问题。此时应优先选择 Agent Skill 后端,仅在必要时询问是否允许启动。
在修改 deploy/.env 之前先阅读 references/env-and-secrets.md。
if [ ! -f deploy/.env ]; then
cp deploy/.env.example deploy/.env
echo "created deploy/.env from deploy/.env.example"
fi
文件缺失时的预期输出:created deploy/.env from deploy/.env.example。文件已存在时的预期输出:无输出,保留现有文件。
切勿打印密钥值。如果凭据缺失,请让用户更新 deploy/.env;不要要求他们将密钥粘贴到聊天中。
匹配用户请求,然后在执行前阅读引用的文件:
| 用户意图 | 参考文件 |
|---|---|
| 不存在 AI-Q 检出目录,安装 AIQ,克隆 AIQ,定位仓库 | references/locate-or-clone.md |
配置环境,检查 API 密钥,查看 .env |
references/env-and-secrets.md |
选择 AI-Q 工作流配置,理解配置文件,设置 BACKEND_CONFIG 或 CONFIG_FILE |
references/configs.md |
为 aiq-research 部署仅后端的本地服务器,AIQ 作为 Agent Skill |
references/skill-backend.md |
| 终端助手,仅 CLI 运行,无 Web UI | references/terminal-cli.md |
| 快速本地开发运行,无容器启动 UI/后端 | references/local-web.md |
| 默认持久化本地部署,Docker Compose,容器,PostgreSQL | references/docker-compose.md |
| Kubernetes,Helm,集群部署 | references/kubernetes-helm.md |
| 基础 RAG / FRAG 集成 | references/frag.md |
基本健康检查,浅层冒烟测试,移交给 aiq-research |
references/validation.md |
| 可选的深度研究完成验证 | references/end-to-end-validation.md |
| 日志,服务异常,端口冲突,配置故障 | references/troubleshooting.md |
| 停止服务,重启,重建,安全清理 | references/shutdown.md |
启动后,阅读 references/validation.md 并为所选模式运行适当的检查。对于默认的本地后端,验证健康状况:
curl -sf http://localhost:8000/health
预期输出:根据服务端构建版本,返回成功的 JSON 健康响应或空的成功响应。如果命令失败,阅读 references/troubleshooting.md 并诊断后再声称后端就绪。
aiq-research 需要一个可访问的 AI-Q 服务器 URL。如果后端在默认端口上,无需额外配置:
AIQ_SERVER_URL=http://localhost:8000
如果后端运行在其他位置,请让用户设置:
export AIQ_SERVER_URL="http://localhost:<PORT>"
除非用户要求或确认了部署后验证提示,否则不要继续进行深度研究或深度研究完成验证。此技能的成功标准是部署并基本验证通过的服务器,而非报告生成质量。
重要提示: 此技能专为 NVIDIA AI-Q Blueprint 2.1.0 版本设计。
语义化版本兼容性规则:
Skill version: X.Y.Z
Blueprint version: A.B.C
Compatible IF:
1. A == X (Major versions MUST match)
2. B >= Y (Minor version must be equal or greater)
3. C can be anything (Patch version does not affect compatibility)
示例:
发现更多技能插件,请访问7w4.net。
如果您的 Blueprint 版本不兼容:
deploy/.env 或环境变量中,而非聊天记录、shell 历史、已提交的文件或示例命令中。deploy/.env 已存在时不要覆盖它。down -v 删除 Docker 卷)前询问用户。RAG_SERVER_URL 和 RAG_INGEST_URL 均已配置并可访问,否则不要声称 FRAG 已就绪。test -f deploy/.env || cp deploy/.env.example deploy/.env
git check-ignore deploy/.env
cd deploy/compose
BUILD_TARGET=release docker compose --env-file ../.env -f docker-compose.yaml config --quiet
BUILD_TARGET=release docker compose --env-file ../.env -f docker-compose.yaml up -d --build aiq-agent
curl -sf http://localhost:8000/health
预期输出:
deploy/.env
<docker compose starts aiq-agent and dependencies>
<health endpoint returns a successful response>
如果 Docker、端口、凭据或健康检查失败,请在重试前阅读 references/troubleshooting.md。
export AIQ_SERVER_URL="http://localhost:8100"
curl -sf "$AIQ_SERVER_URL/health"
预期输出:成功的健康响应。然后告诉用户在调用 aiq-research 前保持 AIQ_SERVER_URL 已设置。
| 主题 | 文档 |
|---|---|
| 定位或克隆 AI-Q | references/locate-or-clone.md |
| 环境和密钥 | references/env-and-secrets.md |
| 工作流配置 | references/configs.md |
| Agent Skill 后端 | references/skill-backend.md |
| CLI 部署 | references/terminal-cli.md |
| 本地 Web 部署 | references/local-web.md |
| Docker Compose 部署 | references/docker-compose.md |
| Kubernetes 和 Helm 部署 | references/kubernetes-helm.md |
| FRAG 集成 | references/frag.md |
| 基本验证 | references/validation.md |
| 端到端验证 | references/end-to-end-validation.md |
| 故障排查 | references/troubleshooting.md |
| 关闭与清理 | references/shutdown.md |
症状:
8000。curl -sf http://localhost:8000/health 访问到意外服务或失败。原因:
deploy/.env 中的 PORT 与现有进程冲突。解决方案:
bash
lsof -nP -iTCP:8000 -sTCP:LISTENdeploy/.env 中设置其他端口(例如 PORT=8100)。bash
curl -sf http://localhost:8100/health症状:
原因:
NVIDIA_API_KEY 缺失或为空。解决方案:
references/env-and-secrets.md 检查存在性(不打印值)。deploy/.env;不要要求他们将密钥粘贴到聊天中。references/validation.md。症状:
/health 成功,但 /chat 或 /v1/jobs/async/agents 失败。aiq-research 报告异步 agent 不可用。原因:
BACKEND_CONFIG 或 CONFIG_FILE 指向了错误的 AI-Q 配置。解决方案:
references/configs.md 并确认所选配置已启用 API。configs/config_web_default_llamaindex.yml。references/validation.md。症状:
docker compose down -v。原因:
down -v 会删除 Docker 卷。解决方案:
references/shutdown.md 中的正常重启。这款 Skill 质量较好,文档清晰、步骤完整,安全性做得不错,不会泄露密钥。部署验证流程规范,故障排查指南实用。主要不足是部分操作可能过于直接(如自动克隆仓库),效率表现参差不齐,新手使用时需留意安全提示。