Teaching LLMs to read API docs before they hit production
RestGPT connects large language models to real-world RESTful APIs through iterative planning and automated response parsing.

What it does
RestGPT is an LLM-powered agent that interacts with real-world applications through their RESTful APIs. Give it a natural language instruction—like finding the director of today’s trending movie or building a Spotify playlist—and it decomposes the request into a chain of API calls. The current implementation targets two domains: the TMDB movie database and Spotify.
The interesting bit
Instead of generating raw API calls in one shot, the system uses an iterative coarse-to-fine planner that first drafts natural language sub-tasks, then maps them to concrete endpoints. Its Executor even generates Python code on the fly to parse responses according to each API’s schema, sidestepping the usual trap of hard-coded JSON parsers.
Key highlights
- Modular pipeline: a
Plannerdrafts sub-tasks, anAPI selectormaps them to endpoints, and anExecutor(Caller+Parser) handles the actual interaction - Dynamic response parsing: the
Parsergenerates Python code at runtime based on the API response schema to extract data - Ships with RestBench, a human-annotated benchmark of 100 TMDB and 57 Spotify instructions with gold solution paths
- Targets real-world scale: TMDB (54 endpoints) and Spotify (40 endpoints), including multi-step sequences up to four API calls long
- Academic artifact from a 2023 paper; a public demo is listed as under construction
Caveats
- The demo is explicitly marked as under-construction
- The optional Spotify environment initializer warns that it will remove all your Spotify data
- Requires external API keys for OpenAI, TMDB, and Spotify to function
Verdict
Useful if you are building LLM agents that must reason over live REST APIs and want to see how iterative, coarse-to-fine planning compares to single-shot tool calling. Skip it if you need a polished, drop-in integration layer—this is research code with visible rough edges.
Frequently asked
- What is Yifan-Song793/RestGPT?
- RestGPT connects large language models to real-world RESTful APIs through iterative planning and automated response parsing.
- Is RestGPT open source?
- Yes — Yifan-Song793/RestGPT is open source, released under the MIT license.
- What language is RestGPT written in?
- Yifan-Song793/RestGPT is primarily written in Python.
- How popular is RestGPT?
- Yifan-Song793/RestGPT has 1.4k stars on GitHub.
- Where can I find RestGPT?
- Yifan-Song793/RestGPT is on GitHub at https://github.com/Yifan-Song793/RestGPT.