Voyager is an embodied lifelong learning agent that utilizes large language models to explore and master skills in Minecraft. It consists of an automatic curriculum for exploration, a skill library for storing complex behaviors, and an iterative prompting mechanism that generates executable code for embodied control. Voyager interacts with a blackbox LLM (GPT-4) through prompting and in-context learning. It shows strong in-context lifelong learning capability and exhibits exceptional proficiency in playing Minecraft, outperforming prior state-of-the-art techniques. Voyager is able to utilize the learned skill library in a new Minecraft world to solve novel tasks from scratch.