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:
- Discovery: Starting from the email, this agent attempts to identify the company domain and basic context.
- Company Profile: It gathers core company information—name, size, industry.
- Financial Intel: This agent enriches the profile with financial data like revenue and funding.
- Tech Stack: It identifies the company’s technology stack by scraping and analyzing web data.
- 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
| Service | Purpose | Get Key |
|---|---|---|
| Firecrawl | Web scraping and content aggregation | firecrawl.dev/app/api-keys |
| OpenAI | Intelligent data extraction | platform.openai.com/api-keys |
Quick Start
- Clone this repository
- Create a
.env.localfile with your API keys:FIRECRAWL_API_KEY=your_firecrawl_key OPENAI_API_KEY=your_openai_key - Install dependencies:
npm installoryarn install - Run the development server:
npm run devoryarn dev - 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.
Related Articles
- AgentGPT: building autonomous AI agents with a full-stack web platform — AgentGPT offers a full-stack solution to deploy autonomous AI agents in the browser using Next.js, FastAPI, and Langchai
- Inside agents: a granular multi-agent orchestration system with PluginEval quality assurance — Explore agents, a Python-based multi-agent orchestration repo featuring 184 AI agents, 78 plugins, and a three-layer Plu
- DeerFlow 2.0: orchestrating multi-agent AI workflows with flexible LLM integration — DeerFlow 2.0 is a Python framework for orchestrating AI sub-agents and memory with support for multiple LLMs and executi
- Awesome LLM Apps: a practical collection of runnable AI agent and RAG templates — Awesome LLM Apps offers 100+ runnable AI agent and RAG templates for quick LLM app development. It supports multiple pro
- PinchTab: Token-efficient Chrome automation for AI agents with Go — PinchTab is a Go HTTP server enabling AI agents to control Chrome instances efficiently by extracting structured text, c
→ GitHub Repo: firecrawl/fire-enrich ⭐ 1,168 · TypeScript