SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.22138 · 2026

Efficient Agentic Reasoning Through Self-Regulated Simulative Planning

Eric Xing, Taylor Killian, Mingkai Deng, Zhengzhong Liu, Varad Pimpalkhute, Jinyu Hou, Lara Neves

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2605.22138.json · badge: /api/ran/2605.22138.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
sailing-lab/sr2am community
Papers with Code archive
3 ran · 0 no recorded run
FunctionStatusWhere it lives
Agent Ran
ran on a synthesized input · constructed an object; no result was computed
sailing-lab/sr2am/run_agent.py
code served (permissive licence) · get_code("07732ce05478c0d3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Agent: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from unittest.mock import AsyncMock, MagicMock
from openai import AsyncOpenAI


# Create a mock tool class with the required interface
class MockTool:
    def __init__(self, name: str, description: str):
        self.name = name
        self.description = description
    
    def get_openai_tool_schema(self):
        # Return a mock schema object that mimics OpenAI tool schema structure
        schema = MagicMock()
        schema.type = "function"
        schema.function = MagicMock()
        schema.function.name = self.name
        schema.function.description = self.description
        schema.function.parameters = MagicMock()
        schema.function.parameters.model_dump = MagicMock(return_value={
            "type": "object",
            "properties": {
                "input": {"type": "string"}
            },
            "required": ["input"]
        })
        schema.function.strict = False
        schema.model_dump = MagicMock(return_value={
            "type": "function",
            "function": {
                "name": self.name,
                "description": self.description,
                "parameters": {
                    "type": "object",
                    "properties": {"input": {"type": "string"}},
                    "required": ["input"]
                }
            }
        })
        return schema


# Create mock client
mock_client = AsyncMock(spec=AsyncOpenAI)
mock_client.chat = AsyncMock()
mock_client.chat.completions = AsyncMock()
mock_client.responses = AsyncMock()

# Create tool instances
tool_instances = {
    "tool_1": MockTool("search", "Search for information"),
    "tool_2": MockTool("calculate", "Perform calculations")
}

# Define system prompt
system_prompt = "You are a helpful assistant that can use tools to help the user."

# Define model name
model = "gpt-4"

# Construct the ARGS dictionary
ARGS = {
    "client": mock_client,
    "model": model,
    "tool_instances": tool_instances,
    "system_prompt": system_prompt,
    "use_response_api": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Agent — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Agent output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
VLLMModelThinkAgent Ran
ran on a synthesized input · constructed an object; no result was computed
sailing-lab/sr2am/run_agent.py
code served (permissive licence) · get_code("7a640e34f7388886")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, VLLMModelThinkAgent: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from unittest.mock import AsyncMock, MagicMock
from openai import AsyncOpenAI


# Create a mock tool class with the required interface
class MockTool:
    def __init__(self, name="test_tool"):
        self.name = name
    
    def get_openai_tool_schema(self):
        mock_schema = MagicMock()
        mock_schema.type = "function"
        mock_schema.function.name = self.name
        mock_schema.function.description = "A test tool"
        mock_schema.function.parameters.model_dump.return_value = {
            "type": "object",
            "properties": {},
            "required": []
        }
        mock_schema.function.strict = False
        mock_schema.model_dump.return_value = {
            "type": "function",
            "function": {
                "name": self.name,
                "description": "A test tool",
                "parameters": {
                    "type": "object",
                    "properties": {},
                    "required": []
                },
                "strict": False
            }
        }
        return mock_schema


# Create mock AsyncOpenAI client
mock_client = AsyncMock(spec=AsyncOpenAI)
mock_client.chat = AsyncMock()
mock_client.chat.completions = AsyncMock()
mock_client.responses = AsyncMock()
mock_client.responses.create = AsyncMock()
mock_client.responses.input_tokens = AsyncMock()
mock_client.responses.input_tokens.count = AsyncMock()

# Mock response objects
mock_usage = MagicMock()
mock_usage.model_dump.return_value = {"prompt_tokens": 10, "completion_tokens": 5}

mock_message = MagicMock()
mock_message.model_dump.return_value = {
    "role": "assistant",
    "content": "Test response",
    "tool_calls": []
}

mock_choice = MagicMock()
mock_choice.message = mock_message

mock_completion_response = MagicMock()
mock_completion_response.choices = [mock_choice]
mock_completion_response.usage = mock_usage

mock_client.chat.completions.create.return_value = mock_completion_response

# Mock response API response
mock_response_api_response = MagicMock()
mock_response_api_response.model_dump.return_value = {
    "output": [
        {
            "type": "message",
            "role": "assistant",
            "status": "completed",
            "content": [{"type": "text", "text": "Test response"}]
        }
    ]
}
mock_response_api_response.usage = mock_usage
mock_client.responses.create.return_value = mock_response_api_response

# Mock token count response
mock_token_count_response = MagicMock()
mock_token_count_response.input_tokens = 100
mock_client.responses.input_tokens.count.return_value = mock_token_count_response

# Create tool instances
tool_instances = {
    "tool_1": MockTool("test_tool_1"),
    "tool_2": MockTool("test_tool_2")
}

# Define ARGS dictionary with all required parameters for VLLMModelThinkAgent
ARGS = {
    "client": mock_client,
    "model": "gpt-5.4",
    "tool_instances": tool_instances,
    "system_prompt": "You are a helpful assistant.",
    "use_response_api": False,
    "max_completion_tokens": 8192,
    "temperature": 0.7
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VLLMModelThinkAgent — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a VLLMModelThinkAgent output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_model_config Ran
ran; our contract draft was wrong, not the code
sailing-lab/sr2am/run_agent.py
code served (permissive licence) · get_code("d126f68b9dfc0ded")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

ARGS = {
    "model_name": "DeepSeek-V3.2"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

How should an agent decide when and how to plan? A dominant approach builds the agent as a reactive policy with adaptive computation (e.g., chain-of-thought reasoning), trained end-to-end with the expectation that planning will emerge implicitly from sufficient data and compute. Without control over the presence, structure, or horizon of planning, however, these systems typically increase reasoning length dramatically during training, leading to inefficient token consumption that does not reliably translate to accuracy gains. We argue that efficient agentic reasoning benefits from a decomposition of decision-making into three interacting systems: simulative reasoning (System II) that grounds deliberation in future-state prediction using a world model, rather than unconstrained chain-of-thought; self-regulation (System III) that decides when and how deeply the agent plans at each turn through a learned configurator; and reactive execution (System I) that handles fine-grained reasoning and action. Simulative reasoning provides a unified planning structure applicable across diverse reasoning tasks without per-domain engineering, while self-regulation ensures that simulative planner is invoked only when the situation warrants it, avoiding both the inefficiency of unregulated deliberation and the rigidity of always-on planning. To test this, we develop SR 2 AM (Self-Regulated Simulative Reasoning Agentic LLM), which realizes the configurator and simulative planning as distinct stages within an LLM's chain-of-thought reasoning, with the LLM itself serving as the world model in language space. We explore two instantiations: recording decisions from a multi-module prompted system (v0.1) and reconstructing structured plans from the traces of pretrained reasoning LLMs (v1.0). Both are trained via supervised learning followed by reinforcement learning (RL). Across mathematical reasoning, scientific problem-solving, tabular data analysis, and web information seeking, SR 2 AM-v0.1-8B and SR 2 AM-v1.0-30B achieve overall Pass@1 competitive with systems at 120-355B and 685B-1T parameters, respectively, while SR 2 AM-v1.0-30B consumes 25.8-95.3% fewer reasoning tokens than competitive agentic LLMs of similar scale. Analysis reveals that RL increases average planning horizon by 22.8% while planning frequency grows only 2.0%, indicating that the model learns to plan further ahead rather than more often. More broadly, the configurator demonstrated here, as a learned mechanism for autonomous regulation of reasoning processes, instantiates a principle we expect to extend beyond inference-time planning to how agents govern their own learning and adaptation. a a Code and model artifacts are available at https://github.com/sailing-lab/sr2am

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2605.22138")
get_code_for_paper("2605.22138")
have("2605.22138")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2605.22138.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2605.22138.svg)](https://syntology.ai/paper/2605.22138)

Connect an agent — have() is free.