> For the complete documentation index, see [llms.txt](https://docs.soda.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.soda.io/soda-ai/contract-autopilot.md).

# Contract Autopilot

{% hint style="success" icon="database" %}
Contract Autopilot is currently available as a **preview** feature. Contact <support@soda.io> for early access.
{% endhint %}

**Contract Autopilot** automatically generates initial data contracts for datasets with **recommended data quality checks** to accelerate onboarding in Soda Cloud. It is designed to help teams achieve **fast time to value** and iterate later.

{% hint style="success" %}
**New: run Autopilot with Soda AI.** Point Soda AI at your datasets to draft fully populated contracts with recommended checks from your data's own profile. You approve what gets enforced.

Read more about [Soda AI](/soda-ai.md)'s capabilities.
{% endhint %}

**Contract Autopilot** automatically generates initial data contracts for datasets with **recommended data quality checks** to accelerate onboarding in Soda Cloud. It is designed to help teams achieve **fast time to value** and iterate later.

{% if !(visitor.claims.plan === 'enterprise' || visitor.claims.plan === 'enterpriseUserBased' || visitor.claims.plan === 'datasetStandard') %}

<figure><img src="/files/SeXLJXXWta7IkyaRBqSq" alt=""><figcaption><p>Generate contracts in bulk and ensure data quality with just one click.</p></figcaption></figure>
{% endif %}

{% if visitor.claims.plan === 'enterprise' || visitor.claims.plan === 'enterpriseUserBased' || visitor.claims.plan === 'datasetStandard' %}

#### <i class="fa-camcorder">:camcorder:</i> Watch Contract Autopilot in action

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA2PmHkO5cBgeRPdiPPOG%2Fuploads%2Fi8AsE1XrAzUpzDViJHQA%2Fautopilot%20demo.mp4?alt=media&token=a806f6eb-77e3-484b-ade0-e47c23a5f3bc>" %}

#### :bulb: Contract Autopilot vs. Create Contract

{% columns %}
{% column %}
**Contract Autopilot** analyzes sampled data and profiling metadata to automatically generate a **fully populated contract with recommended checks**.
{% endcolumn %}

{% column %}
When you click **Create Contract** (or use the CLI `generate` command), Soda creates a **contract skeleton** based on the dataset schema. It includes columns only and **no checks are added**.
{% endcolumn %}
{% endcolumns %}

## Generate a contract with Autopilot

{% hint style="warning" %}
This feature requires the **Manage contract** permission on the select datasets. Learn more about permissions here: [Dataset Attributes & Responsibilities](/dataset-attributes-and-responsibilities.md)
{% endhint %}

{% tabs %}
{% tab title="Via Soda AI" %}
You can generate a contract with natural language while chatting with Soda AI:

{% stepper %}
{% step %}

#### Open Soda AI

From any page, navigate to the left panel and click on **Soda AI** on the bottom left corner. The Soda AI chat interface will open on the same screen.

<figure><img src="/files/cIKh1Lb2mypORfjtPZYL" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Request contract generation

When you request an action in Soda AI, you will be prompted to confirm the changes:

<figure><img src="/files/b9GzVwAenh2VSTKsWOhz" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Confirm contract generation

<figure><img src="/files/4yRIkWjKsTkcsQ0CVOqT" alt="" width="327"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Review changes

After generation, Soda AI will begin the process in the background. You can continue using Soda Cloud while contracts are being generated, and check later the status of the operation on the **Scans** page or by asking Soda AI.

<figure><img src="/files/nUuxtZgd4G8s9Qj0CcMH" alt="" width="327"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

<i class="fa-octagon-check">:octagon-check:</i> You can now **view the generated contracts** to review, edit or suggest changes.
{% endtab %}

{% tab title="Via a dataset" %}
You can generate a contract manually by selecting the datasets you want to monitor:

{% stepper %}
{% step %}

### Select datasets

On the **Datasets** page, select the datasets for which you want to generate a contract.

Then, click on **Generate Contracts** (top right).

<figure><img src="/files/105Xpt1MRpXqZib9nwZA" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### \[Optional] Set a schedule for contracts

You can optionally define a schedule to run contract verification at a time of your choosing.

* **Use the data source's default schedule** if your data source has a default schedule enabled.
* **Manual schedule** if your data source does not have a default schedule, or if you wish to manually set a schedule for the generated contracts.&#x20;

<figure><img src="/files/xaecchRJOIDQ9t9UxSH5" alt="" width="450"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Generate

After selecting the datasets, Soda will provide a snapshot of which contracts will be generated, and a time estimate for generation. You can continue using Soda Cloud while contracts are being generated.

After reviewing what will be created, click on **Generate `[num]` Contracts**.

<figure><img src="/files/7w0Ir2UjjMqUUF2JuL5y" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

<i class="fa-octagon-check">:octagon-check:</i> You can now **view the generated contracts** to review, edit or suggest changes.
{% endtab %}
{% endtabs %}

This process will create a scan for each selected dataset. You can cancel the scan or review the execution logs in the **Scans** tab on the dataset, as well as on the general **Scans** page.

{% columns %}
{% column width="50%" %} <i class="fa-check">:check:</i> **Successful scan**

* **The generated contract is published.**
  * A **purple checkmark** icon indicates that it is an automatically generated contract.
  * The icon will change to a **blue checkmark** icon after there is a **user edit**, to indicate it is a user-generated contract.
* **A** [**data contract history**](broken://pages/gc7k6Fk5zaG6vZozUHWM#contract-history) **entry is published**, indicating that Autopilot published a first version of the contract.
* \[If configured] A "published contract" Webhook will be published (for example, to allow sync to Git).
  {% endcolumn %}

{% column width="50%" %} <i class="fa-x">:x:</i> **Failed scan**

* The dataset is marked with the message "**Contract generation has failed**".
* **Scan logs** can be reviewed to understand the underlying cause.
* The contract generation can be **re-triggered** after inspecting the root cause.
  {% endcolumn %}
  {% endcolumns %}

***

## Requirements & limitations

{% hint style="info" %}
Autopilot is **only available upon request**. [Contact us](mailto:support@soda.io) to enable it in your organization.
{% endhint %}

**Contract Generation Scope**

Autopilot can only generate data contracts for datasets that do **not** already have an existing data contract. Datasets with an existing contract are not eligible for contract generation via Autopilot.

**Autopilot is currently a Soda Cloud feature:**

* A **Soda Runner** is required
* CLI or Python API are not available
* APIs are not available

**Data types**

Autopilot works on the following data types:

* text
* numeric
* timestamps

Columns with other data types, such as JSON or structured array, for example, are not currently supported.

**Data sources**

Autopilot is supported on:

* Snowflake
* Databricks
* Postgres
* Athena
* Țrino
* Dremio
* Oracle
* SQLServer
* Synapse
* Fabric
* Redshift

{% hint style="success" %}
**Contract Autopilot is assistive** and does not autonomously modify data or execute destructive operations. Users can review generated contracts before execution.
{% endhint %}

***

## Privacy & security

Contract Autopilot is designed to minimize data exposure while generating meaningful contract recommendations.

The following data is used locally by Soda:

* A sample of approximately **10,000 rows** to compute profiling metrics

The following data is sent to Soda’s managed OpenAI API:

* Computed profiling metrics
* Data source type
* Dataset schema
* A sample of up to 100 rows, if enabled in the [organization settings](broken://pages/Dt8rj970uYl7OfKTepgr#send-row-level-data-to-soda).

{% hint style="info" %}
Access to Contract Autopilot is **restricted to users with appropriate** dataset **permissions**.
{% endhint %}

> Learn more about [Soda's AI security & privacy measures](/soda-ai.md#sodas-ai-security-and-privacy-measures).

***

## Next steps

Manage the [organization settings](broken://pages/Dt8rj970uYl7OfKTepgr#enable-contract-autopilot-powered-by-openai) to:

* enable/disable Contract Autopilot
* allow Soda to send a small sample of row data to OpenAI

After contract generation, you can:

* Review generated checks
* Validate assumptions with domain experts
* Adjust schedules and thresholds
* Iterate using [Contract Copilot](/soda-ai/contract-copilot.md)
  {% endif %}

<br>

***

{% if (visitor.claims.plan === 'datasetStandard')%}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Dataset Standard license** documentation. Learn more about [Documentation access & licensing](/reference/documentation-access-and-licensing.md).
{% endhint %}
{% endif %}

{% if (visitor.claims.plan === 'enterprise')%}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Team license** documentation. Learn more about [Documentation access & licensing](/reference/documentation-access-and-licensing.md).
{% endhint %}
{% endif %}

{% if (visitor.claims.plan === 'enterpriseUserBased')%}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Enterprise license** documentation. Learn more about [Documentation access & licensing](/reference/documentation-access-and-licensing.md).
{% endhint %}
{% endif %}

{% if !(visitor.claims.plan === 'enterprise' || visitor.claims.plan === 'enterpriseUserBased' || visitor.claims.plan === 'datasetStandard')%}
{% hint style="info" %}
You are **not logged in to Soda** and are viewing the default public documentation. Learn more about [Documentation access & licensing](/reference/documentation-access-and-licensing.md).

If you do have a Soda license, make sure to **log in to Soda Cloud in this same browser**.
{% endhint %}
{% endif %}


---

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

```
GET https://docs.soda.io/soda-ai/contract-autopilot.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.
