How hritvikgupta/worklone works
Worklone is a self-hosted AI workforce platform: users manage employees and teams, then chat or assign work for agents to reason, invoke tools, and return results. Its backend also documents workflows, integrations, scheduling, realtime dispatch, and employee learning; these are retained as distinct branches. The excerpts establish API routing, frontend navigation, persistence helpers, and worker startup, but not most agent, workflow, or dispatch internals, so those links are shown only when README or indexed caller references support them. The integration catalog is represented as one subsystem rather than enumerating hundreds of tools.
Main entry points: routes.py API router · main.py FastAPI application · employee.py Employee endpoints · workflows.py Workflow endpoints
Components 29
User experience
- Worklone app
frontend/src/App.tsx
API and identity
- FastAPI application
backend/api/main.py - API router
backend/api/routes.py - Auth endpoints
backend/api/routers/auth.py - Employee endpoints
backend/api/routers/employee.py - Chat endpoint
backend/api/routers/chat.py - Workflow endpoints
backend/api/routers/workflows.py - Team endpoints
backend/api/routers/teams.py - Dashboard endpoints
backend/api/routers/dashboard.py - Identity service
backend/lib/auth/service.py
AI workforce
- Employee service
backend/services/employee_service.py - ReAct employee
backend/core/agents/employee/react_agent.py - Product employee
backend/core/agents/product_manager/katy.py - Product service
backend/services/katy_service.py - Learning loop
backend/core/agents/evolution
Work execution
- Tool catalog
backend/core/tools/catalog.py - Tool interface
backend/core/tools/system_tools/base.py - Integration tools
backend/core/tools/integration_tools_v2 - Workflow engine
backend/core/workflows - Dispatch coordination
backend/core/dispatch - Background worker
backend/worker/main.py - Realtime sockets
backend/realtime/socket_server.py - Notion integration
backend/core/tools/integration_tools_v2/notion/query_database.py
Persistence and integrations
- SQLite database
backend/db/database.py - Auth and chat store
backend/db/stores/auth_store.py - Workflow store
backend/db/stores/workflow_store.py - OAuth resolution
backend/lib/oauth/oauth_common.py
Other components
- Organization user
- Business services
Connections 35
- Organization user → Worklone app: uses
README.md - Worklone app → FastAPI application: requests
- FastAPI application → API router: mounts
backend/api/main.py - API router → Auth endpoints: routes to
backend/api/routes.py - API router → Employee endpoints: routes to
backend/api/routes.py - API router → Chat endpoint: routes to
backend/api/routes.py - API router → Workflow endpoints: routes to
backend/api/routes.py - API router → Team endpoints: routes to
backend/api/routes.py - API router → Dashboard endpoints: routes to
backend/api/routes.py - Auth endpoints → Identity service: delegates to
backend/api/routers/auth.py - Identity service → Auth and chat store: reads and writes
backend/lib/auth/service.py - Chat endpoint → Product service: delegates to
backend/api/routers/chat.py - Product service → Product employee: invokes
backend/services/katy_service.py - Employee endpoints → Employee service: delegates to
backend/api/routers/employee.py - Employee service → ReAct employee: invokes
backend/services/employee_service.py - Employee endpoints → Tool catalog: uses
backend/api/routers/employee.py - ReAct employee → Tool catalog: selects tools
- Tool catalog → Tool interface: registers tools
- Integration tools → Tool interface: implements
backend/core/tools/integration_tools_v2/notion/query_database.py - Notion integration → OAuth resolution: resolves token
backend/core/tools/integration_tools_v2/notion/query_database.py - Notion integration → Business services: calls Notion
backend/core/tools/integration_tools_v2/notion/query_database.py - ReAct employee → Learning loop: learns from use
- Workflow endpoints → Workflow store: persists workflows
- Workflow endpoints → Workflow engine: starts workflows
- FastAPI application → Workflow store: starts scheduler
backend/api/main.py - FastAPI application → Dispatch coordination: starts dispatcher
backend/api/main.py - FastAPI application → Realtime sockets: mounts sockets
backend/api/main.py - Dispatch coordination → Background worker: queues jobs
backend/worker/main.py - Background worker → Dispatch coordination: consumes jobs
backend/worker/main.py - Auth and chat store → SQLite database: opens SQLite
backend/db/stores/auth_store.py - Workflow store → SQLite database: uses SQLite
backend/db/stores/workflow_store.py - Dashboard endpoints → Auth and chat store: reads data
- Dashboard endpoints → SQLite database: queries data
backend/api/routers/dashboard.py - Team endpoints → Employee service: coordinates employees
- Organization user → Business services: connects integrations
README.md