> ## Documentation Index
> Fetch the complete documentation index at: https://claritylabs.inc/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Policy Change Endorsement: Agent Overview and Quick Start

> Turn natural-language change requests into structured, reviewable carrier work with the CL SDK PCE agent, validation, and submission tooling.

The Policy Change Endorsement (PCE) agent converts natural-language change requests — adding a vehicle, updating a named insured, adjusting a coverage limit — into typed, grounded, reviewable carrier work. Instead of free-form emails to a carrier, you get structured `PolicyChangeItem` arrays with evidence citations, validation issues, and ready-to-review submission packets.

PCE workflows are designed to assist licensed users, not replace their review. The SDK surfaces missing information, flags validation problems, and generates draft artifacts — final submission authority always rests with a licensed professional.

## Capabilities

> **Change Parsing**
>
> Parse a free-text request into typed `PolicyChangeItem[]` with field paths, proposed values, action types, and source citations.

> **Evidence Retrieval**
>
> Retrieve policy and conversation evidence through a `SourceRetriever` to ground each change item in real document text.

> **Missing Info Detection**
>
> Automatically identify required fields that aren't present and surface targeted questions for the requesting user.

> **Impact Summary**
>
> Build a human-readable policy impact summary covering coverage changes, premium implications, and underwriting flags.

> **Execution Mode Selection**
>
> Choose between `deterministic_tree`, `market_eval`, or `hybrid` — or let the SDK pick based on case complexity.

> **Submission Artifacts**
>
> Generate carrier-ready submission packets with citations, a validation report, email drafts, and an underwriter summary.

***

## Quick Start

Create a PCE agent, process a change request, handle any missing-info questions, and generate a submission packet.

```typescript theme={"system"}
import { createPceAgent, MemorySourceStore } from "@claritylabs/cl-sdk";

const sourceRetriever = new MemorySourceStore();

const pce = createPceAgent({
  generateObject,
  sourceRetriever,
  executionMode: "auto",
});

const { state } = await pce.processChangeRequest({
  requestText: "Add 2024 Ford Transit VIN 1FT... to the commercial auto policy.",
  caseId: "pce-123",
});

if (state.missingInfoQuestions.length > 0) {
  // Prompt the user for missing details before generating a carrier packet.
  // See the Workflow guide for how to process their reply.
}

const packet = pce.generateSubmissionPacket({ state });
```

***

## `PceCaseState` Properties

After `processChangeRequest()` resolves, the returned `state` object carries everything needed to review, complete, and submit the case.

**items** `PolicyChangeItem[]`

Normalized requested changes. Each item includes a `fieldPath`, `proposedValue`, `action` type (`add` | `modify` | `remove`), source citations, and a confidence score.

**impacts** `PolicyImpact[]`

Likely policy impacts for underwriter review — coverage changes, premium flags, and any carrier-specific concerns identified during validation.

**evidenceSources** `CaseEvidenceSource[]`

Source text used to ground the case. Each source carries a `sourceId`, raw text, and optional metadata. These are the records that citations in `items` point back to.

**validationIssues** `CaseValidationIssue[]`

Blocking, warning, or informational issues found during validation. Blocking issues must be resolved or intentionally overridden before a submission packet is considered ready.

**missingInfoQuestions** `PceMissingInfoQuestion[]`

Questions that must be answered before the case is complete. Each question is tied to an `itemId` and optional `fieldPath` so you can target the prompt precisely.

**executionMode** `"deterministic_tree" | "market_eval" | "hybrid"`

The automation posture selected for this case, either by you or by the SDK's `auto` selection logic.

***

## Agent Configuration

**generateObject** `GenerateObjectFn`

Structured object generation function for parsing change items and running validation schemas. When omitted, the agent uses heuristic normalization without model calls — useful for testing the workflow without provider access.

**sourceRetriever** `SourceRetriever`

Retriever used to pull policy and conversation evidence. Use `MemorySourceStore` for testing or provide a production implementation backed by your document store. When omitted, evidence collection is limited to any explicit sources you pass in the request.

**executionMode** `"deterministic_tree" | "market_eval" | "hybrid" | "auto"` (default: "auto")

Controls how the PCE state machine processes the case. Set `"auto"` to let the SDK choose based on the number of items, evidence confidence, and carrier constraints.

**retrievalLimit** `number` (default: 8)

Maximum number of source spans fetched during evidence collection.

**onProgress** `(message: string) =\> void`

Optional callback fired at each phase transition with a human-readable status message.

***

## Execution Modes

| Mode | When to use |
| - | - |
| `deterministic_tree` | Constrained flows where rule-based checks are sufficient — e.g. adding a clearly described vehicle with all required fields present |
| `market_eval` | Ambiguous or market-specific changes that need heavier review and model-assisted interpretation |
| `hybrid` | Deterministic scaffolding with model-assisted interpretation for edge cases |
| `auto` | SDK picks based on case complexity, evidence confidence, and missing-info count |

> [!NOTE]
>
> The SDK can determine that a case is ready for submission, but it does not submit changes to carriers. Treat all generated packets as draft or assisted work until a licensed user has reviewed the evidence, resolved missing-info questions, and cleared blocking validation issues.

***

## Next Steps

> **[Workflow Phases](https://claritylabs.inc/docs/cl-sdk/pce/workflow.md)**
>
> Explore each phase of the PCE state machine, execution modes, and standalone helper functions.

> **[Submission Packets](https://claritylabs.inc/docs/cl-sdk/pce/submission-packet.md)**
>
> Learn how to generate carrier-ready packets, run quality reports, and review artifacts before submission.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.