Skip to content
abhi06032005Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

ForgeOps India (OpsAi) — Autonomous Indian Business Operations & Procurement Agent

Adapting multi-agent orchestration into an India-first autonomous business operations, procurement, and verification harness.

Python FastAPI React Vite Tests Security License


1. Overview & Context

ForgeOps India is an autonomous business operations and market research agent engineered specifically for the Indian economic and commercial landscape.

While generic autonomous agents struggle with Indian regional commerce, local currency notation (Lakhs and Crores), complex GST tax structures, industrial clusters, and tiered source reliability, ForgeOps India understands the nuance of Indian B2B operations natively.

Key Capabilities:

  • India-First Data Normalization: Automatic parsing of Lakhs (₹2.5 Lakh ➔ ₹2,50,000), Crores, 15-character GSTINs, 10-character PANs, and 6-digit Indian PIN codes.
  • Granular Landed Cost Engine: Base price + statutory GST slabs (5%, 12%, 18%, 28%) + intra-state vs inter-state freight (CGST/SGST vs IGST) + transit insurance.
  • 4-Tier Source Verification: Official government/statutory portals down to community aggregators, with mandatory price-conflict disclosures.
  • Human-in-the-Loop Gating: Irreversible commercial actions (dispatching RFQs, purchase orders, releasing inquiries) pause in WAITING_FOR_APPROVAL until authorized.
  • Thread-Isolated Sandboxes: File persistence and artifact generation (supplier matrices, audit dossiers, CSVs) isolated per operational workflow.
  • Executive Operations Desk: Modern, responsive React 19 UI with real-time pipeline visualization, landed cost calculator, and source registries.

2. Executive Dashboard & UI Preview

Operations Desk & Autonomous Execution Human-in-the-Loop Approval Gate
Operations Desk Approval Gate
Indian Landed Cost & GST Calculator Indian B2B Source Registry
Landed Cost Calculator Source Registry
Verified Dossiers & Comparison Matrix Real-Time Workflow Trace
Verified Dossiers Workflow Trace

3. Indian-First Architecture

graph TD
    User["User Business Profile & Objective<br/>(e.g., Packaging in Mumbai under ₹30)"] --> Gateway["ForgeOps Engine / API Gateway"]
    Gateway --> Planner["Planner Agent & India Hub Expander"]
    Planner --> Ledger["Task Ledger & Execution DAG"]
    
    subgraph Specialized Indian Autonomous Agents
        Ledger --> Researcher["Researcher Agent<br/>(Indian Source Discovery)"]
        Ledger --> Browser["Safe Browser Inspector<br/>(MOQ, Rates, GSTIN Extraction)"]
        Ledger --> Verifier["Verification Agent<br/>(Tier 1-4 Verification & Conflict Resolution)"]
        Ledger --> Analyst["Analyst Agent<br/>(INR Normalizer, GST Slabs, Landed Cost)"]
        Ledger --> CommAgent["Communication Agent<br/>(Indian B2B RFQs: Email & WhatsApp)"]
        Ledger --> NegAgent["Negotiation Agent<br/>(MOQ, Advance NEFT, Tooling Fee Waivers)"]
        Ledger --> Critic["Critic Agent<br/>(Pre-flight Calculation & Factual Audit)"]
    end

    Researcher --> SourceRegistry["Indian Source Registry<br/>(Govt, Marketplaces, B2B, Directories, ATS)"]
    Analyst --> INBNormalizer["Indian Business Normalizer<br/>(Lakh/Crore, GST, Pincodes, Hubs)"]
    
    CommAgent --> ApprovalGate{"Human Approval Gate<br/>(WAITING_FOR_APPROVAL)"}
    ApprovalGate -->|Approved| Executor["Executor Agent<br/>(Dispatch RFQ / Generate Dossiers)"]
    ApprovalGate -->|Rejected / Revise| Planner

    Executor --> Sandbox["Isolated Thread Sandbox"]
    Sandbox --> FinalReport["Procurement Dossier & Supplier CSV Matrix"]
Loading

4. Specialized Agent Roles

