Interactive forms (structured_clarify)
Myrm renders structured forms inline in chat. The agent calls the structured_clarify tool (ask_question_tool schema) with one or more questions; the WebUI renders options, checkboxes, and free-text fields in the conversation, and the user’s answers resume the same run.
Turn it on or off
structured_clarify is on by default in the default profile. To change it:
- Open Agent settings in chat.
- Toggle Structured Clarify (
structured_clarify) on or off as needed.
ask_question_tool schema is sent at Turn1 — you pay nothing for a capability you do not use.
What you can build
How the round trip works
- The agent calls
structured_clarifyand the run suspends. - The WebUI renders the form inline; the chat stream is never blocked.
- The user submits; answers are persisted and the same run auto-resumes with those answers.
- A 900-second backend timeout guard auto-resumes with
no_answerif the user never replies, so a forgotten form cannot wedge the session.
ClarificationGuardMiddleware enforces at most one ask_question_tool per turn and blocks parallel tools, keeping the form and the tool plan consistent.
When to use it
Usestructured_clarify for clarifying questions and explicit sign-off — deployment checklists, destructive-operation confirmation, and branch selection. For dashboards, charts, or long-lived live panels, prefer Mermaid artifacts or an artifact file: forms are for asking, not for displaying data.
Large-file inline preview protection
HTML/SVG/Mermaid artifacts auto-expand in the chat stream by default. When an artifact exceeds 1 MB (LARGE_FILE_THRESHOLD), the inline renderer gracefully degrades:
- No content fetch or
srcDocrendering occurs (prevents OOM / browser lag). - A compact fallback card shows the file size and a “View in Fullscreen” button.
- Clicking the button opens
ArtifactPortal, which loads the content via isolated URL mode (iframe src) — no performance risk regardless of file size.
See also: Agent configuration — tool loading.