[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"pack-detail-python-agent-frameworks-zh":3,"seo:pack:python-agent-frameworks:zh":61},{"code":4,"message":5,"data":6},200,"操作成功",{"pack":7},{"slug":8,"icon":9,"tone":10,"status":11,"status_label":12,"title":13,"description":14,"items":15,"install_cmd":60},"python-agent-frameworks","🐍","#4F46E5","stable","稳定","Python Agent 框架","Phidata \u002F AGiXT \u002F AutoGPT \u002F OpenAI Swarm \u002F CrewAI — LangGraph 之外的 Python 多 agent 框架。",[16,28,36,44,52],{"id":17,"uuid":18,"slug":19,"title":20,"description":21,"author_name":22,"view_count":23,"vote_count":24,"lang_type":25,"type":26,"type_label":27},223,"d1627127-f788-47dc-ac98-b3464feb99f8","phidata-build-deploy-ai-agents-scale-d1627127","Phidata — Build & Deploy AI Agents at Scale","Framework for building, running, and managing AI agents at scale. Memory, knowledge, tools, reasoning, and team workflows. Monitoring dashboard included. 39K+ stars.","Phidata",333,0,"en","skill","Skill",{"id":29,"uuid":30,"slug":31,"title":32,"description":33,"author_name":34,"view_count":35,"vote_count":24,"lang_type":25,"type":26,"type_label":27},750,"6528233f-b920-475b-8ecb-a15801303634","agixt-extensible-ai-agent-automation-framework-6528233f","AGiXT — Extensible AI Agent Automation Framework","Open-source AI agent automation platform with 50+ provider integrations, plugin system, chain-of-thought workflows, and persistent memory. Self-hostable via Docker.","Agent Toolkit",264,{"id":37,"uuid":38,"slug":39,"title":40,"description":41,"author_name":42,"view_count":43,"vote_count":24,"lang_type":25,"type":26,"type_label":27},221,"6764deda-6349-4f2e-a9a0-0f867ac9d5e6","autogpt-autonomous-ai-agent-platform-6764deda","AutoGPT — Autonomous AI Agent Platform","Build and deploy autonomous AI agents that accomplish goals with minimal human input. Visual builder, marketplace, and API. The original autonomous agent. 183K+ stars.","Script Depot",293,{"id":45,"uuid":46,"slug":47,"title":48,"description":49,"author_name":50,"view_count":51,"vote_count":24,"lang_type":25,"type":26,"type_label":27},231,"d75dad10-15d3-4530-9e8c-4558ec701a27","openai-swarm-lightweight-multi-agent-orchestration-d75dad10","OpenAI Swarm — Lightweight Multi-Agent Orchestration","Educational multi-agent framework by OpenAI. Ergonomic agent handoffs, tool calling, and context variables. Minimal abstraction over Chat Completions API. 21K+ stars.","OpenAI",334,{"id":53,"uuid":54,"slug":55,"title":56,"description":57,"author_name":58,"view_count":59,"vote_count":24,"lang_type":25,"type":26,"type_label":27},623,"97fce2da-d60f-413c-a31d-527cd7aaa558","crewai-multi-agent-orchestration-framework-97fce2da","CrewAI — Multi-Agent Orchestration in Python","Python framework for orchestrating role-playing AI agents that collaborate on complex tasks. Define agents with roles, goals, and tools, then let them work together autonomously. 25,000+ stars.","CrewAI",284,"tokrepo install pack\u002Fpython-agent-frameworks",{"pageType":62,"pageKey":8,"locale":63,"title":64,"metaDescription":65,"h1":13,"tldr":66,"bodyMarkdown":67,"faq":68,"schema":84,"internalLinks":94,"citations":107,"wordCount":120,"generatedAt":121},"pack","zh","Python Agent 框架：LangGraph 之外的 5 个选择","Phidata \u002F AGiXT \u002F AutoGPT \u002F OpenAI Swarm \u002F CrewAI — 五个 Python-first 多 agent 系统框架，跳出 LangGraph 默认选项。TokRepo 一条命令装齐。","五个 Python 原生多 agent 框架 —— 涵盖角色化团队、自主循环、转交路由、完整 agent 平台。TokRepo 一条命令装齐。","## 这个 pack 装了什么\n\n这个包收齐了 **五个 Python-first 的 agent 框架**，按 GitHub star 和提交活跃度排序，每个都有足够的生产代码可以今天就用。每一个代表不同的设计哲学 —— 按问题形态选，不按品牌选。\n\n| # | 框架 | 风格 | 适合场景 |\n|---|---|---|---|\n| 1 | Phidata | 数据应用式 agent | 仪表盘 + 工具调用 |\n| 2 | AGiXT | 完整 agent 平台 | 自建多 provider |\n| 3 | AutoGPT | 自主循环 | 开放式目标追求 |\n| 4 | OpenAI Swarm | 转交路由 | 轻量多 agent |\n| 5 | CrewAI | 角色化团队 | 顺序团队工作流 |\n\n故意把 LangGraph（多数 LangChain 栈默认带）和纯 JS 框架排除掉了。这五个覆盖的是 LangGraph StateGraph 太重时 Python 用户真正会挑的设计空间。\n\n## 为什么「留在 Python」很重要\n\n大多团队已经有 Python 数据栈 —— pandas、FastAPI、Postgres 驱动、ML 库。为一个功能切到 TypeScript 或 Go agent runtime 意味着把数据管道重写。这五个框架完全绕开这个：跑在你现有的 FastAPI 服务里，共享 venv，调用后端已经在用的 DB driver。\n\n权衡形态：\n- **Phidata** 最 Pythonic —— agent 是带工具方法的类，SQLAlchemy 味很浓。适合 agent 本身就是数据应用（仪表盘、内部工具）的场景\n- **AGiXT** 是完整平台，带 UI、provider 抽象、chains、extensions。安装最重，开箱即用功能最多\n- **AutoGPT** 是自主循环原型 —— 进目标，规划+执行+反思，重复。token 成本偏高，开发投入低\n- **OpenAI Swarm** 最小 —— agent 之间通过 `transfer_to_X()` 函数互相转交。实验性，但路由心智模型最干净\n- **CrewAI** 让你定义 `Agent` \u002F `Task` \u002F `Crew` 对象，明确角色，顺序或层级执行。适合「市场 → 审核 → 发布」这种流水线\n\n## 一条命令装齐\n\n```bash\n# 装整个 pack，把依赖 + 示例 agent 放进项目\ntokrepo install pack\u002Fpython-agent-frameworks\n\n# 或者只装一个\ntokrepo install crewai\ntokrepo install openai-swarm\ntokrepo install autogpt\n```\n\nTokRepo CLI 拉取每个框架的 getting-started 模板，放在 `agents\u002F\u003C框架>\u002F`，再把依赖加到 pyproject.toml 或 requirements.txt。接你真实 prompt 之前先 `pytest agents\u002F` 验证示例。\n\n## 几个常见坑\n\n- **AutoGPT 别用在闭式任务**，它的强项是开放式目标。「总结这个 PDF」会让它对着只有一步的问题循环反思烧 token\n- **Swarm 是实验性，不是生产级**，OpenAI 是当作「设计模式」repo 在发。用它的路由模式，生产循环自己写或抄到维护中的 fork 里\n- **CrewAI 顺序模式会隐藏并行机会**，两个任务没依赖就声明并行，否则顺序模式即使不需要也端到端跑\n- **Phidata 的存储层假设你用 Postgres**，SQLite 本地开发能跑，但存储接口是围着 JSONB 设计的。线上版要规划真 Postgres\n- **AGiXT 更新快**，小版本之间 schema 破坏过。生产上钉具体 tag，升级前先看 changelog\n\n## 单这个 pack 不够时\n\n如果你的问题是一个纯 Python 服务，这个 pack 够了。如果你有：\n- **Java\u002FSpring 后端** → 看 [多语言 Agent 框架](\u002Fzh\u002Fpacks\u002Fagent-frameworks-multilang) 找 Spring AI 和 LangChain4j\n- **TypeScript edge function** → 同一个 multilang pack 涵盖 Mastra\n- **非 LLM 评估器作为门控** → 配 [LLM 评测 & 护栏](\u002Fzh\u002Fpacks\u002Fllm-eval-guardrails)\n\n也可以组合：Python 写 CrewAI 编排器，调 Java 的 Spring AI agent 做某个工具，上线前 Promptfoo 评估。这里的框架是 agent runtime，不指定你栈的其他部分。",[69,72,75,78,81],{"q":70,"a":71},"这些框架是免费的吗？","五个都是 MIT 或 Apache 2.0 开源 —— 框架本身不收按席位费、不限调用量。你还是要为背后的 LLM API 付钱（OpenAI \u002F Anthropic 等），AGiXT 的托管版也收钱。五个自建都是真的免费，包括 Phidata 可选的托管 dashboard。",{"q":73,"a":74},"CrewAI 跟 LangGraph 比怎么样？","CrewAI 默认角色化 + 顺序执行 —— 你描述 Agent 和 Task，组装成 Crew。LangGraph 是图式 —— 节点和边自己画。CrewAI 表达团队工作流更快；LangGraph 在控制流不规则或有环时更好。很多团队在 CrewAI 原型，再把热路径移到 LangGraph 拿控制权。",{"q":76,"a":77},"这些能跟 Claude Code 或 Cursor 配合吗？","这些框架是 runtime，不是编辑器集成。你用它们写 agent，然后跑成 Python 服务。你的编辑器（Claude Code \u002F Cursor）是写代码的地方，但 agent 本身作为服务跑。要编辑器侧的 subagent，去看 Claude Code 子代理精选 pack。",{"q":79,"a":80},"和多 agent 框架 pack 的区别？","多 agent 框架是平台无关的，并列对比 JS \u002F Go \u002F Python 选项给你挑。这个 pack 只 Python，更深入 Python 设计选择。如果你已经定 Python 就从这里开始；语言还在挑就先看多 agent 框架 pack。",{"q":82,"a":83},"AutoGPT 的运维坑是什么？","不限制迭代次数或 token 预算它就会永远循环下去。默认配置可以在一个「分析市场」任务里花 50 美元 OpenAI 额度才发现自己在打转。永远设 max_iterations、max_cost_in_usd 和严格目标 —— 模糊目标 + 无限预算就是翻车模式。",{"@context":85,"@type":86,"name":87,"description":88,"numberOfItems":89,"publisher":90},"https:\u002F\u002Fschema.org","CollectionPage","Python Agent Frameworks","Phidata, AGiXT, AutoGPT, OpenAI Swarm, CrewAI — Python-first frameworks for multi-agent systems beyond LangGraph.",5,{"@type":91,"name":92,"url":93},"Organization","TokRepo","https:\u002F\u002Ftokrepo.com",[95,99,103],{"url":96,"anchor":97,"reason":98},"\u002Fzh\u002Fpacks\u002Fmulti-agent-frameworks","多 agent 框架","跨语言平台无关比较",{"url":100,"anchor":101,"reason":102},"\u002Fzh\u002Fpacks\u002Fagent-frameworks-multilang","多语言 Agent 框架","Java \u002F Rust \u002F TS 等非 Python 栈",{"url":104,"anchor":105,"reason":106},"\u002Fzh\u002Fpacks\u002Fllm-eval-guardrails","LLM 评测 & 护栏","上线前给每次改动打分",[108,112,116],{"claim":109,"source_name":110,"source_url":111},"OpenAI Swarm experimental multi-agent framework","openai\u002Fswarm","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fswarm",{"claim":113,"source_name":114,"source_url":115},"CrewAI role-based orchestration","crewAIInc\u002FcrewAI","https:\u002F\u002Fgithub.com\u002FcrewAIInc\u002FcrewAI",{"claim":117,"source_name":118,"source_url":119},"AutoGPT autonomous agent project","Significant-Gravitas\u002FAutoGPT","https:\u002F\u002Fgithub.com\u002FSignificant-Gravitas\u002FAutoGPT",488,"2026-05-02T15:00:00Z"]