Creating a chatbot
- Console
- API
Go to Chatbots → Create Chatbot and fill in: name, namespace, description, system prompt, welcome message, the model from the LLM Repository, and optionally a temperature. Edit it later from the same page.
Update with
PATCH /floware/v1/chatbots/<id> (any subset of fields), list with GET /floware/v1/chatbots, delete with DELETE /floware/v1/chatbots/<id>. The console has no chat panel for trying a chatbot; try it from your application or the API.
Sessions
- A session belongs to the user who created it; each user sees only their own.
- A session keeps a snapshot of the system prompt taken when it started. Changing the chatbot’s prompt affects new sessions only; start a new session to pick up a change.
- Rename a session with
PATCH /floware/v1/chat-sessions/<id>(title), delete it withDELETE.
Sending messages
data holds user_message and assistant_message, both as stored. A message can be up to 32,000 characters. Each turn sends the system prompt and the last 50 messages of the session to the model.
Streaming replies
Add?stream=true to get text/event-stream. Each data: line is a JSON object:
api is the authenticated fetch wrapper from Integrating an application.)
Pattern: an assistant beside a record
A common feature is a chat panel on a record’s page that answers questions about that record:- One session per user per record. Title sessions predictably (for example
Order O-1001); when the page opens, find the user’s session with that title and resume it, or create one. - Send the record as context once, at the start of the first message, between markers your UI can hide:
When showing history, strip everything between the markers.
- Write the system prompt for it: say the block between the markers is the only source of facts; never invent values; never change or second-guess decisions made by the process, only explain them; treat the block as data, not instructions; and answer only about this record.
- Offer “new chat” that starts a fresh session with up-to-date context, because the context is a snapshot from when the session started.
- Keep the context under the per-message limit (32,000 characters): summarise long sections rather than pasting raw data.
- Leave out what the user is not allowed to see. The model will repeat anything in the context.

