How openbmb/staffdeck works
StaffDeck is an enterprise platform for building and operating digital employees. The principal workflow runs from configuring an employee and its SOP, knowledge, and capabilities, through a user or scheduled task, to model-guided execution of business operations and a traceable result. The README also describes channels, citations, memory, human takeover, and feedback as product capabilities. The map combines those documented stages with the sampled Harness v3 composition and execution layers; links for unsampled subsystems are marked unverified rather than inferred as direct calls.
Main entry points: engine_host.py Harness v3 Engine · main.py Application API · turn_coordinator.py Turn Coordinator · App.tsx Enterprise UI
Components 21
User Experience
- Enterprise UI
frontend-enterprise/src/App.tsx - Application API
backend/app/main.py - Chat Session
frontend-enterprise/src/pages/chat/useChatSession.ts - IM Channels
backend/app/channels
Employee Setup
- Digital Employees
backend/app/api/agents.py - Procedural SOPs
backend/app/skills - Composition Snapshot
backend/src/staffdeck_harness/composition/compiler.py - Module Registry
backend/src/staffdeck_harness/modules/registry.py
Execution Runtime
- Turn Coordinator
backend/app/core/turn_coordinator.py - Harness v3 Engine
backend/src/staffdeck_harness/bridge/engine_host.py - Model Service
backend/app/llm/client.py
Business Capabilities
- Business Operations
backend/app/tools/tool_executor.py - Knowledge Retrieval
backend/app/knowledge/service.py - General Skills
backend/app/general_skills/runner.py - Scheduled Tasks
backend/app/scheduled_tasks/worker.py
State and Improvement
- Application Data
backend/app/db/models.py - Long-term Memory
backend/app/memory/service.py - Execution Traces
backend/app/observability/event_log.py - Feedback Loop
backend/app/feedback/service.py - Human Takeover
backend/app/core/human_handoff_service.py
Other components
- User
Connections 22
- User → Enterprise UI: uses
README.md - Enterprise UI → Application API: requests
- User → IM Channels: messages
- Enterprise UI → Chat Session: opens chat
- Chat Session → Application API: submits turn
- Application API → Digital Employees: manages
backend/app/main.py - Digital Employees → Procedural SOPs: configures
README.md - Digital Employees → Composition Snapshot: composes
backend/src/staffdeck_harness/composition/compiler.py - Module Registry → Composition Snapshot: provides hooks
backend/src/staffdeck_harness/composition/compiler.py - Application API → Turn Coordinator: starts turns
- Turn Coordinator → Harness v3 Engine: dispatches
backend/src/staffdeck_harness/bridge/engine_host.py - Harness v3 Engine → Model Service: runs model stages
- Harness v3 Engine → Business Operations: invokes operations
- Harness v3 Engine → Knowledge Retrieval: retrieves sources
- Harness v3 Engine → General Skills: uses skills
- Scheduled Tasks → Turn Coordinator: starts work
- Knowledge Retrieval → Application Data: reads indexed content
- Long-term Memory → Application Data: stores memories
- Harness v3 Engine → Execution Traces: records activity
backend/src/staffdeck_harness/bridge/engine_host.py - User → Feedback Loop: provides feedback
README.md - Harness v3 Engine → Human Takeover: requests takeover
README.md - IM Channels → Turn Coordinator: routes messages