> ## Documentation Index
> Fetch the complete documentation index at: https://agentheya.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Page layout

> Owner-defined UI blocks rendered around your agent's standalone chat page — pre-chat forms, hero banners, FAQ accordions, suggested-prompt chips, embedded widgets, and more.

The **page layout** controls everything *around* the chat panel on your agent's standalone page at `https://agentheya.com/agent/<your-agent>/`. It is **separate from the embeddable widget**: the widget has its own narrow customisation surface; page layout is where the heavier UI lives.

Page layout is configured through the **Web chat page layout** card on the [Web](/sidebar-menu/web) dashboard page (`/dashboard/<agent>/web`). Each entry is a *block* with a stable `id`, a `position`, and a `type`.

## Positions

Every block declares one of three positions:

* `above_chat` — rendered between the page header and the chat panel.
* `below_chat` — rendered under the chat panel, above the legal footer.
* `sidebar` — rendered in a right-hand column alongside the chat. Adding any sidebar block switches the page to a two-column grid (it collapses to single-column under 900 px viewport width).

Blocks at the same position render in array order.

## Block types

Each type has its own focused docs page — the docs are intentionally granular so the AI Designer and the Management MCP can point you (or your operator) at exactly the right one.

| Type                | Purpose                                          | Docs                                                          |
| ------------------- | ------------------------------------------------ | ------------------------------------------------------------- |
| `markdown`          | Free-text paragraphs (markdown supported)        | [markdown](/sections/page-layout/markdown)                    |
| `links`             | Flat list of outbound links                      | [links](/sections/page-layout/links)                          |
| `hero`              | Logo + headline + subtitle + CTA banner          | [hero](/sections/page-layout/hero)                            |
| `json_render`       | Custom UI authored as a RenderSpec JSON object   | [json\_render](/sections/page-layout/json-render)             |
| `input_capture`     | Pre-chat intake form that seeds the conversation | [input\_capture](/sections/page-layout/input-capture)         |
| `suggested_prompts` | Clickable starter chips that send a chat message | [suggested\_prompts](/sections/page-layout/suggested-prompts) |
| `faq`               | Collapsible Q\&A accordion                       | [faq](/sections/page-layout/faq)                              |
| `notice`            | Coloured info/warning/error banner               | [notice](/sections/page-layout/notice)                        |
| `embed`             | Third-party iframe (Calendly, Typeform, …)       | [embed](/sections/page-layout/embed)                          |
| `divider`           | Horizontal rule between blocks                   | [divider](/sections/page-layout/divider)                      |

## How to configure

**Through the UI**: open the dashboard at `/dashboard/<agent>/web`, expand the *Web chat page layout* card, and click **Add block**. Each block has its own collapsible editor card with type-specific fields. The save bar at the bottom of the page persists the whole array.

**Through the AI Designer**: ask the Designer chat in plain language — "Add a 3-step intake form before the chat that asks for the device model and issue area, then send the answers as the first message". The Designer uses `set_section_fields` or the array patch ops (`add_section_item`, `update_section_item`, `remove_section_item`, `reorder_section_items`) with `section: "public_details"` and `array_field: "page_layout"`. Block ids must be unique within the array; match keys for the array patch ops use `id`.

**Through the Management MCP / API**: the same five patch tools are exposed at `manage.agentheya.com/mcp`, REST `POST /v1/manage/{tool}`, and described in OpenAPI at `manage.agentheya.com/openapi.json`. Call `schema.get` with `section: "public_details"` first to see the latest shape — the response includes a `docs_url` and per-block-type discriminator constraints.

## Validation

All write paths (UI, AI Designer, MCP) converge on the same JSON schema. AJV enforces per-block-type required fields — for example, a `suggested_prompts` block missing its `prompts` array, or a `faq` block whose `qa` items are missing the `question` field, is rejected with a precise error message before anything reaches disk.
