当前位置: 首页 > news >正文

AutoGen【部署 01】Windows环境安装部署AutoGen、AutoGenStudio和LiteLLM流程说明

Windows环境安装部署AutoGen、AutoGenStudio和LiteLLM

  • 1.AutoGen 环境搭建
    • 1.1 Anaconda 创建虚拟环境
    • 1.2 安装 AutoGen 及扩展
    • 1.3 安装 AutoGenStudio
  • 2.安装 LiteLLM

AutoGen is a framework for creating multi-agent AI applications that can act autonomously or work alongside humans.

AutoGen 是一个用于开发多智能体 AI 应用的框架,此类应用既可自主运行,亦可与人类协同工作。

1.AutoGen 环境搭建

1.1 Anaconda 创建虚拟环境

Anaconda 的安装操作这里不再赘述,官网说明 AutoGen requiresPython 3.10 or later

# 创建虚拟环境conda create -n AutoGenpython=3.10

也可以直接安装 Python3.10 版本。

1.2 安装 AutoGen 及扩展

AutoGen 的 GitHub 地址:https://github.com/microsoft/autogen,亲测使用 conda 安装失败,使用 pip 进行安装:

# 安装AutoGen和扩展模块,提供模型客户端和外部工具的支持。# Install AgentChat and OpenAI client from Extensionspipinstall-U"autogen-agentchat""autogen-ext[openai]"

1.3 安装 AutoGenStudio

AutoGenStudio 的 GitHub 地址:https://github.com/microsoft/autogen/tree/main/python/packages/autogen-studio

# Install AutoGen Studio for no-code GUIpipinstall-U"autogenstudio"
# 启动 Web Uiautogenstudio ui --port8081# 输出的信息INFO: Loading environment from'C:\Users\Lenovo\.autogenstudio\temp_env_vars.env'C:\Users\Lenovo\.conda\envs\AutoGen\lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn'tfindffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)2025-12-2518:05:52.424|INFO|autogenstudio.web.initialization:__init__:39 - Initializing application data folder: C:\Users\Lenovo\.autogenstudio2025-12-2518:05:52.424|INFO|autogenstudio.web.auth.manager:__init__:26 - Initialized auth manager with provider: none INFO: Started server process[20352]INFO: Waitingforapplication startup.2025-12-2518:05:52.544|INFO|autogenstudio.database.db_manager:initialize_database:82 - Creating database tables...2025-12-2518:05:52.604|INFO|autogenstudio.database.schema_manager:_initialize_alembic:133 - Alembic initialization complete INFO[alembic.runtime.migration]Context impl SQLiteImpl. INFO[alembic.runtime.migration]Will assume non-transactional DDL.2025-12-2518:05:52.751|INFO|autogenstudio.web.app:lifespan:39 - Application startup complete. Navigate to http://127.0.0.1:8081

AutoGen Studio 还接受多个参数来自定义应用程序:

  • –host :指定主机地址。默认情况下是本机 localhost。
  • –appdir :指定应用程序文件(例如,数据库和生成的用户文件)的存储目录。默认情况下,它设置为用户主目录中的 .autogenstudio 目录。
  • –port :指定端口号。默认情况下,它设置为 8080。
  • –reload :在代码更改时启用服务器自动重新加载。默认情况下,它设置为 False。
  • –database-uri :指定数据库 URI。示例值包括 SQLite 的 sqlite:///database.sqlite 和 PostgreSQL 的 postgresql+psycopg://user:password@localhost/dbname。如果未指定,数据库 URL 默认为 --appdir 目录中的 database.sqlite 文件。
  • –upgrade-database :将数据库架构升级到最新版本。默认情况下,该参数设置为 False。

访问 Web UI http://127.0.0.1:8081:

2.安装 LiteLLM

AutoGen 支持的模型说明:https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/tutorial/models.html,想要使用本地模型就要借助 Ollama,先安装:

pipinstall-U"autogen-ext[ollama]"

安装 LiteLLM,用于桥接 AutoGen Studio 与本地模型服务。

pipinstall"litellm"

安装依赖litellm[proxy]

