✨ AgentGen: Enhancing Planning Abilities for Large Language Model based Agent via Environment and Task Generation
- 2025/05: Checking our new Text2World paper on PDDL generation accepted by ACL 2025 Findings.
- 2024/12/11: Initial release the code
- Configure the environment:
conda env create -f environment.yml
conda activate agentgen-
Set up OpenAI credentials:
- Add your
OPENAI_API_KEYtosrc/key.txt
- Add your
-
Install required dependencies (pddlgym and pddlgym_planners):
pip install pddlgym
# for mac:
# brew install coreutils
git clone https://github.com/ronuchit/pddlgym_planners.git
cd pddlgym_planners
pip install -e .Generate the environment and domain for the first iteration:
cd src
bash run.shThis repository provides our implementation to reproduce the data generation process described in the original AgentGen paper. To replicate the results:
- Segment the
src/data/inpiration_corpus/lima.json - Run the
run.shscript iteratively
For additional components:
- Model Training: We use llama-factory
- Model Evaluation: We use AgentBoard
- Dataset: The dataset after iterative environment and task generation is available in the
src/data/it12folder. The trainig-ready conversation SFT data is available atsrc/data/sft_data.json. - Model: We followed the training configuration from the original paper to reproduce the models (We trained the AgentGen-8B model with alpaca template since there exists a bug when training with llama-3 template):
| Model | Huggingface Repo |
|---|---|
| AgentGen-70B-Lora-Rank1 | 🤗 Huggingface |
| AgentGen-70B-Lora-Rank16 | 🤗 Huggingface |
| AgentGen-8B | 🤗 Huggingface |
If you find this repo helpful in your research, please cite the original paper:
@article{hu2024agentgen,
title={Agentgen: Enhancing planning abilities for large language model based agent via environment and task generation},
author={Hu, Mengkang and Zhao, Pu and Xu, Can and Sun, Qingfeng and Lou, Jianguang and Lin, Qingwei and Luo, Ping and Rajmohan, Saravan and Zhang, Dongmei},
journal={arXiv preprint arXiv:2408.00764},
year={2024}
}