Skip to main content

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:
  1. Open Agent settings in chat.
  2. Toggle Structured Clarify (structured_clarify) on or off as needed.
When the toggle is off, no 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

  1. The agent calls structured_clarify and the run suspends.
  2. The WebUI renders the form inline; the chat stream is never blocked.
  3. The user submits; answers are persisted and the same run auto-resumes with those answers.
  4. A 900-second backend timeout guard auto-resumes with no_answer if the user never replies, so a forgotten form cannot wedge the session.
Harness 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

Use structured_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:
  1. No content fetch or srcDoc rendering occurs (prevents OOM / browser lag).
  2. A compact fallback card shows the file size and a “View in Fullscreen” button.
  3. Clicking the button opens ArtifactPortal, which loads the content via isolated URL mode (iframe src) — no performance risk regardless of file size.
This prevents users from mistaking large generated files (data dashboards, complex SVG infographics) as “failed tasks” due to a frozen or blank inline preview. See also: Agent configuration — tool loading.