WorldAPIs: The World Is Worth How Many APIs? A Thought Experiment

Jiefu Ou, Arda Uzunoglu, Benjamin Van Durme, Daniel Khashabi

TL;DR

Researchers conducted a "thought experiment" to determine how many primitive actions (APIs) a truly versatile embodied AI agent needs. By using GPT-4 to translate wikiHow tutorials into Pythonic programs, they induced a diverse action space of over 300 unique APIs—revealing that current embodied simulators cover less than 20% of the most frequent real-world actions.

What Problem Does This Paper Address?

Most current embodied AI research happens in simulators like ALFRED or VirtualHome. However, these environments are built "bottom-up": developers first define a tiny, hand-crafted set of actions (usually 10–15, like Pickup or Open) and then create tasks that fit those actions.

The authors argue this creates a massive gap between simulation and the real world. If we want a robot to help us at home, it needs to do more than just pick up mugs; it needs to scrub, sift, prune, caulk, and measure. This paper flips the script with a "top-down" approach: they start with the vast diversity of human tasks found in wikiHow and ask, "What is the minimum set of primitive actions required to actually perform these?"

Figure 1: Top: WORLDAPIS, the proposed thought experiment that takes a top-down approach. Starting from daily tasks with sequences of instruction steps in wikiHow, and a seed action space (API pool), we iteratively prompt LLMs to generate agent programs and add the induced (hallucinated) APIs in generated programs to the API pool. Bottom: in contrast, most of the prior work in building embodied environments often adopts a bottom-up approach. The simulation and collection of instructions and programs are all based on a close set of predefined actions.

Methods

The authors developed WORLDAPIS, a pipeline that iteratively bootstraps an action space using GPT-4.

  1. Instruction Sampling: They pull "how-to" tutorials from wikiHow (specifically the "Home & Garden" category).
  2. Iterative Prompting: They prompt an LLM (GPT-4) to translate these natural language instructions into Python programs.
  3. Constructive Hallucination: If the LLM encounters a step it can't complete with existing APIs, it is encouraged to "hallucinate" (induce) a new, semantically appropriate API (e.g., squeegee(obj=window)).
  4. Verification & Expansion: The generated programs are checked for syntax. Valid programs and their newly minted APIs are added back into a "pool of demonstrations," which serves as few-shot context for the next iteration.

To keep the action space realistic, they defined a WorldObject class with actionable and material properties, ensuring the LLM doesn't just generate overly abstract actions (like a single dry_clothes() command) but instead breaks them down into logical interactions (like open(dryer), put(clothes, dryer), turn_on(dryer)).

Figure 2: Proposed pipeline that jointly induces new APIs and programs.

Datasets

  • wikiHow: The primary source of diverse, human-written procedural instructions. The study focused on the "Home & Garden" category to ensure the tasks were physically grounded.
  • Embodied Simulators (for comparison): The authors compared their induced action space against existing benchmarks like ALFRED, VirtualHome, and BEHAVIOR-1K.
Comparison of action space sizes across various physical and digital simulators.

Key Insights and Ideas

  • The "Lower Bound" of Reality: By processing just 0.5% of wikiHow tutorials (about 1,000), the system induced over 300 unique, frequently-evoked APIs. This suggests the "true" action space for a general-purpose robot is orders of magnitude larger than what we currently simulate.
  • Saturation Point: The growth of the API pool begins to plateau after about 600 tutorials. This indicates that while the world is complex, the set of primitive actions needed to navigate it might be finite and discoverable through this method.
  • The Simulation Gap: A manual review showed that only 9 of the top 50 most frequent APIs induced by the pipeline are supported by current state-of-the-art simulators. Actions like wipe, mix, measure, and spray are common in human instructions but largely absent in AI training environments.
  • Hallucination as a Tool: While LLM "hallucination" is usually a bug, here it's a feature. By allowing the model to propose new functions, the researchers leverage the LLM's vast internal knowledge of human activity to define the boundaries of a hypothetical world.

Key Results

The researchers evaluated their pipeline variants using human experts to measure Redundancy (are APIs unique?) and Faithfulness (do the programs actually solve the task?).

  • Scale: The pipeline successfully induced a self-contained pool of 300+ frequently-evoked APIs.
  • Coverage: As shown in the frequency chart below, the induced space covers a wide variety of physical actions. The purple bars represent actions that overlap with existing simulators, while the light blue bars represent the "missing" actions that WORLDAPIS identified.
  • Performance: Adding "API use cases" (short snippets showing how an API was used previously) to the prompt significantly reduced redundancy and helped the LLM reuse existing APIs rather than inventing new ones unnecessarily.
Frequency of the top 50 induced APIs, highlighting the gap between simulation (purple) and the real world (blue).

Limitations and Future Work

As a "thought experiment," the primary limitation is executability. These APIs are definitions, not code that actually moves a robot arm. There is no underlying physics engine to verify if sift(flour) actually results in sifted flour.

Additionally, the induced action space still contains some noise and redundancy (e.g., wipe vs. scrub). The authors suggest that future work should focus on self-correction to merge similar APIs and, eventually, grounding these induced actions in video-based simulations or real-world robotic controllers to bridge the gap from thought experiment to physical reality.

Summary updated

Abstract

AI systems make decisions in physical environments through primitive actions or affordances that are accessed via API calls. While deploying AI agents in the real world involves numerous high-level actions, existing embodied simulators offer a limited set of domain-salient APIs. This naturally brings up the questions: how many primitive actions (APIs) are needed for a versatile embodied agent, and what should they look like? We explore this via a thought experiment: assuming that wikiHow tutorials cover a wide variety of human-written tasks, what is the space of APIs needed to cover these instructions? We propose a framework to iteratively induce new APIs by grounding wikiHow instruction to situated agent policies. Inspired by recent successes in large language models (LLMs) for embodied planning, we propose a few-shot prompting to steer GPT-4 to generate Pythonic programs as agent policies and bootstrap a universe of APIs by 1) reusing a seed set of APIs; and then 2) fabricate new API calls when necessary. The focus of this thought experiment is on defining these APIs rather than their executability. We apply the proposed pipeline on instructions from wikiHow tutorials. On a small fraction (0.5%) of tutorials, we induce an action space of 300+ APIs necessary for capturing the rich variety of tasks in the physical world. A detailed automatic and human analysis of the induction output reveals that the proposed pipeline enables effective reuse and creation of APIs. Moreover, a manual review revealed that existing simulators support only a small subset of the induced APIs (9 of the top 50 frequent APIs), motivating the development of action-rich embodied environments.
BibTeX
@inproceedings{ou2025worldapis,
  author = {Jiefu Ou and Arda Uzunoglu and Benjamin Van Durme and Daniel Khashabi},
  title = {{WorldAPIs: The World Is Worth How Many APIs? A Thought Experiment}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  url = {https://openreview.net/forum?id=Yd8fnWsqN0},
}
Figure