# Configure Agent Template

This is the packaged shell for a new Configure agent. It keeps one chat thread, one composer, hosted auth inline in the conversation, and hosted Configure surfaces inline where they belong.

Do not redesign the shell by default. Change:

- `.env`
- `public/brand.css`
- `public/brand.js`
- `server.mjs`

Everything else should stay fixed unless the project already has a strong product shell worth preserving.

## Setup

In the app that will use this template:

```bash
npm install configure
npx configure setup
```

`npx configure setup` writes:

- `CONFIGURE_API_KEY`
- `CONFIGURE_PUBLISHABLE_KEY`
- `CONFIGURE_AGENT`

Then fill in the runtime values shown in `.env.example`:

- `CONFIGURE_AGENT_NAME` for the visible shell title, if you want one
- `MODEL_PROVIDER`
- `MODEL_NAME`
- one real provider key:
  - `ANTHROPIC_API_KEY`
  - `OPENAI_API_KEY`
  - or `OPENROUTER_API_KEY`

Without a real provider key, hosted auth and profile surfaces still work, but live chat and tool execution do not.

## Brand surface

Change only these files for the visual identity:

- `public/brand.css` — shell colors and token values
- `public/brand.js` — visible copy, optional logo URL, hosted surface theme

If you switch `configureTheme` in `public/brand.js` to `dark`, keep `public/brand.css` in a dark palette too so hosted Configure surfaces and the shell stay aligned.

## Runtime surface

- `server.mjs` — backend prompt, model provider, tool behavior
- `.env` — agent handle, display name, Configure keys, provider keys

## What this demonstrates

- hosted linking with `Configure.link()`
- streaming chat over Server-Sent Events
- `profile.tools()` and `profile.executeTool()`
- inline hosted Configure surfaces via `show_ui_component`
- background `profile.commit()` after each turn

## Reference

- **skill.md:** [configure.dev/skill.md](https://configure.dev/skill.md)
- **llms.txt:** [configure.dev/llms.txt](https://configure.dev/llms.txt)
- **Reference agents:** `apps/agents/` in the repo — fuller production examples with persistence and additional product chrome