Agent Responsibility
Planner Agent Decomposes complex operational goals into DAGs; expands geographic queries into verified Indian industrial hubs (e.g., Mumbai expanded to Bhiwandi, Thane, Navi Mumbai, Rabale MIDC).
Researcher Agent Queries Indian sources across marketplaces, corporate directories, official portals, and direct company registries.
Browser Agent Safely inspects marketplace listings and supplier portals, extracting MOQ, pricing tiers, delivery windows, phone numbers, and 15-digit GSTINs with anti-bot resilience.
Verification Agent Enforces the 4-Tier verification hierarchy. Discloses pricing discrepancies (e.g., ₹26.50 on supplier catalog vs ₹32.00 on third-party aggregators) instead of silently choosing.
Analyst Agent Normalizes financial figures into INR, calculates full landed costs (Base + GST + Freight + Transit Insurance), and ranks suppliers using multi-factor scoring.
Communication Agent Generates professional Indian B2B RFQs (Request For Quotation) in formal email and business WhatsApp messaging formats.
Negotiation Agent Creates structured counter-offers with repeat-volume commitments, advance NEFT/RTGS payment incentives, and tooling/die fee waivers.
Critic Agent Conducts pre-delivery audits for calculation accuracy, unverified claims, missing GST data, and duplicate entries before presenting to operators.
Executor Agent Executes authorized actions only after explicit human approval; writes audit dossiers and CSV matrices into the thread sandbox.

5. 4-Tier Source Verification Hierarchy

┌─────────────────────────────────────────────────────────────────────────────┐
│ Tier 1: Official & Regulatory Sources                                       │
│ • Government Portals: services.gst.gov.in, mca.gov.in, gem.gov.in           │
│ • Official Company Portals & Direct ATS Registries (Greenhouse, Lever)      │
└─────────────────────────────────────────────────────────────────────────────┘
                                      ▲
┌─────────────────────────────────────────────────────────────────────────────┐
│ Tier 2: Established Marketplaces & Platforms                                │
│ • B2B Marketplaces: IndiaMART, TradeIndia, Justdial B2B, IndustryBuying     │
│ • Consumer & Enterprise Platforms: Amazon.in, Flipkart, Meesho, Naukri      │
└─────────────────────────────────────────────────────────────────────────────┘
                                      ▲
┌─────────────────────────────────────────────────────────────────────────────┐
│ Tier 3: Business Directories & Aggregators                                  │
│ • Corporate Registrars: ZaubaCorp, Toffler, Instafinancials, YellowPages     │
└─────────────────────────────────────────────────────────────────────────────┘
                                      ▲
┌─────────────────────────────────────────────────────────────────────────────┐
│ Tier 4: Community & Unverified Sources                                      │
│ • Forums & Blogs: Medium, Reddit, Quora, unverified social listings         │
│ * Never treated as authoritative; flagged with mandatory operator warning.  │
└─────────────────────────────────────────────────────────────────────────────┘

6. End-to-End Supported Workflows

1. B2B Packaging & Raw Material Procurement

  • Objective: "Find 20 packaging suppliers in Mumbai that can provide 5000 custom boxes under ₹30 per box and deliver within 15 days."
  • Outcome: Evaluates suppliers across Bhiwandi, Thane, and Rabale; discloses pricing conflicts; computes landed costs (~₹31.27/unit incl. 18% GST and local tempo freight); pauses for human sign-off; generates a downloadable CSV comparison matrix and formal RFQ draft.

2. D2C Business Launch & Capital Allocation

  • Objective: "I want to start a clothing business in Mumbai with ₹5 lakh capital. Research manufacturing, packaging, marketplaces, and give me an actionable launch plan."
  • Outcome: 45% inventory allocation (~650 units @ ₹346), Tirupur/Ulhasnagar/Surat hub comparisons, MSME Udyam + GSTIN + Trademark compliance roadmap, and a 30-day go-to-market timeline.

3. Verified Tech Hiring & Internship Search

  • Objective: "Find Indian companies hiring backend interns, verify that positions are currently active, and provide verified application URLs."
  • Outcome: Verifies direct company ATS portals (Razorpay, Postman, Groww, CRED), filters out expired aggregator postings, and compiles verified direct application links.

