How guts-yang/opswarden works
OpsWarden is an operations-support platform: employees ask questions in the web app, receive RAG or agent-assisted answers, and can confirm ticket creation when knowledge is insufficient. Operators manage ticket lifecycles and write solutions back into the knowledge base, while administrators manage accounts; analytics provides operational summaries. The map includes the documented two-stage retrieval, chat fallback, persisted agent conversations, and major UI areas. Relationships reflect README or shown source references; unsampled implementation details are represented only at their known directory paths.
Main entry points: main.py FastAPI application · client.js API client · graph.py Agent orchestration · account.py Account records
Components 34
Web client
- Vue application
frontend/src/App.vue - AI chat
frontend/src/views/AiChatView.vue - Ticket management
frontend/src/views/TicketsView.vue - Knowledge management
frontend/src/views/KnowledgeBaseView.vue - Account management
frontend/src/views/AccountsView.vue - Dashboard
frontend/src/views/DashboardView.vue - API client
frontend/src/api/client.js
API and access
- FastAPI application
backend/app/main.py - Authentication API
backend/app/api/auth.py - Account API
backend/app/api/account.py - Ticket API
backend/app/api/ticket.py - Knowledge API
backend/app/api/knowledge.py - Analytics API
backend/app/api/analytics.py - Authentication and roles
backend/app/middleware/auth.py - Chat API
backend/app/api/chat.py
AI assistance
- Chat workflow
backend/app/graphs/chat_workflow.py - Agent orchestration
backend/app/agent/graph.py - LLM decisions
backend/app/agent/llm.py - Agent tools
backend/app/agent/tools.py - Fallback chat
backend/app/rag/chat_pipeline.py - Two-stage retrieval
backend/app/rag/retriever.py - Text embeddings
backend/app/rag/embedder.py - Answer generation
backend/app/rag/llm.py - FAQ loading
backend/app/rag/faq_loader.py - Agent trace
backend/app/agent/trace.py - Conversation checkpoints
backend/app/checkpointer/runtime.py
Persistence
- PostgreSQL and pgvector
backend/app/database.py - Account records
backend/app/models/account.py - Ticket records
backend/app/models/ticket.py - Knowledge entries and anchors
backend/app/models/knowledge.py
Other components
- Employee
- Operator
- Administrator
- Local model service
Connections 48
- Employee → Vue application: uses
- Operator → Vue application: uses
- Administrator → Vue application: uses
- Vue application → AI chat: renders
frontend/src/App.vue - Employee → AI chat: asks
- Operator → Ticket management: manages
- Operator → Knowledge management: manages
- Operator → Dashboard: reviews
- Administrator → Account management: manages
- AI chat → API client: requests
- Ticket management → API client: requests
- Knowledge management → API client: requests
- Account management → API client: requests
- Dashboard → API client: requests
- API client → FastAPI application: calls
- FastAPI application → Authentication API: registers
backend/app/main.py - FastAPI application → Account API: registers
backend/app/main.py - FastAPI application → Ticket API: registers
backend/app/main.py - FastAPI application → Analytics API: registers
backend/app/main.py - FastAPI application → Knowledge API: registers
backend/app/main.py - FastAPI application → Chat API: registers
backend/app/main.py - Authentication API → Account records: queries
backend/app/api/auth.py - Authentication and roles → Account records: checks
backend/app/middleware/auth.py - Chat API → Chat workflow: invokes
backend/app/api/chat.py - Chat API → Fallback chat: falls back
backend/app/api/chat.py - Chat workflow → Agent orchestration: orchestrates
- Agent orchestration → LLM decisions: requests decisions
- Agent orchestration → Agent tools: dispatches tools
- Agent orchestration → Conversation checkpoints: persists state
- Agent orchestration → Agent trace: records trace
- LLM decisions → Local model service: requests completion
backend/app/agent/llm.py - Fallback chat → Two-stage retrieval: searches
backend/app/rag/chat_pipeline.py - Fallback chat → Answer generation: generates answer
backend/app/rag/chat_pipeline.py - Two-stage retrieval → Text embeddings: embeds query
backend/app/rag/retriever.py - Two-stage retrieval → PostgreSQL and pgvector: reads and writes
backend/app/rag/retriever.py - Fallback chat → Ticket records: checks ticket sequence
backend/app/rag/chat_pipeline.py - Answer generation → Local model service: requests completion
- FastAPI application → FAQ loading: loads FAQs
backend/app/main.py - Account API → Account records: manages
backend/app/api/account.py - Ticket API → Ticket records: manages
backend/app/api/ticket.py - Ticket API → Knowledge entries and anchors: writes solutions
backend/app/api/ticket.py - Knowledge API → Knowledge entries and anchors: manages
backend/app/api/knowledge.py - Knowledge API → Two-stage retrieval: indexes entries
backend/app/api/knowledge.py - Analytics API → Account records: summarizes
backend/app/api/analytics.py - Analytics API → Ticket records: summarizes
backend/app/api/analytics.py - Analytics API → Knowledge entries and anchors: summarizes
backend/app/api/analytics.py - PostgreSQL and pgvector → Account records: stores
backend/app/models/account.py - PostgreSQL and pgvector → Ticket records: stores
backend/app/models/ticket.py