# Guided intake demo

> A home insurance claim runs through fixed phases, moving on only when each gate passes.

Pattern: Scripted flow. Brand: Harbour Insurance. Tags: scripts, functions, gates, drop-in element.

## What it shows

- A **script** that walks the claim through fixed phases, moving on only when a gate passes, with capability cards and suggested replies at each choice
- Gates of both kinds: conditions on collected fields, and a model confirming an emergency before the claim branches
- The claim file as the form: each answer the agent records fills a field, and a complete file is submitted from the page
- A cover check the script calls on entry: a function over literal sample policy rules
- The claim file filling in from the `record_script_data` calls the page observes, with the script one click away as a readable document

## Files

- `demos/guided-intake/demo.json`
- `demos/guided-intake/script/guided-intake-claim-flow.json`
- `demos/guided-intake/functions/guided-intake-check-cover.json`
- `src/demos/guided-intake/index.tsx`
- `src/demos/guided-intake/progress.ts`
- `src/demos/guided-intake/pageTools.ts`

## More

- [Source](https://docs.mindset.ai/demos/guided-intake/source)
- [How it works](https://docs.mindset.ai/demos/guided-intake/how)
- [Make it follow steps](https://docs.mindset.ai/docs/write-a-script)
- [Add a function](https://docs.mindset.ai/docs/build-a-function)
- [Test behavior](https://docs.mindset.ai/docs/test-an-agents-behavior)
- [The mindset-agent element](https://docs.mindset.ai/docs/the-mindset-agent-element)
- [Put an agent on your page](https://docs.mindset.ai/docs/put-an-agent-on-your-page)
