> For the complete documentation index, see [llms.txt](https://docs.zbrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/flows/flow-components/llmrails.md).

# LLMRails

LLMRails is a platform designed for large language model applications, providing infrastructure and tools to deploy and manage AI models effectively in a scalable environment.

LLMRails is a platform designed for large language model applications, providing infrastructure and tools to deploy and manage AI models effectively in a scalable environment. It specializes in facilitating advanced search, analysis, and interaction capabilities with large datasets.

### **How to Connect LLMRails to ZBrain Flow?** <a href="#how-to-connect-llmrails-to-zbrain-flow" id="how-to-connect-llmrails-to-zbrain-flow"></a>

To integrate LLMRails with ZBrain Flow, follow these steps to select and utilize the desired capabilities:

1. **Search for the Math Helper Component**: Search the LLMRails component within the ZBrain interface.
2. **Select the Required Capability**: Select the required component as per your requirement:

* **Datastore search:** Search in datastore
* **Custom API Call:** Send a custom API call to a specific endpoint.

### **Additional Settings for Datastore Search** <a href="#additional-settings-for-datastore-search" id="additional-settings-for-datastore-search"></a>

* **API Key:** Enter your LLM Rails API key to authenticate the request.
* **Setup a connection:** Choose the API connection setup for LLM Rails. Follow these instructions to get your LLMRails API Key:
  * **Website Link:** Visit the following website: <https://console.llmrails.com/api-keys>.
  * **Create a Key:** Once on the website, click on create a key. Once you have created a key, copy it and use it for the Api key field on the site.
  * **Connection Name:** Enter a custom name for your LLMRails connection.
  * **API Key**: Provide your LLMRails API key for authentication.
* **Datastore ID:** Specify the ID of the datastore you wish to search.
* **Text:** Input the text or query for the datastore search.
* **Hybrid Search:** Opt to use hybrid search, which combines dense and sparse embeddings.
* **Summarize:** Choose if the search results should be summarized.
* **Continue on Failure:** Enable this option to continue execution even if the search fails.
* **Retry on Failure:** Set to retry the operation up to four times if it fails initially.

### **Additional Settings for Custom API Calls** <a href="#additional-settings-for-custom-api-calls" id="additional-settings-for-custom-api-calls"></a>

* **API Key** – Select your LLMRails API connection for authentication.
* **Setup a connection:** Choose the API connection setup for LLM Rails. Follow these instructions to get your LLMRails API Key:
  * **Website Link:** Visit the following website: <https://console.llmrails.com/api-keys>.
  * **Create a Key:** Once on the website, click on create a key. Once you have created a key, copy it and use it for the Api key field on the site.
  * **Connection Name:** Enter a custom name for your LLMRails connection.
  * **API Key**: Provide your LLMRails API key for authentication.
* **URL** – Specify the API endpoint to interact with LLMRails (e.g., `/models`).
* **Method** – Choose the HTTP method (GET, POST, etc.) for the API request.
* **Headers** – Add key-value pairs for additional request headers.
* **Query Parameters** – Provide optional URL query parameters for the request.
* **Body** – Enter the request payload in JSON format if required.
* **No Error on Failure** – Enable to prevent failure from stopping the workflow.
* **Timeout (in seconds)** – Set the time limit for the API request execution.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/flows/flow-components/llmrails.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
