Agent Systems: Learning and Planning Mechanisms from Generative Models to Autonomous Agents

    This article explains why AI agents have become an important research direction after generative models. It compares agents with traditional generative systems, shows how reinforcement learning and Markov decision processes model agent behavior, and discusses why world models and internal simulation matter for planning. It also covers memory design, tool-calling reliability, multi-agent collaboration, evaluation metrics, and open questions in reward design, exploration control, interpretability, and continual learning.

    1. Why Agents Have Become an Important Direction in AI

    For a long time, AI systems were mainly optimized for individual tasks. A system took a piece of text and returned a classification. It took an image and recognized the objects in it. It took user behavior and predicted the next click. These systems usually relied on clearly defined datasets, fixed task objectives, and relatively stable evaluation procedures.

    The rapid development of generative models has changed this picture. Models no longer only judge their inputs. They can generate text, code, images, and structured information. However, being able to generate content does not mean a system can solve complex problems. For a real task, a system often needs to understand the goal, break it into steps, call external tools, observe the results of its actions, and adjust its next actions based on feedback.

    Agents have drawn attention in this context. An agent is not a single model. It is a system organized around a goal. Such a system typically includes modules for perception, reasoning, planning, execution, memory, and feedback. It can make a sequence of decisions over multiple rounds in a relatively open environment. Compared with traditional question-answering systems, an agent is closer to a software entity with the ability to act.

    2. From Recommendation and Retrieval to Autonomous Decision-Making

    Many researchers entered the agent field not from large models but from foundational problems in recommender systems, information retrieval, and machine learning.

    Recommender systems focus on how to choose the most suitable results from a large pool of candidate content, based on the user’s state. Information retrieval focuses on how to quickly find relevant information for a query. These problems may look different from agents, but both involve making choices under incomplete information.

    When a system moves from one-off prediction to continuous interaction, the problem becomes more complex. One recommendation can influence the user’s next action, and the user’s new behavior in turn changes the system’s later judgments. In this case, the system must consider more than whether the current result is accurate. It must also judge how the current action affects future states.

    This provides a natural way to model the problem with reinforcement learning. Researchers can abstract an agent as a Markov decision process, which mainly includes the following elements:

    • State: the information the system can currently access, such as conversation history, environment feedback, task progress, and available resources;
    • Action: an operation the system can perform in the current state, such as generating a response, calling a tool, querying information, or continuing to observe;
    • State transition: the change in the environment or task state after an action is executed;
    • Reward: an evaluation of the result of the current behavior, which may come from rules, human feedback, environment feedback, or the final outcome of the task;
    • Policy: the rule the system uses to choose its next action based on the current state.

    The value of this abstraction is that it extends “intelligence” from a single output into a continuous process. The system must answer not only “What should I do now?” but also “Where will this step take the task?”

    3. Key Differences Between Agents and Ordinary Generative Systems

    Ordinary generative systems typically follow an “input-output” pattern: the user asks a question, and the model returns a result directly. Agents usually follow a loop of observing, thinking, acting, and receiving feedback.

    A simplified agent workflow can be represented as follows:

    1. Read the task goal
    2. ↓
    3. Obtain current environment information
    4. ↓
    5. Analyze the state and formulate a plan
    6. ↓
    7. Select and execute an action
    8. ↓
    9. Read the execution result
    10. ↓
    11. Update memory and task state
    12. ↓
    13. Determine whether the task is complete; if not, continue the loop

    This architecture brings three changes.

    First, the output is no longer the only result the system produces. The process of acting matters as well. An answer can be fluent, but if it does not achieve the goal, it cannot be considered a success.

    Second, the system has to manage uncertainty. In real environments, information may be incomplete, tools may return errors, and task goals may change during execution. For this reason, an agent cannot rely on a single round of reasoning. It needs to be able to re-plan.

    Third, the system’s capability is highly dependent on its environment. The same model may perform very differently when it has access to retrieval, computation, code execution, or business systems. Agent research therefore focuses not only on the model itself but also on how the model, tools, and environment work together.

    4. The Hard Part: Letting the System Anticipate the Future

    Traditional reinforcement learning emphasizes policy optimization, meaning it learns which action to choose in each state through extensive trial and error. For complex tasks, however, relying only on trial and error is often very costly.

    For example, an agent may need to complete a multi-step data analysis task. If the system only learns whether the result was good or bad after the entire task finishes, learning becomes very inefficient. A better system could predict the likely consequences of different options before acting, compare multiple action sequences, and then choose the path with lower risk and higher payoff.

    This is the problem that “world models” or “internal simulation” aim to solve. The system needs an internal representation of its environment that can answer the following questions:

    1. What state is the environment currently in?
    2. If a certain action is taken, how might the environment change?
    3. Which changes will move the task toward completion?
    4. Which actions may work in the short term but increase costs later?
    5. When predictions conflict with reality, how does the system correct its internal model?

    From an engineering perspective, internal simulation does not mean the system must fully replicate the real world. It means forming predictive capabilities relevant to the task. For a software development agent, this may mean understanding code dependencies, test results, and file changes. For an information analysis agent, it may mean understanding the relationships between pieces of evidence, the reliability of information, and the risk of conclusions.

    5. Memory Determines Whether an Agent Can Keep Working

    If an agent starts from scratch in every interaction, it will struggle with long workflows. Memory is therefore an important part of system design.

    Common types of memory fall into three categories:

    1. Short-term working memory

    This stores the context of the current task, including the user’s goal, recent interactions, the current plan, and tool outputs. It emphasizes real-time access, but its capacity is usually limited.

    2. Long-term knowledge memory

    This stores reusable information, such as past task experience, domain knowledge, user preferences, and verified facts. Long-term memory cannot simply accumulate content. It also requires attention to retrieval accuracy, timeliness, and conflict handling.

    3. Episodic memory

    This records what has happened before. It stores not only conclusions but also actions, results, and reasons for failure. Episodic memory helps the system avoid repeating mistakes and reuse effective strategies in similar tasks.

    Memory systems also have to address an important question: what is worth remembering? Storing everything indiscriminately adds noise, cost, and the risk of spreading errors. A better approach is to filter information based on its importance, stability, verifiability, and future reuse value, and to attach source and credibility labels to each memory.

    6. Tool Calling and System Reliability

    For an agent to move from talking to doing, it usually needs to call external tools. But the more tools a system uses, the greater its uncertainty.

    A single tool call involves at least four steps:

    • Deciding whether a tool call is actually needed;
    • Selecting the right tool and parameters;
    • Interpreting the tool’s output;
    • Handling timeouts, insufficient permissions, empty data, or abnormal results.

    Tool calling therefore should not be treated as a simple function execution. It should be part of a complete decision loop. The system needs to validate parameters before the call, check whether the results meet expectations afterward, and respond to exceptions with retries, alternative approaches, or human confirmation.

    In enterprise environments, permission isolation, sensitive data protection, operation auditing, and risk control also matter. For high-risk actions such as deleting data, changing configurations, or submitting business results, the model should generally not decide on its own. These actions should go through approval, secondary confirmation, or rule-based blocking.

    7. From Single Agents to Multi-Agent Collaboration

    A single agent works well for tasks with clear boundaries. In complex scenarios, however, several roles often need to work together. For example, one agent may handle planning, another retrieval, and a third verification of results.

    The key to a multi-agent system is not simply adding more roles. It is defining clear divisions of labor and collaboration protocols. A workable collaboration process usually includes:

    1. Breaking down the overall task;
    2. Assigning responsibility for each subtask;
    3. Specifying input, output, and handoff formats;
    4. Verifying intermediate results;
    5. Arbitrating when conflicts arise;
    6. Aggregating results and producing the final conclusion.

    Without a shared state representation and result validation, multi-agent systems can instead bring communication overhead, duplicated work, and amplified errors. Collaborative systems therefore need structured messages, task state machines, and traceable logs.

    8. How to Tell Whether an Agent Is Truly Getting Better

    Agent evaluation should not focus only on language quality. It also needs to measure task completion. A more complete set of metrics may include:

    • Task success rate: whether the final goal is achieved;
    • Step efficiency: the number of actions and