HomeInsuranceQuoteFlow tutorial
1. A twenty-turn live replay
Start with the finished interaction: a real model-backed quote that collects facts, accepts a correction, renders exact Markdown tables, re-rates, requests consent, and completes.
Read this first. A full replay gives the rest of the track a concrete target: every later lesson explains one part of this interaction. It is not a hand-written ideal conversation. The twenty responses below were captured from a successful live run of HomeInsuranceQuoteFlow, with the test clock frozen to 2027-07-15.
The model's collection wording can vary on another run. The tables, quote IDs, validity date, final session state, and completed flag are code-owned assertions. The name and email in the final turn are obvious fixture data, not a customer record.
Run it yourself
From the demo repository, with OPENAI_API_KEY and PICOFLOW_KEY configured:
- 1
- 2
cd pico-demo
npm run test:home-insurance-flow
The test starts the Nest application, sends all twenty requests to POST /ai/run with one durable session ID, semantically evaluates every response, and reads the final SQLite session document. It verifies the corrected four-year roof, the $5,000 re-rated deductible, the current Enhanced selection, explicit consent, and completed: true on turn 20.
For a fast provider-free check of the same rating rules:
The live scenario uses credentials from .env and is skipped when they are unavailable.
Captured live transcript
-
1 · Qualification
You
Hi, I would like a home insurance quote.
Bot
Certainly! I’d be happy to assist with that. This is a preliminary, non-binding home insurance estimate. Could you please provide the property’s two-letter state and five-digit ZIP code?
-
2 · Qualification
You
The property is in Oregon, ZIP 97205.
Bot
Thank you! Next, could you please let me know the purchase status of the property (own, buying, or refinancing), how you plan to occupy it (primary, secondary, or rental), and the desired effective date for the insurance? The effective date should be in the format YYYY-MM-DD, be after today’s date, and no more than one year from today.
-
3 · Qualification → Property
You
I am buying it as my primary residence and want coverage to start October 1, 2027.
Bot
Let’s start with the property details. Could you please tell me the dwelling type (single_family, townhome, or duplex) and the year it was built?
-
4 · Property
You
It is a single-family home built in 1998.
Bot
Thank you! Next, could you provide the finished square feet, the number of stories, and the construction type (wood_frame, masonry, or mixed) for the home?
-
5 · Property
You
It has 2,100 finished square feet, two stories, and wood-frame construction.
Bot
Great! What is the roof material (composition, metal, or tile) and how many years ago was the roof installed or last replaced?
-
6 · Property
You
The composition roof is 6 years old.
Bot
Thank you. Could you let me know the year the plumbing, electrical, and HVAC systems were last updated? If any system hasn’t been updated or you’re not sure, please let me know.
-
7 · Property → Risk
You
Plumbing and electrical were updated in 2018, and HVAC in 2022.
Bot
Let’s start with any home insurance claims. Have you had any home insurance claims in the last five years? If so, please provide the year, type of claim (e.g., water, fire, wind, theft, liability, or other), and the approximate amount paid for each. If there are no claims, please let me know.
-
8 · Risk
You
There was one water claim in 2024 for about $7,000.
Bot
Thank you. Now, could you tell me if the property has any of the following: a pool, trampoline, or wood stove?
-
9 · Risk
You
No pool, no trampoline, and no wood stove.
Bot
Does the property have any of these protective features: smoke alarms, a burglar alarm, professional alarm monitoring, or an automatic sprinkler system?
-
10 · Risk → Coverage
You
We have smoke alarms and a burglar alarm with professional monitoring, but no sprinkler system.
Bot
To start the coverage preference process, could you please provide the estimated cost to rebuild your home? This amount should be between $100,000 and $2,000,000.
-
11 · Coverage
You
About $450,000 to rebuild.
Bot
Great, we’ve noted the estimated rebuilding cost of $450,000. Next, please select a deductible amount. You can choose from $1,000, $2,500, or $5,000.
-
12 · Coverage
You
Use a $2,500 deductible.
Bot
Thank you! We’ve noted a $2,500 deductible. Now, please choose a personal liability limit from the following options: $100,000, $300,000, $500,000, or $1,000,000.
-
13 · Coverage
You
I want $500,000 of liability coverage.
Bot
You’ve selected a personal liability limit of $500,000. Lastly, are there any optional endorsements you would like to add? The options are water backup, identity theft, or equipment breakdown. You can choose any or none.
-
14 · Coverage → Review
You
Add water backup coverage only.
Bot
Here’s a summary of your application for home insurance:
Qualification:
- State: OR
- ZIP Code: 97205
- Purchase Status: Buying
- Occupancy: Primary
- Effective Date: 2027-10-01
Property:
- Dwelling Type: Single Family
- Year Built: 1998
- Square Feet: 2100
- Stories: 2
- Construction: Wood Frame
- Roof Material: Composition
- Roof Age: 6 years
- Plumbing Updated Year: 2018
- Electrical Updated Year: 2018
- HVAC Updated Year: 2022
Risk:
- Claims: 1 (Water damage in 2024 for $7000)
- Hazards: No pool, trampoline, or wood stove
- Protections: Smoke alarms, burglar alarm, and monitored alarm present; No sprinkler system
Coverage:
- Dwelling Coverage: $450,000
- Deductible: $2,500
- Liability Limit: $500,000
- Endorsements: Water backup
Please note that this is a preliminary, non-binding estimate.
Would you like to confirm this application and generate the quote, or is there any correction needed? If there is a correction, please specify.
-
15 · Property correction → Review
You
Correction: the roof is actually 4 years old, not 6.
Bot
Here is a preliminary, non-binding estimate summary of your home insurance application with Evergreen Home Insurance:
Qualification
- State: OR
- ZIP Code: 97205
- Purchase Status: Buying
- Occupancy: Primary
- Effective Date: 2027-10-01
Property
- Dwelling Type: Single Family Home
- Year Built: 1998
- Square Feet: 2100
- Stories: 2
- Construction Material: Wood Frame
- Roof Material: Composition
- Roof Age: 4 years
- Plumbing Updated Year: 2018
- Electrical Updated Year: 2018
- HVAC Updated Year: 2022
Risk
- Claims History: One claim in 2024 for water damage, amounting to $7,000
- Hazards: No pool, trampoline, or wood stove
- Protections: Smoke alarms, burglar alarm, and monitored alarm present; no sprinkler system
Coverage
- Dwelling Coverage Amount: $450,000
- Deductible: $2,500
- Liability Limit: $500,000
- Endorsements: Water backup coverage
Please review the details above. If everything looks correct, confirm to proceed and generate your quote. Alternatively, indicate any corrections needed. If you wish to stop the process, let me know.
-
16 · Review → deterministic rating → Quote
You
Everything is correct. Generate the quote.
Bot
Preliminary home insurance quote EHI-20270715-82009836
| Option |
Annual premium |
Monthly estimate |
Dwelling |
Extension |
Deductible |
Liability |
Endorsements |
| Essential (ESSENTIAL) |
$1,556.12 |
$129.68 |
$450,000.00 |
0% |
$2,500.00 |
$500,000.00 |
water_backup |
| Enhanced (ENHANCED) |
$1,788.18 |
$149.02 |
$450,000.00 |
10% |
$2,500.00 |
$500,000.00 |
water_backup, equipment_breakdown |
| Premier (PREMIER) |
$2,008.24 |
$167.35 |
$450,000.00 |
25% |
$2,500.00 |
$1,000,000.00 |
water_backup, identity_theft, equipment_breakdown |
Valid through 2027-08-14 under demo rules 2027.1-demo. This is a non-binding estimate, not proof of insurance or an offer to bind coverage.
You can compare options, change the deductible, or select an option for an agent follow-up.
-
17 · Quote comparison
You
Compare Essential and Enhanced.
Bot
Quote comparison
| Option |
Annual premium |
Monthly estimate |
Deductible |
Liability |
Extension |
Endorsements |
| Essential (ESSENTIAL) |
$1,556.12 |
$129.68 |
$2,500.00 |
$500,000.00 |
0% |
water_backup |
| Enhanced (ENHANCED) |
$1,788.18 |
$149.02 |
$2,500.00 |
$500,000.00 |
10% |
water_backup, equipment_breakdown |
Would you like to select one, compare different options, or change the deductible?
-
18 · Quote re-rate
You
Re-run the quote with a $5,000 deductible.
Bot
Preliminary home insurance quote EHI-20270715-F769EF8F
| Option |
Annual premium |
Monthly estimate |
Dwelling |
Extension |
Deductible |
Liability |
Endorsements |
| Essential (ESSENTIAL) |
$1,405.31 |
$117.11 |
$450,000.00 |
0% |
$5,000.00 |
$500,000.00 |
water_backup |
| Enhanced (ENHANCED) |
$1,617.76 |
$134.81 |
$450,000.00 |
10% |
$5,000.00 |
$500,000.00 |
water_backup, equipment_breakdown |
| Premier (PREMIER) |
$1,818.21 |
$151.52 |
$450,000.00 |
25% |
$5,000.00 |
$1,000,000.00 |
water_backup, identity_theft, equipment_breakdown |
Valid through 2027-08-14 under demo rules 2027.1-demo. This is a non-binding estimate, not proof of insurance or an offer to bind coverage.
You can compare options, change the deductible, or select an option for an agent follow-up.
-
19 · Quote selection → Consent
You
Select the Enhanced option.
Bot
Thank you for choosing the “Enhanced” option. Please note that this quote is a preliminary, non-binding estimate. It’s not a guarantee of coverage, a policy issue, or acceptance of payment.
Would you like to consent to a follow-up from one of our agents for further assistance? If you agree, I can collect your name and email, with phone and property street address as optional details.
-
20 · Consent → completed · completed
You
Yes, an agent may contact me. I am Jamie Rivera and my email is jamie.rivera@example.com. No phone or street address for now.
Bot
I can confirm that a follow-up with an agent was requested for Jamie Rivera at jamie.rivera@example.com. Here is the quote you received: EHI-20270715-F769EF8F, with the Enhanced (ENHANCED) plan. This quote is valid through 2027-08-14. Please remember that no coverage has been bound, and no payment has been taken at this time. If you have any further questions, feel free to ask.
The final HTTP response sets completed: true. The terminal step is therefore the last active cursor; an API client should not submit another customer message to that session.
What to compare when your replay differs
| Point in replay | Contract to preserve |
| Turns 1–13 | Only current-stage facts are collected; no premium is invented. |
| Turn 15 | The review says the corrected roof is four years old. |
| Turn 16 | All three initial options, disclosure, and quote ID are code-rendered. |
| Turn 18 | Deductible is $5,000, all premiums and quote ID change, and no old selection survives. |
| Turn 20 | Consent is explicit; completion is true; the response does not claim coverage was bound or payment taken. |
Next
2. Designing a quote journey maps the steps, deterministic decision boundary, correction route, and state owners that produce this replay.