# AG2 — Open-Source AgentOS for Multi-Agent Systems > AG2 (formerly AutoGen) is an open-source framework for building cooperating AI agents with tool use, human-in-the-loop workflows, and patterns. ## Install Save as a script file and run: ## Quick Use 1. Install / run: ```bash pip install ag2[openai] ``` 2. Start / smoke test: ```bash python - <<'PY' import autogen print('autogen module:', autogen.__name__) PY ``` 3. Verify: - Run the smallest “first agent” example from the README/docs and confirm you can complete one task end-to-end before adding more agents. ## Intro AG2 (formerly AutoGen) is an open-source framework for building cooperating AI agents with tool use, human-in-the-loop workflows, and patterns. - **Best for:** Teams prototyping multi-agent collaboration patterns who want an open-source AgentOS-style framework - **Works with:** Python workflows; docs and examples are linked from the README - **Setup time:** 15 minutes ## How to Use It Well - Setup time ~15 minutes (pip install + run one starter example) - The project positions itself as AgentOS-style multi-agent tooling (formerly AutoGen) - GitHub stars + forks (verified): see Source & Thanks Treat multi-agent as a control problem. Start with a tiny set of roles, define tool boundaries, and log every tool call. Once you can reliably reproduce a run, then scale to more agents and longer horizons. ### FAQ **Q: Is it stable?** A: The README discusses roadmap and versioning; start with one pattern and upgrade deliberately. **Q: How many agents should I start with?** A: Two is enough: one assistant and one user/tool proxy. Add more only after you can debug failures. **Q: How do I keep it safe?** A: Use least-privilege keys, separate dev/prod, and require explicit approvals for any write or shell execution. ## Source & Thanks > Source: https://github.com/ag2ai/ag2 > License: Apache-2.0 > GitHub stars: 4,533 · forks: 621 --- ## 快速使用 1. 安装 / 运行: ```bash pip install ag2[openai] ``` 2. 启动 / 冒烟测试: ```bash python - <<'PY' import autogen print('autogen module:', autogen.__name__) PY ``` 3. 验证: - Run the smallest “first agent” example from the README/docs and confirm you can complete one task end-to-end before adding more agents. ## 简介 AG2(原 AutoGen)是开源的 AgentOS 框架:提供多 agent 对话、工具调用、HITL(人类在环)与多种对话模式。适合从研究原型起步,逐步把多 Agent 系统收敛成可维护、可扩展的工程项目。 - **适合谁:** 想验证多 Agent 协作模式,并希望从开源 AgentOS 风格框架起步的团队 - **可搭配:** Python 工作流;文档与示例入口见 README - **准备时间:** 15 分钟 ## 实战建议 - 上手约 15 分钟(安装 + 跑通一个最小示例) - 项目定位为 AgentOS 风格的多 Agent 工具(原 AutoGen) - GitHub stars + forks(已核验):见「来源与感谢」 把多 agent 当控制问题:先从很小的角色集合开始,划清工具边界,并记录每次工具调用。能稳定复现一次 run 后,再扩展到更多 agent 与更长任务周期。 ### FAQ **稳定性如何?** A: README 提到版本路线;建议先用一种模式跑稳,再有计划地升级。 **一开始需要多少个 agent?** A: 两个就够:一个助手 + 一个用户/工具代理。能排查失败后再加复杂度。 **怎么保证安全?** A: 用最小权限密钥、区分 dev/prod,并对任何写操作/命令执行加明确审批门。 ## 来源与感谢 > Source: https://github.com/ag2ai/ag2 > License: Apache-2.0 > GitHub stars: 4,533 · forks: 621 --- Source: https://tokrepo.com/en/workflows/ag2-open-source-agentos-for-multi-agent-systems Author: Agent Toolkit