pipinstall"litellm[proxy]"# 否则启用模型时会报错ImportError: Missing dependency No module named'backoff'.Run`pipinstall'litellm[proxy]'`

安装过程中报以下错误,再次执行安装命令后未再次报错,有知道原因的小伙伴儿吗?

Installing build dependencies... error error: subprocess-exited-with-error × installing build dependenciesforuvloop did not run successfully. │exitcode:1╰─>[2lines of output]ERROR: Could notfinda version that satisfies the requirement setuptools>=60(from versions: none)ERROR: No matching distribution foundforsetuptools>=60[end of output]note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed to build'uvloop'when installing build dependenciesforuvloop

启用模型:

# 启用模型命令litellm --model ollama/qwen2.5:1.5b# 输出信息INFO: Started server process[16984]INFO: Waitingforapplication startup. ██╗ ██╗████████╗███████╗██╗ ██╗ ███╗ ███╗ ██║ ██║╚══██╔══╝██╔════╝██║ ██║ ████╗ ████║ ██║ ██║ ██║ █████╗ ██║ ██║ ██╔████╔██║ ██║ ██║ ██║ ██╔══╝ ██║ ██║ ██║╚██╔╝██║ ███████╗██║ ██║ ███████╗███████╗███████╗██║ ╚═╝ ██║ ╚══════╝╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝ ╚═╝#------------------------------------------------------------## ## 'This feature doesn't meet my needs because...' ## https://github.com/BerriAI/litellm/issues/new ## ##------------------------------------------------------------#Thank youforusing LiteLLM!- Krrish&Ishaan Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:4000(Press CTRL+C to quit)

可视化界面:

http://www.jsqmd.com/news/211521/

相关文章:

  • CoT+RAG+AI推理·工程手记 篇四:DeepSeek-R1-0528-Qwen3-8B 模型解析
  • FTP替代升级:为何及如何迈向现代文件传输方案
  • CoT+RAG+AI推理·工程手记 篇五:BGE-Large-ZH-V1.5 模型解析
  • 企业文件传输升级:告别传统FTP,迈向高效安全新纪元
  • 深度测评9个AI论文网站,自考学生轻松搞定毕业论文!
  • MATLAB代码:多能互补热电联供型微网优化 完美复现(注释详细)
  • trae 中让 clangd 插件格式化代码时大括号换行
  • 网络安全五大专业深度解析:谁主攻科研?谁进大厂拿高薪?
  • 导师推荐10个AI论文工具,助你轻松搞定研究生论文写作!
  • 扣子免费生成PPT的工作流
  • ICLR 2026 Workshop 征稿开启:迈向 Lifelong Agent 终身智能新范式 投稿截止:2026/2/15
  • 2026爆火AI论文工具:9款实测自动降重+高级表达,限时公开!
  • 基于FPGA的CIC滤波器:级联积分梳状滤波器在多采样率信号处理中的数字上下变频
  • 网络安全行业前景真的这么好吗?
  • 吐血推荐专科生必用TOP10 AI论文平台
  • Java小白求职互联网大厂:从Spring Boot到微服务的面试历程
  • 汽车制造数字大脑:驱动未来智能制造的核心引擎
  • 权限控制设计:多用户场景下的安全访问机制
  • 全网最全本科生必用TOP8 AI论文平台测评
  • Java动态编译[源码是字符串形式]
  • 智能手语翻译眼镜系统设计与实现
  • 最近拆了台风机控制系统,发现远景这波人在搞事情。他们家的主控平台玩分层架构,乍看像千层饼——感知层、决策层、执行层三层夹心,中间还抹了SCADA系统当果酱
  • Heath Hoglund加入Sisvel,担任首席知识产权官
  • 汽车制造柔性排产:实现高效响应与资源优化的关键路径
  • 税务工作流智能体设计与实现方案
  • 新能源电动汽车整车控制器VCU原理图与PCB图详解:控制策略及程序实现探讨
  • C#使用ONNX Runtime运行Qwen3Guard-Gen-8B简化部署方案
  • AI亮相中韩创新创业论坛,MiniMax创始人闫俊杰:在韩用户超200万
  • 分布式研发的工具与平台选择
  • 国际光学与光子学学会(SPIE)公布2026年度会士名单