Inspiration

Handling invoices, contracts, and receipts is tedious, error-prone, and time-consuming. We wanted a smart system that could automatically read, understand, and organize documents so teams could focus on decisions instead of data entry.

What it does

Formigo ingests PDFs, images, and emails, extracts structured data, compares multiple documents, flags anomalies, and generates actionable outputs like CSVs, summaries, and email drafts—all powered by AI.

How we built it

We used a multi-agent workflow with Google Gemini:

  • Ingestion Agent: OCR, chunking, and embeddings stored in Supabase.
  • Retrieval Agent: Semantic search over document chunks.
  • Extraction & Reasoning Agents: Parse entities, detect anomalies, and generate action plans.
  • Execution Agent: Produce reports, CSVs, and emails.

Frontend: Next.js; backend and storage: Supabase; graph relationships: Neo4j; vendor enrichment: Tavily; deployed on Render.

Challenges we ran into

  • Chunking and retrieval quality needed fine-tuning for multi-document queries.
  • Aligning Gemini embeddings and vector DB dimensions in Supabase.
  • Ensuring background ingestion didn’t block API routes.
  • Handling multi-format documents while keeping the workflow modular.

Accomplishments that we're proud of

  • Fully functioning multi-agent MVP in under 8 hours.
  • Phase 1 validation ensured ingestion, embeddings, and vector search worked flawlessly.
  • Successfully extracted entities, flagged high-value invoices, and generated actionable summaries.
  • Seamless integration with Supabase, Neo4j, and Tavily for enriched insights.

What we learned

  • Multi-agent workflows drastically improve document intelligence compared to single-chain prompts.
  • Proper testing and validation scripts prevent subtle issues in embeddings, vector searches, and extraction.
  • Even small corpora reveal weaknesses in semantic retrieval and chunking strategies.

What's next for Formigo

  • Improve retrieval and ranking accuracy across diverse documents.
  • Add richer contract clause analysis and comparison.
  • Expand vendor intelligence with Tavily enrichment for risk scoring.
  • Enhance UI with real-time updates on ingestion and reasoning progress.

Built With

Share this project:

Updates