How qybaihe/mu works
mu is a coding agent with desktop and command-line surfaces; its central workflow is user input, model/tool work, bounded judgments that affect agent decisions, and a completed turn. The README also describes context and lesson management, browser and file-related decision points, teamwork, and hosted or local judges. The tree supports the desktop renderer, Kyrn runtime, bridges, persistence, and judge-related components; source excerpts are partial, so some documented subsystem wiring is intentionally left unspecified.
Main entry points: harness.ts Turn harness · KyrnAgent.ts Kyrn agent · localJudge.ts Judge orchestration · renderer Desktop renderer
Components 20
User interfaces
- Desktop renderer
desktop/packages/desktop/src/renderer - Chat input
desktop/packages/desktop/src/renderer/components/chat/SendBox/index.tsx - Mobile client
desktop/mobile/src/components/chat/ChatScreen.tsx
Agent runtime
- Application bridge
desktop/packages/desktop/src/process/bridge/applicationBridge.ts - Kyrn agent
desktop/packages/desktop/src/process/agent/kyrn/KyrnAgent.ts - Turn harness
desktop/packages/desktop/src/process/agent/kyrn/harness.ts - Conversation session
desktop/packages/desktop/src/process/agent/kyrn/conversationSession.ts - Built-in tools
desktop/packages/desktop/src/process/resources/builtinMcp - Skills service
desktop/packages/desktop/src/process/services/skills/index.ts
Judgment kernel
- Judge orchestration
desktop/packages/desktop/src/process/agent/kyrn/localJudge.ts - Local Laya judge
desktop/packages/desktop/src/process/services/localJudgeOnnx/judge.ts - Hosted judges
desktop/packages/desktop/src/common/kyrn/localJudge.ts - Lesson memory
desktop/packages/desktop/src/process/agent/kyrn/lessons.ts
State and integrations
- Model clients
desktop/packages/desktop/src/common/api/ClientFactory.ts - Conversation database
desktop/packages/desktop/src/process/services/database/schema.ts - Agent settings
desktop/packages/desktop/src/process/agent/kyrn/settings.ts
Other components
- User
- Model provider
- Tool processes
- Judge providers
Connections 20
- User → Chat input: enters request
- Chat input → Desktop renderer: submits input
- User → Mobile client: sends message
- Desktop renderer → Application bridge: invokes RPC
- Mobile client → Kyrn agent: connects to agent
- Application bridge → Kyrn agent: dispatches requests
- Kyrn agent → Turn harness: runs turn
- Turn harness → Model clients: requests model
- Model clients → Model provider: sends prompts
- Model provider → Turn harness: returns response
- Turn harness → Built-in tools: dispatches tools
- Built-in tools → Tool processes: runs operations
- Turn harness → Judge orchestration: asks decisions
- Judge orchestration → Local Laya judge: uses local judge
- Judge orchestration → Hosted judges: uses hosted judge
- Hosted judges → Judge providers: sends questions
- Turn harness → Lesson memory: recalls and captures
- Turn harness → Skills service: loads relevant skills
- Conversation session → Conversation database: persists conversations
- Kyrn agent → Agent settings: reads configuration