deploy-to-amp
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDeploy to CrewAI AMP
部署到CrewAI AMP
Ship a crew or flow to AMP without burning deploys on project-shape errors, stale code, stale env values, or the wrong org.
Verified against crewai 1.15.22 and 1.15.23 on 2026-10-01.
Live-tested on CrewAI AMP and real LLMs on 2026-10-01.
Run first; if the major/minor differs, re-verify the version-sensitive rows below with the skill before trusting them.
crewai versionask-docs将crew或flow部署到AMP,避免因项目结构错误、代码过时、环境变量过期或组织错误导致的部署失败。
已于2026-10-01在crewai 1.15.22和1.15.23版本下验证通过。
已于2026-10-01在CrewAI AMP和真实LLM上完成实际测试。
请先运行 ;如果主版本/次版本不一致,请在参考以下版本相关内容前,使用技能重新验证。
crewai versionask-docs1. Preflight - run these three every time
1. 前置检查 - 每次部署前都执行这三步
bash
crewai org current # which org will receive this deploy (machine-wide, see section 5)
uv lock && git status # lockfile fresh, and you know what is uncommitted
crewai deploy validate # local checks, no platform contact, exit 1 on blocking errorscrewai deploy createcrewai deploy push--skip-validatecrewai deploystatus --uuidError: pyproject.toml not found.Exit codes are not a reliable signal in scripts or CI. exits 1 on errors, but and exit 0 when their built-in validation fails (), and / exit 0 on . Gate CI on and check the command output, not only .
crewai deploy validatecreatepushPre-deploy validation failed. Fix the issues above or re-run with --skip-validate.statuslogsdeployment_not_foundcrewai deploy validate$?Validate imports your project, which creates crewai's local storage directory (on macOS ). Set to a scratch path when running it in CI or on a shared machine.
~/Library/Application Support/<pkg>/CREWAI_STORAGE_DIRbash
crewai org current # 哪个组织将接收本次部署(全局生效,见第5节)
uv lock && git status # 锁文件为最新,且你清楚未提交的内容
crewai deploy validate # 本地检查,不访问平台,存在阻塞性错误时退出码为1crewai deploy createcrewai deploy push--skip-validatecrewai deploystatus --uuidError: pyproject.toml not found.在脚本或CI中,退出码不是可靠的判断依据。 出错时退出码为1,但 和 在内置验证失败时退出码仍为0(提示 ),而 / 在遇到 时退出码也为0。CI中请以 的输出作为判断依据,而不仅仅是 退出码。
crewai deploy validatecreatepushPre-deploy validation failed. Fix the issues above or re-run with --skip-validate.statuslogsdeployment_not_foundcrewai deploy validate$?验证过程会导入你的项目,这会创建crewai的本地存储目录(在macOS上为 )。在CI或共享机器上运行时,请将 设置为临时路径。
~/Library/Application Support/<pkg>/CREWAI_STORAGE_DIR2. Project shape the build expects
2. 构建所需的项目结构
| Requirement | Crew (classic, | Flow ( |
|---|---|---|
| Deployment name | | same |
| | |
| Lockfile | | same |
| Package dir | | same |
| Entry code | | |
| Scripts (scaffold) | | |
| Imports | absolute: | absolute: |
JSON-first crews (plain , no ) keep and at the project root instead of ; checks that layout too.
crewai create crew <name>--classiccrew.jsoncagents/src/crewai deploy validateMinimal flow that passes validation:
main.pypython
from crewai.flow import Flow, listen, start
from pydantic import BaseModel
class ReportState(BaseModel):
topic: str = "AI agents"
summary: str = ""
class ReportFlow(Flow[ReportState]):
@start()
def gather(self):
return f"notes on {self.state.topic}"
@listen(gather)
def summarize(self, notes):
self.state.summary = notes.upper()
return self.state.summary
def kickoff():
ReportFlow().kickoff()
if __name__ == "__main__":
kickoff()| 要求 | Crew(经典版, | Flow( |
|---|---|---|
| 部署名称 | | 相同 |
| | |
| 锁文件 | 根目录下的 | 相同 |
| 包目录 | | 相同 |
| 入口代码 | | |
| 脚本(脚手架生成) | | |
| 导入方式 | 绝对导入: | 绝对导入: |
JSON优先的crew项目(直接执行 ,不加 )会将 和 放在项目根目录而非 下; 也会检查这种布局。
crewai create crew <name>--classiccrew.jsoncagents/src/crewai deploy validate可通过验证的最简Flow 示例:
main.pypython
from crewai.flow import Flow, listen, start
from pydantic import BaseModel
class ReportState(BaseModel):
topic: str = "AI agents"
summary: str = ""
class ReportFlow(Flow[ReportState]):
@start()
def gather(self):
return f"notes on {self.state.topic}"
@listen(gather)
def summarize(self, notes):
self.state.summary = notes.upper()
return self.state.summary
def kickoff():
ReportFlow().kickoff()
if __name__ == "__main__":
kickoff()Shape rules, each with the failure it prevents
结构规则及对应的错误规避
| Bad | What happens | Good |
|---|---|---|
| | |
Only a | | Define |
Flow | | Pass per-run values through |
| | |
| | |
Renamed | | Keep the dir equal to the normalized |
| | |
Edited | | Re-run |
Importing code from a sibling dir ( | Validate passes locally, but only the project root is uploaded: the AMP build fails with | Move shared code inside |
| Locally: | |
Keep data files inside and load them as package data, not with paths built from the repo root. Files under go into the wheel the scaffold builds; files at the project root do not.
src/<pkg>/src/<pkg>/python
from importlib.resources import files
rules = files("research_crew").joinpath("data/rules.json").read_text()When validate says or and the class is clearly there, the loader swallowed the real error. Reproduce it with a traceback:
@CrewBase not foundNo Flow subclass foundbash
undefined| 错误做法 | 导致的问题 | 正确做法 |
|---|---|---|
在 | | |
| | 定义 |
Flow的 | | 通过 |
crew项目设置 | | |
flow项目设置 | | |
将 | | 保持目录名与规范化后的 |
缺少 | 报 | 执行 |
锁定后编辑了 | 出现 | 每次编辑 |
通过 | 本地验证通过,但只有项目根目录会被上传:AMP构建会报错 | 将共享代码移到 |
使用 | 本地提示: | 执行 |
请将数据文件放在 内,并作为包数据加载,不要使用从仓库根目录拼接的路径。 下的文件会被包含在脚手架构建的wheel包中;项目根目录下的文件不会。
src/<pkg>/src/<pkg>/python
from importlib.resources import files
rules = files("research_crew").joinpath("data/rules.json").read_text()当验证提示 或 ,但类明明存在时,说明加载器吞掉了真实错误。可以通过以下命令复现错误并查看完整回溯:
@CrewBase not foundNo Flow subclass foundbash
undefined1. Run the file outside its package, as the loader does (catches relative imports and import-time errors)
1. 像加载器一样在包外运行文件(可捕获相对导入和导入时错误)
uv run python -c "import runpy; runpy.run_path('src/research_crew/crew.py', run_name='deploy_check')" # flows: src/<pkg>/main.py
uv run python -c "import runpy; runpy.run_path('src/research_crew/crew.py', run_name='deploy_check')" # flow项目对应: src/<pkg>/main.py
2. Build the object with no arguments (catches missing provider extras and Flow __init__
arguments)
__init__2. 无参构建对象(可捕获缺少提供商额外依赖和Flow __init__
参数问题)
__init__uv run python -c "from research_crew.crew import ResearchCrew; ResearchCrew().crew()"
uv run python -c "from acme_flow.main import ContentFlow; ContentFlow()"
See [validate-checks.md](references/validate-checks.md) for every check and code.
---uv run python -c "from research_crew.crew import ResearchCrew; ResearchCrew().crew()"
uv run python -c "from acme_flow.main import ContentFlow; ContentFlow()"
所有检查项及错误码请参考 [validate-checks.md](references/validate-checks.md)。
---3. The three deploy paths and what each one uploads
3. 三种部署路径及各自上传的内容
| Path | Code AMP builds | Env vars sent |
|---|---|---|
| AMP clones the repo; nothing is uploaded from your disk. AMP needs read access to the repo through a connection in the AMP org (Settings > Git Repositories: GitHub OAuth or Any Git Repository) - otherwise create still prints | Every key in local |
| A ZIP of your working tree (prints | Every key in local |
| Nothing is uploaded; AMP rebuilds from the deployment's own source | None |
| A fresh ZIP of your working tree, including uncommitted edits | Every key in local |
| Dashboard, Deploy from Code (GitHub OAuth or Git Repository tab) | The repository and branch you pick from a connection (optional auto-deploy on new commits) | What you enter in the dashboard |
| Dashboard, ZIP upload | The ZIP you choose | What you enter in the dashboard |
pushorigin| Deployment created as | Local state at | Result |
|---|---|---|
| ZIP | | No ZIP uploaded; AMP rebuilt the last uploaded ZIP. Working-tree code and |
| Git | | CLI uploaded a ZIP and |
Rules that follow from this:
- Never add or remove on a project after
origin. For a ZIP deployment, a correct push printscreateandPreparing project ZIP...; if those lines are missing, nothing new shipped.Uploading project ZIP... - Git-based: AMP builds the commit on the remote, never your disk. Uncommitted edits and local commits that are not pushed are both skipped (the build ran the previous pushed version, status ).
Crew is Online,git commit, thengit push.crewai deploy push - ZIP-based: the ZIP holds files Git tracks plus untracked files that are not ignored, and always drops ,
.env(except.env.*/.env.example),.env.sample,.git, caches,.venvandbuild/. Add run outputs (dist/,report.md) and scratch files tooutput/, or they ship. Do not depend on root-level dotfiles at runtime:.gitignoreand.gitignorewere in the ZIP but absent from the deployed project root..env.example - If the directory has no commits yet (the scaffold runs but does not commit),
git init/createcommits everything not ignored as "Initial crew". Ifpushis missing, validation's ownuv.lockcreates it before the upload (anduv run/createfall back topush).crewai install - Only the project root is packaged. Monorepo subfolders need a working directory set in the dashboard (the CLI create flow has no such option).
- without
pushfinds the deployment by--uuidin the selected org. Deployment names are not unique in an org, so keep the name stable and prefer[project].namein scripts.--uuid - prints the deployment's full record, including its public URL and bearer token. Do not paste
pushoutput into tickets or keep it in CI logs.pushprints only the name and status.crewai deploy status - fetches the deployment (build) log. When a deploy fails, read the real error there (
crewai deploy logs,ModuleNotFoundError ...): the status line only saysgit_clone_failure,Automation error, fix the code and deploy again.orProvisioning Failed, try again.Read run output from the kickoff result or the dashboard's Executions and Traces tabs.Something went wrong, try again. - means the build finished and AMP's import test of your project passed. Runtime problems (a missing provider key, a bad model name) only show at kickoff - for example status
Crew is OnlinewithFAILED. After every deploy, kick off the cheapest real input and read the output (seeValueError: ANTHROPIC_API_KEY is required).call-deployed-crew
Full matrix, exclusions, and a script to list what a ZIP deploy would contain: what-gets-uploaded.md.
| 部署路径 | AMP构建的代码来源 | 发送的环境变量 |
|---|---|---|
| AMP克隆仓库;不会从你的磁盘上传任何内容。AMP需要通过AMP组织中的连接获得仓库读取权限(设置 > Git仓库:GitHub OAuth或任意Git仓库)——否则create仍会打印 | 本地 |
| 你的工作目录的ZIP包(会打印 | 本地 |
| 不上传任何内容;AMP从部署自身的源重新构建 | 无 |
| 你的工作目录的全新ZIP包,包含未提交的修改 | 本地 |
| 仪表盘,从代码部署(GitHub OAuth或Git仓库标签页) | 你从连接中选择的仓库和分支(可选新提交自动部署) | 你在仪表盘中输入的内容 |
| 仪表盘,ZIP上传 | 你选择的ZIP文件 | 你在仪表盘中输入的内容 |
pushorigin| 部署创建方式 | | 结果 |
|---|---|---|
| ZIP | 之后添加了 | 不会上传ZIP;AMP会重建上次上传的ZIP。工作目录的代码和 |
| Git | 移除了 | CLI上传了ZIP和 |
由此得出以下规则:
- 项目create之后,不要添加或移除 。对于ZIP部署,成功的push会打印
origin和Preparing project ZIP...;如果没有这些行,说明没有部署新内容。Uploading project ZIP... - 基于Git的部署:AMP构建的是远程仓库上的提交,永远不是你本地磁盘上的内容。未提交的修改和未推送的本地提交都会被忽略(构建运行的是上一次推送的版本,状态为 )。请先执行
Crew is Online、git commit,再执行git push。crewai deploy push - 基于ZIP的部署:ZIP包含Git跟踪的文件,加上未被忽略的未跟踪文件,且始终会排除 、
.env(除了.env.*/.env.example)、.env.sample、.git、缓存、.venv和build/。请将运行输出(dist/、report.md)和临时文件添加到output/,否则它们会被一起部署。不要在运行时依赖根目录下的点文件:.gitignore和.gitignore会在ZIP中,但部署后的项目根目录中没有这些文件。.env.example - 如果目录还没有任何提交(脚手架会执行 但不会提交),
git init/create会将所有未被忽略的内容提交为 “Initial crew”。如果缺少push,验证过程中的uv.lock会在上传前创建它(并且uv run/create会回退到push)。crewai install - 只有项目根目录会被打包。monorepo的子文件夹需要在仪表盘中设置工作目录(CLI的create流程没有该选项)。
- 不带 的
--uuid会通过所选组织中的push查找部署。组织内的部署名称不是唯一的,因此请保持名称稳定,在脚本中优先使用[project].name。--uuid - 会打印部署的完整信息,包括其公开URL和Bearer Token。请不要将push输出粘贴到工单中,也不要保留在CI日志中。
push仅打印名称和状态。crewai deploy status - 会获取部署(构建)日志。当部署失败时,请在日志中查看真实错误(
crewai deploy logs、ModuleNotFoundError ...):状态行只会显示git_clone_failure、Automation error, fix the code and deploy again.或Provisioning Failed, try again.。运行输出请查看kickoff结果或仪表盘的执行与追踪标签页。Something went wrong, try again. - 表示构建已完成,且AMP对你的项目的导入测试通过了。运行时问题(缺少提供商密钥、模型名称错误)只会在kickoff时显现——例如状态为
Crew is Online并提示FAILED。每次部署后,请用成本最低的真实输入执行一次kickoff并查看输出(参考ValueError: ANTHROPIC_API_KEY is required)。call-deployed-crew
完整的矩阵、排除规则,以及列出ZIP部署包含内容的脚本,请参考 what-gets-uploaded.md。
4. Environment variables
4. 环境变量
Env vars live on each deployment. Set provider keys (, , ...) and tool keys (, ...) as that deployment's environment variables in the AMP dashboard, and confirm them with a kickoff rather than assuming an org-level setting reaches your code.
OPENAI_API_KEYANTHROPIC_API_KEYSERPER_API_KEYWhat the CLI does with local :
.env| Situation | What gets sent |
|---|---|
| Every non-comment |
| The same, and the deployment's variables are replaced by exactly this set: a key missing from |
| No env fields at all (it prints |
| Never sends env vars - change values in the dashboard. A Git-based deployment keeps the values from its |
Values are sent verbatim: arrives as (python-dotenv locally strips the comment and gives , so local runs hide this), and arrives with the quotes. Write with bare values and no inline comments.
MAX_CASES=3 # note3 # note3QUOTED="abc".envTo push code without touching a ZIP deployment's variables, run from a tree with no (move it aside) and manage values in the dashboard. Never push with a partial . Ship a with placeholders so the required names are documented.
crewai deploy push.env.env.env.example<your-key>Provider facts that bite on deploy:
- An agent with no uses the OpenAI default (
llm=), so it needsgpt-4.1-minieven in an Anthropic-only project. SetOPENAI_API_KEYon every agent.llm= - The native providers read their key from or the provider variable; a missing key fails at kickoff, not at deploy:
api_key=,ValueError: OPENAI_API_KEY is required.ValueError: ANTHROPIC_API_KEY is required - Non-OpenAI providers are extras: ,
crewai[anthropic],crewai[google-genai],crewai[bedrock]. Add them withcrewai[azure-ai-inference]so they are inuv addandpyproject.toml; without the extra, validate (and thereforeuv.lock/create) rejects the project.push - warns (
crewai deploy validate) when code callsenv_vars_not_in_dotenvor similar for a known key that is missing fromos.getenv("SERPER_API_KEY")and your shell. It is a reminder to add the key to the deployment, not a blocker..env
环境变量隶属于每个部署。请在AMP仪表盘的部署环境变量中设置提供商密钥(、 等)和工具密钥( 等),并通过kickoff验证,不要假设组织级别的设置会生效。
OPENAI_API_KEYANTHROPIC_API_KEYSERPER_API_KEYCLI对本地 的处理方式:
.env| 场景 | 发送的内容 |
|---|---|
| 所有非注释的 |
ZIP方式的 | 同样发送所有内容,且部署的变量会被完全替换为该集合: |
不存在 | 完全不发送环境变量(会打印 |
本地有 | 永远不发送环境变量——请在仪表盘中修改值。基于Git的部署会保留create时的变量,直到你在仪表盘中编辑 |
值会原样发送: 会被发送为 (本地的python-dotenv会去除注释,得到 ,因此本地运行不会暴露这个问题),而 会连同引号一起发送。请在 中使用纯值,不要加行内注释。
MAX_CASES=3 # note3 # note3QUOTED="abc".env要在不修改ZIP部署变量的情况下推送代码,请在没有 的目录下运行 (把.env移走),并在仪表盘中管理变量。永远不要用不完整的 推送。请提供带有 占位符的 ,以记录所需的变量名。
.envcrewai deploy push.env<your-key>.env.example5. Org selection is machine-wide
部署时容易踩坑的提供商相关事实:
The CLI keeps one selected org per OS user in , and every platform call () carries that org. Switching in one terminal switches it for every shell and project on the machine.
~/.config/crewai/settings.jsondeploy create/push/status/logs/list/remove- Run before every create, push, or remove. (Bare
crewai org currentprints nothing on 1.15.22-1.15.23 - use thecrewai orgsubcommand.)current - shows the orgs you belong to;
crewai org listchanges the selection.crewai org switch <org-id> - replaces the selection with the account's current org as reported by the platform, so re-check with
crewai loginafter every login.crewai org current - (
deployment_not_found) means the selected org has no deployment with that UUID or name. The usual causes: the CLI is pointed at a different org than the one that owns the deployment, orRequest to Enterprise API failed. Details: deployment_not_foundchanged since[project].name(lookup is by name). Checkcreatefirst, then the name orcrewai org current.--uuid - Scripts and CI that drive the CLI should switch org explicitly at the start and verify it, never rely on whatever was last selected.
- 没有设置 的agent会使用OpenAI默认模型(
llm=),因此即使是纯Anthropic的项目也需要gpt-4.1-mini。请为每个agent都设置OPENAI_API_KEY。llm= - 原生提供商会从 参数或对应的提供商环境变量读取密钥;密钥缺失会在kickoff时失败,而不是部署时:
api_key=、ValueError: OPENAI_API_KEY is required。ValueError: ANTHROPIC_API_KEY is required - 非OpenAI提供商属于额外依赖:、
crewai[anthropic]、crewai[google-genai]、crewai[bedrock]。请使用crewai[azure-ai-inference]添加它们,确保它们在uv add和pyproject.toml中;没有这些额外依赖的话,验证(以及uv.lock/create)会拒绝该项目。push - 当代码调用 等已知密钥,但
os.getenv("SERPER_API_KEY")和你的shell环境中都没有该密钥时,.env会发出警告(crewai deploy validate)。这只是提醒你需要将该密钥添加到部署中,不会阻塞部署。env_vars_not_in_dotenv
6. Common mistakes
5. 组织选择是全局生效的
| Symptom | Cause | Fix |
|---|---|---|
| Deploy is Online but runs old code | Git-based deployment and the change was not pushed; or a ZIP deployment pushed from a tree that now has an | |
Deploy keeps old env values after editing | Push with a local | Edit the values in the dashboard |
| A stale value overwrites a rotated key, an unrelated secret appears on the deployment, or a key vanished | ZIP | Deploy from a tree without |
Kickoff | Key missing on the deployment (often removed by a ZIP push with a partial | Set it in the dashboard, or push with a complete |
| Git-based deployment and AMP has no access to the (private) repo | Check Settings > Git Repositories in the AMP org: if it only offers "Configure GitHub" / "Add Repository", nothing is connected. Connect GitHub (or add the repo) with access to this repository, then push again: a deployment created from the CLI picks up the connection on its next |
| The AMP build's import test failed | |
| Inline comment in | Bare values only |
| No lockfile | |
Validate passed on the second run although you never ran | Validate's import check ran | Commit the new |
| Relative import, missing provider extra, or any import error in | Run the diagnostic commands in section 2 to see the real error |
| No Flow class, Flow needs constructor args, or | Add a no-arg Flow subclass; fix |
| Imports from outside the project root | Move it under |
| Extra missing from | |
| Agent without | Set |
| Wrong org selected, or | |
| Run outside a project dir | |
| Deployment from a monorepo subfolder fails to find the project | Only the repo or ZIP root is used by default | Set the working directory in the dashboard |
CLI会在 中为每个操作系统用户保存一个选中的组织,所有平台调用()都会携带该组织。在一个终端中切换组织,会影响机器上所有的shell和项目。
~/.config/crewai/settings.jsondeploy create/push/status/logs/list/remove- 每次create、push或remove前都请运行 。(在1.15.22-1.15.23版本中,直接执行
crewai org current不会输出任何内容——请使用crewai org子命令。)current - 会显示你所属的所有组织;
crewai org list会切换选中的组织。crewai org switch <org-id> - 会将选中的组织替换为平台返回的账户当前组织,因此每次登录后都请用
crewai login重新检查。crewai org current - (
deployment_not_found)表示所选组织中没有对应UUID或名称的部署。常见原因:CLI指向的组织与部署所属的组织不同,或者Request to Enterprise API failed. Details: deployment_not_found自create后发生了变化(查找是按名称进行的)。请先检查[project].name,再检查名称或crewai org current。--uuid - 脚本和CI中驱动CLI的操作应在开头明确切换组织并验证,永远不要依赖上次选中的组织。
7. Deploy checklist
6. 常见错误
- shows the intended org
crewai org current - matches the project (crew or flow)
[tool.crewai] type - matches
src/<pkg>/; crew has[project].name+@CrewBase, flow has a no-argconfig/*.yamlsubclass +Flowkickoff() - All project imports are absolute; nothing imported from outside the project root
- Provider extras (, ...) added with
crewai[anthropic];uv addrun after the lastuv lockeditpyproject.toml - committed
uv.lock - exits 0
crewai deploy validate - Git-based: changes committed and pushed, and AMP can access the repo. ZIP-based: no added since create; run outputs and scratch files ignored
origin - holds exactly this deployment's complete key set with bare values - or is moved aside so nothing is sent
.env - Provider and tool keys set as the deployment's env vars in the dashboard
- Push output showed (ZIP) - and was not pasted anywhere (it contains the bearer token)
Uploading project ZIP... - After Online, one cheap kickoff returned the expected output
| 症状 | 原因 | 解决方法 |
|---|---|---|
| 部署显示Online但运行的是旧代码 | 基于Git的部署,修改未推送;或者ZIP部署的推送时目录已经有了 | 执行 |
编辑 | 本地有 | 在仪表盘中修改变量值 |
| 过期的值覆盖了轮换后的密钥、部署上出现了不相关的密钥,或者某个密钥消失了 | ZIP方式的 | 在没有 |
尽管状态为Online,kickoff仍 | 部署上缺少该密钥(通常是因为使用不完整的 | 在仪表盘中设置,或者使用完整的 |
| 基于Git的部署,AMP没有(私有)仓库的访问权限 | 检查AMP组织中的设置 > Git仓库:如果只有“配置GitHub”/“添加仓库”选项,说明没有连接任何仓库。连接GitHub(或添加仓库)并授予该仓库的访问权限,然后重新推送:从CLI创建的部署会在下次 |
| AMP构建的导入测试失败 | 通过 |
| | 仅使用纯值,不加注释 |
| 没有锁文件 | 执行 |
你从未运行过 | 验证的导入检查执行了 | 提交新生成的 |
明明有装饰器,却报 | 相对导入、缺少提供商额外依赖,或者 | 运行第2节中的诊断命令查看真实错误 |
| 没有Flow类、Flow需要构造参数,或者crew项目设置了 | 添加无参的Flow子类;修正 |
本地运行正常,但AMP上出现 | 导入了项目根目录外的代码 | 将其移到 |
| | 执行 |
kickoff时报 | agent没有设置 | 显式设置 |
push、status或logs时报 | 所选组织错误,或者 | 执行 |
任何 | 在项目目录外运行 | |
| 从monorepo子文件夹部署时找不到项目 | 默认只使用仓库或ZIP的根目录 | 在仪表盘中设置工作目录 |
References
7. 部署检查清单
- What gets uploaded - per-path matrix, ZIP include/exclude rules, env-var handling, and a script to list what a ZIP deploy would contain
- Validate checks - every check, its code and severity, and what it cannot catch
crewai deploy validate - Public docs: Prepare for Deployment, Deploy to AMP, Automations, Monorepo Deployments, CLI
For related skills:
- call-deployed-crew - ,
/inputs,/kickoffonce the deployment is Online/status - test-crewai-project - offline stub LLM so and validate work without keys
crewai run - check-crewai-api - current model strings, default model, structured output
LLM - build-flow - Flow state, routers, persistence
- connect-tools-and-mcp - which tool and MCP transports work on a hosted deployment
- ask-docs - query the live docs for anything not covered here
- 显示的是目标组织
crewai org current - 与项目类型匹配(crew或flow)
[tool.crewai] type - 与
src/<pkg>/匹配;crew有[project].name+@CrewBase,flow有无参的config/*.yaml子类 +Flowkickoff() - 所有项目导入都是绝对导入;没有导入项目根目录外的内容
- 提供商额外依赖(等)已通过
crewai[anthropic]添加;最后一次编辑uv add后已执行pyproject.tomluv lock - 已提交
uv.lock - 退出码为0
crewai deploy validate - 基于Git的部署:修改已提交并推送,且AMP可以访问仓库。基于ZIP的部署:create后没有添加过 ;运行输出和临时文件已被忽略
origin - 恰好包含该部署的完整密钥集,且为纯值——或者已被移走,不会发送任何内容
.env - 提供商和工具密钥已在仪表盘中设置为部署环境变量
- Push输出显示了 (ZIP方式)——且没有被粘贴到任何地方(包含Bearer Token)
Uploading project ZIP... - 部署变为Online后,执行了一次低成本的kickoff并返回了预期输出
—
参考资料
—
- 上传内容说明 - 各部署路径的矩阵、ZIP包含/排除规则、环境变量处理,以及列出ZIP部署包含内容的脚本
- 验证检查项 - 的所有检查项、错误码和严重程度,以及无法捕获的问题
crewai deploy validate - 官方文档:部署准备、部署到AMP、自动化、Monorepo部署、CLI
相关技能:
- call-deployed-crew - 部署变为Online后,调用 、
/inputs、/kickoff接口/status - test-crewai-project - 离线存根LLM,无需密钥即可运行 和验证
crewai run - check-crewai-api - 当前 模型字符串、默认模型、结构化输出
LLM - build-flow - Flow状态、路由、持久化
- connect-tools-and-mcp - 托管部署支持的工具和MCP传输方式
- ask-docs - 查询官方文档中未涵盖的内容