SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.12361 · 2024

Proactive Agent: Shifting LLM Agents from Reactive Responses to Active Assistance

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2410.12361.json · badge: /api/ran/2410.12361.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
thunlp/proactiveagent canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
cut_messages Ran
ran; our contract draft was wrong, not the code
thunlp/proactiveagent/dataset/build_agent_trainset.py
code served (permissive licence) · get_code("6df273ea032c1eee")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 json

# Construct valid messages for the cut_messages function
messages = [
    {
        'role': 'system',
        'content': 'You are a helpful assistant.' * 100  # Make it reasonably long
    },
    {
        'role': 'user',
        'content': json.dumps({'question': 'What is 2+2?'})
    },
    {
        'role': 'assistant',
        'content': 'The answer is 4.' * 50
    },
    {
        'role': 'user',
        'content': json.dumps({'question': 'What is 3+3?'})
    },
    {
        'role': 'assistant',
        'content': 'The answer is 6.' * 50
    },
    {
        'role': 'user',
        'content': json.dumps({'question': 'What is 5+5?'})
    }
]

ARGS = {
    'messages': messages,
    'max_length': 20000,
    'max_agent_response_length': 10000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
extrat_pred Ran
ran; our contract draft was wrong, not the code
thunlp/proactiveagent/dataset/build_agent_trainset.py
code served (permissive licence) · get_code("bbab44ae333b7271")
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 json
import re

def extrat_pred(s):
    if '```json' in s:
        s = re.findall('```json\\n(.*?)\\n```', s, re.DOTALL)[0]
    ret = json.loads(s)
    if ret.get('Proactive Task', None) is None:
        ret['Proactive Task'] = None
    elif ret.get('Proactive Task') == 'null':
        ret['Proactive Task'] = None
    if ret.get('Response', None) is not None and ret.get('Response') == 'null':
        ret['Response'] = None
    return ret

# Test case 1: plain JSON string
test_string_1 = json.dumps({
    "Proactive Task": "some_task",
    "Response": "some_response"
})

# Test case 2: JSON with markdown code fence
test_string_2 = """```json
{
    "Proactive Task": null,
    "Response": "test_response"
}
"""

# Test case 3: JSON string with "null" as string value
test_string_3 = json.dumps({
    "Proactive Task": "null",
    "Response": "null"
})

ARGS = {
    "s": test_string_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
format_message Ran
ran; our contract draft was wrong, not the code
thunlp/proactiveagent/dataset/build_reward_trainset.py
code served (permissive licence) · get_code("288e12deebad1396")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 json

def format_message(obs, pred_task, user):
    inst_dict = {'Observations (Time Ascending)': obs, 'Proposed Task': pred_task, 'User Judgement': 'accepted' if user else 'rejected', 'Instruction': 'You as the user have given the judgement to the proposed task. You should complete the reasoning process for your judgement in first person. Try to understand the decision and give same judgement.'}
    return [{'role': 'system', 'content': 'SYSTEM'}, {'role': 'user', 'content': json.dumps(inst_dict, sort_keys=False, ensure_ascii=False, indent=4)}]

ARGS = {
    'obs': [
        {'timestamp': '2024-01-01 10:00:00', 'event': 'user opened email'},
        {'timestamp': '2024-01-01 10:05:00', 'event': 'user browsed documents'},
        {'timestamp': '2024-01-01 10:10:00', 'event': 'user checked calendar'}
    ],
    'pred_task': {
        'task_name': 'send_reminder',
        'description': 'Send meeting reminder to team',
        'priority': 'high',
        'estimated_time': 5
    },
    'user': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
format_reward_instruction Ran
ran; our contract draft was wrong, not the code
thunlp/proactiveagent/eval/reward_model_template.py
code served (permissive licence) · get_code("bb2fc5fcd8d68b23")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 json

# Based on the function signature, we need:
# - obs: list[dict] - a list of observation dictionaries
# - pred_task: str - a proposed task string

# Create sample observations
obs = [
    {
        "timestamp": 1,
        "state": "user is idle",
        "context": "morning routine"
    },
    {
        "timestamp": 2,
        "state": "user checking emails",
        "context": "work preparation"
    },
    {
        "timestamp": 3,
        "state": "user in meeting",
        "context": "project discussion"
    }
]

# Create a sample predicted task
pred_task = "Schedule a follow-up meeting for tomorrow at 2 PM"

# Define ARGS mapping all parameters
ARGS = {
    'obs': obs,
    'pred_task': pred_task
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
format_thought_check Ran
ran; our contract draft was wrong, not the code
thunlp/proactiveagent/dataset/build_reward_trainset.py
code served (permissive licence) · get_code("c0f2bb2f36f724f7")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 json

def format_thought_check(thought: str):
    CHECK_SYSTEM = '<Task>\nYou will be given a string of thoughts, you should generate the judgement by infer the thought.\nPlease generate the judgement according to the thought.\n</Task>    \n\n<Rule> \n1. Analyze the reasoning provided in the `reason` field to understand the thought process behind the decision.\n2. If the reasoning indicates acceptance of the prediction, mark the judgement result as `accepted`.\n3. If the reasoning indicates rejection of the prediction, mark the judgement result as `rejected`.\n</Rule>\n\n<Format>\nYou should answer with following JSON format:\n{\n    "reason": "Your analysis of the thought.",\n    "judgement": "accepted or rejected"\n}\n</Format>'
    inst_dict = {'Thought To Check': thought, 'Instruction': 'You should analyze the thought and provide the judgement result according to the provided thought.'}
    return [{'role': 'system', 'content': CHECK_SYSTEM}, {'role': 'user', 'content': json.dumps(inst_dict, sort_keys=False, ensure_ascii=False, indent=4)}]

ARGS = {
    'thought': 'The model prediction is correct because the input features align with the expected output pattern.'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
read_text_from_file Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
thunlp/proactiveagent/agent/agentmodule.py
code served (permissive licence) · get_code("7b909dda991ae7cf")
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 str. 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 tempfile
import os

# Create temporary text file for testing
temp_dir = tempfile.mkdtemp()
txt_filepath = os.path.join(temp_dir, "test.txt")
with open(txt_filepath, 'w') as f:
    f.write("This is a test document.\nLine 2\nLine 3\nLine 4\nLine 5")

# Define arguments for read_text_from_file
ARGS = {
    'filepath': txt_filepath,
    'pages': 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PyPDF2, docx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 6 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

Agents powered by large language models have shown remarkable abilities in solving complex tasks. However, most agent systems remain reactive, limiting their effectiveness in scenarios requiring foresight and autonomous decision-making. In this paper, we tackle the challenge of developing proactive agents capable of anticipating and initiating tasks without explicit human instructions. We propose a novel data-driven approach for this problem. Firstly, we collect real-world human activities to generate proactive task predictions. These predictions are then labeled by human annotators as either accepted or rejected. The labeled data is used to train a reward model that simulates human judgment and serves as an automatic evaluator of the proactiveness of LLM agents. Building on this, we develop a comprehensive data generation pipeline to create a diverse dataset, ProactiveBench, containing 6,790 events. Finally, we demonstrate that fine-tuning models with the proposed ProactiveBench can significantly elicit the proactiveness of LLM agents. Experimental results show that our fine-tuned model achieves an F1-Score of 66.47% in proactively offering assistance, outperforming all open-source and close-source models. These results highlight the potential of our method in creating more proactive and effective agent systems, paving the way for future advancements in human-agent collaboration.

For agents

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

get_harvested_code_for_paper("2410.12361")
get_code_for_paper("2410.12361")
have("2410.12361")

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

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

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

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

Connect an agent — have() is free.