{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/2408-00764","title":"AgentGen: Enhancing Planning Abilities for Large Language Model based Agent via Environment and Task Generation","arxiv_id":"2408.00764","date":"2024-08-01","proceeding":null,"authors":["Mengkang Hu","Pu Zhao","Can Xu","Qingfeng Sun","JianGuang Lou","QIngwei Lin","Ping Luo","Saravan Rajmohan"],"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.","url_abs":"https://arxiv.org/abs/2408.00764v2","url_pdf":"https://arxiv.org/pdf/2408.00764v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"2408-00764","repo_url":"https://github.com/lazychih114/AgentGen-Reproduction","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-3","method_name":"GPT-3"},{"method_slug":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"set","method_name":"SET"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2408.00764","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.00764"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lazychih114/AgentGen-Reproduction","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":4},"by_repo_kind":{"official":{"samples":9,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"790716209d5d4c6e","entry":"count_predicates_actions","repo":"lazychih114/AgentGen-Reproduction","repo_kind":"official","path":"src/utils/pddl_utils.py","file_url":"https://github.com/lazychih114/AgentGen-Reproduction/blob/HEAD/src/utils/pddl_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"790716209d5d4c6e"}},{"code_sha256_prefix":"6f285d0b8df6a684","entry":"extract_domain_name","repo":"lazychih114/AgentGen-Reproduction","repo_kind":"official","path":"src/utils/pddl_utils.py","file_url":"https://github.com/lazychih114/AgentGen-Reproduction/blob/HEAD/src/utils/pddl_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6f285d0b8df6a684"}},{"code_sha256_prefix":"79dfdf929d34143d","entry":"get_action_space","repo":"lazychih114/AgentGen-Reproduction","repo_kind":"official","path":"src/utils/env_utils.py","file_url":"https://github.com/lazychih114/AgentGen-Reproduction/blob/HEAD/src/utils/env_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"79dfdf929d34143d"}},{"code_sha256_prefix":"8ddb5c95ed41e188","entry":"literal_to_text_wonl","repo":"lazychih114/AgentGen-Reproduction","repo_kind":"official","path":"src/utils/env_utils.py","file_url":"https://github.com/lazychih114/AgentGen-Reproduction/blob/HEAD/src/utils/env_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ddb5c95ed41e188"}},{"code_sha256_prefix":"3f2560e9e74537fe","entry":"make_correction_prompt","repo":"lazychih114/AgentGen-Reproduction","repo_kind":"official","path":"src/utils/world_generation.py","file_url":"https://github.com/lazychih114/AgentGen-Reproduction/blob/HEAD/src/utils/world_generation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3f2560e9e74537fe"}},{"code_sha256_prefix":"d12177c671808a0a","entry":"call_chatgpt_openai","repo":"lazychih114/AgentGen-Reproduction","repo_kind":"official","path":"src/utils/openai_access.py","file_url":"https://github.com/lazychih114/AgentGen-Reproduction/blob/HEAD/src/utils/openai_access.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d12177c671808a0a"}},{"code_sha256_prefix":"e59b374eeb3792e8","entry":"extract_from_python","repo":"lazychih114/AgentGen-Reproduction","repo_kind":"official","path":"src/utils/data_utils.py","file_url":"https://github.com/lazychih114/AgentGen-Reproduction/blob/HEAD/src/utils/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e59b374eeb3792e8"}},{"code_sha256_prefix":"7d575f2370b0c282","entry":"extract_pddl","repo":"lazychih114/AgentGen-Reproduction","repo_kind":"official","path":"src/utils/pddl_utils.py","file_url":"https://github.com/lazychih114/AgentGen-Reproduction/blob/HEAD/src/utils/pddl_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7d575f2370b0c282"}},{"code_sha256_prefix":"faec2e1ac9c153ea","entry":"literal_to_text","repo":"lazychih114/AgentGen-Reproduction","repo_kind":"official","path":"src/utils/env_utils.py","file_url":"https://github.com/lazychih114/AgentGen-Reproduction/blob/HEAD/src/utils/env_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"faec2e1ac9c153ea"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}