Concepts / Planning for Foundation Model Agents

Planning for Foundation Model Agents

Tools do two jobs. Some let an agent take in information about its surroundings, and others let it change something in those surroundings. An agent that can only observe is stuck watching, and an agent that can only act has no picture of what it is acting on.

  • Programming

Where a Single Model Runs Out of Reach

Picture a model working entirely on its own. A language model can produce text, and an image generator can produce pictures. Each one is good at a single kind of output. Neither model, by itself, can check the weather, look up a bank balance, or send a message. Its reach ends where its own inputs and outputs end.

What do you think happens?

Can a text-only language model check tomorrow's weather on its own, without any help from outside?

  • Yes, because it has learned enough about weather patterns

  • No, because nothing about the model lets it reach outside its own inputs and outputs

Reveal answer
Answer:

No. Its reach ends where its own inputs and outputs end.

A model that works entirely on its own can only produce what it is designed to produce. Checking live information requires a connection to something outside the model, which is what an external tool provides.

An agent is different because it can be connected to things outside the model. A system does not need external tools to count as an agent, but without them its capabilities stay narrow. The question this article follows is this: once an agent can reach beyond the model, what kinds of tools does it need, and what does each kind change about the agent's behavior?

Why the Tool Inventory Is a Design Decision

Definition

The tool inventory is the full set of tools an agent can call. The inventory determines what the agent is able to do, which makes it a design decision rather than a fixed property of the model.

Adding tools widens what the agent can accomplish, but a larger inventory is harder to understand and harder to use well. Choosing the right inventory usually takes experimentation rather than a single correct answer. A designer is balancing reach against clarity: each added tool expands the set of possible actions, and each one also gives the agent another option to choose among.

Key point

Tools do two jobs. Some let an agent take in information about its surroundings, and others let it change something in those surroundings. An agent that can only observe is stuck watching, and an agent that can only act has no picture of what it is acting on.

Read-Only Versus Write Actions

Read-only tools let a model draw information from its data sources. Write tools let the same kind of system change those sources. The difference is easiest to see with a single tool that does both. A SQL executor can retrieve a data table, which is a read, but it can also change or delete that table, which is a write. An email API can read a message and can also send a reply. A banking API can report a current balance and can also initiate a transfer.

Retrieve a data tableSQL executorChange or delete atableSQL executorRead a messageEmail APISend a replyEmail APIReport a currentbalanceBanking APIInitiate a transferBanking API
How does an action that only observes the environment differ from one that changes it?

The comparison separates the two directions. A read flows from the data source back to the agent, so the agent gains information without changing anything. A write flows from the agent outward into the environment, so the agent's decision has consequences that persist after the call finishes. Write actions are what make automation possible. An agent could research prospective customers, draft and send emails, read the replies, follow up, record orders, and update a database, all without a person handling each step.

A workplace comparison helps. A new intern should not be given authority to delete the production database, and an unreliable AI should not be allowed to start bank transfers. The point is not that write access is forbidden. The point is that it must be matched to how dependable the system is. Humans make mistakes too, and tools are what let both humans and models accomplish far more than they could alone.

The Three Tool Families

Once an agent's inventory is in view, its tools can be sorted into three families. The first is knowledge augmentation, sometimes called context construction, where tools enrich what the agent knows at the moment it is working. The second is capability extension, where tools cover tasks a model handles poorly by itself. The third family is environment interaction: tools that let the agent act upon its environment, which corresponds to the write actions described above.

Tool inventoryKnowledgeaugmentationcontext constructionKnowledge retrievalCapability extensiontasks the model handlespoorlyCalculatorEnvironmentinteractionwrite actionsCode interpreterEmail APIBanking APIfamilyfamilyfamilyexampleexampleexampleexampleexample
How do the three tool categories relate to one another, and which tools belong under each?

These families are not mutually exclusive. A single tool can serve more than one purpose, and an agent's inventory will often mix all three. The sections that follow take the first two families, which focus on what the agent knows and what it can compute, before turning to the planner that coordinates them.

Why Tools Extend a Single Model

Before

Model alone: text in, text out. It cannot read a live data source or change one.

Reach ends at the model's own inputs and outputs.

After

Model with tools: text in, planner selects a tool, tool returns a result, model reasons over the result and produces the reply.

Reach extends to data sources and the environment through tools.

The model alone performs one kind of action. With tools, the same model can gather information from outside its own context, perform narrow computations it does poorly by itself, and change external systems. The model still does the reasoning, but the tools supply what the model cannot supply on its own.

Planning Before Calling a Tool

