> 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 %}
