How wecode-ai/wegent works
Wegent combines a local coding workbench, browser-based agents, and a self-hostable backend for shared projects and remote execution. The main workflow is a user creating a task in the workbench, which routes it to Executor; Executor drives Codex against a project and returns activity and results for review. Project-space collaboration and backend services extend that workflow across people and devices. Relationships among documented product pieces use README evidence; source-level edges are limited to relationships visible in the supplied excerpts or SOURCE INDEX.
Main entry points: router.py Backend APIs · useWorkbenchRuntimeTasks.ts Desktop workbench · standard_engine.rs Executor · retrieval_service.py RAG retrieval
Components 23
Desktop execution
- Desktop workbench
wework/src/features/workbench/useWorkbenchRuntimeTasks.ts - Executor
executor/src/agents/codex/standard_engine.rs - Codex agent
- Conversation scrolling
packages/collaboration/src/conversation/useConversationScrollController.tsx - Runtime transcripts
wework/src/features/workbench/useWorkbenchRuntimeTasks.ts
Project collaboration
- Workspace controller
packages/collaboration/src/workspace-controller/useCollaborationWorkspaceController.ts - Platform controller
packages/collaboration/src/platform/useCollaborationPlatformController.ts - Shared workspace API
packages/collaboration/src/ports/SharedWorkspaceApi.ts - Project board
packages/collaboration/src/board.ts - Wegent Web
Backend services
- Backend APIs
backend/app/api/router.py - Backend configuration
backend-rs/src/config.rs - Backend state
backend-rs/src/state.rs - Execution devices
backend-rs/src/devices.rs - Task routing
backend-rs/src/task_routing.rs - Pipeline stages
backend-rs/src/task_pipeline_stage_info.rs - JSON compatibility
backend-rs/src/json_compat.rs - Skills
backend-rs/src/skills/skills_unified.rs - Backend logging
backend/app/core/logging.py
Knowledge services
- RAG retrieval
backend/app/services/rag/retrieval_service.py - Knowledge ingestion
knowledge_engine/knowledge_engine/ingestion/pipeline.py
Other components
- User
- Local project
Connections 22
- User → Desktop workbench: creates tasks
README.md - Desktop workbench → Executor: sends tasks
README.md - Executor → Codex agent: drives agent
README.md - Codex agent → Local project: works on files
README.md - Executor → Desktop workbench: returns activity
README.md - User → Wegent Web: uses agents
README.md - Wegent Web → Backend APIs: uses backend
README.md - Desktop workbench → Shared workspace API: shares project work
README.md - Workspace controller → Shared workspace API: loads snapshots
packages/collaboration/src/workspace-controller/useCollaborationWorkspaceController.ts - Platform controller → Shared workspace API: loads workspace data
packages/collaboration/src/platform/useCollaborationPlatformController.ts - Workspace controller → Project board: uses board helpers
packages/collaboration/src/workspace-controller/useCollaborationWorkspaceController.ts - Backend APIs → Task routing: routes tasks
- Backend APIs → Execution devices: manages devices
README.md - Backend APIs → Skills: offers Skills
- Backend APIs → RAG retrieval: serves knowledge
README.md - Knowledge ingestion → RAG retrieval: supplies indexed content
- Backend configuration → Backend state: configures services
backend-rs/src/state.rs - Backend state → Pipeline stages: provides task state
backend-rs/src/task_pipeline_stage_info.rs - Pipeline stages → JSON compatibility: uses JSON types
backend-rs/src/task_pipeline_stage_info.rs - RAG retrieval → Backend logging: logs retrieval
backend/app/services/rag/retrieval_service.py - Desktop workbench → Runtime transcripts: fetches transcripts
wework/src/features/workbench/useWorkbenchRuntimeTasks.ts - Conversation scrolling → Runtime transcripts: renders transcript gaps
packages/collaboration/src/conversation/useConversationScrollController.tsx