How shangxinxiaolin/user-help works
Lingxi is a planned AI customer-support system split between a Python conversational agent and Java mock business services. The current chat path is HTTP client → FastAPI chat handler → conversation runtime → LangGraph answer workflow, with conversation persistence and checkpointing; the Java side exposes business operations through a debug HTTP controller and gRPC endpoints. The README also defines planned retrieval, routing, tools, and unified gateway capabilities, but says these are not yet implemented or integrated. Edges reflect shown calls or README-described architecture; unverified/planned links are omitted.
Main entry points: main.py Chat API · rpc Business gRPC · BusinessController.java Business Debug API · runtime.py Turn Runtime
Components 26
Python Agent
- Chat API
agent-service/app/main.py - Agent Router
agent-service/app/api/agent.py - Turn Runtime
agent-service/app/graph/runtime.py - Answer Graph
agent-service/app/graph/answer.py - Graph Builder
agent-service/app/graph/build.py - Chat Node
agent-service/app/graph/nodes/chat.py - Chat Model
agent-service/app/core/llm.py - Prompt Templates
agent-service/app/core/prompts.py - Answer Resolver
agent-service/app/graph/answer.py - Conversation Repository
agent-service/app/db/repositories/conversation.py - Conversation Records
agent-service/app/db/models/conversation.py - Message Records
agent-service/app/db/models/message.py - Graph Checkpoint
agent-service/app/db/checkpointer.py - Knowledge Retrieval
agent-service/app/graph - Business Tools
agent-service/app/graph
Java Business
- Business Debug API
business-service/src/main/java/com/shangui/userhelp/business/api/BusinessController.java - Order Service
business-service/src/main/java/com/shangui/userhelp/order/service/impl/OrderServiceImpl.java - Logistics Service
business-service/src/main/java/com/shangui/userhelp/logistics/service/impl/LogisticsServiceImpl.java - Aftersales Service
business-service/src/main/java/com/shangui/userhelp/aftersales/service/impl/AftersalesServiceImpl.java - Refund Service
business-service/src/main/java/com/shangui/userhelp/refund/service/impl/RefundServiceImpl.java - Ticket Service
business-service/src/main/java/com/shangui/userhelp/ticket/service/impl/TicketServiceImpl.java - Business gRPC
business-service/src/main/java/com/shangui/userhelp/rpc - Protobuf Contract
business-service/src/main/proto/business_service.proto - Gateway / BFF
business-service/src/main/java/com/shangui/userhelp
Agent State
- Conversation State
agent-service/app/graph/state.py
Other components
- User
Connections 29
- User → Chat API: sends chat
agent-service/app/main.py - Chat API → Turn Runtime: runs turn
agent-service/app/main.py - Chat API → Answer Resolver: resolves answer
agent-service/app/main.py - Chat API → Conversation Repository: injects repository
agent-service/app/main.py - Chat API → Graph Builder: builds graph
agent-service/app/main.py - Chat API → Agent Router: registers router
agent-service/app/main.py - Turn Runtime → Conversation Repository: persists messages
agent-service/app/graph/runtime.py - Turn Runtime → Answer Graph: invokes graph
agent-service/app/graph/runtime.py - Graph Builder → Chat Node: registers node
- Chat Node → Chat Model: calls model
agent-service/app/graph/nodes/chat.py - Chat Node → Prompt Templates: uses prompts
agent-service/app/graph/nodes/chat.py - Turn Runtime → Conversation State: creates state
agent-service/app/graph/runtime.py - Conversation Repository → Conversation Records: stores conversations
- Conversation Repository → Message Records: stores messages
- Chat API → Graph Checkpoint: opens checkpoint
agent-service/app/main.py - Business Debug API → Order Service: calls order service
business-service/src/main/java/com/shangui/userhelp/business/api/BusinessController.java - Business Debug API → Logistics Service: calls logistics service
business-service/src/main/java/com/shangui/userhelp/business/api/BusinessController.java - Business Debug API → Aftersales Service: calls aftersales
business-service/src/main/java/com/shangui/userhelp/business/api/BusinessController.java - Business Debug API → Refund Service: calls refund service
business-service/src/main/java/com/shangui/userhelp/business/api/BusinessController.java - Business Debug API → Ticket Service: calls ticket service
business-service/src/main/java/com/shangui/userhelp/business/api/BusinessController.java - Business gRPC → Order Service: dispatches RPC
README.md - Business gRPC → Logistics Service: dispatches RPC
README.md - Business gRPC → Aftersales Service: dispatches RPC
README.md - Business gRPC → Refund Service: dispatches RPC
README.md - Business gRPC → Ticket Service: dispatches RPC
README.md - Protobuf Contract → Business gRPC: defines contract
README.md - Gateway / BFF → Chat API: planned HTTP/SSE
README.md - Business Tools → Business gRPC: planned gRPC calls
README.md - Answer Graph → Knowledge Retrieval: planned retrieval
README.md