规划与任务分解

一句话总结
把一个大目标拆成可执行的子步骤/子任务,并在执行中按需重规划。从”无显式规划的 ReAct”到”先产出完整任务 DAG 再执行”,是 agent 处理复杂、多步、需分工任务的关键。

它解决什么问题

纯 ReAct 走一步看一步,面对长程任务容易迷失、重复、漏步。显式规划提供全局视野、可追踪的进度、以及把子任务分给不同 agent/工具的基础。

设计维度 / 实现谱系

  • 有无显式规划:隐式(边做边想)↔ 显式(先 plan 后 execute)
  • 计划结构:线性任务列表 ↔ 有依赖的 DAG ↔ 层级(目标→子目标)
  • 重规划:一次性计划 ↔ 执行中根据观察动态 replan
  • 谁来规划:同一 agent ↔ 专职 planner agent(见 single-vs-multi-agent
  • 驱动方式:自由生成 ↔ SOP/模板约束(如 MetaGPT 的标准化流程)

关键要点

  • 规划 vs 不规划是 范式的核心分水岭之一。
  • 计划越显式越可控可并行,但越可能”脱离现实”——replan 是必要兜底。
  • 多 agent 系统里,规划常上移为 orchestrator 的职责。

关联

各框架实现对比

下表汇总 32 个实现了「规划」的框架(源码级阅读结论)。网站上以可展开 + 源码节选呈现。

框架实现方式
Aeon单技能内无显式 planner(交给 LLM);跨技能用 chains(chains: 配置 DAG,parallel: 并发组 + consume: 注入上游输出)和 frontmatter depends_on(调度器据此排序,依赖在前 sleep 5 再派发依赖方)
AG2内核无显式 planner,规划交给 LLM/对话模式。contrib/captainagent 可动态组建专家团队;society_of_mind_agent 把子群当一个”内省”Agent;agent_optimizer 离线优化函数集
Agent-LLM (AGiXT)①隐式:靠 “Think About It” 提示让 LLM 自己 thinking/reflection;②显式:用 JSON Chain 预编排多步工作流(如 chains/Smart Instruct.json、Generate Task Chain.json);命令选择阶段先让 LLM 挑出相关命令及其前置命令
AgentDock内核无独立 planner;规划=人写的 orchestration steps(声明式状态机)+ LLM 自身推理。step 可设 sequence(强制工具顺序) 与 conditions(tool_used/sequence_match) 实现确定性多阶段流程;另有 agent-planner 模板做”设计其他 agent”
AgentsetdeepResearch 模式做查询规划:generateInitialQueries→performSearch→conductIterativeResearch(budget 轮,evaluateResearchCompleteness 产出补充 query)→filter→generateResearchAnswer 生成多页报告
AgentVersetask-solving 的”规划”= DecisionMaker 规则产出 List[SolverMessage] plan,支持多种拓扑:horizontal/vertical/central/concurrent/brainstorming/dynamic(rules/decision_maker/);memory_manipulator 中另有 plan 变体辅助生成计划;simulation 无显式 planner
Astron Agent单体 agent 无显式 planner,规划隐式交给 LLM 的 CoT;显式编排在 workflow 层:decision 节点用 router prompt 做意图分流/分支,iteration/loop 节点做循环分解,整个 DAG 由 DSL 描述
AutoGen内核无通用 planner;规划由 LLM 隐式完成。显式规划见 Magentic-One orchestrator:先建 task ledger(facts + plan 两段 prompt 推理),再用 progress ledger 驱动外/内双层循环
ConnectOnion内核无显式 planner;规划交给 LLM 自身。可选 subagents 插件附带内建 plan/explore 子 agent(AGENT.md);ReAct 插件只做意图识别+反思,不做计划
Cordum仅有 Workflow Engine 把声明式工作流拆成多个 JobRequest 步骤并推进(loop/parallel/subworkflow),非 LLM 规划
CrewAI①Crew 级 planning=True:跑前用 planning agent 为每个 task 生成 step-by-step plan 注入描述;②hierarchical 经理动态分解派活;任务编排本身是声明式 Task 列表
Hive不预设固定 planner:①Queen(编码 agent)把 NL 目标拆成 graph 结构(节点/边)=离线规划;②Queen 自身用 task_create_batch/task_update 做多步任务清单(framework/tasks/);③图内 llm_decide 边做运行时路由
LangChain内核无显式 planner;规划交给 LLM。可选 TodoListMiddleware 注入 write_todos 工具+todos 状态字段做轻量任务清单(对标 Claude Code TodoWrite);更重的 planning 在上层 Deep Agents 包
LlamaIndex内核无显式 planner;规划隐式交给 LLM(ReAct 的 Thought 链 / function-calling 多轮)。另有 CodeActAgent 让 LLM 写 Python 代码作为”计划+执行”;tools/query_plan 提供查询级子问题分解。无独立 plan-then-execute 编排器
LoongFlowPES 的 Planner Worker 是显式独立阶段:理解任务+从进化记忆检索父代经验+产出执行蓝图(best_plan.txt);Planner 仅是 get_worker 的薄封装,具体策略由场景 Agent 实现(如 general_agent/planner.py);ReAct 侧用 Todo 工具做轻量任务清单
Maestro由 orchestrator LLM 隐式规划:每轮只产出”下一个子任务”的 prompt(增量式拆解,非一次性全计划),并自评目标是否达成
Mastra内核无显式 planner;自主规划交给 LLM。显式规划走声明式 workflow:开发者用 .then/.branch/.parallel/.dowhile/.foreach/.map 手工编排为 DAG;多 agent 场景由 routing agent 动态决定下一个 primitive(见多智能体编排)
MetaGPT两层:①SOP 即”硬编码计划”——角色的 Action 顺序就是流程;②plan_and_act 模式下 Planner 用 WritePlan 让 LLM 生成 Plan(Task 列表 + 依赖,拓扑排序),逐任务执行+review+动态改计划
nanobot内核无独立 planner,规划交给 LLM;提供 sustained goal / long_task 机制:/goal 持续目标跨 turn 续跑,goal_continue_message 注入让模型继续推进或 complete_goal;Step Plan 经 skill 引导
Open Multi-Agentgoal→任务 DAG 的一次性 LLM 拆解:coordinator 收 goal+roster,输出 json 任务数组;parseTaskSpecs 容错解析(fenced/裸数组),title 形式的 dependsOn 在 loadSpecsIntoQueue 中两遍映射为真实 task id;简单目标走 isSimpleGoal 短路只跑单 agent
OpenClaw内核无显式 planner,规划交给 LLM 自身;提供 thinking 级别(—thinking high、/think )与 reasoning 透传;自治侧靠 standing orders(写在 AGENTS.md 里的”程序”边界)而非结构化计划
Pipecat框架内核无显式 planner;任务分解交给 LLM 自身或上层应用。结构化”分解”体现在管道编排(Pipeline/ParallelPipeline)与多 worker job RPC(@job + job_group 扇出),而非自动 plan
PraisonAI可选 planning=True:PlanningAgent 仿 CrewAI AgentPlanner / Claude Code Plan Mode,先以只读工具(READ_ONLY_TOOLS)研究再产出 Plan/PlanStep;Task 级别用 next_tasks/condition 静态声明 DAG,hierarchical process 由 manager LLM 动态分派
Semantic Kernel内核无独立 planner(旧 Stepwise/Handlebars planner 已从主源码移除,仅余 InternalUtilities/planning/ 与 samples 迁移示例)。规划=模型自身多步 function calling;多步业务流程交给 Process 框架;Magentic manager 内含动态计划账本
smolagents可选周期性规划:planning_interval 触发独立 planning step,首步生成 initial_plan、之后 update_plan(summary_mode 重写记忆);计划存为 PlanningStep 注入记忆,非强制
Strands Agents内核无显式 planner——这正是 model-driven 的取舍:规划交给模型隐式完成。结构化分解可借 multiagent/graph.py 的依赖图或 swarm.py 的自治移交,但单 agent 层无独立规划组件
SwarmClawmain-agent-loop 维护持久 MainLoopState(goal/goalContract/planSteps/completedPlanSteps/currentPlanStep/reviewNote),心跳每次回灌;plan/review 由 LLM 经 meta 标记产出后解析(parseMainLoopPlan/parseMainLoopReview)
Swarms可选 plan_enabled/plan(task):用 planning_prompt+历史让 LLM 先产出 step-by-step 计划写入短期记忆;max_loops=“auto” 走 _run_autonomous_loop 的 plan→execute→reflect 三段式;专门拓扑 PlannerWorkerSwarm/AutoSwarmBuilder
Transformers Agents由 LLM 隐式规划工具调用序列;无独立 planner
Upsonic内核无强制 planner,规划交给 LLM;可选 enable_thinking_tool/enable_reasoning_tool(agent.py:263);deepagent 子包带 planning_toolkit/TodoList(tasks.py:11 引用);Graph 把多 Task 显式编排成 DAG/链
vectara-agentic内核无显式 planner;规划交给 LLM(base 指令鼓励“拆子问题”,prompts.py:54)。提供可选 内置 workflow 做显式分解:SubQuestionQueryWorkflow(并行子问题,@step(num_workers=8))与 SequentialSubQuestionsWorkflow(顺序依赖);旧的 StructuredPlanning 已在 v0.4 废弃
VoltAgent内核无强制 planner;规划交给 LLM。独立的 PlanAgent(Claude-Code 风格)内建 write_todos 规划工具箱 + filesystem + subagent,强制”多步任务先写 todo”

各框架实现对比 · 源码级

32 个框架实现该组件 · 27 个附源码节选 · 点击任意框架展开看实现要点与代码

Aeon yaml 单技能内无显式 planner(交给 LLM);跨技能用 chains(chains: 配置 DAG,parallel: 并发组 + consume: 注入上游输出)和 frontmatter depends_on(调度器据此排序,依赖在前 sleep 5 再派发依赖方)

单技能内无显式 planner(交给 LLM);跨技能用 chains(chains: 配置 DAG,parallel: 并发组 + consume: 注入上游输出)和 frontmatter depends_on(调度器据此排序,依赖在前 sleep 5 再派发依赖方)

aeon.yml:276github/workflows/messages.yml:209
aeon.yml:276 yaml
#       steps:
#         - parallel: [skill-a, skill-b]
#         - skill: skill-c, consume: [skill-a, skill-b]
chains:
  # daily-routine:
  #   schedule: "0 7 * * *"
  #   on_error: fail-fast
  #   steps:
  #     - parallel: [token-movers, paper-pick, github-issues, hacker-news-digest]
  #     - skill: daily-routine, consume: [token-movers, paper-pick, github-issues, hacker-news-digest]

# Default model for all skills. Override per-run via workflow_dispatch.
# Options: claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5-20251001
查看 Aeon 完整笔记 →
AG2 python 内核无显式 planner,规划交给 LLM/对话模式。contrib/captainagent 可动态组建专家团队;society_of_mind_agent 把子群当一个"内省"Agent;agent_optimizer 离线优化函数集

内核无显式 planner,规划交给 LLM/对话模式。contrib/captainagent 可动态组建专家团队;society_of_mind_agent 把子群当一个"内省"Agent;agent_optimizer 离线优化函数集

查看 AG2 完整笔记 →
Agent-LLM (AGiXT) python ①隐式:靠 "Think About It" 提示让 LLM 自己 thinking/reflection;②显式:用 JSON Chain 预编排多步工作流(如 chains/Smart Instruct.json、Generate Task Chain.json);命令选择阶段先让 LLM 挑出相关命令及其前置命令

①隐式:靠 "Think About It" 提示让 LLM 自己 thinking/reflection;②显式:用 JSON Chain 预编排多步工作流(如 chains/Smart Instruct.json、Generate Task Chain.json);命令选择阶段先让 LLM 挑出相关命令及其前置命令

Interactions.py:2831Chain.py:38
agixt/Interactions.py:2831 python
        MAX_BATCH_TOKENS = 100000

        # Calculate base prompt template tokens (without the batch content)
        base_selection_prompt = f"""You are an expert assistant that selects relevant commands/tools for a user request. You manage IT infrastructure, remote machines, tickets, desktop support, code execution, web browsing, media generation, and more. Your job is to select exactly the right set of commands the agent will need.

## User's Request
{user_input}

## Context
{context}

{{BATCH_COMMANDS}}
查看 Agent-LLM (AGiXT) 完整笔记 →
AgentDock typescript 内核无独立 planner;规划=人写的 orchestration steps(声明式状态机)+ LLM 自身推理。step 可设 sequence(强制工具顺序) 与 conditions(tool_used/sequence_match) 实现确定性多阶段流程;另有 agent-planner 模板做"设计其他 agent"

内核无独立 planner;规划=人写的 orchestration steps(声明式状态机)+ LLM 自身推理。step 可设 sequence(强制工具顺序) 与 conditions(tool_used/sequence_match) 实现确定性多阶段流程;另有 agent-planner 模板做"设计其他 agent"

查看 AgentDock 完整笔记 →
Agentset typescript deepResearch 模式做查询规划:generateInitialQueries→performSearch→conductIterativeResearch(budget 轮,evaluateResearchCompleteness 产出补充 query)→filter→generateResearchAnswer 生成多页报告

deepResearch 模式做查询规划:generateInitialQueries→performSearch→conductIterativeResearch(budget 轮,evaluateResearchCompleteness 产出补充 query)→filter→generateResearchAnswer 生成多页报告

apps/web/src/lib/deep-research/index.ts:469deep-research/index.ts:407deep-research/config.ts:14
apps/web/src/lib/deep-research/index.ts:469 typescript
   * @param topic The research topic
   * @returns The research answer
   */
  async runResearch(topic: string) {
    console.log(`\x1b[36m🔍 Researching topic: ${topic}\x1b[0m`);

    // Step 1: Generate initial queries
    const initialQueries = await this.generateInitialQueries({ topic });

    // Step 2: Perform initial search
    const initialResults = await this.performSearch({
      queries: initialQueries,
    });
查看 Agentset 完整笔记 →
AgentVerse python task-solving 的"规划"= DecisionMaker 规则产出 List[SolverMessage] plan,支持多种拓扑:horizontal/vertical/central/concurrent/brainstorming/dynamic(rules/decision_maker/);memory_manipulator 中另有 plan 变体辅助生成计划;simulation 无显式 planner

task-solving 的"规划"= DecisionMaker 规则产出 List[SolverMessage] plan,支持多种拓扑:horizontal/vertical/central/concurrent/brainstorming/dynamic(rules/decision_maker/);memory_manipulator 中另有 plan 变体辅助生成计划;simulation 无显式 planner

dynamic.py:16
agentverse/environments/tasksolving_env/rules/decision_maker/dynamic.py:16 python
    from agentverse.message import Message


@decision_maker_registry.register("dynamic")
class DynamicDecisionMaker(BaseDecisionMaker):
    """
    Discuss in a horizontal manner.
    """

    name: str = "dynamic"

    ## To Do: implement dynamic
    # def step(
查看 AgentVerse 完整笔记 →
Astron Agent python 单体 agent 无显式 planner,规划隐式交给 LLM 的 CoT;显式编排在 workflow 层:decision 节点用 router prompt 做意图分流/分支,iteration/loop 节点做循环分解,整个 DAG 由 DSL 描述

单体 agent 无显式 planner,规划隐式交给 LLM 的 CoT;显式编排在 workflow 层:decision 节点用 router prompt 做意图分流/分支,iteration/loop 节点做循环分解,整个 DAG 由 DSL 描述

engine/dsl_engine.py:786
core/workflow/engine/dsl_engine.py:786 python
        return DefaultNodeExecutionStrategy()


class WorkflowEngine(BaseModel):
    """
    Main workflow execution engine.

    Orchestrates the execution of workflow nodes using depth-first search,
    manages error handling, retry mechanisms, and provides various execution
    strategies for different node types.
    """

    engine_ctx: WorkflowEngineCtx = None  # type: ignore
查看 Astron Agent 完整笔记 →
AutoGen python 内核无通用 planner;规划由 LLM 隐式完成。显式规划见 Magentic-One orchestrator:先建 task ledger(facts + plan 两段 prompt 推理),再用 progress ledger 驱动外/内双层循环

内核无通用 planner;规划由 LLM 隐式完成。显式规划见 Magentic-One orchestrator:先建 task ledger(facts + plan 两段 prompt 推理),再用 progress ledger 驱动外/内双层循环

_magentic_one/_magentic_one_orchestrator.py:157
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_magentic_one/_magentic_one_orchestrator.py:157 python
            await self._output_message_queue.put(msg)

        # Outer Loop for first time
        # Create the initial task ledger
        #################################
        # Combine all message contents for task
        self._task = " ".join([msg.to_model_text() for msg in message.messages])
        planning_conversation: List[LLMMessage] = []

        # 1. GATHER FACTS
        # create a closed book task and generate a response and update the chat history
        planning_conversation.append(
            UserMessage(content=self._get_task_ledger_facts_prompt(self._task), source=self._name)
查看 AutoGen 完整笔记 →
ConnectOnion python 内核无显式 planner;规划交给 LLM 自身。可选 subagents 插件附带内建 plan/explore 子 agent(AGENT.md);ReAct 插件只做意图识别+反思,不做计划

内核无显式 planner;规划交给 LLM 自身。可选 subagents 插件附带内建 plan/explore 子 agent(AGENT.md);ReAct 插件只做意图识别+反思,不做计划

useful_plugins/re_act.py:17
connectonion/useful_plugins/re_act.py:17 python
1. After user input: Acknowledge request (show we understood)
2. After tool execution: Reflect on results

Planning is left to the main agent - this plugin just adds intent recognition and reflection.

Trace kinds for frontend rendering:
- kind='intent' → Show as "Understanding..." card
- kind='reflect' → Show as "Reflecting..." card

Usage:
    from connectonion import Agent
    from connectonion.useful_plugins import re_act
查看 ConnectOnion 完整笔记 →
Cordum go 仅有 Workflow Engine 把声明式工作流拆成多个 JobRequest 步骤并推进(loop/parallel/subworkflow),非 LLM 规划

仅有 Workflow Engine 把声明式工作流拆成多个 JobRequest 步骤并推进(loop/parallel/subworkflow),非 LLM 规划

查看 Cordum 完整笔记 →
CrewAI python ①Crew 级 planning=True:跑前用 planning agent 为每个 task 生成 step-by-step plan 注入描述;②hierarchical 经理动态分解派活;任务编排本身是声明式 Task 列表

①Crew 级 planning=True:跑前用 planning agent 为每个 task 生成 step-by-step plan 注入描述;②hierarchical 经理动态分解派活;任务编排本身是声明式 Task 列表

crewai/crew.py:1406crewai/utilities/planning_handler.py:37
lib/crewai/src/crewai/crew.py:1406 python
            )
        return task_outputs

    def _handle_crew_planning(self) -> None:
        """Handles the Crew planning."""
        self._logger.log("info", "Planning the crew execution")
        result = CrewPlanner(
            tasks=self.tasks, planning_agent_llm=self.planning_llm
        )._handle_crew_planning()

        plan_map: dict[int, str] = {}
        for step_plan in result.list_of_plans_per_task:
            if step_plan.task_number in plan_map:
查看 CrewAI 完整笔记 →
Hive python 不预设固定 planner:①Queen(编码 agent)把 NL 目标拆成 graph 结构(节点/边)=离线规划;②Queen 自身用 task_create_batch/task_update 做多步任务清单(framework/tasks/);③图内 llm_decide 边做运行时路由

不预设固定 planner:①Queen(编码 agent)把 NL 目标拆成 graph 结构(节点/边)=离线规划;②Queen 自身用 task_create_batch/task_update 做多步任务清单(framework/tasks/);③图内 llm_decide 边做运行时路由

agents/queen/nodes/__init__.py:230orchestrator/edge.py:205
core/framework/agents/queen/nodes/__init__.py:230 python
_queen_tools_independent = """
# Tools

## Planning — use FIRST for multi-step work
- task_create_batch — When a request has 2+ atomic steps, your FIRST \
tool call is `task_create_batch` with one entry per step (atomic, \
one round-trip).
- task_create — One-off mid-run additions when you discover \
unplanned work AFTER the initial plan is laid out.
- task_update / task_list / task_get — Mark progress, inspect, or \
re-read state.

See "Independent execution" for the per-step flow and granularity rule.
查看 Hive 完整笔记 →
LangChain python 内核无显式 planner;规划交给 LLM。可选 TodoListMiddleware 注入 write_todos 工具+todos 状态字段做轻量任务清单(对标 Claude Code TodoWrite);更重的 planning 在上层 Deep Agents 包

内核无显式 planner;规划交给 LLM。可选 TodoListMiddleware 注入 write_todos 工具+todos 状态字段做轻量任务清单(对标 Claude Code TodoWrite);更重的 planning 在上层 Deep Agents 包

agents/middleware/todo.py:35todo.py:46
libs/langchain_v1/langchain/agents/middleware/todo.py:35 python
    """The current status of the todo item."""


class PlanningState(AgentState[ResponseT]):
    """State schema for the todo middleware.

    Type Parameters:
        ResponseT: The type of the structured response. Defaults to `Any`.
    """

    todos: Annotated[NotRequired[list[Todo]], OmitFromInput]
    """List of todo items for tracking task progress."""
查看 LangChain 完整笔记 →
LlamaIndex python 内核无显式 planner;规划隐式交给 LLM(ReAct 的 Thought 链 / function-calling 多轮)。另有 CodeActAgent 让 LLM 写 Python 代码作为"计划+执行";tools/query_plan 提供查询级子问题分解。无独立 plan-then-execute 编排器

内核无显式 planner;规划隐式交给 LLM(ReAct 的 Thought 链 / function-calling 多轮)。另有 CodeActAgent 让 LLM 写 Python 代码作为"计划+执行";tools/query_plan 提供查询级子问题分解。无独立 plan-then-execute 编排器

agent/workflow/codeact_agent.py:25
llama-index-core/llama_index/core/agent/workflow/codeact_agent.py:25 python
from llama_index.core.tools import BaseTool, FunctionTool
from llama_index.core.workflow import Context

DEFAULT_CODE_ACT_PROMPT = """You are a helpful AI assistant that can write and execute Python code to solve problems.

You will be given a task to perform. You should output:
- Python code wrapped in <execute>...</execute> tags that provides the solution to the task, or a step towards the solution. Any output you want to extract from the code should be printed to the console.
- Text to be shown directly to the user, if you want to ask for more information or provide the final answer.
- If the previous code execution can be used to respond to the user, then respond directly (typically you want to avoid mentioning anything related to the code execution in your response).

## Response Format:
Example of proper code format:
<execute>
查看 LlamaIndex 完整笔记 →
LoongFlow python PES 的 Planner Worker 是显式独立阶段:理解任务+从进化记忆检索父代经验+产出执行蓝图(best_plan.txt);Planner 仅是 get_worker 的薄封装,具体策略由场景 Agent 实现(如 general_agent/planner.py);ReAct 侧用 Todo 工具做轻量任务清单

PES 的 Planner Worker 是显式独立阶段:理解任务+从进化记忆检索父代经验+产出执行蓝图(best_plan.txt);Planner 仅是 get_worker 的薄封装,具体策略由场景 Agent 实现(如 general_agent/planner.py);ReAct 侧用 Todo 工具做轻量任务清单

framework/pes/planner/planner.py:13framework/pes/register.py:55
src/loongflow/framework/pes/planner/planner.py:13 python
from loongflow.framework.pes.register import get_worker


class Planner:
    """Planner Class"""

    def __init__(self, planner_name: str, config: Any, db: Any):
        self.planner = get_worker(
            name=planner_name, phase="planner", config=config, db=db
        )

    async def run(self, context: Any, message: Message | None) -> Message:
        """
查看 LoongFlow 完整笔记 →
Maestro python 由 orchestrator LLM 隐式规划:每轮只产出"下一个子任务"的 prompt(增量式拆解,非一次性全计划),并自评目标是否达成

由 orchestrator LLM 隐式规划:每轮只产出"下一个子任务"的 prompt(增量式拆解,非一次性全计划),并自评目标是否达成

maestro.py:42maestro.py:52
maestro.py:42 python
# Initialize the Rich Console
console = Console()

def opus_orchestrator(objective, file_content=None, previous_results=None, use_search=False):
    console.print(f"\n[bold]Calling Orchestrator for your objective[/bold]")
    previous_results_text = "\n".join(previous_results) if previous_results else "None"
    if file_content:
        console.print(Panel(f"File content:\n{file_content}", title="[bold blue]File Content[/bold blue]", title_align="left", border_style="blue"))
    
    messages = [
        {
            "role": "user",
            "content": [
查看 Maestro 完整笔记 →
Mastra typescript 内核无显式 planner;自主规划交给 LLM。显式规划走声明式 workflow:开发者用 .then/.branch/.parallel/.dowhile/.foreach/.map 手工编排为 DAG;多 agent 场景由 routing agent 动态决定下一个 primitive(见多智能体编排)

内核无显式 planner;自主规划交给 LLM。显式规划走声明式 workflow:开发者用 .then/.branch/.parallel/.dowhile/.foreach/.map 手工编排为 DAG;多 agent 场景由 routing agent 动态决定下一个 primitive(见多智能体编排)

workflows/workflow.ts:1775loop/network/index.ts:224
packages/core/src/workflows/workflow.ts:1775 typescript
   * The step's inputSchema must be satisfied by the previous step's output (or workflow input for first step).
   * This means: TPrevSchema must be assignable to TStepInput
   */
  then<TStepId extends string, TStepState, TStepInput, TSchemaOut>(
    step: Step<
      TStepId,
      // Allow steps with any/unknown state, or steps whose state is a subset of workflow state
      unknown extends TStepState ? TStepState : SubsetOf<TStepState, TState>,
      // Check: previous output (TPrevSchema) must satisfy step's input requirements (TStepInput)
      // If TPrevSchema can be assigned to TStepInput, allow it. Otherwise show expected type.
      TPrevSchema extends TStepInput ? TStepInput : TPrevSchema,
      TSchemaOut,
      any,
查看 Mastra 完整笔记 →
MetaGPT python 两层:①SOP 即"硬编码计划"——角色的 Action 顺序就是流程;②plan_and_act 模式下 Planner 用 WritePlan 让 LLM 生成 Plan(Task 列表 + 依赖,拓扑排序),逐任务执行+review+动态改计划

两层:①SOP 即"硬编码计划"——角色的 Action 顺序就是流程;②plan_and_act 模式下 Planner 用 WritePlan 让 LLM 生成 Plan(Task 列表 + 依赖,拓扑排序),逐任务执行+review+动态改计划

metagpt/strategy/planner.py:77role.py:472metagpt/schema.py:496schema.py:457
metagpt/strategy/planner.py:77 python
    def current_task_id(self):
        return self.plan.current_task_id

    async def update_plan(self, goal: str = "", max_tasks: int = 3, max_retries: int = 3):
        if goal:
            self.plan = Plan(goal=goal)

        plan_confirmed = False
        while not plan_confirmed:
            context = self.get_useful_memories()
            rsp = await WritePlan().run(context, max_tasks=max_tasks)
            self.working_memory.add(Message(content=rsp, role="assistant", cause_by=WritePlan))
查看 MetaGPT 完整笔记 →
nanobot python 内核无独立 planner,规划交给 LLM;提供 sustained goal / long_task 机制:/goal 持续目标跨 turn 续跑,goal_continue_message 注入让模型继续推进或 complete_goal;Step Plan 经 skill 引导

内核无独立 planner,规划交给 LLM;提供 sustained goal / long_task 机制:/goal 持续目标跨 turn 续跑,goal_continue_message 注入让模型继续推进或 complete_goal;Step Plan 经 skill 引导

session/goal_state.py:40agent/runner.py:196
nanobot/session/goal_state.py:40 python
    return _session_goal_raw(metadata)


def sustained_goal_active(metadata: Mapping[str, Any] | None) -> bool:
    """True when this session has an active sustained objective (``long_task`` bookkeeping)."""
    goal = parse_goal_state(goal_state_raw(metadata))
    return isinstance(goal, dict) and goal.get("status") == "active"


def sustained_goal_turn(
    metadata: Mapping[str, Any] | None,
    *,
    message_metadata: Mapping[str, Any] | None = None,
查看 nanobot 完整笔记 →
Open Multi-Agent typescript goal→任务 DAG 的一次性 LLM 拆解:coordinator 收 goal+roster,输出 json 任务数组;parseTaskSpecs 容错解析(fenced/裸数组),title 形式的 dependsOn 在 loadSpecsIntoQueue 中两遍映射为真实 task id;简单目标走 isSimpleGoal 短路只跑单 agent

goal→任务 DAG 的一次性 LLM 拆解:coordinator 收 goal+roster,输出 json 任务数组;parseTaskSpecs 容错解析(fenced/裸数组),title 形式的 dependsOn 在 loadSpecsIntoQueue 中两遍映射为真实 task id;简单目标走 isSimpleGoal 短路只跑单 agent

src/orchestrator/orchestrator.ts:1232src/orchestrator/orchestrator.ts:358src/orchestrator/orchestrator.ts:1773src/orchestrator/orchestrator.ts:150
src/orchestrator/orchestrator.ts:1232 typescript
    // ------------------------------------------------------------------
    // Step 2: Parse tasks from coordinator output
    // ------------------------------------------------------------------
    const taskSpecs = parseTaskSpecs(decompositionResult.output)

    const queue = new TaskQueue()
    const scheduler = new Scheduler('dependency-first')
    const taskMetrics = new Map<string, TaskExecutionMetrics>()

    if (taskSpecs && taskSpecs.length > 0) {
      // Map title-based dependsOn references to real task IDs so we can
      // build the dependency graph before adding tasks to the queue.
      this.loadSpecsIntoQueue(taskSpecs, agentConfigs, queue)
查看 Open Multi-Agent 完整笔记 →
OpenClaw typescript 内核无显式 planner,规划交给 LLM 自身;提供 thinking 级别(--thinking high、/think <level>)与 reasoning 透传;自治侧靠 standing orders(写在 AGENTS.md 里的"程序"边界)而非结构化计划

内核无显式 planner,规划交给 LLM 自身;提供 thinking 级别(--thinking high、/think <level>)与 reasoning 透传;自治侧靠 standing orders(写在 AGENTS.md 里的"程序"边界)而非结构化计划

agent-loop.ts:300
packages/agent-core/src/agent-loop.ts:300 typescript
      const nextTurnSnapshot = await config.prepareNextTurn?.(nextTurnContext);
      if (nextTurnSnapshot) {
        currentContext = nextTurnSnapshot.context ?? currentContext;
        config = Object.assign({}, config, {
          model: nextTurnSnapshot.model ?? config.model,
          reasoning:
            nextTurnSnapshot.thinkingLevel === undefined
              ? config.reasoning
              : nextTurnSnapshot.thinkingLevel === "off"
                ? undefined
                : nextTurnSnapshot.thinkingLevel,
        });
      }
查看 OpenClaw 完整笔记 →
Pipecat python 框架内核无显式 planner;任务分解交给 LLM 自身或上层应用。结构化"分解"体现在管道编排(Pipeline/ParallelPipeline)与多 worker job RPC(@job + job_group 扇出),而非自动 plan

框架内核无显式 planner;任务分解交给 LLM 自身或上层应用。结构化"分解"体现在管道编排(Pipeline/ParallelPipeline)与多 worker job RPC(@job + job_group 扇出),而非自动 plan

pipeline/pipeline.py:91pipeline/parallel_pipeline.py:24
src/pipecat/pipeline/pipeline.py:91 python
                await self._downstream_push_frame(frame, direction)


class Pipeline(BasePipeline):
    """Main pipeline implementation that connects frame processors in sequence.

    Creates a linear chain of frame processors with automatic source and sink
    processors for external frame handling. Manages processor lifecycle and
    provides metrics collection from contained processors.
    """

    def __init__(
        self,
查看 Pipecat 完整笔记 →
PraisonAI python 可选 planning=True:PlanningAgent 仿 CrewAI AgentPlanner / Claude Code Plan Mode,先以只读工具(READ_ONLY_TOOLS)研究再产出 Plan/PlanStep;Task 级别用 next_tasks/condition 静态声明 DAG,hierarchical process 由 manager LLM 动态分派

可选 planning=True:PlanningAgent 仿 CrewAI AgentPlanner / Claude Code Plan Mode,先以只读工具(READ_ONLY_TOOLS)研究再产出 Plan/PlanStep;Task 级别用 next_tasks/condition 静态声明 DAG,hierarchical process 由 manager LLM 动态分派

planning/planner.py:24process/process.py:434
src/praisonai-agents/praisonaiagents/planning/planner.py:24 python
from .plan import Plan, PlanStep

# Define READ_ONLY_TOOLS locally to avoid circular import
READ_ONLY_TOOLS = [
    "read_file",
    "list_directory",
    "search_codebase",
    "search_files",
    "grep_search",
    "find_files",
    "web_search",
    "get_file_content",
    "list_files",
查看 PraisonAI 完整笔记 →
Semantic Kernel csharp 内核无独立 planner(旧 Stepwise/Handlebars planner 已从主源码移除,仅余 InternalUtilities/planning/ 与 samples 迁移示例)。规划=模型自身多步 function calling;多步业务流程交给 Process 框架;Magentic manager 内含动态计划账本

内核无独立 planner(旧 Stepwise/Handlebars planner 已从主源码移除,仅余 InternalUtilities/planning/ 与 samples 迁移示例)。规划=模型自身多步 function calling;多步业务流程交给 Process 框架;Magentic manager 内含动态计划账本

dotnet/src/Experimental/Process.Core/ProcessBuilder.cs:517
dotnet/src/Experimental/Process.Core/ProcessBuilder.cs:517 csharp
    /// Builds the process.
    /// </summary>
    /// <returns>An instance of <see cref="KernelProcess"/></returns>
    public KernelProcess Build(KernelProcessStateMetadata? stateMetadata = null)
    {
        // Build the edges first
        var builtEdges = this.Edges.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Select(e => e.Build()).ToList());

        // Build the steps and injecting initial state if any is provided
        var builtSteps = this.BuildWithStateMetadata(stateMetadata);

        // Create the process
        KernelProcessState state = new(this.Name, version: this.Version, id: this.Id);
查看 Semantic Kernel 完整笔记 →
smolagents python 可选周期性规划:planning_interval 触发独立 planning step,首步生成 initial_plan、之后 update_plan(summary_mode 重写记忆);计划存为 PlanningStep 注入记忆,非强制

可选周期性规划:planning_interval 触发独立 planning step,首步生成 initial_plan、之后 update_plan(summary_mode 重写记忆);计划存为 PlanningStep 注入记忆,非强制

agents.py:550agents.py:639
查看 smolagents 完整笔记 →
Strands Agents python 内核无显式 planner——这正是 model-driven 的取舍:规划交给模型隐式完成。结构化分解可借 multiagent/graph.py 的依赖图或 swarm.py 的自治移交,但单 agent 层无独立规划组件

内核无显式 planner——这正是 model-driven 的取舍:规划交给模型隐式完成。结构化分解可借 multiagent/graph.py 的依赖图或 swarm.py 的自治移交,但单 agent 层无独立规划组件

multiagent/graph.py:241
strands-py/src/strands/multiagent/graph.py:241 python
            raise ValueError("Session persistence is not supported for Graph agents yet.")


class GraphBuilder:
    """Builder pattern for constructing graphs."""

    def __init__(self) -> None:
        """Initialize GraphBuilder with empty collections."""
        self.nodes: dict[str, GraphNode] = {}
        self.edges: set[GraphEdge] = set()
        self.entry_points: set[GraphNode] = set()

        # Configuration options
查看 Strands Agents 完整笔记 →
SwarmClaw typescript main-agent-loop 维护持久 MainLoopState(goal/goalContract/planSteps/completedPlanSteps/currentPlanStep/reviewNote),心跳每次回灌;plan/review 由 LLM 经 meta 标记产出后解析(parseMainLoopPlan/parseMainLoopReview)

main-agent-loop 维护持久 MainLoopState(goal/goalContract/planSteps/completedPlanSteps/currentPlanStep/reviewNote),心跳每次回灌;plan/review 由 LLM 经 meta 标记产出后解析(parseMainLoopPlan/parseMainLoopReview)

agents/main-agent-loop.ts:34
src/lib/server/agents/main-agent-loop.ts:34 typescript

type MainLoopObjectiveSource = 'goal' | 'working_state' | 'run_context' | 'legacy_tag'

export interface MainLoopState {
  goal: string | null
  goalContract: GoalContract | null
  objectiveSource: MainLoopObjectiveSource | null
  summary: string | null
  nextAction: string | null
  planSteps: string[]
  completedPlanSteps: string[]
  currentPlanStep: string | null
  reviewNote: string | null
查看 SwarmClaw 完整笔记 →
Swarms python 可选 plan_enabled/plan(task):用 planning_prompt+历史让 LLM 先产出 step-by-step 计划写入短期记忆;max_loops="auto" 走 _run_autonomous_loop 的 plan→execute→reflect 三段式;专门拓扑 PlannerWorkerSwarm/AutoSwarmBuilder

可选 plan_enabled/plan(task):用 planning_prompt+历史让 LLM 先产出 step-by-step 计划写入短期记忆;max_loops="auto" 走 _run_autonomous_loop 的 plan→execute→reflect 三段式;专门拓扑 PlannerWorkerSwarm/AutoSwarmBuilder

agent.py:3159agent.py:2105
swarms/structs/agent.py:3159 python
            role=self.agent_name, content=message
        )

    def plan(self, task: str, *args, **kwargs) -> None:
        """
        Create a strategic plan for executing the given task.

        This method generates a step-by-step plan by combining the conversation
        history, planning prompt, and current task. The plan is then added to
        the agent's short-term memory for reference during execution.

        Args:
            task (str): The task to create a plan for
查看 Swarms 完整笔记 →
Transformers Agents python 由 LLM 隐式规划工具调用序列;无独立 planner

由 LLM 隐式规划工具调用序列;无独立 planner

查看 Transformers Agents 完整笔记 →
Upsonic python 内核无强制 planner,规划交给 LLM;可选 enable_thinking_tool/enable_reasoning_tool(agent.py:263);deepagent 子包带 planning_toolkit/TodoList(tasks.py:11 引用);Graph 把多 Task 显式编排成 DAG/链

内核无强制 planner,规划交给 LLM;可选 enable_thinking_tool/enable_reasoning_tool(agent.py:263);deepagent 子包带 planning_toolkit/TodoList(tasks.py:11 引用);Graph 把多 Task 显式编排成 DAG/链

agent.py:263src/upsonic/graph/graph.py:438
src/upsonic/storage/memory/session/agent.py:263 python
            if is_async_storage_backend(self.storage):
                await self.storage.aupsert_session(session, deserialize=True)
            else:
                self.storage.upsert_session(session, deserialize=True)

            if self.debug:
                status_str = "completed" if is_completed else "incomplete"
                info_log(
                    f"Session saved for run {output.run_id} ({status_str})",
                    "AgentSessionMemory",
                )
        except Exception as e:
            if self.debug:
查看 Upsonic 完整笔记 →
vectara-agentic python 内核无显式 planner;规划交给 LLM(base 指令鼓励“拆子问题”,prompts.py:54)。提供可选 内置 workflow 做显式分解:SubQuestionQueryWorkflow(并行子问题,@step(num_workers=8))与 SequentialSubQuestionsWorkflow(顺序依赖);旧的 StructuredPlanning 已在 v0.4 废弃

内核无显式 planner;规划交给 LLM(base 指令鼓励“拆子问题”,prompts.py:54)。提供可选 内置 workflow 做显式分解:SubQuestionQueryWorkflow(并行子问题,@step(num_workers=8))与 SequentialSubQuestionsWorkflow(顺序依赖);旧的 StructuredPlanning 已在 v0.4 废弃

sub_query_workflow.py:23sub_query_workflow.py:149sub_query_workflow.py:199
vectara_agentic/sub_query_workflow.py:23 python
)


class SubQuestionQueryWorkflow(Workflow):
    """
    Workflow for sub-question query engine.
    """

    # Workflow inputs/outputs
    class InputsModel(BaseModel):
        """
        Inputs for the workflow.
        """
查看 vectara-agentic 完整笔记 →
VoltAgent typescript 内核无强制 planner;规划交给 LLM。独立的 PlanAgent(Claude-Code 风格)内建 write_todos 规划工具箱 + filesystem + subagent,强制"多步任务先写 todo"

内核无强制 planner;规划交给 LLM。独立的 PlanAgent(Claude-Code 风格)内建 write_todos 规划工具箱 + filesystem + subagent,强制"多步任务先写 todo"

planagent/plan-agent.ts:45
packages/core/src/planagent/plan-agent.ts:45 typescript
const DEFAULT_GENERAL_PURPOSE_DESCRIPTION =
  "General-purpose agent for researching complex questions, searching for files and content, and executing multi-step tasks. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries use this agent to perform the search for you. This agent has access to all tools as the main agent.";

const PLANNING_SYSTEM_MESSAGE = [
  "<planagent_planning>",
  "Use write_todos to plan any multi-step task or any tool usage.",
  "If the user asks for a plan, you must call write_todos.",
  "Before using any tool other than write_todos, call write_todos with a short plan.",
  "Keep exactly one todo in_progress at a time and update the list as you go.",
  "Only mark todos done after completing the work.",
  "</planagent_planning>",
].join("\n");
查看 VoltAgent 完整笔记 →