A sophisticated multi-agent AI system that processes and routes different types of input (JSON, Email) to specialized agents for intelligent processing and analysis.
This system implements a multi-agent architecture that can:
- Accept input in various formats (JSON, Email)
- Classify the format and intent
- Route to specialized agents for processing
- Maintain shared context and traceability
The system currently accepts two types of text-based inputs:
-
JSON Input
- Must be valid JSON format
- Should follow the target schema structure
- Example:
{"name": "John", "age": 30, "email": "john@example.com"}
-
Email Input
- Must be plain text email content
- Should include standard email headers (From, Subject, etc.)
- Example:
From: sender@example.com Subject: Meeting Request Date: 2024-03-20 Hello, I would like to schedule a meeting...
Note: The system does not currently support PDF or other file formats. All input must be provided as text in either JSON or email format.
The system consists of three main components:
- Acts as the central router
- Classifies input format (JSON/Email)
- Determines intent (Invoice, RFQ, Complaint, etc.)
- Routes to appropriate specialized agent
- Maintains format and intent logs
- Processes structured JSON payloads
- Validates against target schema
- Reformats data as needed
- Flags anomalies and missing fields
- Processes email content
- Extracts key information:
- Sender details
- Subject
- Intent
- Urgency level
- Sentiment
- Response requirements
- Formats output for CRM integration
The system uses SQLite to store all agent interactions and messages. Below is the database schema:
The database stores:
- Agent interactions
- Message history
- Processing results
- Timestamps and metadata
- Python
- LangChain
- Google Gemini AI
- SQLite for message storage
- Streamlit for web interface
- Real-time message processing
- Persistent storage of agent interactions
- Structured data validation
- Intelligent email analysis
- Web-based interface
- Clone the repository
- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
export GOOGLE_API_KEY="your_gemini_api_key"- Run the application:
streamlit run main.py- Access the web interface at
http://localhost:8501 - Enter your input in the text field
- The system will automatically:
- Classify the input
- Route to appropriate agent
- Process and return results
- Store interaction history
The system uses SQLite to store:
- Agent interactions
- Message history
- Processing results
- Timestamps and metadata