7. Security & Secrets Management (Zero Leaked Keys)

  • No Secrets in Source Code: This repository contains NO hardcoded API keys, private tokens, or credentials.
  • Automated .gitignore Protection: The .gitignore is pre-configured to strictly ignore:
    • All .env and .env.* files
    • Private certificates (*.pem, *.key)
    • Runtime execution sandboxes (sandboxes/*)
    • Python caches (__pycache__/, .pytest_cache/)
    • Node dependencies (node_modules/, frontend/node_modules/)
    • Reference repositories and submodules (_deerflow_ref/)
  • Self-Contained Engine: The core engine operates out-of-the-box using local specialized agents, statutory rules engines, and resilient web scrapers without requiring third-party paid API keys.
  • Configuring Custom Integrations: If you extend the agent with custom external LLM APIs, copy .env.example to .env:
    cp .env.example .env
    (Never commit .env to version control).

8. Installation & Quickstart

Prerequisites

  • Python 3.10+
  • Node.js 18+ & npm (for building or customizing the frontend)

1. Clone the Repository

git clone https://github.com/abhi06032005/OpsAi.git
cd OpsAi

2. Install Python Dependencies

pip install -r requirements.txt

3. Build the Frontend Dashboard

npm --prefix frontend install
npm --prefix frontend run build

(The production bundle builds directly into static/ which is automatically served by FastAPI).

4. Run the Test Suite

Ensure all 17 integration and unit tests pass:

python -m pytest tests/

5. Launch the Server

python -m uvicorn src.server.api:app --host 127.0.0.1 --port 8080 --reload

6. Access the Dashboard

Open your browser and navigate to:

http://127.0.0.1:8080

9. How to Connect and Push to GitHub

To link this local repository to your GitHub remote and push the main branch, run the following commands in order:

Step 1: Initialize Git and Stage Clean Files

# Initialize git repository if not already initialized
git init

# Stage all files (protected by .gitignore - no secrets or caches are staged)
git add .

# Create the initial commit
git commit -m "feat: complete ForgeOps India autonomous agent harness and executive UI"

Step 2: Set the Remote Repository

git remote add origin https://github.com/abhi06032005/OpsAi.git

Note: If origin was already set previously, you can update it using:

git remote set-url origin https://github.com/abhi06032005/OpsAi.git

Step 3: Rename Current Branch to Main

git branch -M main

Step 4: Push to GitHub

git push -u origin main

10. Project Directory Layout

OpsAi/
├── docs/
│   └── images/              # Dashboard preview screenshots
├── frontend/                # React 19 + Vite executive dashboard
│   ├── src/
│   │   ├── components/      # OperationsDesk, LandedCostCalculator, SourceRegistry, etc.
│   │   ├── App.jsx
│   │   └── App.css
│   ├── package.json
│   └── vite.config.js
├── src/
│   ├── agents/              # Autonomous specialized agents
│   │   ├── planner/         # Objective decomposition & hub expander
│   │   ├── verifier/        # 4-tier verification & conflict engine
│   │   ├── analyst/         # Landed cost & financial scoring
│   │   ├── communication/   # RFQ generation (Email & WhatsApp)
│   │   ├── negotiation/     # Counter-offers & payment terms
│   │   ├── critic/          # Pre-flight QA & calculation audit
│   │   └── executor/        # Approved action executor & artifact writer
│   ├── approvals/           # Human-in-the-loop state machine
│   ├── memory/              # Persistent business preferences & blacklist
│   ├── sandbox/             # Per-thread isolated file workspace
│   ├── server/              # FastAPI REST API & static file serving
│   ├── sources/             # Indian Source Registry & tier classifications
│   ├── tools/               # Web browser inspector & landed cost calculator
│   ├── utils/               # Indian statutory normalizer (GSTIN, PAN, Lakhs)
│   └── workflows/           # Orchestrators (Procurement, Business Launch, Jobs)
├── static/                  # Production dashboard assets served by FastAPI
├── tests/                   # 17 automated test suites
├── .env.example             # Safe environment configuration template
├── .gitignore               # Strict exclusion of secrets, builds, & sandboxes
├── package.json             # Root npm scripts
├── requirements.txt         # Python dependencies
└── README.md                # Comprehensive documentation

11. License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages