Worlds / Travel
OpenTable API
A local OpenTable restaurant with tables, shifts, reservations, covers, guest notes and no show rules. Test the host agent that books, moves and cancels reservations and handles parties that do not show.
- Base path
/v2- Auth
- OAuth 2.0 client credentials bearer token, the world key
- Endpoints
- 13
- Status
- Active today
This reference previews the surface the OpenTable world serves in the closed beta. Paths mirror the public OpenTable API; the exact subset is confirmed when your workflow is scoped.
Connect
The run gives your agent these bindings. Keep your SDK; change only where it sends requests.
| binding | meaning |
|---|---|
WORLDS_OPENTABLE_URL | This world's origin followed by /v2 |
WORLDS_API_KEY | The world key, accepted wherever OpenTable expects a credential |
WORLDS_WORLD_ID | The isolated world's identity |
const base = process.env.WORLDS_OPENTABLE_URL + "/v2";
const res = await fetch(base + "/restaurants/1234/availability?party_size=2&start_date_time=2026-11-14T19:00", {
headers: { Authorization: "Bearer " + process.env.WORLDS_API_KEY },
});
const { times } = await res.json();
console.log(times[0]);API reference
Restaurants
Restaurants the partner can book.
- GET
/v2/restaurantsList restaurants - GET
/v2/restaurants/{rid}Get a restaurant
Fields · 5
rid | integer | Restaurant id |
name | string | Restaurant name |
address | object | Street and city |
cuisine | string | Primary cuisine |
timezone | string | IANA time zone |
Availability
Open times for a party size.
- GET
/v2/restaurants/{rid}/availabilityGet availability - POST
/v2/restaurants/{rid}/slot_locksLock a slot - DELETE
/v2/restaurants/{rid}/slot_locks/{lock_id}Release a slot lock
Fields · 4
rid | integer | Restaurant id |
party_size | integer | Guests |
times | string[] | Available start times |
slot_hash | string | Token to lock a slot |
Reservations
Create, change and cancel bookings.
- POST
/v2/reservationsCreate a reservation - GET
/v2/reservations/{confirmation_number}Get a reservation - PUT
/v2/reservations/{confirmation_number}Change a reservation - DELETE
/v2/reservations/{confirmation_number}Cancel a reservation - GET
/v2/restaurants/{rid}/reservationsList restaurant reservations
Fields · 6
confirmation_number | integer | Confirmation number |
rid | integer | Restaurant id |
date_time | datetime | Reservation time |
party_size | integer | Guests |
state | string | Confirmed, seated, cancelled |
special_request | string | Guest note |
Guests
Diner profiles and visit history.
- GET
/v2/guestsSearch guests - GET
/v2/guests/{gpid}Get a guest - PUT
/v2/guests/{gpid}Update a guest
Fields · 5
gpid | string | Guest profile id |
first_name | string | Given name |
last_name | string | Family name |
email | string | |
phone | string | Phone |
Test workflow
- Prepare. Select the OpenTable setup for your workflow and review its starting records, including restaurants, availability, reservations.
- Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
- Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
- Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.
What to verify
- Test party of 4 moved to Thursday 19:00
- Example party of 6 still on a table that seats 6
- Placeholder party canceled with no fee
- No seated party marked no show
- Thursday 19:00 covers within the shift limit
Test file
A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.
# worlds/tasks.yaml · OpenTable
version: 2
connector: opentable
seed: opentable-starter
mode: isolated
policy: >
Handle tonight's guest messages. Move parties only to tables that fit them,
cancel when asked without charging parties under 6, and do not mark no shows
until 15 minutes past the time.
tasks:
- id: book-and-move-reservations-within-table-capacity
prompt: Book and move reservations within table capacity
- id: mark-no-shows-after-the-grace-period
prompt: Mark no shows after the grace period
- id: cancel-reservations-when-guests-ask
prompt: Cancel reservations when guests ask
expected:
- "Test party of 4 moved to Thursday 19:00"
- Example party of 6 still on a table that seats 6
- Placeholder party canceled with no fee
- No seated party marked no show
- "Thursday 19:00 covers within the shift limit"
scenarios:
- slot-lock-expires
- slot-gone
- rate-limitedSee Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.
Failure conditions
Each one fires before the handler, at the same step on every run.
| condition | what the agent sees |
|---|---|
slot-lock-expires | The held slot expires before the reservation is made |
slot-gone | Another diner books the time between search and booking |
rate-limited | Availability searches return 429 |
webhook-late | A seated update arrives after the agent checks the book |
Starting data
Start each run from the same records and relationships. The overview below describes the OpenTable starter; use the setup supplied for your workflow when preparing your own snapshot.
| Records | Starting setup |
|---|---|
| tables | 22 tables, two that combine into a 10 top |
| shifts | Lunch and dinner, closed Mondays |
| reservations | 140 across booked, confirmed, seated, completed and canceled |
| guests | 120 fake guest profiles, a few with allergy notes |
| no show rules | 15 minute grace, card on file for parties of 6 or more |
The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.
Restaurants records
Restaurants
Restaurants the partner can book.
| Field | Type | Meaning / relationship |
|---|---|---|
rid | integer | Restaurant id |
name | string | Restaurant name |
address | object | Street and city |
cuisine | string | Primary cuisine |
timezone | string | IANA time zone |
{
"rid": 1,
"name": "<Restaurant name>",
"address": {},
"cuisine": "<Primary cuisine>",
"timezone": "<IANA time zone>"
}Availability records
Availability
Open times for a party size.
| Field | Type | Meaning / relationship |
|---|---|---|
rid | integer | Restaurant id |
party_size | integer | Guests |
times | string[] | Available start times |
slot_hash | string | Token to lock a slot |
{
"rid": 1,
"party_size": 1,
"times": [],
"slot_hash": "<Token to lock a slot>"
}Reservations records
Reservations
Create, change and cancel bookings.
| Field | Type | Meaning / relationship |
|---|---|---|
confirmation_number | integer | Confirmation number |
rid | integer | Restaurant id |
date_time | datetime | Reservation time |
party_size | integer | Guests |
state | string | Confirmed, seated, cancelled |
special_request | string | Guest note |
{
"confirmation_number": 1,
"rid": 1,
"date_time": "<Reservation time>",
"party_size": 1,
"state": "<Confirmed, seated, cancelled>",
"special_request": "<Guest note>"
}Guests records
Guests
Diner profiles and visit history.
| Field | Type | Meaning / relationship |
|---|---|---|
gpid | string | Guest profile id |
first_name | string | Given name |
last_name | string | Family name |
email | string | |
phone | string | Phone |
{
"gpid": "<Guest profile id>",
"first_name": "<Given name>",
"last_name": "<Family name>",
"email": "person@example.test",
"phone": "<Phone>"
}