Reasoning Models for AI Agents: From Conversation to Executable Planning
This article explores the transition from conversational large language models to reasoning models designed for AI agents. It highlights the fundamental differences between conversational and agent models in terms of output format, convergence, and feedback mechanisms. Furthermore, it details the core reasoning requirements for agents, including task understanding, step planning, feedback-driven adjustments, output stability, and latency management. The article also introduces evaluation methods using classic puzzles and provides practical engineering recommendations for building robust agent systems, such as establishing safety boundaries, recording execution traces, and setting termination conditions.
I. Background: From Answering Questions to Completing Tasks
Large language models (LLMs) were initially used primarily for question-answering and text generation. A user asks a question, the model provides an answer, and the task is essentially complete once the output is generated. The evaluation criteria for this interaction include answer accuracy, fluency, and tone.
The usage pattern of an AI Agent is different. It receives a goal, such as “analyze these logs and generate an anomaly report,” and then independently decides which steps to take, which tools to call, and how to process intermediate results until the goal is achieved. In this scenario, plausible but unexecutable advice is useless. The model must translate the goal into a sequence of actionable steps that can be gradually implemented.
Therefore, agent-oriented reasoning models must be distinguished from conversational models in several aspects. Let’s explore these differences below.
II. Goal Differences Between Conversational and Agent Models
2.1 Output Format
The output of a conversational model is typically a complete piece of natural language. It can include background information, multiple viewpoints, and emotional expressions, allowing readers to filter out the useful parts.
The output of an agent model is more akin to the intermediate state of a program. It should contain explicit step numbers, inputs and outputs for each step, dependencies, and completion conditions. The more structured the output, the easier it is for the system to parse and execute automatically.
2.2 Divergence and Convergence
Conversational scenarios allow models to think from multiple angles. When a user asks an open-ended question, it is often reasonable for the model to list various possibilities.
Execution scenarios, however, require convergence. The model must select a feasible plan among multiple candidates and explain the basis for the selection. If the planning process is full of uncertain speculations, the executor cannot determine what to do next.
2.3 Feedback Mechanisms
Conversational models generally do not rely on external feedback; the interaction is complete once a response is given.
Every step an agent takes produces external results, such as command return codes, API response contents, or file read results. The model needs to read these results, determine whether the original plan still holds, and modify subsequent steps if necessary. Without a feedback loop, an agent can only mechanically execute the initial plan and will fail upon encountering an exception.
III. Core Reasoning Requirements for Agents
3.1 Task Understanding: Translating Goals into Completion Conditions
The key to task understanding is translating a natural language goal into verifiable completion conditions. For instance, the goal “make the service more stable” is too vague. A proper understanding should provide specific metrics, such as “reduce the interface error rate to below 1% while maintaining compatibility with existing interfaces.”
The model also needs to identify implicit constraints, including permission scopes, operation sequences, and whether data deletion is allowed. Overlooking constraints can lead the agent to perform operations beyond its authorized scope.
3.2 Step Planning: Ordered and Dependent
Planning should specify the prerequisites for each step. Below is a simplified example of a task plan:
Goal: Find APIs with response times exceeding the threshold in the last 24 hours and generate a reportStep 1: Read access logs, filter records for the last 24 hoursStep 2: Group by API path, calculate average and P95 response time for each groupStep 3: Filter APIs where P95 exceeds the thresholdDependency: Output of Step 2Step 4: Sort filtered results by request volume impactStep 5: Generate a Markdown format report containing API names, metrics, and recommended troubleshooting directionsCompletion condition: Each API in the report has corresponding data sources
Each step in this plan has clear inputs, outputs, and dependencies. The executor can run them one by one and locate the cause of failure if any step fails.
3.3 Feedback Adjustment: Revising Plans Based on Results
Suppose Step 1 returns empty logs. A reasonable approach is to check the log path, time format, or collection status, rather than continuing to execute subsequent steps and generating an empty report. This requires the model to treat the return result of each step as a basis for judgment.
Below is a simplified agent loop illustration, explaining the basic structure of “planning, execution, feedback, and revision”:
def run_agent(goal, planner, executor, max_steps=20):plan = planner.make_plan(goal)history = []for step_index in range(max_steps):if not plan.remaining_steps():return {"status": "done", "history": history}step = plan.next_step()result = executor.run(step)history.append((step, result))if result.ok:plan.mark_done(step)else:# Revise the subsequent plan based on the error message instead of blindly continuingplan = planner.revise_plan(goal, plan, history)return {"status": "stopped", "reason": "max_steps_reached", "history": history}
The focus of this code is the failure branch. For models lacking feedback adjustment capabilities, the failure branch can only terminate directly. A model with revision capabilities can try alternative solutions within a limited number of steps.
3.4 Output Stability
Agent outputs are often read directly by programs, so format stability is more important than literary flair. Outputs for the same type of task should maintain consistent fields, such as step numbers, action types, parameter names, and status codes. Field drift will cause parsing logic to fail frequently.
3.5 Latency and Multi-turn Calls
Agents typically require multiple rounds of reasoning and tool calls. A few hundred milliseconds of delay per inference can turn into a noticeable wait time after a dozen rounds of calls. Therefore, inference speed significantly impacts the actual user experience of an agent. Evaluation should measure both single-step latency and the total time to complete the entire task.
IV. Evaluation Methods for Reasoning Capabilities: Using Classic Puzzles
Classic puzzles can expose a model’s way of thinking. They usually require minimal information but demand thinking beyond literal constraints.
4.1 Three-Meter Stick Through a One-Meter Wide, Two-Meter High Doorway
The surface-level reasoning for this puzzle is: The diagonal of the door is approximately 2.236 meters, which is shorter than 3 meters, so it cannot pass through. This reasoning only considers the 2D plane of the door face.
A more logical approach considers 3D space. The stick’s length limit applies to its projection on the plane of the doorway. If the stick passes through perpendicularly to the door face, its projection on the doorway plane approximates a point, so it can pass through. In practice, one also needs enough space on both sides of the door to maneuver the stick.
During evaluation, a good answer should point out the key concept of projection and explain the prerequisites for 3D operation. Answering only “cannot pass through” indicates the model is stuck in 2D thinking.
4.2 Can a Sealed Cup with an Open Bottom Hold Water?
This puzzle tests the model’s understanding of the relationship between an object’s structure and its function. The container described has an open bottom and a closed top, essentially an inverted cup, which cannot hold liquid like a normal cup.
A good answer should first identify the opening position, then infer the container’s usage, and finally draw a conclusion. If the model answers directly based on the common pattern that “cups can hold water,” it indicates a reliance on surface patterns and a lack of physical structure inspection.
4.3 Design Principles for Evaluation Sets
The above puzzles are suitable for quick checks but are insufficient to represent real-world task capabilities. A formal evaluation should include the following types of samples:
- Multi-step tasks: Require the model to output a complete plan and check whether the step sequence and dependencies are correct.
- Tool feedback tasks: Simulate tools returning errors, empty results, or timeouts, and observe if the model can revise its plan.
- Format tasks: Check whether the output conforms to the preset structure and can be read correctly by a parser.
- Boundary tasks: Include requests for unauthorized, deletion, or irreversible operations to check if the model proactively asks for confirmation.
- Common sense trap tasks: Similar to the puzzles above, used to check the basic reliability of reasoning.
Each type of sample should record the pass rate, average number of steps, failure reasons, and total time. Relying on a single metric can easily lead to a misjudgment of the model’s actual capabilities.
V. Engineering Implementation Recommendations
5.1 Set Safety Boundaries for Executors
Plans generated by the model should not be run directly with full privileges. The executor should restrict the range of callable tools and require additional confirmation for high-risk operations like writing, deleting, or publishing. Minimizing privileges can significantly reduce the damage caused by erroneous plans.
5.2 Record Complete Execution Traces
The plan, call parameters, return results, and the model’s revision rationale for each step should be recorded. Trace data serves three purposes: troubleshooting, comparing different models’ performance, and constructing subsequent evaluation samples.
5.3 Set Termination Conditions
An agent might get stuck in a loop of repeatedly trying the same failed action. The executor should set a maximum number of steps, single-step timeouts, and duplicate action detection. Upon reaching the limit, the system should stop execution and hand it over to human processing instead of continuing to consume resources.
5.4 Distinguish Between Reasoning and Execution
The model is responsible for planning and judgment, while specific execution should be handed over to deterministic programs. This approach has two benefits: execution results are reproducible, and errors can be located to specific modules. The model only needs to output a structured plan without directly manipulating the underlying system.
VI. Conclusion
The core value of agent-oriented reasoning models lies in translating goals into executable, verifiable, and feedback-adjustable steps. Their differences from conversational models are reflected in output format, convergence methods, and feedback mechanisms.
When evaluating such models, one cannot only look at whether the response is fluent or appears smart. It is necessary to examine whether task understanding is accurate, whether the plan has dependencies, whether it can revise after failure, whether the output is stable, and whether the latency is acceptable. Classic puzzles can serve as a quick check tool, but formal evaluation still needs to cover real multi-step tasks and tool feedback scenarios.
For developers, the model is only part of the system. Privilege control, execution trace recording, termination conditions, and manual confirmation mechanisms are equally important. Only by combining these mechanisms with model capabilities can agents steadily improve production efficiency.
