Inspiration

Long forms force people to translate their life story into an unfamiliar sequence of fields. Conditional applications make this worse: users answer questions that may not apply, repeat information across sections, and often discover missing evidence only near the end.

We wanted to explore a different future for the web—one where a person explains their situation naturally, an agent connects the details, and the website remains responsible for its own rules and safety constraints.

What it does

VisaFlow turns a deliberately long 55-field visitor-visa application into a guided voice or text conversation.

A user can describe their trip naturally, speak their answers, type them, or attach supporting documents. The agent then:

  • identifies whether the application is for tourism, business, or a family visit;
  • selects the correct funding and prior-travel branches;
  • removes questions that do not apply;
  • extracts multiple supported facts from each answer;
  • calculates transparent derived values such as trip duration;
  • fills reasonable interpretations while clearly flagging them for review;
  • asks one story-shaped follow-up covering several related gaps;
  • shows every WebMCP action and live application progress; and
  • consolidates uncertain and sensitive values into one editable final-review queue.

After every applicable field and review item is resolved, the user can finish the fictional application and see a completion receipt.

Why WebMCP

An LLM alone could generate a possible JSON object, but it would need a hardcoded copy of the form schema, routing rules, and validation logic. Alternatively, it would have to manipulate fragile DOM selectors and click through every conditional page.

WebMCP gives the agent a live semantic contract owned by the website.

VisaFlow publishes 22 typed tools that let an agent inspect possible routes, select the applicable flow, discover missing requirements, apply structured answers, attach evidence references, calculate derived insights, resolve conflicts, and request human review.

WebMCP is not decorative in this project: application changes go through website-owned tool handlers. Every write is validated for route applicability, field type, allowed choices, date ranges, confidence, provenance, and review requirements before it reaches shared application state.

This enables something that was previously difficult: a person can tell one coherent story, an agent can connect that story across many conditional fields, and the website can safely accept only the values allowed by its current rules—without page-by-page navigation.

Human-agent collaboration

The human provides meaning and judgment. The agent extracts, connects, derives, and decides what to ask next. The website validates every action and keeps uncertainty visible.

Explicit user statements, document facts, deterministic derivations, and AI proposals remain visibly separate. Sensitive or uncertain values are never silently treated as verified. The user reviews and corrects them once before completing the application.

How we built it

The application uses React, TypeScript, and Vite with a government-service-inspired interface.

On page load, VisaFlow registers 22 tools through document.modelContext.registerTool(). A WebMCP-capable agent can discover these tools at runtime and execute them without knowing the DOM structure.

A same-origin Worker endpoint uses the OpenAI Responses API with GPT-5.6 Terra and a strict structured-output schema. Each turn includes the current route, resolved answers, remaining applicable questions, recent conversation history, remembered partial facts, and pending review fields.

The LLM returns a plan containing explicit facts, document facts, safe derivations, reviewable proposals, route decisions, and the next question. It never writes application state directly. The client converts the plan into WebMCP calls, and the website validates and applies them.

Voice recognition, spoken questions, multilingual interfaces, document extraction, visible WebMCP activity, browser-local drafts, and the completion flow are integrated into one coherent experience.

Challenges

The hardest problems were preventing the conversation from forgetting previously stated facts, resolving phrases such as “this year,” extracting many useful facts from one answer, and avoiding repeated address questions.

We also had to ensure route changes happened before field validation, preserve incomplete facts between turns, batch WebMCP writes safely, distinguish derived values from invented values, and keep document extraction useful without allowing documents to act as instructions.

Accomplishments

  • A working 55-field adaptive application rather than a single autofill demo
  • 22 non-trivial WebMCP tools with typed schemas and validation
  • Dynamic application routing with irrelevant-question removal
  • Voice, text, document, and multilingual interaction
  • Visible provenance, derived values, progress, and semantic actions
  • A consolidated final-review experience
  • A gated fictional completion receipt
  • 32 automated tests across domain, WebMCP, and integrated UI behavior

What we learned

The most important lesson was that an agent should not own a website’s rules. The website should publish capabilities and remain authoritative, while the model focuses on understanding natural language and planning.

WebMCP makes that separation possible. It allows an agent to be flexible without making application writes opaque or unsafe.

We also learned that conversational form completion works best when the agent asks for coherent parts of a person’s story, rather than disguising several traditional form labels as a chatbot question.

What's next

Next, we would test VisaFlow with more external WebMCP agents, expand accessibility testing, support additional document formats and application domains, and add encrypted cross-device draft storage.

The same architecture could support healthcare enrollment, insurance claims, benefits applications, university admissions, and other conditional workflows.

Live application: https://adaptive-visitor-visa-webmcp.avszoom.chatgpt.site/

Source code: https://github.com/avszoom/webmcp

Built With

Share this project:

Updates

Submission history