Skip to content

This repository contains the implementation of a multi agent ai system using LangChain and Python. This multi agent ai system is capable to classify documents based on emails, json data and pdf content. It analyzes the classified content and take actions accordingly.

License

Notifications You must be signed in to change notification settings

Pranav910/multi-agent-ai-system

Repository files navigation

Multi Agent AI System

This project contains implementation of a multi agent ai system which can classifies emails, json and pdfs. It is able to extract intents, tone and risk associated with the documents mentioned before.

🤖 Agents

1. Classifier Agent (Level-Up):

Detects format and business intent

Classifies: JSON, Email, PDF

Extracts Intent: RFQ, Complaint, Invoice, Regulation, Fraud Risk

Passes routing + intent metadata to memory

2. Email Agent:

Extracts structured fields: sender, urgency, issue/request

Identifies tone (e.g., escalation, polite, threatening)

Triggers action based on tone + urgency

Escalate → notify CRM (simulate with API)

Routine → log and close

3. JSON Agent

Parses webhook data (simulate with provided sample)

Validates required schema fields

Flags anomalies (e.g., field mismatch, type errors)

If anomalies detected → log alert in memory/API

4. PDF Agent

Extracts fields (using PDF parsers, not hardcoded text)

Parses line-item invoice data or policy document

Flags if:

Invoice total > 10,000

Policy mentions "GDPR", "FDA", etc.

🚀 Features:

🧠 Shared Memory Store

All agents read from and write to a centralized memory store.

Stored Data Includes:

  • Input metadata (source, timestamp, classification)
  • Extracted fields per agent
  • Chained actions that were triggered
  • Agent decision traces

🔀 Action Router (New Component)

Triggers follow-up actions based on agent outputs.

Examples:

  • Create a support ticket
  • Escalate an issue
  • Flag a compliance risk

These actions can be simulated via REST calls:

POST /crm
POST /risk_alert

🔁 End-to-End Flow Example

  • User uploads email → Classifier detects: Email + Complaint

  • Email agent processes → Tone = angry, Urgency = high

  • Action Router calls: POST /crm/escalate

  • Memory logs entire trace for audit


🔁 Workflow Diagram

Alt text


  • Sample Inputs and Outpus

    • Email Agent

      Input: Alt text

      Output: Alt text

      Logs: Alt text

    • PDF Agent

      Input: Alt text

      Output: Alt text

      Logs: Alt text

    • JSON Agent

      • Valid JSON

      Input: Alt text

      Output: Alt text

      Logs: Alt text

    • JSON Agent

      • Invalid JSON

      Input: Alt text

      Output: Alt text

      Logs: Alt text

About

This repository contains the implementation of a multi agent ai system using LangChain and Python. This multi agent ai system is capable to classify documents based on emails, json data and pdf content. It analyzes the classified content and take actions accordingly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published