How mohamedhishm/ai-agents-at-work works
ELDOCTOR is a web-based operations agent for auto-parts businesses. A user signs in, sends a request through the frontend, and the FastAPI backend invokes the LangGraph agent; the agent uses customer/admin tools and JSON-backed business data to answer or manage an order. Order proposals require user confirmation before deterministic creation. The README also documents inventory summaries, low-stock checks, reorder drafts, order tracking, and role separation. The source index shows a second agent implementation under backend/agent; its relationship to the documented eldockor runtime is not established by the excerpts.
Main entry points: eldockor/graph.py Conversation workflow · router.py API routes · agent/graph.py Backend agent graph · page.js Operations UI
Components 24
Web client
- Operations UI
frontend/app/dashboard/page.js - Chat interface
frontend/components/Chat.js - Login flow
frontend/app/login/page.js - API client
frontend/lib/api.js
Backend API
- FastAPI app
backend/app/main.py - API routes
backend/app/api/router.py - Authentication
backend/app/services/auth_service.py - Agent service
backend/app/services/agent_service.py - Task routes
backend/app/api/routes/tasks.py - Task operations
backend/app/services/task_service.py
Agent runtime
- Conversation workflow
eldockor/graph.py - LLM adapter
eldockor/llm.py - Agent prompts
eldockor/prompts.py - Customer tools
eldockor/tools_customer.py - Admin tools
eldockor/tools_admin.py - Backend agent graph
backend/agent/agent/graph.py - Backend prompts
backend/agent/agent/prompts.py - Backend admin tools
backend/agent/agent/tools_admin.py
Business data
- Agent FileStore
eldockor/store/file_store.py - User repository
backend/app/repositories/user_repository.py - Order repository
backend/app/repositories/order_repository.py - JSON file access
backend/app/repositories/json_file.py - Backend FileStore
backend/agent/agent/store/file_store.py
Other components
- Customer / admin
Connections 22
- Customer / admin → Operations UI: uses
- Operations UI → FastAPI app: requests API
- Chat interface → API client: sends messages
- Login flow → API client: authenticates via
- FastAPI app → API routes: mounts routes
backend/app/main.py - API routes → Agent service: routes agent requests
- API routes → Authentication: routes authentication
- API routes → Task routes: includes
backend/app/api/router.py - Task routes → Task operations: delegates tasks
backend/app/api/routes/tasks.py - Agent service → Conversation workflow: invokes agent
backend/app/services/agent_service.py - Conversation workflow → LLM adapter: invokes model
eldockor/graph.py - Conversation workflow → Agent prompts: uses prompts
eldockor/graph.py - Conversation workflow → Customer tools: dispatches customer tools
eldockor/graph.py - Conversation workflow → Admin tools: dispatches admin tools
eldockor/graph.py - Conversation workflow → Agent FileStore: reads and writes
eldockor/graph.py - Authentication → User repository: looks up users
backend/app/services/auth_service.py - Task operations → Order repository: manages orders
backend/app/services/task_service.py - User repository → JSON file access: reads and writes
backend/app/repositories/user_repository.py - Order repository → JSON file access: reads and writes
backend/app/repositories/order_repository.py - Backend agent graph → Backend prompts: uses prompts
backend/agent/agent/graph.py - Backend agent graph → Backend admin tools: uses admin tools
backend/agent/agent/graph.py - Backend agent graph → Backend FileStore: uses store
backend/agent/agent/graph.py