Skip to Content

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.

APITool definitionsTools
Flights Search APIhttps://api.voyagelabs.ai/v1/tools.jsonsearch_flights, get_search_results
Hotels Search APIhttps://api.voyagelabs.ai/v1/hotels/tools.jsonsearch_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.

APISummaryFull guideOpenAPI 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. never means change the request or stop. now means try again. after means wait error.retry_after_s seconds first.
  • Don't search again while a search runs. A flight search whose status is partial, or a hotel search whose status is running, is still filling in. Read it again by its search_id.

Let an agent read these docs

These docs are published in forms an agent can read directly.

Docs MCP server

https://docs.voyagelabs.ai/mcp is an MCP server, over Streamable HTTP, with three tools:

  • list_pages lists every page.
  • search searches the docs.
  • get_page reads 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

On this page