Course contentsShow
← Machine Learning and Deep Learning
Lesson 2083 of 3,53844. AI Agents: FoundationsFree lesson

Planning in AI Agents: Problem Formulation

Understanding how to formulate agent problems as planning tasks with states, actions, and goals.

Planning in AI Agents: Problem Formulation

What you'll learn: How to translate real-world agent tasks into formal planning problems with clearly defined states, actions, and goals.

The Core Idea

Before an AI agent can solve a problem, you must frame it as a planning problem. This means defining three essential components:

  1. States: All possible configurations of the world the agent might encounter
  2. Actions: Operations the agent can perform that transition between states
  3. Goals: Target states or conditions the agent should achieve

Think of it like planning a road trip. Your state is your current location and fuel level. Your actions are driving to connected cities or refueling. Your goal is reaching your destination with enough fuel.

Why This Matters

Without proper problem formulation, agents flail aimlessly. A well-formulated problem gives the agent:

  • A clear understanding of what success looks like
  • A structured action space to search through
  • Metrics to evaluate progress toward the goal

For example, in a tool-using agent (building on concepts like action space and tool registry from earlier lessons), you might formulate:

  • State: Current conversation context, available tools, previous tool results
  • Actions: Call a specific tool with specific parameters, respond to user
  • Goal: Answer the user's question with verified information

From Formulation to Execution

Once formulated, the planning problem connects to your agent's ReAct loop. The agent uses the state to decide which action to take next, observes the result (new state), and checks if the goal is met—triggering termination conditions when successful.

Key Takeaway: Problem formulation is the bridge between a vague task ("help the user") and a solvable planning problem with concrete states, actions, and goals that your agent can reason about systematically.