1. Create the chatbot
chatbots/record-assistant.yaml
enabled: true turns this one on.
2. Build the context
Write a function in your application that turns the record and its review into compact text:- Leave out what the user may not see, and mask identifiers (show the last digits only). The model repeats whatever is in the context.
- Stay under the message limit (32,000 characters per message): summarise long sections.
3. Sessions: one per user per record
GET /floware/v1/chatbots, then match namespace and name) instead of hard-coding it.
4. Send messages
stripContext, so the context block never appears in the panel.
5. The panel
- Collapsed by default, as a slim bar on the side of the page, so it does not take space until needed; remember the user’s choice in local storage.
- Suggested questions before the first message: “Why did this record get its decision?”, “What is missing?”, “What should I ask the customer?”.
- A “new chat” button that starts a fresh session with up-to-date context, because the context is a snapshot from when the session started.
- Markdown rendering for replies, and a visible error when a turn fails.
Limits to design around
- Each turn sends the last 50 messages. In a very long conversation, the first message, and the context in it, drops out; the “new chat” button is the remedy.
- A session keeps the system prompt as it was when the session started. After changing the prompt, new sessions pick it up; old ones keep the old prompt.

