How hasini-kotha/fed_knowledge_graph_agentic_platform works
TraceAI is a privacy-preserving, cross-enterprise fraud and threat detection platform. Its documented workflow prepares private client data, trains and securely aggregates federated models, scores transactions, adds knowledge-graph context, generates explanations, and supports agent-driven response. A FastAPI service and Next.js console expose scanning, batch processing, decisions, administration, and federated-learning operations. The README documents the five-stage AI flow; source-index references show selected module relationships. Several runtime modules were not sampled, so uncertain internal links are omitted.
Main entry points: main.py TraceAI API · client.py Federated Client · routes.py Federated Gateway · run_data_pipeline.py Data Preparation
Components 23
User Console & API
- Web Console
frontend/src/app - Frontend API Client
frontend/src/lib/api.ts - TraceAI API
backend/main.py - Scan & Batch
backend/routers/scan.py - Decisions & Admin
backend/routers/decisions.py
Federated Learning
- Data Preparation
src/main/run_data_pipeline.py - Feature Mapping
src/core/metadata_engine.py - Feature Vectorizer
src/core/vectorizer.py - Federated Client
src/fl/client.py - Training Engine
src/models/train_engine.py - Secure Updates
src/fl/secure_update.py - Aggregation Server
src/fl/server.py
Risk Intelligence
- Fraud Model
src/models/Fed_model.py - Risk Predictor
src/prediction/predictor.py - Knowledge Graph
src/kg/kg_builder.py - Graph Evidence Query
src/kg/kg_query.py
Explanation & Response
- Explanation Generator
src/explain/explanation_generator.py - Agent Workflow
src/agent/workflow.py - Response Actions
src/agent/nodes/execute.py
Gateway & State
- Federated Gateway
src/gateway/routes.py - Gateway Authentication
src/gateway/auth.py - Gateway Database
src/gateway/database.py
Other components
- Enterprise Operator
Connections 26
- Enterprise Operator → Web Console: uses
README.md - Web Console → Frontend API Client: requests data
README.md - Frontend API Client → TraceAI API: calls API
backend/main.py - TraceAI API → Scan & Batch: mounts routes
backend/main.py - TraceAI API → Decisions & Admin: mounts routes
backend/main.py - TraceAI API → Federated Gateway: mounts gateway
backend/main.py - TraceAI API → Gateway Database: initializes
backend/main.py - Enterprise Operator → Data Preparation: provides private data
README.md - Data Preparation → Feature Mapping: loads mapping
src/main/run_data_pipeline.py - Data Preparation → Feature Vectorizer: fits features
src/main/run_data_pipeline.py - Federated Client → Training Engine: trains locally
src/fl/client.py - Federated Client → Fraud Model: uses model
src/fl/client.py - Federated Client → Secure Updates: protects updates
src/fl/client.py - Federated Client → Federated Gateway: submits updates
- Federated Gateway → Gateway Authentication: authenticates
src/gateway/routes.py - Federated Gateway → Gateway Database: reads and writes
src/gateway/routes.py - Aggregation Server → Secure Updates: aggregates protected weights
README.md - Aggregation Server → Fraud Model: updates global model
README.md - Risk Predictor → Fraud Model: loads model
src/prediction/predictor.py - Scan & Batch → Risk Predictor: scores transactions
- Risk Predictor → Knowledge Graph: supplies risk scores
src/main/run_kg_pipeline.py - Knowledge Graph → Graph Evidence Query: builds queryable graph
- Graph Evidence Query → Explanation Generator: provides evidence
src/kg/kg_query.py - Graph Evidence Query → Agent Workflow: provides evidence
src/kg/kg_query.py - Explanation Generator → Enterprise Operator: returns reasoning
README.md - Agent Workflow → Response Actions: dispatches actions
README.md