Read a pending form
form_fetchFetch the active form in a flow, returning fillable fields for form_submit or a link when manual entry is required.
Instructions
Read the form a flow is waiting on. When the participant hosts it, this fetches the page, screens it for active content, and returns its fields ready to fill — then call form_submit. When this mock hosts it, there is nothing to do but wait for the participant, and the answer says so. In a manual-mode session it returns the link to hand to a person instead of the fields. Omit step_key to use whichever form the flow is currently waiting on.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step_key | No | Which form step. Omit to use whichever form the flow is waiting on. | |
| session_id | Yes | Session returned by session_create. | |
| transaction_id | Yes | Transaction the form belongs to. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | 'llm_auto' — fill `fields` and call form_submit. 'manual' — give form_url to the human, then call form_submit with the submission_id they receive. | |
| role | Yes | 'fill' — the participant hosts this form and this mock must submit it. 'host' — this mock serves it and the participant must submit it. | |
| events | No | What has happened in this session since your last call — the participant's callbacks, steps sent automatically, refusals, form submissions. Attached to every session-scoped result and delivered exactly once, so read it here instead of polling. Absent when nothing happened. `more` above zero means call record_get_events for the rest. | |
| fields | Yes | Inputs parsed out of the form. Empty in manual mode. | |
| method | No | GET or POST, as the form declares. | |
| form_url | No | Where the form lives. | |
| step_key | Yes | ||
| warnings | Yes | Anything suspicious in the page — read these before filling it. | |
| action_url | No | Where a submission is POSTed. Resolved against the form's URL. | |
| instructions | Yes | What to do next, given the mode and the role. |