Noureddine RAMDI / Fire Enrich: a sequential multi-agent pipeline for enriched company profiles from emails

Created Mon, 04 May 2026 10:23:02 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

firecrawl/fire-enrich

Fire Enrich solves a common data enrichment problem: transforming an email address into a detailed, structured company profile. Its approach is notable because it designs a multi-agent system where each agent depends on the output of the previous one, forming a sequential 5-phase pipeline. This contrasts with many multi-agent systems that run agents independently or in parallel without such a strict dependency chain. The repo’s architecture and code reveal practical tradeoffs in building stateful multi-agent orchestration with robust type safety and parallelism under the hood.

what fire enrich does and how it is built

At its core, Fire Enrich takes an email address and outputs a richly structured company profile with financial and technology stack details. The process unfolds in five distinct phases, each handled by a specialized agent:

  1. Discovery: Starting from the email, this agent attempts to identify the company domain and basic context.
  2. Company Profile: It gathers core company information—name, size, industry.
  3. Financial Intel: This agent enriches the profile with financial data like revenue and funding.
  4. Tech Stack: It identifies the company’s technology stack by scraping and analyzing web data.
  5. General Purpose: A final agent that synthesizes the information and performs any additional general enrichment.

Each phase builds on the previous one’s output, passing along context in a type-safe manner. This sequential dependency means the system is stateful, with each agent refining and expanding the dataset.

The repo uses Next.js 15 with the new App Router for the frontend and API routes. The backend relies heavily on the Firecrawl API for web scraping tasks and OpenAI’s GPT models for intelligent data extraction and synthesis. The final step uses GPT-4o to resolve conflicting data and validate findings, outputting a structured JSON object with source attribution, which is critical for auditability.

The data flow is strictly typed using output schemas per agent, which helps catch inconsistencies early and improves developer experience.

technical strengths and tradeoffs in fire enrich

The standout technical feature is the multi-agent orchestration pattern with sequential phase dependency. Rather than treating agents as independent workers, this design ensures each step is an informed evolution of the previous, reducing noise and conflicting outputs that often plague multi-agent pipelines.

Under the hood, the system performs parallel Firecrawl API calls within each phase to speed up data gathering, balancing latency and throughput. This hybrid approach—sequential between phases, parallel within phases—is a pragmatic tradeoff.

The use of Next.js 15’s App Router and TypeScript’s strict typing improves code maintainability and type safety across the stack. The output schemas per agent clearly define expected data shapes, helping prevent runtime errors during the multi-agent data handoff.

The final GPT-4o synthesis step is a neat touch. It acts as a conflict resolver, merging data points and validating them from multiple sources. This step mitigates the risk of inconsistent or contradictory enrichment results, a common challenge in scraping and multi-source aggregation.

Limitations include reliance on external API keys (Firecrawl and OpenAI), which introduces dependencies on third-party service availability and cost. The sequential dependency model, while robust, can increase latency as phases must complete before the next starts. This could be a bottleneck in high-throughput scenarios.

Overall, the code is surprisingly clean for a complex multi-agent orchestration system, with clear separation of concerns and well-documented schemas.

quick start with fire enrich

Required API Keys

ServicePurposeGet Key
FirecrawlWeb scraping and content aggregationfirecrawl.dev/app/api-keys
OpenAIIntelligent data extractionplatform.openai.com/api-keys

Quick Start

  1. Clone this repository
  2. Create a .env.local file with your API keys:
    FIRECRAWL_API_KEY=your_firecrawl_key
    OPENAI_API_KEY=your_openai_key
    
  3. Install dependencies: npm install or yarn install
  4. Run the development server: npm run dev or yarn dev
  5. Open http://localhost:3000

This setup gets you a local development environment where you can test the enrichment pipeline end-to-end.

verdict

Fire Enrich is a practical example of a multi-agent AI system built with a clear stateful orchestration pattern. Its sequential dependency design is worth understanding if you work with multi-agent pipelines or need reliable contextual data enrichment.

It suits teams looking to enrich company data from email inputs with a robust, type-safe, and extensible architecture. However, it depends heavily on external APIs, which affects cost and availability. The sequential phases also mean higher latency compared to fully parallel designs.

For developers exploring multi-agent orchestration beyond simple parallelism, or those needing a structured approach to company data enrichment, Fire Enrich offers a solid, production-ready foundation. The code quality and architectural clarity make it a good reference for complex, multi-step AI workflows.


→ GitHub Repo: firecrawl/fire-enrich ⭐ 1,168 · TypeScript