> For the complete documentation index, see [llms.txt](https://help.tillit.cloud/tillit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.tillit.cloud/tillit/knowledge-base/setting-up-tillit/integrations/wire-flow/task-types-and-integrations/ai-and-validation.md).

# AI & Validation

Wire Flow AI and validation tasks — Bedrock AI for intelligent data processing and Schema Validator for enforcing data structure.

## Bedrock AI

Invokes an AI model to classify, extract, or summarise data within a workflow.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-f481ea9f29a62e76e832c14881e43223afd5ef1c%2FPasted%20image%2020260414121412.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-4316b1d6da076ca5e292b0230b4d93f2cce09793%2FPasted%20image%2020260414121432.png?alt=media" alt=""><figcaption></figcaption></figure>

| Field             | Description                                                             |
| ----------------- | ----------------------------------------------------------------------- |
| **Model ID**      | The AI model to use (e.g., `anthropic.claude-3-haiku-20240307-v1:0`)    |
| **Prompt**        | Supports `{$.body.field}` placeholders or a JSONPath to a prompt string |
| **System Prompt** | Optional system instructions                                            |
| **Max Tokens**    | Maximum response length (default: 1024)                                 |

The next task receives the model's response in this format:

```json
{
  "statusCode": 200,
  "body": {
    "content": [{ "type": "text", "text": "The model's response..." }]
  }
}
```

Extract the response text in a downstream JSONata task: `$states.input.body.content[0].text`

**Use cases:** classification, data extraction from unstructured text, summarisation, decision support.

## Schema Validator

Validates the step input against a JSON Schema. If validation fails, the step errors — catchable with an Error Boundary.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-1c19b552e187e95213586b2b52c4df418a5c67de%2FPasted%20image%2020260414121440.png?alt=media" alt=""><figcaption></figcaption></figure>

| Field           | Description                                  |
| --------------- | -------------------------------------------- |
| **JSON Schema** | Standard JSON Schema definition              |
| **Edit**        | Opens an editor with live validation preview |

If validation passes, the input is passed through unchanged to the next step.
