Skip to main content
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.

PceCaseState Properties

After processChangeRequest() resolves, the returned state object carries everything needed to review, complete, and submit the case.
PolicyChangeItem[]
Normalized requested changes. Each item includes a fieldPath, proposedValue, action type (add | modify | remove), source citations, and a confidence score.
PolicyImpact[]
Likely policy impacts for underwriter review — coverage changes, premium flags, and any carrier-specific concerns identified during validation.
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.
CaseValidationIssue[]
Blocking, warning, or informational issues found during validation. Blocking issues must be resolved or intentionally overridden before a submission packet is considered ready.
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.
"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

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
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.
"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.
number
default:"8"
Maximum number of source spans fetched during evidence collection.
(message: string) => void
Optional callback fired at each phase transition with a human-readable status message.

Execution Modes

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

Explore each phase of the PCE state machine, execution modes, and standalone helper functions.

Submission Packets

Learn how to generate carrier-ready packets, run quality reports, and review artifacts before submission.