How nana7mi-swjtu/agent works
This is a web-based, workspace-scoped AI application with chat, document-grounded retrieval, knowledge-graph context, and bankruptcy analysis, alongside authentication and profile settings. The main workflow is a user sending a workspace chat request: the backend loads conversation context, invokes the agent service, and returns or streams a reply; the frontend also supports uploading and indexing documents for retrieval. Bankruptcy analysis is a separate workflow for submitting and reviewing records. The tree and excerpts establish these entry points and capabilities, but not all internal calls or provider wiring; uncertain links are omitted.
Main entry points: main.js Vue application · routes.py Workspace chat routes · indexer.py Document indexing · db.py Application database
Components 23
Web client
- Vue application
frontUI/src/app/main.js - Chat workspace
frontUI/src/features/chat/model/useChatMessaging.js - RAG workspace
frontUI/src/features/rag/model/useWorkspaceRag.js - Bankruptcy workspace
frontUI/src/features/bankruptcy/model/useBankruptcyWorkspace.js - Authentication UI
frontUI/src/features/auth/model/actions.js
Identity and workspace
- Authentication routes
app/auth/routes.py - Workspace chat routes
app/workspace/routes.py - Profile routes
app/user/routes.py - Application database
app/db.py
Agent runtime
- Agent service
app/agent/services.py - Agent graph
app/agent/graph/builder.py - Agent tools
app/agent/tools/tools.py - Knowledge graph query
knowledge_graph/graph_cypher_query_tool.py
Document retrieval
- RAG routes
app/rag/routes.py - RAG service
app/rag/service.py - Document indexing
app/rag/pipeline/indexer.py - File loaders
app/rag/fileloaders/registry.py - Embedding and retrieval providers
app/rag/providers/registry.py - Vector store
app/rag/providers/chromadb_store.py
Bankruptcy analysis
- Bankruptcy routes
app/bankruptcy/routes.py - Bankruptcy service
app/bankruptcy/service.py - Bankruptcy repository
app/bankruptcy/repository.py
Other components
- User
Connections 20
- User → Vue application: uses
- Vue application → Chat workspace: opens
- Vue application → RAG workspace: opens
- Vue application → Bankruptcy workspace: opens
- Vue application → Authentication UI: opens
- Authentication UI → Authentication routes: HTTP requests
- Chat workspace → Workspace chat routes: chat requests
- RAG workspace → RAG routes: document requests
- Bankruptcy workspace → Bankruptcy routes: analysis requests
- Workspace chat routes → Agent service: generates reply
- Workspace chat routes → Application database: loads and saves
- Authentication routes → Application database: reads and writes
- Profile routes → Application database: reads and writes
- RAG routes → RAG service: dispatches
- RAG service → Document indexing: indexes documents
- Document indexing → File loaders: loads files
- Document indexing → Embedding and retrieval providers: uses providers
- Embedding and retrieval providers → Vector store: stores vectors
- Bankruptcy routes → Bankruptcy service: dispatches
- Bankruptcy service → Bankruptcy repository: persists records