aiq-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAIQ Deploy Skill
AIQ 部署技能
Purpose
用途
Use this skill to get a local or self-hosted NVIDIA AI-Q Blueprint server running and verified for use by
.
aiq-researchThis skill owns setup, deployment, operational checks, troubleshooting, and shutdown. It does not run deep
research itself. After deployment is healthy, hand off the verified server URL to .
aiq-research使用本技能搭建本地或自托管的NVIDIA AI-Q Blueprint服务器,并完成验证以供使用。
aiq-research本技能负责设置、部署、运行检查、故障排查和停机操作,但不执行深度研究任务。部署完成且状态正常后,需将已验证的服务器URL交付给。
aiq-researchPrerequisites
前提条件
Users need:
- Access to clone or update .
https://github.com/NVIDIA-AI-Blueprints/aiq - Git available in the shell.
- One deployment runtime:
- Docker Engine with Docker Compose v2 for the default durable local deployment.
- Python 3.11+ and for local process or CLI mode.
uv - Node.js 20+ and for local browser UI development mode.
npm - 1.28+, Helm 3.12+, and access to a Kubernetes cluster for Helm mode.
kubectl
- Network access to GitHub, NVIDIA-hosted model endpoints, and any selected search provider.
- Credentials stored outside chat. Hosted-model usage requires ; web research requires at least one supported search provider key such as
NVIDIA_API_KEY,TAVILY_API_KEY, orSERPER_API_KEY.EXA_API_KEY - System capacity for the selected runtime. Docker Compose mode starts the AI-Q backend and PostgreSQL by default;
browser UI mode also uses frontend port . Self-hosted model or RAG deployments may require GPU resources.
3000
Before writing secrets, verify is ignored:
deploy/.envbash
git check-ignore deploy/.envExpected output: or a matching ignore rule. If it is not ignored, stop and fix the ignore rule before
placing credentials in the file.
deploy/.env用户需要满足以下条件:
- 拥有克隆或更新的权限。
https://github.com/NVIDIA-AI-Blueprints/aiq - 终端环境中已安装Git。
- 具备以下部署运行环境之一:
- 默认持久化本地部署:Docker Engine及Docker Compose v2。
- 本地进程或CLI模式:Python 3.11+和。
uv - 本地浏览器UI开发模式:Node.js 20+和。
npm - Helm模式:1.28+、Helm 3.12+,且能访问Kubernetes集群。
kubectl
- 具备访问GitHub、NVIDIA托管模型端点及所选搜索提供商的网络权限。
- 在聊天外存储凭证:使用托管模型需要;网页研究需要至少一个受支持的搜索提供商密钥,如
NVIDIA_API_KEY、TAVILY_API_KEY或SERPER_API_KEY。EXA_API_KEY - 所选运行环境的系统容量满足要求:Docker Compose模式默认启动AI-Q后端和PostgreSQL;浏览器UI模式还会占用前端端口。自托管模型或RAG部署可能需要GPU资源。
3000
在写入密钥前,需确认已被忽略:
deploy/.envbash
git check-ignore deploy/.env预期输出:或匹配的忽略规则。如果未被忽略,需先修复忽略规则,再在文件中存放凭证。
deploy/.envInstructions
操作步骤
- Locate or clone the AI-Q repository.
- Confirm the expected repository files exist.
- Select the deployment mode.
- Prepare without overwriting user secrets.
deploy/.env - Check runtime prerequisites for the selected path.
- Start the selected deployment.
- Run basic validation.
- Report the verified for
AIQ_SERVER_URL.aiq-research - Ask whether to run optional deep research completion validation.
- 定位或克隆AI-Q代码仓库。
- 确认预期的仓库文件存在。
- 选择部署模式。
- 准备文件,且不覆盖用户已有的密钥。
deploy/.env - 检查所选部署路径的运行环境前提条件。
- 启动所选部署。
- 执行基础验证。
- 向报告已验证的
aiq-research。AIQ_SERVER_URL - 询问是否运行可选的深度研究完成验证。
Step 1 - Locate or clone AI-Q
步骤1 - 定位或克隆AI-Q
If no AI-Q checkout exists, read before cloning. In an existing checkout, confirm the
required files:
references/locate-or-clone.mdbash
pwd
test -f pyproject.toml
test -f deploy/.env.example
test -d configsExpected output: prints the AI-Q repository path; the commands exit with status 0 and no output.
pwdtest如果尚未检出AI-Q代码,克隆前请阅读。在已有的代码检出目录中,确认所需文件存在:
references/locate-or-clone.mdbash
pwd
test -f pyproject.toml
test -f deploy/.env.example
test -d configs预期输出:打印AI-Q仓库路径;命令执行后返回状态0且无输出。
pwdtestStep 2 - Select the deployment mode
步骤2 - 选择部署模式
If the user asks to install, deploy, set up, or run AI-Q without naming a mode, ask:
text
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.Wait for the user's answer before starting services.
Do not ask this question when the user already specified a mode, such as Docker Compose, Helm, UI, CLI, or Agent Skill
backend. Do not ask the full mode question when routed here because a deep research request needs a
backend. In that case, prefer Agent Skill backend and ask only for permission to start it if needed.
aiq-research如果用户要求安装、部署、设置或运行AI-Q但未指定模式,请询问:
text
你希望以哪种方式运行AI-Q?
1. Skill后端 - 仅为aiq-research提供后端服务,无浏览器UI。
2. CLI - 交互式终端AI-Q。
3. UI - 包含后端和前端的浏览器AI-Q应用。
4. 自定义 - 部署前选择现有AI-Q配置或查看高级自定义文档。等待用户回复后再启动服务。
如果用户已指定模式(如Docker Compose、Helm、UI、CLI或Agent Skill后端),则无需询问此问题。如果是因深度研究请求需要后端而跳转至此,则优先选择Agent Skill后端,仅在需要时询问用户是否允许启动。
aiq-researchStep 3 - Prepare environment and secrets
步骤3 - 准备环境和密钥
Read before changing .
references/env-and-secrets.mddeploy/.envbash
if [ ! -f deploy/.env ]; then
cp deploy/.env.example deploy/.env
echo "created deploy/.env from deploy/.env.example"
fiExpected output when the file is missing: . Expected output when the file
already exists: no output, and the existing file is preserved.
created deploy/.env from deploy/.env.exampleNever print secret values. If credentials are missing, ask the user to update ; do not ask them to paste
secret values into chat.
deploy/.env修改前,请阅读。
deploy/.envreferences/env-and-secrets.mdbash
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/.envStep 4 - Route to the selected deployment path
步骤4 - 路由至所选部署路径
Match the user request, then read the referenced file before acting:
| User Intent | Reference |
|---|---|
| No AI-Q checkout exists, install AIQ, clone AIQ, locate repo | |
Configure environment, check API keys, inspect | |
Choose an AI-Q workflow config, understand config files, set | |
Backend-only local server for | |
| Terminal assistant, CLI-only run, no web UI | |
| Quick local development run, start UI/backend without containers | |
| Default durable local deployment, Docker Compose, containers, PostgreSQL | |
| Kubernetes, Helm, cluster deployment | |
| Foundational RAG / FRAG integration | |
Basic health checks, shallow smoke checks, handoff to | |
| Optional deep research completion validation | |
| Logs, unhealthy services, port conflicts, config failures | |
| Stop services, restart, rebuild, safe cleanup | |
匹配用户请求,执行操作前先阅读参考文档:
| 用户需求 | 参考文档 |
|---|---|
| 未检出AI-Q、安装AI-Q、克隆AI-Q、定位仓库 | |
配置环境、检查API密钥、查看 | |
选择AI-Q工作流配置、理解配置文件、设置 | |
为 | |
| 终端助手、仅CLI运行、无Web UI | |
| 快速本地开发运行、启动无容器的UI/后端 | |
| 默认持久化本地部署、Docker Compose、容器、PostgreSQL | |
| Kubernetes、Helm、集群部署 | |
| Foundational RAG / FRAG集成 | |
基础健康检查、浅层冒烟测试、交付给 | |
| 可选深度研究完成验证 | |
| 日志、服务异常、端口冲突、配置失败 | |
| 停止服务、重启、重建、安全清理 | |
Step 5 - Validate and hand off
步骤5 - 验证并交付
After startup, read and run the appropriate checks for the selected mode. For the default
local backend, verify health:
references/validation.mdbash
curl -sf http://localhost:8000/healthExpected output: a successful JSON health response or an empty successful response depending on the server build. If the
command fails, read and diagnose before claiming the backend is ready.
references/troubleshooting.mdaiq-researchbash
AIQ_SERVER_URL=http://localhost:8000If the backend runs elsewhere, tell the user to set:
bash
export AIQ_SERVER_URL="http://localhost:<PORT>"Do not continue into deep research or deep research completion validation unless the user asks for it or confirms the
post-deploy validation prompt. This skill's success criterion is a deployed and basically validated server, not report
generation quality.
启动后,阅读并针对所选模式执行相应检查。对于默认本地后端,验证健康状态:
references/validation.mdbash
curl -sf http://localhost:8000/health预期输出:返回成功的JSON健康响应或空成功响应(取决于服务器构建)。如果命令执行失败,请先阅读进行诊断,再确认后端是否就绪。
references/troubleshooting.mdaiq-researchbash
AIQ_SERVER_URL=http://localhost:8000如果后端运行在其他位置,请告知用户设置:
bash
export AIQ_SERVER_URL="http://localhost:<PORT>"除非用户要求或确认部署后验证提示,否则不要继续执行深度研究或深度研究完成验证。本技能的成功标准是部署并完成基础验证的服务器,而非研究报告的生成质量。
Version Compatibility
版本兼容性
IMPORTANT: This skill is designed for NVIDIA AI-Q Blueprint version 2.1.0.
Semantic Versioning Compatibility Rules:
text
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)Examples:
- Skill version 2.1.0 is compatible with Blueprint version 2.1.0.
- Skill version 2.1.0 is compatible with Blueprint version 2.2.0.
- Skill version 2.1.0 is compatible with Blueprint version 2.1.5.
- Skill version 2.1.0 is not compatible with Blueprint version 3.0.0.
- Skill version 2.1.0 is not compatible with Blueprint version 2.0.0.
If your Blueprint version is not compatible:
- Check for an updated skill version matching your Blueprint version.
- Use a Blueprint version compatible with this skill.
- Proceed with caution only when the user accepts the compatibility risk; deployment commands or config names may have changed.
重要提示: 本技能专为NVIDIA AI-Q Blueprint 2.1.0版本设计。
语义版本兼容性规则:
text
技能版本:X.Y.Z
Blueprint版本:A.B.C
兼容条件:
1. A == X(主版本必须匹配)
2. B >= Y(次版本必须大于或等于)
3. C无限制(补丁版本不影响兼容性)示例:
- 技能版本2.1.0与Blueprint版本2.1.0兼容。
- 技能版本2.1.0与Blueprint版本2.2.0兼容。
- 技能版本2.1.0与Blueprint版本2.1.5兼容。
- 技能版本2.1.0与Blueprint版本3.0.0不兼容。
- 技能版本2.1.0与Blueprint版本2.0.0不兼容。
如果你的Blueprint版本不兼容:
- 检查是否有与你的Blueprint版本匹配的更新技能版本。
- 使用与本技能兼容的Blueprint版本。
- 仅当用户接受兼容性风险时才谨慎继续;部署命令或配置名称可能已更改。
Security Best Practices
安全最佳实践
- Never print secret values. Check only whether required environment variables are set.
- Store credentials in or environment variables, not in chat transcripts, shell history, committed files, or example commands.
deploy/.env - Do not overwrite when it already exists.
deploy/.env - Ask before destructive cleanup such as deleting Docker volumes with .
down -v - Do not claim FRAG is ready unless both and
RAG_SERVER_URLare configured and reachable.RAG_INGEST_URL - Run verification commands yourself when possible.
- 切勿打印密钥值。仅检查所需环境变量是否已设置。
- 将凭证存储在或环境变量中,不要存储在聊天记录、终端历史、已提交文件或示例命令中。
deploy/.env - 当已存在时,不要覆盖它。
deploy/.env - 执行破坏性清理(如使用删除Docker卷)前需询问用户。
down -v - 仅当和
RAG_SERVER_URL均已配置且可访问时,才可确认FRAG已就绪。RAG_INGEST_URL - 尽可能自行执行验证命令。
Limitations
局限性
- This skill prepares and validates AI-Q infrastructure; it does not judge deep research report quality.
- It cannot provide or inspect secret values. Users must configure credentials outside chat.
- Helm, FRAG, custom config, and self-hosted model paths depend on infrastructure the user controls.
- Destructive cleanup, such as deleting Docker volumes, requires explicit user approval.
- 本技能仅负责准备和验证AI-Q基础设施,不评判深度研究报告的质量。
- 无法提供或查看密钥值。用户必须在聊天外配置凭证。
- Helm、FRAG、自定义配置和自托管模型路径依赖于用户控制的基础设施。
- 破坏性清理(如删除Docker卷)需要用户明确批准。
Examples
示例
Example 1: Deploy a backend-only Skill server with Docker Compose
示例1:使用Docker Compose部署仅后端的Skill服务器
bash
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/healthExpected output:
text
deploy/.env
<docker compose starts aiq-agent and dependencies>
<health endpoint returns a successful response>If Docker, ports, credentials, or health checks fail, read before retrying.
references/troubleshooting.mdbash
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预期输出:
text
deploy/.env
<docker compose启动aiq-agent及依赖服务>
<健康端点返回成功响应>如果Docker、端口、凭证或健康检查失败,请先阅读再重试。
references/troubleshooting.mdExample 2: Hand off a non-default backend URL to aiq-research
示例2:向aiq-research交付非默认后端URL
bash
export AIQ_SERVER_URL="http://localhost:8100"
curl -sf "$AIQ_SERVER_URL/health"Expected output: a successful health response. Then tell the user to keep set before invoking
.
AIQ_SERVER_URLaiq-researchbash
export AIQ_SERVER_URL="http://localhost:8100"
curl -sf "$AIQ_SERVER_URL/health"预期输出:返回成功的健康响应。然后告知用户在调用前保持已设置。
aiq-researchAIQ_SERVER_URLReferences
参考文档
| Topic | Documentation |
|---|---|
| Locate or clone AI-Q | |
| Environment and secrets | |
| Workflow configs | |
| Agent Skill backend | |
| CLI deployment | |
| Local web deployment | |
| Docker Compose deployment | |
| Kubernetes and Helm deployment | |
| FRAG integration | |
| Basic validation | |
| End-to-end validation | |
| Troubleshooting | |
| Shutdown and cleanup | |
| 主题 | 文档路径 |
|---|---|
| 定位或克隆AI-Q | |
| 环境和密钥 | |
| 工作流配置 | |
| Agent Skill后端 | |
| CLI部署 | |
| 本地Web部署 | |
| Docker Compose部署 | |
| Kubernetes和Helm部署 | |
| FRAG集成 | |
| 基础验证 | |
| 端到端验证 | |
| 故障排查 | |
| 停机和清理 | |
Common Issues
常见问题
Issue: Backend port is already in use
问题:后端端口已被占用
Symptoms:
- Docker Compose fails to bind port .
8000 - reaches an unexpected service or fails.
curl -sf http://localhost:8000/health
Causes:
- Another AI-Q backend or local development server is already running.
- in
PORTconflicts with an existing process.deploy/.env
Solutions:
- Identify the process:
bash
lsof -nP -iTCP:8000 -sTCP:LISTEN - Either stop the conflicting process with the user's approval or set a different port in , such as
deploy/.env.PORT=8100 - Restart the selected deployment path and verify:
bash
curl -sf http://localhost:8100/health
症状:
- Docker Compose无法绑定端口。
8000 - 访问到意外服务或执行失败。
curl -sf http://localhost:8000/health
原因:
- 另一个AI-Q后端或本地开发服务器已在运行。
- 中的
deploy/.env与现有进程冲突。PORT
解决方案:
- 识别占用进程:
bash
lsof -nP -iTCP:8000 -sTCP:LISTEN - 经用户批准后停止冲突进程,或在中设置不同端口,如
deploy/.env。PORT=8100 - 重启所选部署路径并验证:
bash
curl -sf http://localhost:8100/health
Issue: Required credentials are missing
问题:缺少必要凭证
Symptoms:
- Infrastructure starts, but model-backed chat or research requests fail.
- Logs mention unauthorized, forbidden, invalid key, or missing provider configuration.
Causes:
- is missing or empty.
NVIDIA_API_KEY - No supported search provider key is configured for web research.
Solutions:
- Check presence without printing values by following .
references/env-and-secrets.md - Ask the user to update ; do not ask them to paste secrets into chat.
deploy/.env - Rerun after the user updates credentials.
references/validation.md
症状:
- 基础设施启动,但基于模型的聊天或研究请求失败。
- 日志提及未授权、禁止访问、无效密钥或缺少提供商配置。
原因:
- 缺失或为空。
NVIDIA_API_KEY - 未配置网页研究所需的受支持搜索提供商密钥。
解决方案:
- 按照检查凭证是否存在,不要打印密钥值。
references/env-and-secrets.md - 要求用户更新;不要让用户将密钥粘贴到聊天中。
deploy/.env - 用户更新凭证后,重新执行中的验证步骤。
references/validation.md
Issue: Backend is healthy but not compatible with aiq-research
问题:后端健康但与aiq-research不兼容
Symptoms:
- succeeds, but
/healthor/chatfails./v1/jobs/async/agents - reports that async agents are unavailable.
aiq-research
Causes:
- The selected config is CLI-only or does not expose the web/API backend expected by the skill.
- or
BACKEND_CONFIGpoints at the wrong AI-Q config.CONFIG_FILE
Solutions:
- Read and confirm the selected config is API-enabled.
references/configs.md - For the default Skill backend, use .
configs/config_web_default_llamaindex.yml - Restart the backend and rerun .
references/validation.md
症状:
- 请求成功,但
/health或/chat请求失败。/v1/jobs/async/agents - 报告异步Agent不可用。
aiq-research
原因:
- 所选配置仅支持CLI,未暴露Skill所需的Web/API后端。
- 或
BACKEND_CONFIG指向错误的AI-Q配置。CONFIG_FILE
解决方案:
- 阅读,确认所选配置已启用API。
references/configs.md - 默认Skill后端使用。
configs/config_web_default_llamaindex.yml - 重启后端并重新执行中的验证步骤。
references/validation.md
Issue: Docker cleanup would remove useful state
问题:Docker清理会删除有用状态
Symptoms:
- Troubleshooting suggests .
docker compose down -v - The user may have local PostgreSQL job or checkpoint data they want to keep.
Causes:
- removes Docker volumes.
down -v - Rebuilds and restarts are often enough for config or image changes.
Solutions:
- Prefer a normal restart from .
references/shutdown.md - Ask for explicit approval before running volume deletion.
- After cleanup, rerun deployment and validation from the selected route.
症状:
- 故障排查建议执行。
docker compose down -v - 用户可能希望保留本地PostgreSQL的任务或检查点数据。
原因:
- 会删除Docker卷。
down -v - 对于配置或镜像变更,通常重建和重启即可解决问题。
解决方案:
- 优先选择中的常规重启方式。
references/shutdown.md - 执行卷删除前需获得用户明确批准。
- 清理完成后,从所选路径重新执行部署和验证步骤。