mlsanityData to 7 Oct 2026

Code as Policies: Language Model Programs for Embodied Control

arXiv 2209.07753 ↗First posted 16 Sep 2022cs.ROcited by 1,172

Not on the map. Why?

Cited by 289 in LLM agents and tool use, but placed by its own abstract, which didn’t fit.

Abstract (arXiv)

Large language models (LLMs) trained on code completion have been shown to be capable of synthesizing simple Python programs from docstrings [1]. We find that these code-writing LLMs can be re-purposed to write robot policy code, given natural language commands. Specifically, policy code can express functions or feedback loops that process perception outputs (e.g.,from object detectors [2], [3]) and parameterize control primitive APIs. When provided as input several example language commands (formatted as comments) followed by corresponding policy code (via few-shot prompting), LLMs can take in new commands and autonomously re-compose API calls to generate new policy code respectively. By chaining classic logic structures and referencing third-party libraries (e.g., NumPy, Shapely) to perform arithmetic, LLMs used in this way can write robot policies that (i) exhibit spatial-geometric reasoning, (ii) generalize to new instructions, and (iii) prescribe precise values (e.g., velocities) to ambiguous descriptions ("faster") depending on context (i.e., behavioral commonsense). This paper presents code as policies: a robot-centric formulation of language model generated programs (LMPs) that can represent reactive policies (e.g., impedance controllers), as well as waypoint-based policies (vision-based pick and place, trajectory-based control), demonstrated across multiple real robot platforms. Central to our approach is prompting hierarchical code-gen (recursively defining undefined functions), which can write more complex code and also improves state-of-the-art to solve 39.8% of problems on the HumanEval [1] benchmark. Code and videos are available at https://code-as-policies.github.io

Key facts. Cited by 1,172 papers in the map (data through 7 Oct 2026). First posted on arXiv 16 Sep 2022.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 7; 2023: 183; 2024: 315; 2025: 279; 2026: 388.

1,172 papers.

Sort:

By area:

  1. 2023A Survey of Large Language Modelscited by 2,537
  2. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,081
  3. 2023PaLM-E: An Embodied Multimodal Language Modelcited by 2,037
  4. 2022RT-1: Robotics Transformer for Real-World Control at Scalecited by 2,007
  5. 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 1,908
  6. 2025π0.5: a Vision-Language-Action Model with Open-World Generalizationcited by 1,653
  7. 2025GR00T N1: An Open Foundation Model for Generalist Humanoid Robotscited by 1,167
  8. 2023VoxPoser: Composable 3D Value Maps for Robotic Manipulation with Language Modelscited by 733
  9. 2023Eureka: Human-Level Reward Design via Coding Large Language Modelscited by 542
  10. 2024Executable Code Actions Elicit Better LLM Agentscited by 537
  11. 2023DriveLM: Driving with Graph Visual Question Answeringcited by 527
  12. 2023Identifying the Risks of LM Agents with an LM-Emulated Sandboxcited by 514
38 more
  1. 2023DriveGPT4: Interpretable End-to-end Autonomous Driving via Large Language Modelcited by 455
  2. 2023Cognitive Architectures for Language Agentscited by 422
  3. 2023Augmented Language Models: a Surveycited by 398
  4. 2023Describe, Explain, Plan and Select: Interactive Planning with Large Language Models Enables Open-World Multi-Task Agentscited by 396
  5. 2022Visual Language Maps for Robot Navigationcited by 362
  6. 2023A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesiscited by 350
  7. 2024Agent Workflow Memorycited by 342
  8. 2024Robotic Control via Embodied Chain-of-Thought Reasoningcited by 340
  9. 2023Language to Rewards for Robotic Skill Synthesiscited by 307
  10. 2023Tool Learning with Foundation Modelscited by 302
  11. 2023Robots That Ask For Help: Uncertainty Alignment for Large Language Model Plannerscited by 298
  12. 2023ChatGPT for Robotics: Design Principles and Model Abilitiescited by 296
  13. 2023Ghost in the Minecraft: Generally Capable Agents for Open-World Environments via Large Language Models with Text-based Knowledge and Memorycited by 288
  14. 2023A Survey on Multimodal Large Language Models for Autonomous Drivingcited by 288
  15. 2024A Survey on Vision-Language-Action Models for Embodied AIcited by 274
  16. 2024ReEvo: Large Language Models as Hyper-Heuristics with Reflective Evolutioncited by 266
  17. 2023FireAct: Toward Language Agent Fine-tuningcited by 247
  18. 2024RoboPoint: A Vision-Language Model for Spatial Affordance Prediction for Roboticscited by 242
  19. 2023Building Cooperative Embodied Agents Modularly with Large Language Modelscited by 231
  20. 2023InterCode: Standardizing and Benchmarking Interactive Coding with Execution Feedbackcited by 229
  21. 2023Text2Motion: From Natural Language Instructions to Feasible Planscited by 223
  22. 2024Data Interpreter: An LLM Agent For Data Sciencecited by 222
  23. 2023TidyBot: Personalized Robot Assistance with Large Language Modelscited by 219
  24. 2025Hi Robot: Open-Ended Instruction Following with Hierarchical Vision-Language-Action Modelscited by 216
  25. 2023RoboGen: Towards Unleashing Infinite Data for Automated Robot Learning via Generative Simulationcited by 206
  26. 2023Leveraging Pre-trained Large Language Models to Construct and Utilize World Models for Model-based Task Planningcited by 204
  27. 2025DreamVLA: A Vision-Language-Action Model Dreamed with Comprehensive World Knowledgecited by 203
  28. 2023Large Language Models as General Pattern Machinescited by 196
  29. 2023Grounding Large Language Models in Interactive Environments with Online Reinforcement Learningcited by 193
  30. 2023AdaPlanner: Adaptive Planning from Feedback with Language Modelscited by 193
  31. 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 192
  32. 2023LanguageMPC: Large Language Models as Decision Makers for Autonomous Drivingcited by 188
  33. 2024PIVOT: Iterative Visual Prompting Elicits Actionable Knowledge for VLMscited by 187
  34. 2023TaskMatrix.AI: Completing Tasks by Connecting Foundation Models with Millions of APIscited by 184
  35. 2024Agent S: An Open Agentic Framework that Uses Computers Like a Humancited by 182
  36. 2023Synapse: Trajectory-as-Exemplar Prompting with Memory for Computer Controlcited by 180
  37. 2024Aligning Cyber Space with Physical World: A Comprehensive Survey on Embodied AIcited by 175
  38. 2023ReWOO: Decoupling Reasoning from Observations for Efficient Augmented Language Modelscited by 174

50 most cited of 1,172 All 1,172 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2026CaP-X: A Framework for Benchmarking and Improving Coding Agents for Robot Manipulation
  2. 2022Inner Monologue: Embodied Reasoning through Planning with Language Models
  3. 2024ROS-LLM: A ROS framework for embodied AI with task feedback and structured reasoning
  4. 2026Learning Structured Robot Policies from Vision-Language Models via Synthetic Neuro-Symbolic Supervision
  5. 2025Plan Verification for LLM-Based Embodied Task Completion Agents
  6. 2026From Local Corrections to Generalized Skills: Improving Neuro-Symbolic Policies with MEMO
  7. 2025Bootstrapping Human-Like Planning via LLMs
  8. 2026ALRM: Agentic LLM for Robotic Manipulation