# Build with AI agents (/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 [#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:

```bash
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 [#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 [#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 [#let-an-agent-read-these-docs]

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

- **Any page as Markdown.** Add `.md` to its address, as in [`/quickstart.md`](/quickstart.md). A request that sends `Accept: text/markdown` gets Markdown at the normal address.
- **An index, and everything at once.** [`/llms.txt`](/llms.txt) lists every page. [`/llms-full.txt`](/llms-full.txt) is the whole site in one file.
- **The OpenAPI documents** as shown in the reference: [`/openapi/flights.json`](/openapi/flights.json) and [`/openapi/hotels.json`](/openapi/hotels.json).

### Docs MCP server [#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.

<Tabs items={["Claude Code","Cursor","Antigravity","Other clients"]}>
<Tab value="Claude Code">
```bash
claude mcp add --transport http voyage-labs-docs https://docs.voyagelabs.ai/mcp
```
</Tab>

<Tab value="Cursor">
```json title=".cursor/mcp.json"
{
  "mcpServers": {
    "voyage-labs-docs": {
      "url": "https://docs.voyagelabs.ai/mcp"
    }
  }
}
```
</Tab>

<Tab value="Antigravity">
In the agent panel, open the **…** menu, then **MCP Servers**, **Manage MCP Servers** and **View raw config**. Add the server to the file:

```json title="~/.gemini/config/mcp_config.json"
{
  "mcpServers": {
    "voyage-labs-docs": {
      "serverUrl": "https://docs.voyagelabs.ai/mcp"
    }
  }
}
```
</Tab>

<Tab value="Other clients">
Add a remote MCP server with the address `https://docs.voyagelabs.ai/mcp` and the Streamable HTTP transport. It needs no authentication.
</Tab>
</Tabs>