We introduce Voyager, the first LLM-powered embodied lifelong learning agentin Minecraft that continuously explores the world, acquires diverse skills, andmakes novel discoveries without human intervention. Voyager consists of threekey components: 1) an automatic curriculum that maximizes exploration, 2) anever-growing skill library of executable code for storing and retrievingcomplex behaviors, and 3) a new iterative prompting mechanism that incorporatesenvironment feedback, execution errors, and self-verification for programimprovement. Voyager interacts with GPT-4 via blackbox queries, which bypassesthe need for model parameter fine-tuning. The skills developed by Voyager aretemporally extended, interpretable, and compositional, which compounds theagent's abilities rapidly and alleviates catastrophic forgetting. Empirically,Voyager shows strong in-context lifelong learning capability and exhibitsexceptional proficiency in playing Minecraft. It obtains 3.3x more uniqueitems, travels 2.3x longer distances, and unlocks key tech tree milestones upto 15.3x faster than prior SOTA. Voyager is able to utilize the learned skilllibrary in a new Minecraft world to solve novel tasks from scratch, while othertechniques struggle to generalize. We open-source our full codebase and promptsat https://voyager.minedojo.org/.