> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/query/queries/ai-assistant/guardrails.md).

# Guardrails

Use the `guardrails` query to get the information of the guardrails set for the assistants set via console.

### Arguments

| Field               | Type    | Description                                                                                            |
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------ |
| `after`             | String  | See [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination). |
| `before`            | String  | See [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination). |
| `frist`             | Int     | See [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination). |
| `last`              | Int     | See [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination). |
| `id`                | ID      | Id of the guardrail.                                                                                   |
| `filters`           | filters |                                                                                                        |
| `filters.assistant` | ID      | Id of the assistant.                                                                                   |

### Available fields

| Field         | Type       | Description                                                                                                                     |
| ------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `id`          | ID!        | Id of the guardrail.                                                                                                            |
| `name`        | String!    | Name of the guardrail.                                                                                                          |
| `message`     | String!    | Templated message that will be sent instead.                                                                                    |
| `description` | String!    | Subject the assistant should not respond to.                                                                                    |
| `updatedAt`   | DateTime!  | Date and time of the last update. `YYYY-MM-DDT hh:mm:ssZ`                                                                       |
| `createdAt`   | DateTime!  | Guardrail creation date. `YYYY-MM-DDT hh:mm:ssZ`                                                                                |
| `assistant`   | Assistant! | [See more.](https://app.gitbook.com/o/-LwqSh0rNboNaGEQruZQ/s/-LwqSnBDpAb6mFZYLsuB/~/changes/1950/query/queries/wgpt/assistants) |

### Example

{% tabs %}
{% tab title="Query" %}

```graphql
query{
  guardrails{
    edges{
      node{
        id
        name
        description
        message
        assistant{
          id
          name
        }
        updatedAt
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "guardrails": {
      "edges": [
        {
          "node": {
            "id": "R3VhcmRyYWlsOjEw",
            "name": "Guardrail Example",
            "description": "Do not promote other products other than \"Acme Inc\"",
            "message": "Sorry I can't promote other products.",
            "assistant": {
              "id": "QXNzaXN0YW50OjMyNDk0YWZjLTQ0NzQtNDkzYS1hMWYxLTZiMTZmNjdhZmZhNQ==",
              "name": "Welcome Sequence"
            },
            "updatedAt": "2024-06-04T15:37:53.910452+00:00"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.suggestic.com/graphql/query/queries/ai-assistant/guardrails.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.
