EntraFlow is a powerful, production-ready AI agent orchestration system designed to simulate and automate complex enterprise workflows. It leverages modular agent architecture, intelligent DAG-based orchestration, and seamless integration with Large Language Models (LLMs) to provide deep business insights and automated decision-making.
EntraFlow coordinates a suite of specialized agents through a central Orchestrator. Each agent is responsible for a specific domain—from data ingestion and machine learning analysis to strategic decision-making and quality assurance.
- 📡 DataFetcher: Ingests real-time data from external APIs (OpenWeather, NewsAPI). Features robust caching and mock data fallbacks for development.
- 🔍 Analyzer: Conducts multi-layer analysis using Transformer models (DistilBERT) for sentiment analysis and LangChain-powered LLMs for deep semantic insights.
- ⚖️ DecisionMaker: Applies complex business logic and priority rules. It uses LLMs to provide Strategic AI Advisory, translating data analysis into actionable corporate strategy.
- 📢 Notifier: The reporting engine. Generates stakeholder-ready reports in HTML, JSON, and Markdown/Text formats, including executive summaries and alert logs.
- 🛡️ Supervisor: The QA layer. Validates agent outputs against schemas, resolves data conflicts, and ensures final reports meet enterprise quality standards.
- Intelligent Orchestration: Uses a Directed Acyclic Graph (DAG) for dependency management and topological sorting.
- LLM-Agnostic Core: Native support for OpenAI, HuggingFace, and Ollama via LangChain integration.
- Fault-Tolerant Engine: Automatic retries with exponential backoff, state persistence for workflow resumption, and graceful degradation.
- Extensible Configuration: Entire workflows, agent thresholds, and API settings are managed via a centralized
config.yaml. - Comprehensive Logging: Multi-tier logging with console colorization and persistent storage for audit trails.
- Enterprise-Grade Analysis: Combines classical NLP (keywords) with modern Deep Learning (Transformers) and GenAI (LLMs).
git clone https://github.com/hashimkalam/EntraFlow.git
cd EntraFlowCreate a .env file or set environment variables:
# API Keys (Optional - fallbacks provided)
export OPENWEATHER_API_KEY="your_key"
export NEWS_API_KEY="your_key"
export OPENAI_API_KEY="your_key" # If using OpenAI providerpip install -r requirements.txtNote: On first run, the system will automatically download the DistilBERT model (~260MB) for local analysis if not present.
EntraFlow is highly configurable via config.yaml. Key sections include:
- api: Set your preferred LLM provider (
huggingface,openai,ollama) and model name. - agents: Tune confidence thresholds, priority rules, and output formats.
- workflows: Define custom sequences of agent execution.
EntraFlow provides a powerful CLI for managing your agent workforce.
Execute the full enterprise analysis pipeline:
python main.py run --workflow enterprise_analysis# List all defined workflows
python main.py list-workflows
# Check status of previous runs
python main.py status# Test a specific agent in isolation
python main.py test --agent AnalyzerEntraFlow/
├── agents/ # Modular agent implementations
│ ├── base_agent.py # Base class with core lifecycle logic
│ ├── analyzer.py # ML & LLM analysis logic
│ └── ... # Other specialized agents
├── orchestrator/ # The "Brain" of the system
│ ├── orchestrator.py # DAG execution and scheduling
│ └── workflow.py # Workflow definition parsing
├── utils/ # Shared utilities
│ ├── llm.py # LangChain & LLM provider management
│ └── logger.py # Enterprise logging system
├── cli/ # Terminal interface logic
├── data/ # Persistent states and generated reports
└── config.yaml # Centralized system settings
EntraFlow doesn't just process data; it communicates results. Check data/outputs/ after a run for:
- HTML Reports: Polished, visual summaries for executives.
- JSON Data: Raw, structured output for downstream integration.
- Alert Logs: Immediate notification of critical business triggers.
Distributed under the MIT License. See LICENSE for more information.
