Reference
Every command, tool, error and limit, generated from the code of the version these pages describe.
The reference pages are written by a script that reads the product's code. A page cannot describe a command, a tool or a limit that the code does not have. The check that keeps them equal runs on every change.
rehearsal command, with its arguments and an example.REST APIEvery operation, with the access it needs and its request body.Python SDKEvery method of the Python client, and the operation it calls.MCP toolsThe tools an AI assistant calls, with arguments, results and costs.ErrorsEach status and message, and what to do.ConfigurationEvery setting a server and a client read, with its default.Plans and limitsWhat each hosted plan allows, as the server enforces it.The same task in four places
Rehearsal has one API. The console, the CLI, the Python client and the MCP tools all call it, so they can all do the same work. The words differ a little.
| Task | Console | CLI | Python | MCP tool |
|---|---|---|---|---|
| Add an application | Applications | rehearsal apps add | rh.applications.create | add_application |
| Build a world | Build world | rehearsal build | rh.worlds.build | build_world |
| Follow a build | Build view | rehearsal jobs watch | rh.jobs.events | job_status |
| List worlds | Applications | rehearsal worlds list | rh.worlds.list | list_worlds |
| See the jobs of a world | World page | rehearsal worlds scenarios | rh.worlds.scenarios | list_scenarios |
| Create an agent | Agents | rehearsal profiles create | rh.profiles.create | create_agent |
| Run an evaluation | Runs | rehearsal eval | rh.evaluations.create | run_evaluation |
| Read a run | Run page | rehearsal runs show | rh.runs.get | run_results |
| Read an episode | Episode row | rehearsal runs episode | rh.runs.episode | episode_details |
| Improve an agent | Improve on a run | rehearsal improve | rh.post("/v1/improvements", ...) | improve_agent |
| Compare | Compare | rehearsal compare | rh.evaluations.compare | compare_runs |
In Python, rh is Rehearsal() from rehearsal.sdk.
The API itself
REST API lists every operation. The server also describes its own API: on a server that you can
reach, /api/docs is a page where you can try each operation, and /openapi.json is the OpenAPI document.
Ids
Every id starts with a prefix that says what it names.
| Prefix | Names |
|---|---|
prj_ | A project |
app_ | An application |
wld_ | A world |
wv_ | A world version |
scn_ | A job in a world (a scenario) |
prof_ | An agent profile |
run_ | A run |
ep_ | An episode |
job_ | A server job: a build, a part of a run, an improvement, a re-check |
art_ | An exported file |
key_ | An API key's record. The key itself starts with rh_ |
Was this page helpful?