对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。

agentengine secret set

设置或更新密钥。

设置或更新项目或工作区域秘密存储中的秘密信息。

该平台需要 MONGODB_URI,当 features.memory 为 true 时,还需要 VOYAGE_API_KEY。ANTHROPIC_API_KEY 和 OPENAI_API_KEY 等提供商密钥是代理特定的;请设置您的代理所使用的密钥。

名称必须符合 ^[A-Z][A-Z0-9_]{0,127}$,且不能是保留的平台名称。默认情况下,这会设置项目范围的密钥;--workspace-scope 或 --workspace-id 则针对工作区。--context 仅命名组织和项目,因此请将其与 --project-scope 结合使用。

省略隐藏提示的值,或使用 --stdin 管传输它。Positional VALUE 和 --value 已弃用。批量 dotenv 导入使用 --from-file(- 表示 stdin)。--from-文件 读取明文密钥。首选掩码提示或来自密钥管理器的 stdin。如果您使用文件,请将其设置为仅所有者可读,导入一次,然后删除它并从历史记录、备份和版本控制中删除副本,如果已提交或泄露,请轮换每个导入的密钥。不要提交或同步该文件。文件路径仅适用于 Linux,因此在 macOS 和 Windows 上请使用 --from-file -。

--on-empty 用于控制导入时的空值:skip(跳过)、warn(警告)或 error(报错)。默认行为是在交互式终端上进行提示,否则报错。

--同步 会等待直到下一条消息可以使用新值。当前轮次保留旧值。

例子:

agentengine secret set MONGODB_URIsecret-manager export-dotenv | agentengine secret set --from-file -agentengine secret set API_KEY --workspace-scope
agentengine secret set [NAME] [flags]
--base-url string Platform base URL --context string Named context to target (see 'agentengine context list') --description string Human-readable description of the secret --from-file string Security warning: import plaintext dotenv secrets from a private temporary Linux file, or - for stdin on any OS-h, --help help for set --on-empty string Action for empty values when using --from-file: skip, warn, or error --org-id string Organization ID --project-id string Project ID --project-scope Target project-scoped secrets (the default; explicit alternative to --workspace-scope) --stdin Read the entire stdin stream as one secret; use --from-file - for dotenv --sync After setting, wait until the next message can use the new secret values --workspace string Monorepo: target a specific workspace by name (from root agent.yaml) --workspace-id string Workspace ID --workspace-scope Target workspace-scoped secrets instead of project-scoped secrets (the default)
--log-file string override log file path --log-level string file log verbosity (error|warn|info|debug) (default "info") --no-log disable file logging-q, --quiet silence stderr below error-v, --verbose count raise stderr verbosity (-v info, -vv debug)
给本页内容打分