SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.00764 · 2024

AgentGen: Enhancing Planning Abilities for Large Language Model based Agent via Environment and Task Generation

arXiv · PDF · Open in the Atlas

Code that ran

5 of 9 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 4 no recorded run), measured 2026-11-22; 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/2408.00764.json · badge: /api/ran/2408.00764.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
lazychih114/AgentGen-Reproduction canonical (classifier label)
classifier basis: census
5 ran · 4 no recorded run
FunctionStatusWhere it lives
count_predicates_actions Ran
ran, honoured the contract we drafted
lazychih114/AgentGen-Reproduction/src/utils/pddl_utils.py
code served (permissive licence) · get_code("790716209d5d4c6e")
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 tuple, ndim 1, dtype family int; 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 torch
import torch.nn as nn

# Analyze the function: it takes 'content' string and:
# 1. Splits by '(:' 
# 2. Counts lines in predicates sections
# 3. Counts action sections
# The function expects a string in PDDL-like format

content = """(define (domain test-domain)
  (:requirements :typing)
  (:predicates
    (at ?x - location)
    (clear ?x - obj)
    (holding ?x - obj)
  )
  (:action move
    :parameters (?from ?to - location)
    :precondition (at ?from)
    :effect (and (at ?to) (not (at ?from)))
  )
  (:action pick-up
    :parameters (?obj - obj ?loc - location)
    :precondition (and (at ?loc) (clear ?obj))
    :effect (holding ?obj)
  )
)"""

ARGS = {
    "content": content
}
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 tuple, ndim 1, dtype family int — a tuple 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
extract_domain_name Ran
ran; our contract draft was wrong, not the code
lazychih114/AgentGen-Reproduction/src/utils/pddl_utils.py
code served (permissive licence) · get_code("6f285d0b8df6a684")
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 re

def extract_domain_name(pddl_text):
    pattern = '\\(define \\(domain\\s+(\\S+)'
    match = re.search(pattern, pddl_text)
    if match:
        return match.group(1).replace(')', '')
    else:
        return None

# Valid PDDL text with a domain definition
pddl_text_with_domain = "(define (domain logistics-domain)\n  (:requirements :typing)\n  (:types location vehicle package - object))"

# PDDL text without domain definition
pddl_text_without_domain = "(define (problem test-problem)\n  (:domain logistics-domain))"

ARGS = {
    'pddl_text': pddl_text_with_domain
}
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 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
get_action_space Ran
ran; our contract draft was wrong, not the code
lazychih114/AgentGen-Reproduction/src/utils/env_utils.py
code served (permissive licence) · get_code("79dfdf929d34143d")
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 torch
import numpy as np
from collections import namedtuple

# Define a simple stand-in Predicate class
class Predicate:
    def __init__(self, name):
        self.name = name

# Define a simple stand-in Variable/Object class
class Variable:
    def __init__(self, name):
        self.name = name
    
    def __str__(self):
        return self.name

# Define a simple stand-in Literal class
class Literal:
    def __init__(self, predicate, variables):
        self.predicate = predicate
        self.variables = variables

# Define a simple stand-in ActionSpace class
class ActionSpace:
    def __init__(self, ground_literals):
        self.ground_literals_list = ground_literals
    
    def all_ground_literals(self, obs):
        return self.ground_literals_list

# Define a simple stand-in Environment class
class Environment:
    def __init__(self, action_space):
        self.action_space = action_space

# Create test data
pred1 = Predicate("reach")
var1 = Variable("block_a")
var2 = Variable("table")
literal1 = Literal(pred1, [var1, var2])

pred2 = Predicate("move")
var3 = Variable("robot")
var4 = Variable("pos_1")
literal2 = Literal(pred2, [var3, var4])

ground_literals = [literal1, literal2]
action_space = ActionSpace(ground_literals)
env = Environment(action_space)

last_obs = None  # The observation parameter isn't used in the function body

