Build with AI agents
Ready-made tool definitions for each API, guides written for models, and an MCP server that lets an agent read these docs.
Both APIs were designed for agents as well as apps. Answers are small by default, and every error says whether to retry. Each API publishes the files a model needs to use it, and these docs can be read by an agent too.
Give a model the tools
Each API serves tool definitions, one for each call your key can make. Hand them to a model and run the calls it asks for with your key.
| API | Tool definitions | Tools |
|---|---|---|
| Flights Search API | https://api.voyagelabs.ai/v1/tools.json | search_flights, get_search_results |
| Hotels Search API | https://api.voyagelabs.ai/v1/hotels/tools.json | search_hotels, get_hotel_search, get_hotel_rates |
Add ?format=anthropic or ?format=openai to get each provider's own tool shape:
curl "https://api.voyagelabs.ai/v1/tools.json?format=anthropic"The schemas carry limits such as minimum, maximum and maxLength. A provider's strict mode may not accept those keywords. If it doesn't, strip them: the API still checks every input.
These files need no key. Your key goes only on the calls themselves, which your code makes.
Give a model the guide
Each API also has a short description and a full guide written for a model: the whole loop of search, wait, narrow down and show a result, and what to do after each error.
| API | Summary | Full guide | OpenAPI document |
|---|---|---|---|
| Flights Search API | /llms.txt | /llms-full.txt | /v1/openapi.json |
| Hotels Search API | /v1/hotels/llms.txt | /v1/hotels/llms-full.txt | /v1/hotels/openapi.json |
All of these are on https://api.voyagelabs.ai and need no key. Put the full guide in your agent's system prompt, or let the agent fetch it.
Rules your agent must follow
The guides spell these out. They matter enough to repeat here:
- Show a link exactly as given. Never build, edit or shorten a booking link.
- Check the age of a price. Both APIs say how old their prices are, in
pricing.age_s. When it is over 240 for flights, or over 900 for hotels, search again before showing a price or a link. Reading a search again never refreshes its prices. - Say that the price can change. The airline or hotel site shows its own price, which can differ from the one in the answer.
- Follow
error.retry.nevermeans change the request or stop.nowmeans try again.aftermeans waiterror.retry_after_sseconds first. - Don't search again while a search runs. A flight search whose
statusispartial, or a hotel search whosestatusisrunning, is still filling in. Read it again by itssearch_id.
Let an agent read these docs
These docs are published in forms an agent can read directly.
- Any page as Markdown. Add
.mdto its address, as in/quickstart.md. A request that sendsAccept: text/markdowngets Markdown at the normal address. - An index, and everything at once.
/llms.txtlists every page./llms-full.txtis the whole site in one file. - The OpenAPI documents as shown in the reference:
/openapi/flights.jsonand/openapi/hotels.json.
Docs MCP server
https://docs.voyagelabs.ai/mcp is an MCP server, over Streamable HTTP, with three tools:
list_pageslists every page.searchsearches the docs.get_pagereads a page as Markdown.
It needs no key. It reads the docs only, and never calls the APIs they describe.
claude mcp add --transport http voyage-labs-docs https://docs.voyagelabs.ai/mcp