> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/artificial-intelligence/ai-agents/ai-agents-save-data.md).

# AI Agents - Save Data

Making the agent save information in the lead data.

## Defining the visible fields for the A.I.

The A.I. will have read access to all fields entered in "**Lead Information**" in the Contextualization tab, that is, it will be able to use them during the conversation with the lead. It is essential that the fields it can edit are also available for reading.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FGuVE1sKAodJO0NGm2VSX%2Fimage.png?alt=media&amp;token=285647a6-da15-4332-9fef-2f8014e6182b" alt=""><figcaption></figcaption></figure>

## Allowing field changes

To allow it to save data during the conversation, it is necessary to enable this feature as shown below, selecting the fields that can be changed.

If you want the agent to also be able to modify fields that are already filled in, you need to enable the option "**Allow data overwrite?**".

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FqhMFZkEJANSkLHju4MxV%2Fimage.png?alt=media&amp;token=8fa4e61f-b8ab-4343-8464-13e874ece634" alt=""><figcaption><p><em>Agent edit screen.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FWKWcrM164NiPpNAAObt7%2Fimage.png?alt=media&amp;token=73e17a65-ff9f-43ff-b477-ae32b54da347" alt=""><figcaption><p><em>Selecting fields that can be changed.</em></p></figcaption></figure>

## Setting rules to save the fields

It is important to make it explicitly clear at what point the agent will be able to save the fields. Ideally, this should be done in the "Additional Rules" section. If you are working with custom lead fields, you can reference them by either alias or display name.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fj14Ywz2wxrnC2iqLrlJs%2Fimage.png?alt=media&amp;token=d4f86824-5c39-4bf6-a14b-88d7e7538fc4" alt=""><figcaption><p><em>Additional Rules to change the fields.</em></p></figcaption></figure>