ARGS = {
    "env": env,
    "last_obs": last_obs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
literal_to_text_wonl Ran
ran; our contract draft was wrong, not the code
lazychih114/AgentGen-Reproduction/src/utils/env_utils.py
code served (permissive licence) · get_code("8ddb5c95ed41e188")
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 torch
import torch.nn as nn

class Variable:
    def __init__(self, name):
        self.name = name

class Predicate:
    def __init__(self, name):
        self.name = name

class Literal:
    def __init__(self, predicate, variables):
        self.predicate = predicate
        self.variables = variables

# Construct test data
predicate = Predicate("loves")
variables = [Variable("Alice"), Variable("Bob"), Variable("Charlie")]
literal = Literal(predicate, variables)

ARGS = {
    "literal": literal
}
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 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
make_correction_prompt Ran
ran; our contract draft was wrong, not the code
lazychih114/AgentGen-Reproduction/src/utils/world_generation.py
code served (permissive licence) · get_code("3f2560e9e74537fe")
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 torch

torch.manual_seed(0)

correction_format = '\nRound [Round]\nIncorrect PDDL:\n[PDDL]\nError Information:\n[Error]\nCorrected PDDL:\n[Corrected_PDDL]\n'

history_format = '\nRound [Round]\nIncorrect PDDL: \n[PDDL]\nError Information:\n[Error]\n'

def make_correction_prompt(prompt, trace, domain, error_info):
    history = [history_format.replace('[Round]', str(idx)).replace('[PDDL]', _['incorrect_domain']).replace('[Error]', _['error_info']) for idx, _ in enumerate(trace)]
    history.append(correction_format.replace('[Round]', str(len(trace))).replace('[PDDL]', domain).replace('[Corrected_PDDL]', '').replace('[Error]', error_info))
    prompt += '\n\n' + '\n\n'.join(history)
    return prompt

ARGS = {
    'prompt': 'Initial prompt for PDDL correction task',
    'trace': [
        {
            'incorrect_domain': '(define (domain logistics)\n  (:requirements :typing)\n  (:types truck location package)\n)',
            'error_info': 'Missing :action definition'
        },
        {
            'incorrect_domain': '(define (domain logistics)\n  (:action move\n    :parameters (?t - truck ?l1 ?l2 - location)\n    :precondition (at ?t ?l1)\n    :effect (and (at ?t ?l2) (not (at ?t ?l1)))\n  )\n)',
            'error_info': 'Action move is incomplete, missing delivery logic'
        }
    ],
    'domain': '(define (domain logistics)\n  (:requirements :typing :action-expansions)\n  (:types truck location package)\n  (:action move\n    :parameters (?t - truck ?l1 ?l2 - location)\n    :precondition (at ?t ?l1)\n    :effect (and (at ?t ?l2) (not (at ?t ?l1)))\n  )\n)',
    'error_info': 'Missing package delivery action definitions'
}
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 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
call_chatgpt_openai Not yet run
unverified (harvested, no recorded run)
lazychih114/AgentGen-Reproduction/src/utils/openai_access.py
code served (permissive licence) · get_code("d12177c671808a0a")
How it ran

no invocation recorded.

extract_from_python Not yet run
unverified (harvested, no recorded run)
lazychih114/AgentGen-Reproduction/src/utils/data_utils.py
code served (permissive licence) · get_code("e59b374eeb3792e8")
How it ran

no invocation recorded.

extract_pddl Not yet run
unverified (harvested, no recorded run)
lazychih114/AgentGen-Reproduction/src/utils/pddl_utils.py
code served (permissive licence) · get_code("7d575f2370b0c282")
How it ran

no invocation recorded.

literal_to_text Not yet run
unverified (harvested, no recorded run)
lazychih114/AgentGen-Reproduction/src/utils/env_utils.py
code served (permissive licence) · get_code("faec2e1ac9c153ea")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 9 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-22.

Repositories linked to this paper

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

Abstract

Large Language Model-based agents have garnered significant attention and are becoming increasingly popular. Furthermore, planning ability is a crucial component of an LLM-based agent, which generally entails achieving a desired goal from an initial state. This paper investigates enhancing the planning abilities of LLMs through instruction tuning, referred to as agent training. Recent studies have demonstrated that utilizing expert-level trajectory for instruction-tuning LLMs effectively enhances their planning capabilities. However, existing work primarily focuses on synthesizing trajectories from manually designed planning tasks and environments. The labor-intensive nature of creating these environments and tasks impedes the generation of sufficiently varied and extensive trajectories. To address this limitation, this paper explores the automated synthesis of diverse environments and a gradual range of planning tasks, from easy to difficult. We introduce a framework, AgentGen, that leverages LLMs first to generate environments and subsequently generate planning tasks conditioned on these environments. Specifically, to improve environmental diversity, we propose using an inspiration corpus composed of various domain-specific text segments as the context for synthesizing environments. Moreover, to increase the difficulty diversity of generated planning tasks, we propose a bidirectional evolution method, Bi-Evol, that evolves planning tasks from easier and harder directions to synthesize a task set with a smoother difficulty curve. The evaluation results derived from AgentBoard show that AgentGen greatly improves LLMs' planning ability, e.g., the AgentGen instruction-tuned Llama-3.1-8B surpasses GPT-3.5 in overall performance. Moreover, the AgentGen-tuned Llama-3.1-70B model achieves state-of-the-art results in planning tasks. Project page: https://agent-gen.github.io/.

For agents

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

get_harvested_code_for_paper("2408.00764")
get_code_for_paper("2408.00764")
have("2408.00764")

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

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

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

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

Connect an agent — have() is free.