SuperAPI AI 工具集

Use llamactl - a CLI tool for LlamaAgents

部署与运维

查看项目

更新于 10-16 09:53

技能介绍

用途:llamactl 是开发和部署 LlamaIndex 工作流的 CLI 工具,用于把工作流作为 LlamaAgents 管理,涵盖初始化项目、本地开发服务器和云端部署管理。

前置条件:需要 uv(Python 包管理与构建工具)、Node.js(UI 开发,支持 npm、pnpm 或 yarn),以及环境中安装 llama-index-workflows 和 llamactl。

安装:全局安装可用 uv tool install -U llamactl,随后 llamactl --help 查看帮助;也可不安装直接运行 uvx llamactl --help。

初始化项目:llamactl init 会基于模板创建包含 LlamaIndex 工作流和可选 UI 前端的 Python 模块,配置在 pyproject.toml 中维护,可定义工作流实例、环境设置和 UI 构建选项。

本地开发:llamactl serve 会安装依赖、把工作流以 API 形式提供(由 pyproject.toml 配置)并启动前端开发服务器;服务器可自动检测文件变更,并支持恢复进行中的工作流。

部署到 LlamaCloud:先将代码推送到 git 仓库(git remote add origin、git add -A、git commit、git push -u origin main),再用 llamactl deployments create 创建云部署,它会打开交互式终端界面配置部署名称、Git 仓库(支持通过 LlamaDeploy GitHub app 使用私有仓库)、分支/标签/提交和环境机密。

管理部署:llamactl deployments get 查看状态,llamactl deployments edit 更新机密或分支,llamactl deployments update 部署新版本;详细配置选项参见 Deployment Config Reference。

限制:资料未提供具体支持平台、收费与价格、性能或效果数据。