Tools only help if the agent knows which ones to use and in what order. That is the job of planning, which sits at the heart of a foundation model agent. The model is responsible for solving a task, and a task is defined by its goal and its constraints. The goal says what must be achieved, and the constraints limit how it may be achieved.

Complex tasks cannot be handled in a single leap, so the agent produces a plan. A plan is a roadmap that lays out the steps needed to accomplish the task. Producing a good plan usually means understanding the task, considering several ways to achieve it, and choosing the most promising one. For the purposes of tool use, the key point is that the planner is the component that decides which tools to call and in what order.

How a Planner Routes a Multimodal Request

A model that handles only one kind of input or output is called unimodal. Tools can change that. A text-only model can gain image generation by calling a text-to-image model as a tool, so the combined system produces both text and images. The model itself never learns to draw. It learns to recognize when a drawing is needed and to hand the request to a tool that can draw.

Incoming requestPlannerdecides text, image, orbothText generationCombined replyImage generationtext-to-image toolreads requesttext neededimage neededtext outputimage output
When a request arrives, which tool does the planner call first, and how does it decide whether text, images, or both are needed?

Read the diagram as a control path. The planner reads the incoming request and decides whether text generation, image generation, or both are needed. Either branch can run alone, and when the request calls for both, their outputs are combined into one reply. The same routing pattern explains how ChatGPT produces text and images, since it relies on DALL-E as its image generator.

Worked example

Routing a request that needs both text and an image

A user writes: explain what this sales dataset shows, and draw a picture of the trend. Trace how the planner routes this request.

  1. 1
    Read the request

    The planner sees two demands: an explanation in words and a picture of a trend.

  2. 2
    Decide the branches

    Because the request asks for both text and an image, the planner routes it down both branches rather than choosing one.

  3. 3
    Run the text branch

    The language model produces the written explanation of the dataset.

  4. 4
    Run the image branch

    The planner hands the trend request to an image generation tool, which produces the picture.

  5. 5
    Combine the outputs

    The text and the image are combined into one reply for the user.

Result

One combined reply containing the explanation and the trend picture, produced by routing the request through two tools.

The idea runs in the other direction too. A model that accepts only text can call an image captioning tool to interpret pictures, a transcription tool to handle audio, or an OCR tool to read text out of PDFs. Other tool chains extend the same logic: a code interpreter can produce charts and graphs, a LaTeX compiler can render math equations, and a browser can render web pages from HTML.

Mistakes When Reasoning About Tools

  • Common mistake

    Assuming the model can do anything a tool can do, just because it is a capable model

    What it looks like

    Expecting a text-only model to check live information without any connection to an outside source

    Why it fails

    The model's reach ends where its own inputs and outputs end, so capability inside the model does not include reaching outside it.

    Do this instead

    Ask what the tool inventory provides, and treat anything outside the model as something that requires a tool.

  • Common mistake

    Treating a tool as only read-only or only write because of its name

    What it looks like

    Assuming a SQL executor only reads data

    Why it fails

    The same SQL executor can retrieve a table, which is a read, and also change or delete it, which is a write.

    Do this instead

    Classify each call by what it does to the environment, not by the tool's label.

  • Common mistake

    Assuming a larger tool inventory is always better

    Why it fails

    Adding tools widens what the agent can do, but a larger inventory is harder to understand and to use well.

    Do this instead

    Treat the inventory as a design decision and choose it through experimentation.

  • Common mistake

    Thinking the planner only matters for long tasks

    Why it fails

    The planner decides which tools to call and in what order, even for a single request that needs two outputs.

Trace a Request Through the Tools

MEDIUM

A user asks an agent to read a PDF, add up a column of numbers in it, and email the total to a colleague. For each of the three steps, state whether it is a read-only action or a write action, name the tool family it belongs to, and say in what order the planner should call them.

Hints
  • Reading text out of a PDF gathers information without changing anything, so think about which family handles tools that observe the environment or supply information.
  • Adding up numbers is a narrow computation a model does poorly by itself, which points to capability extension.
  • Sending an email changes something outside the model, so it is a write action in the environment interaction family, and it should come last because it needs the total.

Key Takeaways

  • A single model performs one kind of action, and external tools let an agent perceive its environment and act upon it.
  • Read-only actions let an agent gather information without changing anything, while write actions change the environment or data sources with greater risk.
  • The three tool families are knowledge augmentation, capability extension, and environment interaction, and a single tool can serve more than one purpose.
  • A planner reads each request, decides which tools to call and in what order, and can route a request down text, image, or both branches before combining the outputs.

Related concepts

More concepts starting with P