> For the complete documentation index, see [llms.txt](https://developers.newbluefx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.newbluefx.com/captivate-api/captivate-controller-reference.md).

# Captivate Controller Setup

Many of Captivate's built-in controllers use JavaScript embedded in HTML pages to drive data to the application. Captivate's embedded browser hosts the HTML page as a user interface to the controller and the JavaScript code connects to the Captivate WebSocket API to schedule data and playback operations on titles.

Using this method, any data that can be entered by a user, accessed from the web, or read from a file can be pulled into Captivate, translated into variables by JavaScript, and sent back to the Captivate scheduler.

For convenience, Captivate includes a built-in HTTP server to optionally host your HTML pages, making it even easier to create your own simple controllers.

> **Note:** For definitions of the different terms, controller, input, and title, please see the [Terminology](/getting-started/terminology.md) page. For detailed explanation of our API, please see the [Controller API Reference Page.](/captivate-api/javascript-api-reference.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.newbluefx.com/captivate-api/captivate-controller-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
