Report Abuse

Basic Information

This repository contains the code and data accompanying the paper RestGPT, which implements an autonomous agent that connects large language models with real-world RESTful APIs. The project demonstrates an iterative coarse-to-fine online planning framework composed of a Planner, an API selector, and an Executor that organizes API calls and parses responses. It includes example integrations with TMDB and Spotify, a configuration file for required API keys, and a benchmark dataset called RestBench with human-annotated instructions and gold solution paths. The codebase is intended for researchers and developers who want to reproduce the paper's experiments, experiment with LLM-driven API invocation workflows, and evaluate end-to-end planning, API calling, and response parsing in realistic web service scenarios.

Links

App Details

Features
Implements a coarse-to-fine online planning pipeline with distinct modules: Planner for generating sub-tasks, API selector for mapping sub-tasks to concrete API calls, and Executor with a Caller to prepare API parameters and a Parser that generates Python code to parse API responses according to schemas. Provides RestBench, a benchmark covering TMDB and Spotify scenarios with gold solution paths and statistics of API usage. Includes runnable scripts such as run.py, run_tmdb.py and run_spotify.py, setup instructions and dependency list, and an optional init_spotify.py script for initializing the Spotify environment. Configuration is handled via config.yaml where OpenAI, TMDB and Spotify keys are stored.
Use Cases
The repository helps researchers and developers build, run, and evaluate LLM-based agents that interact with RESTful services by providing a concrete implementation of planning, API selection, execution, and response parsing. It supplies reproducible example scenarios and a benchmark dataset with gold solution paths for objective evaluation. The included scripts let users run single instructions or iterate through the RestBench tasks, and the config-driven setup clarifies required API credentials. Overall the codebase reduces engineering overhead for studying LLM control of web APIs and for extending the approach to new APIs or downstream application scenarios.

Please fill the required fields*