# 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: 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:

```
GET https://docs.suggestic.com/graphql/query/queries/ai-assistant/guardrails.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
