How ak6062042-commits/digital-workspace-agent works
Digital Workspace Agent is a local-first assistant for workspace context, task organization, research, and writing help, with user-controlled action boundaries. The main workflow runs from a dashboard or companion client through the authenticated FastAPI control plane: chat is routed through context, planning, and policy-enforcing execution; optional context capture is redacted and persisted for state views and task linking. Major client integrations and capabilities documented in the README are included. Several subsystem links rely on README descriptions because their implementation excerpts were not provided.
Main entry points: main.py FastAPI Control Plane · executor.py Policy Executor · router.py Coordinator Router · db.py SQLite Database
Components 26
User Clients
- React Dashboard
frontend/src/App.jsx - Chat Interface
frontend/src/components/ChatWindow.jsx - API Client
frontend/src/api/client.js - Desktop Widget
system-agent/floating-widget/widget.py - Chrome Companion
system-agent/browser-extension/popup.js - Word Task Pane
system-agent/word-addin/taskpane.js
Control Plane
- FastAPI Control Plane
backend/main.py - Request Security
backend/core/security.py - Privacy Filtering
backend/core/privacy.py
Assistant Workflow
- Coordinator Router
backend/coordinator/router.py - Session Context
backend/coordinator/context_store.py - Intent Planner
backend/orchestration/planner.py - Policy Executor
backend/orchestration/executor.py - State Agent
backend/agents/state_agent.py - Task Agent
backend/agents/task_agent.py - Research Agent
backend/agents/web_agent.py - Suggestion Scheduler
backend/coordinator/scheduler.py
Workspace Data
- SQLite Database
backend/db/db.py - Workspace Records
backend/db/models.py
Local Integrations
- Local State Watcher
system-agent/local-agent/watcher.py - Browser Actions
backend/tools/browser_tool.py - Desktop Actions
backend/tools/os_tool.py - Web Search
backend/tools/search_tool.py - Page Fetching
backend/tools/fetch_tool.py
Other components
- Workspace User
- Search Providers
Connections 32
- Workspace User → React Dashboard: uses
README.md - Workspace User → Desktop Widget: uses
README.md - Workspace User → Chrome Companion: uses
README.md - Workspace User → Word Task Pane: uses
README.md - React Dashboard → Chat Interface: renders
frontend/src/App.jsx - React Dashboard → API Client: requests through
frontend/src/App.jsx - Chat Interface → API Client: sends requests
frontend/src/components/ChatWindow.jsx - API Client → FastAPI Control Plane: calls API
frontend/src/api/client.js - Desktop Widget → FastAPI Control Plane: uses authenticated API
README.md - Chrome Companion → FastAPI Control Plane: syncs opt-in context
README.md - Word Task Pane → FastAPI Control Plane: submits selected text
README.md - Local State Watcher → FastAPI Control Plane: submits snapshots
README.md - FastAPI Control Plane → Request Security: guards requests
README.md - FastAPI Control Plane → Coordinator Router: routes chat
backend/main.py - Coordinator Router → State Agent: reads latest state
backend/coordinator/router.py - Coordinator Router → Session Context: records messages
backend/coordinator/router.py - Coordinator Router → Intent Planner: plans request
backend/coordinator/router.py - Coordinator Router → Policy Executor: executes plan
backend/coordinator/router.py - Policy Executor → State Agent: delegates state
backend/orchestration/executor.py - Policy Executor → Task Agent: delegates tasks
backend/orchestration/executor.py - Policy Executor → Research Agent: delegates research
backend/orchestration/executor.py - Policy Executor → Browser Actions: opens URLs
backend/orchestration/executor.py - Policy Executor → Desktop Actions: launches apps
backend/orchestration/executor.py - Research Agent → Web Search: searches web
backend/agents/web_agent.py - Research Agent → Page Fetching: fetches pages
backend/agents/web_agent.py - Web Search → Search Providers: queries providers
backend/tools/search_tool.py - State Agent → SQLite Database: reads snapshots
backend/agents/state_agent.py - Task Agent → SQLite Database: manages tasks
backend/agents/task_agent.py - FastAPI Control Plane → SQLite Database: persists workspace data
README.md - SQLite Database → Workspace Records: stores records
backend/db/db.py - FastAPI Control Plane → Privacy Filtering: redacts data
README.md - Suggestion Scheduler → SQLite Database: reads and writes suggestions
backend/coordinator/scheduler.py