# Add a new employee demo

> An HR admin screen with six sections and a dozen rules. Tell the copilot about the new hire and it fills the form field by field, catches a salary outside its pay band, explains it, and leaves Save to you.

Pattern: Form copilot. Brand: Plinth. Tags: embed, page tools, situational awareness, functions, forms.

## What it shows

- **Page tools as the only way in**: `set_field`, `focus_section` and `check_form` each check their arguments and return the field’s validation result, so the agent learns at once that $132,000 is above the band
- **Situational awareness** of the form itself, sent with every turn: the current section, what is filled, which required fields are empty, every current problem and the completion percent
- A **function** of literal pay bands by level and location, with the default pay schedule and the benefits rule, that the agent reads before it proposes a fix
- **Validation on the page**: required fields, formats, a weekday start date, the salary inside its band and benefits from the first of the next month; Save stays disabled until all of it passes
- Fields the agent sets flash once, on the `set_field` call itself, and keep a “Filled by copilot” tag until the admin edits them

## Files

- `demos/plinth/demo.json`
- `demos/plinth/functions/plinth-pay-bands.json`
- `demos/plinth/prompt/policy-rules.md`
- `demos/plinth/prompt/background.md`
- `src/demos/admin-form/index.tsx`
- `src/demos/admin-form/pageTools.ts`
- `src/demos/admin-form/form.ts`
- `src/demos/admin-form/data.ts`
- `src/content/demos/admin-form.ts`
- `src/content/demos/admin-form.md`

## More

- [Source](https://docs4.mindset.ai/demos/admin-form/source)
- [How it works](https://docs4.mindset.ai/demos/admin-form/how)
- [Put an agent on your page](https://docs4.mindset.ai/docs/sdk/put-an-agent-on-your-page)
- [The mindset-agent element](https://docs4.mindset.ai/docs/sdk/the-mindset-agent-element)
- [Build a function](https://docs4.mindset.ai/docs/ams/build-a-function)
- [Events reference](https://docs4.mindset.ai/docs/sdk/events-reference)
