How lasithhaputhanthri/chatbot works
This is an autonomous Windows desktop AI assistant: a user chats through a floating Tauri/React UI, the backend streams lifecycle updates while an agent plans and executes tools, and results may include workspace changes, documents, presentations, research, database operations, or retrieval-grounded answers. The graph preserves these major product branches and the approval, verification, and persistence layers. Evidence is limited to README statements and SOURCE INDEX references; unsampled implementation details and some runtime wiring are not inferred.
Main entry points: registry.py Tool registry · App.tsx Desktop application · service.py Agent orchestration · PermissionManager.tsx Permissions inbox
Components 21
Desktop experience
- Desktop application
desktop/src/App.tsx - Chat panel
desktop/src/components/ChatPanel/ChatPanel.tsx - Permissions inbox
desktop/src/components/PermissionManager/PermissionManager.tsx - Assistant state
desktop/src/state/assistantMachine.ts - Backend client
desktop/src/api/backendClient.ts
Agent orchestration
- Chat service
backend/app/services/chat_service.py - Agent orchestration
backend/app/orchestration/service.py - Agent graph
backend/app/orchestration/graph.py - Tool registry
backend/app/services/tools/registry.py - Approval and recovery
backend/app/orchestration/approvals.py
Workspace operations
- Workspace security
backend/app/services/workspace.py - Filesystem tools
backend/app/services/filesystem - Document automation
backend/app/services/documents - Presentation automation
backend/app/services/presentations
Knowledge and research
- Internet research
backend/app/services/research - RAG retrieval
backend/app/services/rag
Backend platform
- Backend API
backend/app/main.py - Database management
backend/app/services/database - Audit logging
backend/app/services/audit.py - Application database
backend/app/core/database.py
Other components
- Desktop user
Connections 24
- Desktop user → Desktop application: uses
README.md - Desktop application → Chat panel: renders
desktop/src/App.tsx - Desktop application → Permissions inbox: opens
desktop/src/App.tsx - Desktop application → Assistant state: owns state
desktop/src/App.tsx - Desktop application → Backend client: sends chat
desktop/src/App.tsx - Backend client → Backend API: streams events
README.md - Backend API → Chat service: routes chat
backend/app/main.py - Chat service → Agent orchestration: starts tasks
- Agent orchestration → Agent graph: runs graph
backend/app/orchestration/service.py - Agent orchestration → Tool registry: uses tools
backend/app/orchestration/service.py - Agent orchestration → Approval and recovery: manages approval
README.md - Tool registry → Filesystem tools: dispatches
backend/app/services/tools/registry.py - Tool registry → Document automation: dispatches
backend/app/services/tools/registry.py - Tool registry → Presentation automation: dispatches
backend/app/services/tools/registry.py - Tool registry → Internet research: dispatches
backend/app/services/tools/registry.py - Tool registry → Database management: dispatches
backend/app/services/tools/registry.py - Tool registry → RAG retrieval: dispatches
- Filesystem tools → Workspace security: confines access
README.md - Document automation → Workspace security: checks permissions
README.md - Presentation automation → Workspace security: checks permissions
README.md - Database management → Application database: uses catalog
backend/app/services/database/catalog.py - Permissions inbox → Backend client: submits decisions
desktop/src/components/PermissionManager/PermissionManager.tsx - Tool registry → Audit logging: records calls
backend/app/services/tools/registry.py - Permissions inbox → Backend API: manages workspaces