How rajmohandp/workassistai works
WorkAssist AI serves employee support through a Streamlit chat and a FastAPI backend. Requests are classified and routed to PTO balance assistance, document retrieval, or combined answers; administrators can synchronize S3 documents into Pinecone. The graph preserves the documented ingestion, conversational RAG, guardrail, citation, and handoff capabilities. Several service and UI links are based on the README or SOURCE INDEX rather than complete source excerpts; those limits are reflected by omitting uncertain edges or marking them unverified.
Main entry points: vector_store.py Index and sync · routes.py HTTP routes · nodes.py Agent actions · graph.py Request graph
Components 26
User interfaces
- Streamlit chat
app.py - API client
app/frontend_client.py
API and agent orchestration
- HTTP routes
app/api/routes.py - API schemas
app/api/schemas.py - Request graph
app/agent/graph.py - Intent router
app/agent/router.py - Agent actions
app/agent/nodes.py - Conversation state
app/agent/state.py
Document knowledge
- RAG service
app/services/rag_service.py - RAG answer chain
src/rag_chain.py - Semantic retrieval
src/retriever.py - RAG guardrails
src/guardrails.py - S3 document loader
src/s3_loader.py - Chunk processor
src/document_processor.py - Embedding provider
src/embeddings.py - Index and sync
src/vector_store.py
PTO and support
- PTO tool
app/tools/pto_tool.py - PTO repository
app/repositories/pto_repository.py - Human handoff
app/services/handoff_service.py
Identity and operations
- Authentication
app/core/security.py - Structured logging
src/logging_config.py
Other components
- Employee
- Administrator
- Amazon S3
- Pinecone index
- Employee database
Connections 28
- Employee → Streamlit chat: asks question
README.md - Administrator → Streamlit chat: manages sync
README.md - Streamlit chat → API client: uses
app.py - API client → HTTP routes: sends requests
- HTTP routes → API schemas: validates requests
app/api/routes.py - HTTP routes → Authentication: authenticates
app/api/routes.py - HTTP routes → Request graph: executes
app/api/routes.py - Request graph → Intent router: classifies
app/agent/graph.py - Request graph → Agent actions: dispatches
app/agent/graph.py - Request graph → Conversation state: carries state
app/agent/graph.py - Agent actions → PTO tool: invokes
app/agent/nodes.py - Agent actions → RAG service: invokes
app/agent/nodes.py - Agent actions → Human handoff: requests support
app/agent/nodes.py - PTO tool → PTO repository: reads balances
app/tools/pto_tool.py - PTO repository → Employee database: queries
app/repositories/pto_repository.py - RAG service → RAG answer chain: runs answer flow
app/services/rag_service.py - RAG answer chain → Semantic retrieval: retrieves evidence
src/rag_chain.py - RAG answer chain → RAG guardrails: checks content
src/rag_chain.py - Semantic retrieval → Index and sync: searches index
src/retriever.py - Index and sync → Pinecone index: indexes and deletes vectors
README.md - Index and sync → S3 document loader: scans documents
src/vector_store.py - Index and sync → Chunk processor: chunks documents
src/vector_store.py - Index and sync → Embedding provider: embeds chunks
src/vector_store.py - S3 document loader → Amazon S3: lists and loads
README.md - Administrator → Index and sync: initiates synchronization
README.md - HTTP routes → Index and sync: requests sync
app/api/routes.py - Agent actions → PTO repository: looks up balances
app/agent/nodes.py - HTTP routes → Structured logging: logs operations