# Enable the Narrative Agent

With the 26R1 release, Veeva Safety introduces the Narrative Agent. This generative AI tool refines narrative content by correcting spelling and grammar and improving readability. Depending on your business needs, you can configure your Vault so users can manually run the agent on any narrative document, and automatically when users run the _Generate Narrative from Outline_ action for rules based narratives. The Narrative Agent can:

* **Proofread**: Update any spelling and grammar issues without changing the structure or details. 
* **Rewrite**: Update the content to improve flow and voice. This may include changes to the structure but should not remove any details.

When the agent runs automatically, both actions execute on the narrative content. When users manually run the agent on an existing narrative document, they can select which actions to run on the content. Narratives generated by the agent may contain up to 100,000 characters, though typically include fewer than 20,000 characters. 

## Prerequisites

Before enabling this feature in your Vault, you may need to configure the following, depending on your business needs:
* <a href="/en/gr/832805/">Rules Based Narratives</a>
* <a href="/en/gr/01212/">Narrative Templates</a>

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: This feature is available only in Vaults using Veeva AI for Safety.</p>
    </div>
  </div>
</div>



## Update the Case Layout

To display the agent's status on the narrative's associated _Case_, <a href="/en/gr/26387/#how-to-add-object-fields">add</a> the _Narrative Generation Status_ field to the _Case_ layout for the _AER_, _Case_, and _Imported Case_ object types in the _Narrative_ section.

## Update the Narrative Outline Layout

<a href="/en/gr/26387/#how-to-add-object-fields">Add</a>  the following fields to the layouts for the _Narrative Outline_ object so that you can define this value on the applicable records.

* _Narrative Agent Initial Case Options_
* _Narrative Agent Follow-up Case Options_

## Define Narrative Outlines

To automatically run the agent when users run the _Generate Narrative from Outline_ action, update the following fields on the applicable <a href="/en/gr/832805/#narrative-outlines">_Narrative Outlines_</a>. These values specify that the agent automatically runs for _Cases_ associated with the outline for initial _Cases_, follow-up _Cases_, or both:

* _Narrative Agent Initial Case Options_
* _Narrative Agent Follow-up Case Options_

## Configure the Generate Text with Narrative Agent Action

To allow users to manually run the Narrative Agent, configure the _Generate Text with Narrative Agent_ <a href="/en/gr/12339/">user action</a> on the applicable states of the _Narrative Lifecycle_ document lifecycle. We recommend  configuring the action only on the _Draft_ state.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: When users run the <em>Generate Text with Narrative Agent</em> action on a narrative generated by <a href="/en/gr/01212/#merge-fields">narrative templates with merge fields</a>, narratives generated by the Narrative Agent do not maintain any merge field tokens inherited from the template, so they cannot re-render the narrative after running the agent to update the data points. For these narratives, we recommend users wait to run the agent until late in the <em>Case’s</em> lifecycle, after medical review and QA.</p>
    </div>
  </div>
</div>


