Back to Projects

Formea AI Form Automation

Multi-Agent Chrome Extension for Intelligent Form Filling

Overview

AI-powered Chrome Extension (Manifest V3) that automates web form filling using a self-validating multi-agent system. Three specialized agents — Planner, Navigator, and Validator — orchestrated by an Executor with shared AgentContext. Supports 8 LLM providers via LangChain with automatic structured output fallback. Built the VBON Form Explorer agent to reverse-engineer complex government forms (PrimeFaces/JSF) with 10K+ lines of HTML using stable hash-based IDs and deterministic DOM diffing.

Key Features

  • Multi-agent system: Planner, Navigator, Validator with self-validation loops
  • 8 LLM providers via LangChain with automatic structured output fallback
  • VBON Form Explorer for reverse-engineering government forms (10K+ HTML lines)
  • Stable hash-based IDs surviving DOM changes and PrimeFaces AJAX updates
  • Template system with dependency management for reusable form blueprints
  • NanoBrowser integration for reliable in-tab browser automation

Tech Stack

AI & Agents

LangChainZodNanoBrowserPuppeteer

LLM Providers

OpenAIAnthropicGoogleGroqDeepSeekOllama

Backend

Express.jsNode.jsMongoDBMongooseClerk Auth

Frontend

Plasmo MV3ReactHeroUIZustandFramer MotionTailwind CSS

Challenges & Solutions

Complex Government Forms (VBON)

Problem

Government forms (PrimeFaces/JSF) have 10K+ lines of HTML with repeated IDs, inline JavaScript handlers, and dynamic AJAX updates — traditional scraping approaches fail entirely.

Solution

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

Problem

Not all LLM providers (DeepSeek Reasoner, Llama) support native JSON schema output — agents need consistent Zod-validated responses regardless of provider.

Solution

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

Problem

Three agents need shared browser context, real-time UI updates from background worker, and graceful error handling across agent boundaries.

Solution

Shared AgentContext with BrowserContext, EventManager for real-time UI updates, and generic BaseAgent<T extends ZodType> enforcing type-safe structured outputs per agent.

Key Achievements

3 Agents
Planner, Navigator, Validator with self-validation loops
8 Providers
LLM provider support with automatic fallback
10K+ HTML
Government form handling via VBON Form Explorer
Solo Dev
Full-stack AI Chrome Extension built from scratch