# AssistantPanel: the assistant beside the page

AssistantPanel is the assistant of an app built on Meadowstack: a column beside the page, opened from the top bar, never a page of its own. It answers from the app's data with sources that link to records, and anything it would change comes as a proposal card that does nothing until someone says yes.

Checked 2 December 2026. By Bohuslav Poláček. https://meadowstack.com/components/assistant-panel/

*The site assistant at Stonebridge in the demo: left a new conversation with the four questions the demo's data can answer; right the handover question answered from the snag list, with its source and the proposal waiting for a yes.*

A live screen, rendered from the kit's components on the page: https://meadowstack.com/components/assistant-panel/

## What it is for

An app's assistant answers questions about the app's own records and proposes changes to them. In Meadowstack it lives in one place: a column beside the page, opened from the top bar and placed in `AppShell`'s `aside`, so the page stays in view while someone asks about it.

The preview is the site assistant of the [Stonebridge example](https://meadowstack.com/examples/construction-site-management/). A new conversation opens on its greeting and offers the four questions the demo's data can answer, as buttons. On the right, the handover question has been asked. The answer comes from the snag list, names the three subcontractors with open snags, and links its source. Under it a proposal card, "Remind the subcontractors of their dates", says what it would do and waits for **Yes, do it** or **No**. The line at the foot of the column says what that means: nothing is written until you confirm it.

The manifest's `not` is as clear: never a page of its own, never a floating chat bubble.

## The rules and where they live

- **The assistant is a column beside the page, never a page.** The root `AGENTS.md`, Apps do work, and people never get lost.
- **One action goes the whole way.** `AGENTS.md`: a proposal with its impact, a confirm, the change through the module's api as the person, then a notification in the bell; the recipe is `docs/recipes/notifications-and-assistant.md`.
- **Roles change the data, the assistant's answers included.** `AGENTS.md`, Permissions and audit: an external role never sees internal costs, margins or other clients' records "in assistant answers as on the pages". In the demo every answer and every proposal names the permissions it needs.
- **Answers with sources, quick prompts from the data, every change as a card that runs only after a yes.** `docs/patterns.md`, Conversation, after Notion AI and the ElevenLabs agent panel.
- **Thinking shows what it is doing**: a twinkling dot matrix and the step's words shimmering, a new step every 1.8 s, then the newest answer writes itself in (`docs/patterns.md`, `thinkingSteps`).
- **The assistant's box is `Composer appearance="liquid"`.** `AGENTS.md`; `docs/principles.md`, Conversations: one bar on top in every state, text at a reading measure.

## What AI coding tools write instead

The manifest names **a hand-built chat sidebar or chatbot widget**. A tool asked to "add an AI assistant" writes a bubble in the corner that opens a chat over the content, or a `/chat` page that loses the record someone was looking at. The answers are plain text without sources, the model's reply is written to the database as soon as it arrives, and the feed it reads from ignores permissions, so a client can ask about another client's invoices.

`AssistantPanel` takes the place in the shell, the answer as kit content with its sources, and the change as an `action` turn whose status only `onDecide` moves on. What runs after the yes is the module's own api, called as the person, so the permissions, the history entry and the notification are the same as for a click on the page.

## How to use it

| Prop | What it takes |
| --- | --- |
| `name`, `greeting` | The assistant's name in its header and the first line of an empty conversation. |
| `turns` | `AssistantTurn[]`: `user` with `text`, `assistant` with `content` and `sources`, `action` with `title`, `detail` and `status`. |
| `quickPrompts` | Questions to offer as buttons on an empty conversation. |
| `thinking`, `thinkingSteps` | The answer is on its way, and the steps to show meanwhile. |
| `onSend`, `mentions` | A question was sent; the records to offer after @. |
| `onDecide` | Yes or no to a proposal, with its id. |
| `conversations`, `onNewChat`, `onOpenConversation` | Earlier conversations and a new one. |
| `expanded`, `onExpandedChange`, `onClose` | A wider column, and closing it. |
| `onDictate`, `voiceMode`, `voiceTranscript` | Dictation into the box, and a voice conversation. |
| `renderSource`, `now` | Your router's link for a source, and the clock. |

## Its entry in the manifest

*The component's rules as the kit's manifest states them, the same entry an AI coding tool reads.*

| Manifest field | AssistantPanel |
| --- | --- |
| What it is | The assistant as a column beside the page: conversations, answers as kit cards, the composer. |
| Use it for | The app's assistant, opened from the top bar. |
| Not for | As a page of its own; As a floating chat bubble |
| It replaces | A hand-built chat sidebar or chatbot widget |
| Screen types | Shell |
| Import | `import { AssistantPanel } from "@meadowstack-studio/kit";` |

Read from the kit's component manifest when the site was built (126 components, packages/kit/src/components.json); the same entry answers an AI coding tool through the kit's MCP server.

## How the demo calls it

*AssistantColumn is the demo's AssistantPanel, loaded the first time the column opens: the turns, the quick prompts while the conversation is empty, onDecide for the proposal cards, sources as the router's links.*

From `apps/demo/src/workspace/extras.tsx` in the Meadowstack repository:

```tsx
<AssistantColumn
  name={name}
  greeting={assistant?.greeting ?? tx("Dobrý den.", "Hello.")}
  turns={turns}
  thinking={thinking}
  quickPrompts={turns.length ? undefined : answers.map((answer) => answer.prompt)}
  onSend={send}
  onDecide={decide}
  onNewChat={turns.length ? () => setTurns([]) : undefined}
  expanded={expanded}
  onExpandedChange={setExpanded}
  onClose={close}
  renderSource={renderSource}
```

## What a turn can be

*The exported type of turns: a question, an answer with its sources, or an action with its status, from proposed to done or failed.*

From `packages/kit/src/components/assistant-panel.tsx` in the Meadowstack repository:

```tsx
export type AssistantTurn =
  | { id: string; kind: "user"; text: string; at: string }
  | { id: string; kind: "assistant"; content: ReactNode; at: string; sources?: AssistantSource[] }
  | {
      id: string;
      kind: "action";
      /** What it would do, as a sentence: "Přesunout betonáž na čtvrtek 23. 10." */
      title: string;
      /** What changes, record by record. */
      detail?: ReactNode;
      status: "proposed" | "approved" | "declined" | "done" | "failed";
      at: string;
    };
```

## Questions

### Does the assistant change data on its own?

No. Anything it would change comes as a proposal card that says what it would do, and only Yes, do it runs it, through the module's api as the person who said yes, so permissions and history apply as for a click.

### Why a column beside the page and not a chat bubble?

A column keeps the page in view while someone asks about it, and the page makes room for it instead of being covered. A bubble in the corner hides content and has no room for answers built from lists and cards.

### Can the assistant show data the person may not see?

No. Its answers follow the same permissions as the pages: in the demo each answer and each proposal names the permissions it needs and is left out for a person without them.

### What does it show while it thinks?

What it is doing: a twinkling dot matrix with the current step's words shimmering, a new step every 1.8 seconds, and then the answer writes itself in.

### Can people talk to it instead of typing?

Yes, when the app passes a dictation handler: a microphone appears in the box and the recording becomes text. There is also a voice mode that shows the conversation as a transcript.

## Related

- [NotificationCenter: the bell and its list](https://meadowstack.com/components/notification-center/) (Components)
- [A change order that shows its price before anyone approves it](https://meadowstack.com/screens/change-order-form/) (Screens)
- [A construction schedule that reads the weather](https://meadowstack.com/screens/construction-schedule/) (Screens)
- [A content calendar for a creator's posts and brand deals](https://meadowstack.com/screens/content-calendar/) (Screens)
- [A proof the customer approves in their own portal](https://meadowstack.com/screens/proof-approval/) (Screens)
- [A roast plan worked out from the orders](https://meadowstack.com/screens/roast-plan/) (Screens)
