How pavithra-ssg/sd-assistant works
SD Assistant is an IT service desk: employees describe an issue in chat or a form, receive policy-gated guided fixes, and reach a human queue with the conversation and evidence attached when needed. Agents handle queued tickets; supervisors manage knowledge, users, and service performance. The diagram covers the documented OCR, authentication, ticket lifecycle, alerting, analytics, and privacy capabilities. Relationships follow the excerpts, SOURCE INDEX references, and README; some route-level details are unsampled, so they are not expanded.
Main entry points: api.py FastAPI routes · orchestrator.py Conversation policy · store.py Relational store · tickets.py Ticket lifecycle
Components 25
User experience
- Chat and forms
pages/employee_chat.py - Ticket views
pages/ticket.py - Admin and insights
pages/knowledge.py - HTTP client
ui/client.py
API and identity
- FastAPI routes
api.py - Authentication
servicedesk/services/auth.py
Guided support
- Conversation policy
servicedesk/orchestrator.py - Jev judgments
servicedesk/brain.py - Knowledge and policy
servicedesk/knowledge.py - Screenshot OCR
servicedesk/services/attachments.py - Verified tools
servicedesk/tools.py
Ticket operations
- Ticket lifecycle
servicedesk/services/tickets.py - Alerts and SLA
servicedesk/services/alerts.py - Service analytics
servicedesk/services/analytics.py - Article management
servicedesk/services/kb.py - Privacy controls
servicedesk/services/privacy.py - Notifications
servicedesk/services/notify.py - Background worker
worker.py
Data and services
- Relational store
servicedesk/store.py - Audit events
servicedesk/logs.py
Other components
- Employees
- IT agents
- Supervisors
- Email and Teams
- SQLite or Postgres
Connections 38
- Employees → Chat and forms: describe issue
- IT agents → Ticket views: work tickets
- Supervisors → Admin and insights: manage service
- Chat and forms → HTTP client: call API
ui/client.py - Ticket views → HTTP client: call API
ui/client.py - Admin and insights → HTTP client: call API
ui/client.py - HTTP client → FastAPI routes: HTTP requests
ui/client.py - FastAPI routes → Authentication: authenticate
api.py - FastAPI routes → Conversation policy: route conversations
api.py - FastAPI routes → Screenshot OCR: process uploads
api.py - FastAPI routes → Ticket lifecycle: route ticket actions
api.py - FastAPI routes → Service analytics: serve analytics
api.py - FastAPI routes → Article management: manage articles
api.py - FastAPI routes → Privacy controls: serve privacy actions
api.py - Conversation policy → Jev judgments: request judgments
servicedesk/orchestrator.py - Conversation policy → Knowledge and policy: apply policy
servicedesk/orchestrator.py - Conversation policy → Screenshot OCR: use OCR evidence
servicedesk/orchestrator.py - Conversation policy → Verified tools: invoke verified actions
servicedesk/orchestrator.py - Conversation policy → Ticket lifecycle: request transitions
servicedesk/orchestrator.py - Conversation policy → Alerts and SLA: escalate cases
servicedesk/orchestrator.py - Conversation policy → Notifications: send updates
servicedesk/orchestrator.py - Ticket lifecycle → Alerts and SLA: raise alerts
servicedesk/services/tickets.py - Alerts and SLA → Knowledge and policy: read routing and SLA
servicedesk/services/alerts.py - Service analytics → Ticket lifecycle: read ticket data
servicedesk/services/analytics.py - Background worker → Alerts and SLA: tick timers
worker.py - Background worker → Ticket lifecycle: sweep tickets
worker.py - Background worker → Notifications: send outbox
worker.py - Background worker → Privacy controls: run retention
worker.py - Notifications → Email and Teams: deliver messages
servicedesk/services/notify.py - Authentication → Relational store: read and write
servicedesk/services/auth.py - Screenshot OCR → Relational store: save metadata
servicedesk/services/attachments.py - Ticket lifecycle → Relational store: persist lifecycle
servicedesk/services/tickets.py - Alerts and SLA → Relational store: persist alerts
servicedesk/services/alerts.py - Notifications → Relational store: persist notifications
servicedesk/services/notify.py - Privacy controls → Relational store: read and update
servicedesk/services/privacy.py - Article management → Relational store: persist articles
servicedesk/services/kb.py - Relational store → SQLite or Postgres: use backend
servicedesk/store.py - FastAPI routes → Audit events: audit actions
api.py