How playa-cyrene/cyrene-agent works
Cyrene-Agent is a Windows Live2D desktop companion whose central workflow is user chat through the renderer and main-process agent runtime to an LLM and, in Work/Code/Learn, optional tools; replies and run state return to the UI. The repository also documents long-term memory, voice, external chat channels, plugins, learning, proactive delivery, and desktop character interaction. Edges are limited to relationships described in the README or visible in the provided excerpts; several feature implementations were not sampled, so their internal wiring is not asserted.
Main entry points: cyrene-harness.ts CyreneHarness · AgentRunController.ts Chat UI · index.ts Renderer bridge · manager.ts Live2D character
Components 33
Desktop experience
- Chat UI
src/renderer/react/features/chat/pages/run/AgentRunController.ts - Chat views
src/renderer/react/features/chat/components/ChatMessageList.tsx - Chat state types
src/shared/chat-types.ts - Renderer bridge
src/preload/index.ts - IPC contracts
src/shared/ipc-channels.ts - Live2D character
src/renderer/live2d/manager.ts - Character interaction
src/renderer/live2d/interaction.ts - Renderer base
src/shared/renderer-base.ts
Agent runtime
- Agent UI bridge
src/main/agui-bridge.ts - Run controller
src/renderer/react/features/chat/pages/run/AgentRunController.ts - CyreneHarness
src/main/orchestrator/harness/cyrene-harness.ts - Run presentation
src/renderer/react/features/chat/components/agent-rounds.ts - Run status
src/renderer/react/features/chat/components/run-presentation.ts - Conversation transcript
src/main/orchestrator/conversation-transcript-coordinator.ts - Model vendors
src/main/orchestrator/vendors/index.ts - Output profiles
src/main/orchestrator/structured-output/profiles.ts - Structured output
src/main/orchestrator/structured-output/runner.ts - Context usage
src/shared/context-usage.ts - Token accounting
src/main/token-usage-store.ts
Knowledge and tools
- DMAE memory
src/main/memory/memory-manager.ts - RAG retrieval
src/main/rag/retriever.ts - Agent tools
src/main/orchestrator/tools - Learn workspace
src/main/learn/obsidian/obsidian-workspace-service.ts
Channels and extensions
- Chat channels
src/main/channels/dispatcher.ts - Plugin runtime
src/plugins/manager.ts - Plugin SDK contract
src/shared/plugin-management.ts - Proactive delivery
src/main/proactive/proactive-service.ts
Voice and services
- Speech services
src/main/tts/tts-dispatcher.ts - Speech recognition
src/main/asr/asr-dispatcher.ts - Screenshot helper
native/cyrene-screenshot/src/app.rs - Sticker matching
src/main/sticker-descriptions.ts - Music player
src/main/music/music-service.ts
Other components
- User
Connections 31
- User → Chat UI: sends message
README.md - Chat UI → Renderer bridge: uses bridge
src/renderer/react/features/chat/pages/run/AgentRunController.ts - Renderer bridge → IPC contracts: invokes channels
src/preload/index.ts - Chat UI → Run controller: controls run
src/renderer/react/features/chat/pages/run/AgentRunController.ts - Run controller → Agent UI bridge: starts run
- Agent UI bridge → CyreneHarness: dispatches run
- CyreneHarness → Model vendors: requests model
README.md - CyreneHarness → Agent tools: dispatches tools
README.md - CyreneHarness → Conversation transcript: checkpoints run
README.md - Run controller → Run presentation: renders rounds
src/renderer/react/features/chat/pages/run/AgentRunController.ts - Run controller → Run status: resolves status
src/renderer/react/features/chat/pages/run/AgentRunController.ts - Chat UI → Chat views: presents messages
src/renderer/react/features/chat/pages/run/AgentRunController.ts - Chat views → Chat state types: uses message shapes
src/renderer/react/features/chat/components/TaskSessionInspector.tsx - Renderer bridge → Live2D character: exposes character APIs
- Live2D character → Character interaction: uses hit areas
src/renderer/live2d/manager.ts - Live2D character → Renderer base: uses shared base
- Structured output → Output profiles: uses profiles
src/main/cita/remote-semantic-engine.ts - Model vendors → Structured output: supports structured output
- CyreneHarness → Context usage: emits snapshots
README.md - CyreneHarness → Token accounting: accounts usage
- CyreneHarness → DMAE memory: uses long-term memory
README.md - CyreneHarness → RAG retrieval: retrieves knowledge
- Agent tools → Learn workspace: supports Learn mode
README.md - Chat channels → CyreneHarness: shares agent capability
README.md - Plugin runtime → Plugin SDK contract: implements plugin API
src/plugins/manager.ts - Proactive delivery → Chat channels: delivers to channels
README.md - Speech services → User: speaks replies
README.md - User → Speech recognition: provides speech
README.md - Screenshot helper → Chat UI: provides captures
- Sticker matching → Chat UI: enriches replies
README.md - Music player → Agent tools: provides music tools
README.md