AI Engineer World's Fair 2025

How to Build Planning Agents Without Losing Control - Yogendra Miraje, FactSet

Read the talk

How to Build Planning Agents Without Losing Control

A natural-language blueprint can give an enterprise agent room to plan while keeping its tools, task dependencies, and evaluation criteria explicit.

From a talk by Yogendra Miraje

Before you start: Familiarity with LLM tool calling and basic service APIs will help; the article introduces the planning and workflow terminology.

Capability exceeds control

Building AI applications can feel like driving a monster truck through a crowded mall with tiny joysticks. The model has considerable power; the developer has surprisingly little control over how it behaves. Yogendra Miraje, working at FactSet, a financial data and software company, uses this mismatch to explain why he believes AI applications have yet to experience their own ChatGPT moment despite rapid improvements in model intelligence.

One source of that mismatch is missing context. In an enterprise, the missing information is often knowledge of the organization's workflows: what needs to happen, in what order, and with which capabilities. A capable model cannot reliably follow a business process it has never been given.

Slide lists LLM errors, unclear instructions, tool problems, and poorly written input/output contracts, then highlights missing context and limited enterprise-specific workflow knowledge.Open full source frame
Why agents misbehave: missing context and enterprise workflow knowledge.
0:170:27
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:17 · section reference included

Who controls the workflow?

Tools extend what an LLM can do beyond its training-time knowledge. Combine an LLM with tools and memory, and Miraje calls the result an augmented LLM. Put it on a static, predefined path, and it becomes a workflow. Give it substantial autonomy and a feedback loop, and it becomes an agent. Workflows offer control and reliability; agents offer flexibility and autonomy. An agentic workflow aims to combine those properties by planning and executing a workflow according to the goal, context, and feedback.

The distinction rests on who decides the path:

SystemWho controls the path?Workflow
Workflow agentPredefined workflowStatic; run by an agent
Agentic workflowAgentDynamic; planned and run by the agent

These are Miraje's working definitions, useful because the terms are often used interchangeably. He also invokes Andrew Ng's view of agentic systems as a spectrum: an agentic workflow generally sits farther toward autonomy than a workflow agent.

1:241:34
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

1:24 · section reference included

Reuse enterprise services, then plan around them

For enterprises, the attraction goes beyond predictability. Agentic workflows offer a way to automate processes while building on existing microservices—capabilities that may represent years or decades of investment. The agent layer can compose those services instead of requiring the organization to replace them. Although the examples here concern enterprises, the architecture applies more broadly.

Miraje recommends moving from a predominantly ReAct-based approach toward proactive planning. ReAct already supports tracking and updating plans through interleaved reasoning and action; the architectural change here is to make task decomposition an explicit stage. Alongside tools, memory, and reflection, introduce planning by sub-goal division: break the goal into simpler steps that the system can execute.

Different planning architectures make different tradeoffs. Miraje recommends LangChain's explanations and accompanying code; its Plan-and-Execute Agents article provides relevant implementation reading. At FactSet, his team adapts LLMCompiler to its own problems, adding a high-level planning stage before the task planner.

3:253:45
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:25 · section reference included

From a user question to a replanning decision

The architecture wraps enterprise microservices in tools, then routes a user question through four responsibilities:

  1. Blueprint generator: produce a high-level plan for the requested workflow.
  2. Planner: turn that blueprint into a low-level task plan.
  3. Executor: execute the planned tasks.
  4. Joiner: combine the outputs from those tasks.

The blueprint describes the intended work before the planner commits to the details of individual calls.

After the joiner, replanning logic determines whether the system should take another pass or terminate and return a response. A recursion limit can bound the loop so the agent does not continue indefinitely. FactSet implements the blueprint generator, planner, executor, and joiner as separate LangGraph nodes. The graph makes both the forward execution path and the return path for replanning explicit.

Architecture diagram shows a blueprint generator, planner, executor, joiner, response formatter, and replanning loop alongside an MCP tool server and enterprise microservices.Open full source frame
Agentic workflow architecture linking planning, execution, tools, and enterprise microservices.
5:145:29
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:29 · section reference included

Design tools from the agent's point of view

Miraje expects much of the implementation effort to go into building tools around enterprise microservices. Their relationship is many-to-many, not necessarily one tool per service. A tool interface should reflect the work an agent can understand and perform, rather than simply copying the organization's service boundaries. The design question is whether the agent has enough information to choose and use the capability correctly.

An MCP tool server provides a standard interface for those capabilities. Within that interface, different pieces of documentation answer different questions:

Tool informationAgent's question
PurposeWhich tool should I select?
Detailed descriptionWhen should I invoke it?
Input/output contractsHow do I use it?

Here, input/output contracts are interface-design requirements. The historical March 2025 MCP specification defines inputSchema and returned result content, but not an outputSchema field. Validation checks complete the interface by acting as brakes on incorrect tool use.

6:376:47
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:37 · section reference included

Give the planner a blueprint

A blueprint is a sequence of natural-language workflow steps matched to available tool capabilities. It is fed to the planner rather than executed directly. FactSet introduced this stage after finding that the planner became overloaded when asked to handle too much at once. Decomposing the task in natural language separates deciding what work is needed from specifying the low-level calls.

The blueprint also provides finer control over task planning by narrowing the tools placed in the planner's context. Large collections of tool descriptions consume the context window and burden tool selection. The blueprint stage can select the relevant tools, leaving the planner with a smaller set of capabilities appropriate to the workflow.

