# Two agents, one page demo

> Several agents on one page, each with its own session: a Lisbon hotel has a concierge desk and a spa desk side by side, two different agents from the same script tag. The spa is scripted, so it speaks first while the concierge waits.

Pattern: Two agents. Brand: The Atlas, Lisboa. Tags: multiple agents, scripts, functions, sessions, runtime events, drop-in element.

## What it shows

- **Several agents**: two `<mindset-agent>` elements on one page, each configured with its own `agent` handle, `atlas-concierge` and `atlas-spa`, from the one served bundle
- A session per desk: each element’s `getSession` asks for a session bound to its own agent, so neither desk can see the other’s conversation
- A one-phase script, `atlas-spa-welcome`, whose `onEnter` greets the guest and offers Restoring and Help me sleep as suggested replies before anyone types
- The script’s phase granting `atlas-spa-treatments` through `resources.functions`, so the spa can answer the first reply, then handing over to free chat
- A function over literal sample data on each desk, with each desk’s status light and its line on the "Your evening" card moved only by that desk’s own runtime events

## Files

- `demos/atlas-concierge/demo.json`
- `demos/atlas-concierge/functions/atlas-concierge-find-dining.json`
- `demos/atlas-concierge/prompt/policy-rules.md`
- `demos/atlas-spa/demo.json`
- `demos/atlas-spa/script/atlas-spa-welcome.json`
- `demos/atlas-spa/functions/atlas-spa-treatments.json`
- `src/demos/atlas/index.tsx`
- `src/demos/atlas/evening.ts`
- `src/content/demos/atlas.ts`
- `src/content/demos/atlas.md`

## More

- [Source](https://docs4.mindset.ai/demos/atlas/source)
- [How it works](https://docs4.mindset.ai/demos/atlas/how)
- [The mindset-agent element](https://docs4.mindset.ai/docs/sdk/the-mindset-agent-element)
- [Create a session for your users](https://docs4.mindset.ai/docs/sdk/create-a-session-for-your-users)
- [Write a script](https://docs4.mindset.ai/docs/ams/write-a-script)
- [Build a function](https://docs4.mindset.ai/docs/ams/build-a-function)
- [How embedding works](https://docs4.mindset.ai/docs/sdk/how-embedding-works)
- [See and control what it costs](https://docs4.mindset.ai/docs/ams/see-and-control-what-it-costs)
