RestGPT
An LLM-driven workflow for carrying out movie and music tasks through REST APIs.
- Source repo
- Yifan-Song793/RestGPT
- Stars
- ★ 1.4k
- Last updated
- 2y ago
- License
- MIT
- Primary language
- Python
- FA score
- 42/100 · Major gaps
At a glance
- How it runs
- Works with
- Platform-specificOpenAI API
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A researcher evaluating multi-step API planning for TMDB can run the 100 human-annotated RestBench-TMDB instructions and their gold solution paths.
- Not a fit if
- Developers wanting their own REST APIs; only TMDB and Spotify scenarios are provided
- Teams unwilling to risk Spotify data loss; the init script removes all Spotify data
- Source review
- 42/100 · Major gaps 2 safety controls not found
What does this agent do, and when should you use it?
RestGPT is the code accompanying the paper “RestGPT: Connecting Large Language Models with Real-World RESTful APIs,” built to let a large language model control real-world applications. It uses an iterative coarse-to-fine online planning framework and an executor for RESTful API calls. Its stated modules are a Planner, API selector, and Executor; the Executor includes a Caller and Parser, with the Parser generating Python code from a response schema. The repository supplies TMDB movie-database and Spotify music-player scenarios and is run through command-line scripts; it does not document a hosted service, web UI, or long-running deployment model.
After a user runs python run.py, they enter a TMDB or Spotify scenario and a natural-language instruction. The Planner generates the current natural-language sub-task, the API selector maps it to a finer API-calling plan, and the Executor runs that plan. The Caller organizes API parameters from the plan and API documentation, while the Parser generates Python code to parse API responses using their response schemas. For batch evaluation, python run_tmdb.py sequentially executes RestBench-TMDB instructions; python run_spotify.py is provided for RestBench-Spotify, but requires manually changing query_idx and opening Spotify on the device.
- A researcher evaluating multi-step API planning for TMDB can run the 100 human-annotated RestBench-TMDB instructions and their gold solution paths.
- A developer who needs to decompose “Who is the director of today’s most trending movie?” can follow the TMDB flow from a trending request to movie credits.
- A Spotify user creating a playlist named “Love Mariah” with three Mariah Carey songs can study the documented search, user lookup, playlist creation, and track-addition path.
- A research team examining how natural-language sub-tasks, API selection, parameter construction, and response parsing form a REST call chain can use the repository’s stated module structure.
- Someone comparing API-path lengths across two real-world scenarios can use RestBench’s TMDB and Spotify statistics and gold paths.
How do you install or deploy this agent?
Install the listed dependencies: pip install langchain colorama tiktoken spotipy openai. Create the log directory: mkdir logs. Obtain an OpenAI key, a TMDB key, and a Spotify key from their respective providers, then place your keys in config.yaml; the README does not document the config.yaml field format or a required Python version.
How do you use this agent?
After configuring credentials, run python run.py and enter a scenario (TMDB or Spotify) and an instruction. Use python run_tmdb.py for the TMDB benchmark; use python run_spotify.py for the Spotify benchmark after manually changing query_idx and opening Spotify on your device. The optional python init_spotify.py removes all Spotify data, so run it only when you explicitly intend to initialize that environment.
What are this agent's strengths and limitations?
- Separates planning, API selection, parameter organization, and response parsing into named components rather than presenting only one-off API calls.
- RestBench covers two real-world scenarios, TMDB and Spotify, with human-annotated gold solution paths.
- The Parser explicitly generates Python parsing code from a response schema, addressing post-call response handling.
- Provides an interactive entry point plus dedicated TMDB and Spotify batch scripts.
- Execution depends on an OpenAI key, and the README identifies OpenAI as the model-credential source.
- The only documented application scenarios are TMDB and Spotify; no procedure for integrating other REST APIs is provided.
- The Spotify benchmark requires Spotify to be open on a device and requires manual
query_idxchanges. init_spotify.pyremoves all Spotify data, creating a material initialization risk.- The README does not specify the
config.yamlfields, Python version, or a service deployment approach.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| RestGPT This agent | 42 · Major gaps | CLIFree + model costs | ★ 1.4k | 2y ago | Python | OpenAI API |
| zer0dex Local Memory | 84 · Good | CLIFree | ★ 60 | 2d ago | Python | — |
| InPlan Interactive Planning Editor | 81 · Good | CLIFreemium | ★ 23 | 1mo ago | TypeScript | Claude Code |
| NotebookLM Python Automation | 81 · Good | CLIFree + model costs | ★ 19k | 1d ago | Python | Codex · Claude Code · Claude.ai |
How does FollowAgents rate this agent?
Why each dimension lost points
Evidence shows: README explicitly requires users to provide OpenAI, TMDB, and Spotify API keys, and warns that initializing the Spotify environment will delete user data, indicating attention to sensitive data and external effects. However, no code evidence for least privilege, user confirmation, data flow transparency, rollback, or dependency security. Deductions: lack of code evidence for these mechanisms.
Evidence shows: README and code structure are consistent, module division is clear, but dependency installation only lists package names without version pinning, and no detailed failure message documentation. Deductions: dependency availability unverified, failure handling documentation insufficient.
Evidence shows: README describes usage scenarios for researchers and developers, provides two examples (TMDB and Spotify), and states capability boundaries (RESTful API control). However, trigger precision (e.g., API selection logic) and runtime environment requirements (e.g., Spotify device) are not detailed. Deductions: environment fit and trigger precision documentation insufficient.
Evidence shows: README is well-structured, includes installation instructions, examples, and citation, and MIT license is clear. However, missing version changelog, naming stability, and maintenance responsibility statements. Deductions: versioning and maintenance information missing.
Evidence shows: README provides usage examples and benchmark, output is natural language instruction execution results, has marginal value. But no cost-benefit analysis or performance data. Deductions: cost-benefit not quantified.
Evidence shows: README cites arXiv paper, provides benchmark data, but no reproducible experimental steps or result verification. Deductions: facts and inferences not clearly separated, lack of cross-validation.
- Not found in source: dependency securityPin versions and run a dependency audit (npm audit, pip-audit) before installing; prefer running it in a container.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- Initializing the Spotify environment will delete user data; proceed with caution.
- Dependencies are not version-pinned, posing potential supply chain risks.
- API key handling is not explicit; ensure secure storage.
FAQ
Which credentials are required?
config.yaml.Which applications can it operate?
Does it make external calls?
Is Spotify initialization safe?
python init_spotify.py removes all Spotify data.