That intermediate representation makes agent behavior easier to interpret. It also gives nontechnical collaborators something they can discuss directly: natural-language steps are less intimidating than a collection of function calls. The same artifact therefore helps constrain planning and expose the intended business process for review.

8:008:15
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:00 · section reference included

Preparing for NVIDIA's earnings call

Preparing for a company's earnings call is a common financial research workflow. Miraje demonstrates a deliberately simplified version for NVIDIA. The blueprint pairs a tool with a task; the executable plan pairs a tool with a function call. He describes two tools in the blueprint, supporting a sequence of four tasks.

The workflow first summarizes NVIDIA's previous earnings call, then retrieves financial data for the company. It uses that material to suggest questions for the upcoming call and finally generates a comprehensive report. Task context passes into the corresponding function calls, allowing later work to use earlier results.

Two four-step lists pair retrieval, reasoning, and reporting tasks with corresponding function calls and task-context references.Open full source frame
An NVIDIA earnings-call blueprint paired with its executable plan.

A compact JSON representation makes the intended dependencies explicit. The identifiers below describe a proposed plan, with context_from naming earlier task outputs that a later step will need:

json

{
  "company": "NVIDIA",
  "status": "planned",
  "steps": [
    {
      "id": "previous_call",
      "task": "Summarize the previous earnings call",
      "context_from": []
    },
    {
      "id": "financial_data",
      "task": "Retrieve company financial data",
      "context_from": []
    },
    {
      "id": "questions",
      "task": "Suggest questions for the upcoming earnings call",
      "context_from": ["previous_call", "financial_data"]
    },
    {
      "id": "report",
      "task": "Generate a comprehensive preparation report",
      "context_from": ["previous_call", "financial_data", "questions"]
    }
  ]
}

This representation illustrates the task-context relationship; the planner's next responsibility is to bind the work to tool calls and their input contracts.

In the displayed response comparison, Miraje describes the original answer as generic and the answer after introducing the agentic workflow as structured around the financial research process. The useful change is that the response reflects the requested workflow, rather than merely supplying a broadly relevant answer. This is a qualitative demonstration; no numerical improvement is reported.

9:349:50
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:34 · section reference included

Evaluate the behavior you need to control

The architecture needs an evaluation framework that is built and maintained alongside it. Miraje calls for both component evaluations and end-to-end evaluations, using metrics that matter to the application. Evaluating individual stages helps locate failures; evaluating the complete workflow checks whether those stages together produce the desired result. Code-based checks, LLM judges, and human review serve different purposes.

Choose the method according to the aspect being tested:

AspectSuggested evaluation
Blueprint resembles a golden blueprintLLM-as-a-judge
Correct tools selectedCode-based checks
Plan follows the blueprintLLM-as-a-judge
Report formattingHuman review

A single overall score can hide which part of the system failed. These separate checks distinguish an unsuitable workflow from incorrect tool selection, a plan that departs from the blueprint, or an unsatisfactory presentation of the results.

10:4911:04
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

10:49 · section reference included

When planning is the wrong choice

The ability to plan dynamically is not useful in every application. Miraje identifies several cases where an agentic workflow is a poor fit:

  • Fixed, repeated tasks: an ETL pipeline is probably the better choice.
  • Work that cannot be captured as a workflow: the architecture has little useful process structure to operate on.
  • Deterministic outcomes: strict compliance or safety-critical requirements may rule out agentic planning.
  • Tight latency or cost constraints: the planning architecture may not fit the operating budget.

These boundaries belong in the architecture decision before investing in a planner and its supporting infrastructure.

11:5512:06
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:55 · section reference included

Start with simple blueprints

Start with simple blueprints and work toward a more complex retrieval-augmented system for blueprints as the need develops. The immediate job of the blueprint remains concrete: supply the high-level plan and reduce the tools in the planner's context. Keep tool usage simple, and build safety guardrails, evaluations, and observability into the system.

The reliability at scale that Miraje seeks depends on this combination of task decomposition, plan-and-execute architecture, and tools that complement existing microservices. His own blueprint stage is an example of adapting a research architecture to the problem rather than treating it as fixed. Experiment with those architectural changes, but make evaluations first-class components so there is a basis for judging whether the changes help.

12:3212:52
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

12:32 · section reference included

Implementation references and orchestration choices

Asked for a GitHub project or implementation reference, Miraje points back to LangChain's planning-agent material and its code for the research architectures. The reference slide groups Plan-and-Solve, ReWOO, and LLMCompiler as starting points for exploring plan-and-execute agents.

Slide lists Plan-and-Solve, ReWOO, and LLM Compiler with brief descriptions, a Plan + Execute Agents image, and the link https://blog.langchain.dev/planning-agents/.Open full source frame
Recommended planning architectures and a LangChain implementation reference.

The final question asks whether MCP, LangGraph, or another approach will become the primary orchestration method. Miraje's answer separates two complementary jobs. MCP provides an organizational standard for exposing functionality: wrap a shared capability once, then reuse it across different AI applications.

LangGraph handles orchestration—the arrangement of planning, execution, and feedback inside an application. Miraje regards it as a useful choice while expecting multiple frameworks to remain useful. Standardizing tool access does not require every application to use the same orchestration framework; the appropriate framework depends on the use case.

14:1014:19
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

14:10 · section reference included

Resources

From the talk

Updates since the talk

Transcript download
Read the transcript and explore slides

Loading transcript and slides…