Built an embeddable form-to-conversation system: a JS widget routes submissions to a Discord-based AI agent (Mistral API), validates user input, and returns normalized JSON to developer webhooks.
Project Overview
Developers define question schemas in a portal, then embed a generated widget on any site. The widget collects a Discord ID, starts a DM-based question flow, and enforces format/validation constraints via agent prompts plus server-side checks.
Key Features
- Embeddable Widget: Drop-in JS snippet with no heavy SDK requirements.
- Agent Orchestration: Discord.js workflow for prompt sequencing, retries, and state.
- Input Validation: Mistral-backed conversational correction with schema-aware formatting.
- Webhook Delivery: Final responses emitted as structured JSON for downstream automation.
Technical Details
Architecture: widget -> Node/Express API -> Discord.js agent worker -> Mistral inference -> webhook emitter. Session state tracks question order, validated field types, and completion status before posting final payloads.