How pandharimaske/loanagent works
LoanAgent is a full-stack loan-management application whose main workflow takes a customer’s chat turn through session handling, multilingual processing, LangGraph orchestration, memory retrieval and conflict-aware response generation. Its memory spans structured SQLite facts, ChromaDB conversation context and session summaries. The graph also preserves authentication, administration and the frontend’s signup, login, dashboard and loan-calculator capabilities. Edges reflect the supplied excerpts and README; some implementation details, especially unsampled agent nodes and frontend API calls, are not shown.
Main entry points: App.jsx React app · main.py FastAPI application · core_nodes.py Agent processing · session_routes.py Session routes
Components 24
Web application
- React app
frontend/src/App.jsx - Home and calculator
frontend/src/component/Home.jsx - Signup
frontend/src/component/signup.jsx - Login
frontend/src/component/login.jsx - Customer dashboard
frontend/src/component/dashboard.jsx - Admin panel
frontend/src/component/AdminPanel.jsx
API and sessions
- FastAPI application
backend/main.py - Session routes
backend/api/session_routes.py - Chat routes
backend/api/chat_routes.py
Agent workflow
- LangGraph workflow
backend/agent/graph.py - Agent processing
backend/agent/core_nodes.py - Turn handlers
backend/agent/handlers.py - Language support
backend/agent/language.py - Agent prompts
backend/agent/prompts.py - Entity schemas
backend/agent/schemas.py
Memory and storage
- Memory context builder
backend/memory/retriever.py - Structured memory
backend/memory/sqlite_store.py - Vector memory
backend/memory/vector_store.py
Identity and admin
- Authentication routes
backend/api/auth_routes.py - Admin routes
backend/api/admin_routes.py - User and session store
backend/auth/user_store.py
Other components
- Customer
- Ollama inference
- Claude summarization
Connections 30
- Customer → React app: uses
README.md - React app → Home and calculator: routes to
frontend/src/App.jsx - React app → Signup: routes to
frontend/src/App.jsx - React app → Login: routes to
frontend/src/App.jsx - React app → Customer dashboard: routes to
frontend/src/App.jsx - React app → Admin panel: routes to
frontend/src/App.jsx - Home and calculator → Customer: offers calculator
README.md - React app → FastAPI application: calls API
- FastAPI application → Authentication routes: registers
backend/main.py - FastAPI application → Session routes: registers
backend/main.py - FastAPI application → Chat routes: registers
backend/main.py - FastAPI application → Admin routes: registers
backend/main.py - Authentication routes → User and session store: manages accounts
backend/api/auth_routes.py - Admin routes → User and session store: checks admin
backend/api/admin_routes.py - Session routes → Chat routes: shares sessions
backend/api/session_routes.py - Chat routes → Language support: translates turns
backend/api/chat_routes.py - Chat routes → LangGraph workflow: invokes workflow
backend/api/chat_routes.py - Session routes → LangGraph workflow: runs turns
backend/api/session_routes.py - Session routes → User and session store: persists messages
backend/api/session_routes.py - LangGraph workflow → Agent processing: dispatches nodes
- LangGraph workflow → Turn handlers: routes turns
backend/agent/graph.py - Agent processing → Memory context builder: loads context
backend/agent/core_nodes.py - Turn handlers → Structured memory: reads and writes facts
backend/agent/handlers.py - Turn handlers → Vector memory: stores chunks
backend/agent/handlers.py - Memory context builder → Structured memory: loads facts
backend/memory/retriever.py - Memory context builder → Vector memory: searches context
backend/memory/retriever.py - Agent processing → Agent prompts: uses
backend/agent/core_nodes.py - Agent processing → Entity schemas: validates entities
backend/agent/core_nodes.py - Agent processing → Ollama inference: runs inference
- Turn handlers → Claude summarization: summarizes turns