Formea AI Form Automation
Multi-Agent Chrome Extension for Intelligent Form Filling
Architected multi-agent system with 3 specialized agents (Planner, Navigator, Validator) orchestrated by an Executor with self-validation loops. LangChain integration supporting 8 LLM providers with automatic structured output fallback via Zod schemas. Built VBON Form Explorer agent for autonomous government form reverse-engineering using stable IDs and deterministic DOM diffing.
Key Features
- Multi-agent orchestration: Executor coordinates Planner, Navigator, and Validator agents
- Self-validation loop: Validator verifies results before proceeding, feeds errors back for retry
- 8 LLM providers (OpenAI, Claude, Gemini, Groq, DeepSeek, Cerebras, Ollama, X AI) via LangChain
- Automatic structured output fallback: native withStructuredOutput() or manual JSON extraction + Zod validation
- VBON Form Explorer: autonomous agent that builds form dependency graphs via deterministic DOM diffing
- Human-in-the-loop checkpoints for risky interactions on government forms
Tech Stack
AI & Agents
LLM Providers
Backend
Frontend
Challenges & Solutions
Complex Government Forms (VBON)
Government forms (PrimeFaces/JSF) have 10K+ lines of HTML with repeated IDs, inline JavaScript handlers, and dynamic AJAX updates — traditional scraping approaches fail entirely.
Built VBON Form Explorer agent using stable hash-based IDs (XPath + role + label) that survive DOM changes, PrimeFaces AJAX completion detection, and deterministic DOM diffing to build field dependency graphs.
Models Without Structured Output Support
Not all LLM providers (DeepSeek Reasoner, Llama) support native JSON schema output — agents need consistent Zod-validated responses regardless of provider.
Automatic fallback pattern: detect provider capability, use native withStructuredOutput() when available, fall back to manual JSON extraction + Zod validation for unsupported models. Provider-agnostic agent code.
Agent Coordination & State Management
Three agents need shared browser context, real-time UI updates from background worker, and graceful error handling across agent boundaries.
Shared AgentContext with BrowserContext, EventManager for real-time UI updates, and generic BaseAgent<T extends ZodType> enforcing type-safe structured outputs per agent.