How alyab16/employee-onboarding-agent works
An employee uses the chat UI to request onboarding actions or policy answers. The chat API streams a supervisor-led specialist workflow; write-capable actions pause for review, then resume through the API. Specialists use MCP integrations for HR, training, access approvals/tickets and related SaaS records, or the knowledge tools for hybrid policy retrieval. The README documents checkpointed conversation state and configurable model/tracing integrations; their implementations are not sampled here, so uncertain wiring is omitted. MCP and RAG capabilities are represented from the README and tree.
Main entry points: specialists.py Scoped Specialists · orchestrator.py Graph Orchestrator · engine.py Mock SaaS Records · useChat.ts Chat Streaming State
Components 22
Employee UI
- Chat and Approval UI
frontend/app/components/ChatInterface.tsx - Chat Streaming State
frontend/app/hooks/useChat.ts - Editable Approval Card
frontend/app/components/MessageBubble.tsx
Chat Service
- Chat SSE API
backend/api/chat.py - Application Startup
backend/main.py
Agent Workflow
- Graph Orchestrator
backend/agent/orchestrator.py - Supervisor Router
backend/agent/supervisor.py - Scoped Specialists
backend/agent/specialists.py - Write Approval Gate
backend/agent/hitl.py - Graph Checkpoints
Onboarding Integrations
- HR Profile Tools
backend/mcp_servers/hr_server.py - Training Tools
backend/mcp_servers/training_server.py - IT Access Tools
backend/mcp_servers/it_server.py - Slack Tools
backend/mcp_servers/slack_server.py - Salesforce Tools
backend/mcp_servers/salesforce_server.py - Mock SaaS Records
backend/database/engine.py
Policy Knowledge
- Knowledge Search Tools
backend/agent/knowledge_tools.py - Hybrid RAG Index
backend/knowledge/vector_store.py - Policy Documents
Other components
- Employee
- Language Model
- LangSmith Tracing
Connections 32
- Employee → Chat and Approval UI: requests onboarding
- Chat and Approval UI → Chat Streaming State: handles chat
- Chat Streaming State → Chat SSE API: POSTs chat or resume
- Chat SSE API → Graph Orchestrator: streams or resumes
- Graph Orchestrator → Supervisor Router: runs graph
- Supervisor Router → Scoped Specialists: routes turns
- Graph Orchestrator → Chat SSE API: emits SSE events
- Chat SSE API → Chat Streaming State: streams SSE
- Chat Streaming State → Editable Approval Card: renders approval
- Editable Approval Card → Chat Streaming State: submits decision
- Graph Orchestrator → Write Approval Gate: gates writes
- Write Approval Gate → Graph Orchestrator: interrupts or resumes
- Graph Orchestrator → Graph Checkpoints: reads and writes state
- Scoped Specialists → Language Model: requests completions
- Supervisor Router → Language Model: routes with structured output
- Graph Orchestrator → LangSmith Tracing: traces runs
- Scoped Specialists → HR Profile Tools: calls profile tools
- Scoped Specialists → Training Tools: calls training tools
- Scoped Specialists → IT Access Tools: calls access tools
- Scoped Specialists → Slack Tools: calls profile tools
- Scoped Specialists → Salesforce Tools: calls profile tools
- HR Profile Tools → Mock SaaS Records: reads and writes
- Training Tools → Mock SaaS Records: reads and writes
- IT Access Tools → Mock SaaS Records: reads and writes
- Slack Tools → Mock SaaS Records: reads and writes
- Salesforce Tools → Mock SaaS Records: reads and writes
- Scoped Specialists → Knowledge Search Tools: calls search tool
- Knowledge Search Tools → Hybrid RAG Index: queries index
- Policy Documents → Hybrid RAG Index: indexed at startup
- Application Startup → Graph Orchestrator: creates runtime
- Application Startup → Hybrid RAG Index: initializes index
- Application Startup → Mock SaaS Records: initializes database