How hardikdhawan2904/ai-dispute-investigation-system works
The platform accepts customer disputes, persists and validates cases, runs a staged multi-agent investigation, stores structured findings, and exposes customer tracking and analyst review. The README documents the agent sequence and customer communication; source-index references and excerpts establish selected API, service, persistence, and workflow links. Several route and agent details are unsampled, so their internal connections are omitted rather than inferred.
Main entry points: dispute_workflow.py Investigation workflow · dispute_service.py Case lifecycle · main.py FastAPI application · disputes.py Dispute endpoint
Components 21
User experience
- Dispute submission
frontend/src/app/submit-dispute/page.tsx - Case tracking
frontend/src/app/track/[caseId]/page.tsx - Internal review
frontend/src/app/internal-review/[caseId]/page.tsx
API and case services
- FastAPI application
backend/api/main.py - Dispute endpoint
backend/api/routes/disputes.py - Case lifecycle
backend/services/dispute_service.py - Document rules
backend/services/document_rules.py
Investigation agents
- Investigation workflow
backend/workflows/dispute_workflow.py - Dispute understanding
backend/agents/dispute_agent/nodes/pipeline.py - Investigation planning
backend/agents/investigation_agent/nodes/pipeline.py - Workflow orchestration
backend/agents/orchestration_agent/nodes/pipeline.py - Fraud reasoning
backend/agents/fraud_reasoning_agent/nodes/pipeline.py - Fraud intelligence tools
backend/agents/fraud_reasoning_agent/tools.py - Evidence assessment
backend/agents/evidence_agent/nodes/pipeline.py
Operations and communications
- Priority scoring
backend/services/priority_engine.py - Manual review rules
backend/services/manual_review_service.py - Customer communications
backend/services/communication_service.py
Persistence
- Case database
backend/database/models.py
Other components
- Customer
- Operations analyst
- Email provider
Connections 21
- Customer → Dispute submission: submits dispute
README.md - Dispute submission → FastAPI application: sends submission
README.md - Operations analyst → Internal review: reviews cases
README.md - Case tracking → FastAPI application: requests status
- Internal review → FastAPI application: requests case data
- FastAPI application → Dispute endpoint: routes requests
backend/api/main.py - Dispute endpoint → Case lifecycle: delegates case handling
backend/api/routes/disputes.py - Dispute endpoint → Document rules: checks documents
backend/api/routes/disputes.py - Case lifecycle → Investigation workflow: starts investigation
backend/services/dispute_service.py - Investigation workflow → Dispute understanding: runs first
backend/workflows/dispute_workflow.py - Investigation workflow → Investigation planning: runs planning
backend/workflows/dispute_workflow.py - Investigation workflow → Workflow orchestration: routes investigation
backend/workflows/dispute_workflow.py - Investigation workflow → Fraud reasoning: runs fraud analysis
backend/workflows/dispute_workflow.py - Investigation workflow → Evidence assessment: runs evidence assessment
backend/workflows/dispute_workflow.py - Fraud reasoning → Fraud intelligence tools: invokes tools
backend/agents/fraud_reasoning_agent/nodes/pipeline.py - Investigation workflow → Case database: saves findings
backend/workflows/dispute_workflow.py - Case lifecycle → Priority scoring: calculates priority
backend/services/dispute_service.py - Case lifecycle → Manual review rules: checks review need
backend/services/dispute_service.py - Case lifecycle → Customer communications: requests notifications
backend/services/dispute_service.py - Customer communications → Email provider: sends email
- Case lifecycle → Case database: reads and writes cases
backend/services/dispute_service.py