How m4raa/mage works
Mage is an Electron desktop workbench for managing and supervising coding-agent conversations; it does not normally supply the agent model. The user works in a multi-pane UI, starts a conversation with a provider, reviews permission requests, and can inspect or reopen transcripts. Separate branches cover accounts and usage, shared MCP configuration, browser tools, Git/worktrees, scheduled tasks, and artifacts. The README documents these capabilities; sampled source confirms key renderer and session responsibilities, but many runtime links are shown only at the product level.
Main entry points: App.tsx Workbench UI · engineBlocks.ts Permission review · providerAdapter.ts Provider adapters · ScheduledTasksView.tsx Scheduled tasks UI
Components 20
Desktop workbench
- Workbench UI
src/renderer/src/App.tsx - Renderer entry
src/renderer/src/main.tsx - Workbench state
src/renderer/src/workbench/workbenchStore.ts - Permission review
src/renderer/src/workbench/engineBlocks.ts - Scheduled tasks UI
src/renderer/src/workbench/tasks/ScheduledTasksView.tsx
Agent execution
- Session manager
src/main/engine/sessionManager.ts - Provider adapters
src/main/engine/providerAdapter.ts - Agent CLIs
- OpenAI runtime
src/main/runtime/agentLoop.ts
Conversation management
- Accounts and login
src/main/accounts/accountService.ts - Usage tracking
src/main/usage/usageService.ts - Transcript history
src/main/transcripts/transcriptService.ts - Conversation storage
src/main/conversations/conversationsService.ts - Scheduled task service
src/main/tasks/taskService.ts
Tools and integrations
- MCP configuration
src/main/config/mcpResolved.ts - MCP server
src/main/mcpServer/server.ts - Browser tools
src/main/browser/browserAgent.ts - Git and worktrees
src/main/git/gitService.ts - Artifacts
src/main/artifacts/artifactsService.ts
Other components
- User
Connections 22
- Renderer entry → Workbench UI: mounts
src/renderer/src/main.tsx - User → Workbench UI: uses
README.md - Workbench UI → Workbench state: reads state
src/renderer/src/App.tsx - Workbench UI → Session manager: starts sessions
- Session manager → Provider adapters: resolves provider
src/main/engine/sessionManager.ts - Provider adapters → Agent CLIs: launches CLI
- Provider adapters → OpenAI runtime: selects runtime
- Agent CLIs → Permission review: requests approval
- OpenAI runtime → Permission review: requests approval
- Workbench UI → Permission review: shows requests
src/renderer/src/App.tsx - User → Permission review: approves actions
README.md - User → Accounts and login: adds accounts
README.md - Accounts and login → Usage tracking: tracks limits
- Workbench UI → Transcript history: browses history
- Transcript history → Conversation storage: reads conversations
- User → MCP configuration: manages servers
README.md - MCP configuration → MCP server: configures tools
- MCP server → Browser tools: exposes tools
src/main/mcpServer/server.ts - User → Git and worktrees: manages worktrees
README.md - Workbench UI → Scheduled tasks UI: opens tasks
src/renderer/src/App.tsx - Scheduled tasks UI → Scheduled task service: runs tasks
- User → Artifacts: views artifacts
README.md