How qingyang-520/qingyangai-agent works
QingYangAI-Agent is a native MAUI AI companion, centered on a user chat with an OpenAI-compatible model and optional client-side actions. Its principal workflow combines model replies with perception, tools, and locally stored conversation state; separate branches provide image generation and scheduled proactive care. The graph preserves documented capabilities even where implementation files were not sampled. Some UI-to-service wiring and unsampled subsystems are therefore omitted rather than inferred.
Main entry points: AgentActionExecutor.cs Action executor · DeviceContextService.cs Device context · CareReceiver.cs Care scheduler · ChatPage.xaml.cs Chat interface
Components 23
Chat and agent
- Chat interface
ChatPage.xaml.cs - Agent loop
AgentLoopService.cs - Instruction parser
InstructionParser.cs - Action executor
AgentActionExecutor.cs
Device perception
- Perception API registry
ApiRegistry.cs - Device context
DeviceContextService.cs - Usage stats
Platforms/Android/UsageStatsHelper.cs - Notification capture
Platforms/Android/CareNotificationListener.cs - Accessibility capture
Platforms/Android/QyAccessibilityService.cs - Calendar access
Platforms/Android/CalendarHelper.cs
Proactive companion
- Background observation
CareWatch.cs - Care scheduler
Platforms/Android/CareReceiver.cs - Inner life and heartbeat
InnerLifeService.cs - Care notification
Platforms/Android/CareNotification.cs
Actions and media
- File access controls
FileGuard.cs - File operations
FileTool.cs - Browser and web
BrowserTool.cs - Command execution
ShizukuRunner.cs - Image generation
ImageGenService.cs
Local state
- App settings
AppSettings.cs - Chat and domain store
ChatStore.cs
Other components
- User
- Configured model API
Connections 25
- User → Chat interface: chats with
- Agent loop → Configured model API: requests completion
AgentLoopService.cs - Action executor → File operations: uses
AgentActionExecutor.cs - Action executor → Command execution: runs commands
AgentActionExecutor.cs - Action executor → Perception API registry: executes perception
AgentActionExecutor.cs - Action executor → Browser and web: uses
AgentActionExecutor.cs - Action executor → File access controls: checks access
- Agent loop → Instruction parser: parses actions
AgentLoopService.cs - Perception API registry → Device context: dispatches
ApiRegistry.cs - Device context → Usage stats: reads usage
DeviceContextService.cs - Device context → Notification capture: reads notices
DeviceContextService.cs - Device context → Accessibility capture: checks service
DeviceContextService.cs - Device context → Calendar access: reads calendar
DeviceContextService.cs - Care scheduler → Background observation: observes periodically
Platforms/Android/CareReceiver.cs - Care scheduler → Inner life and heartbeat: requests heartbeat
Platforms/Android/CareReceiver.cs - Care scheduler → Chat and domain store: reads and writes
Platforms/Android/CareReceiver.cs - Care scheduler → Care notification: shows message
Platforms/Android/CareReceiver.cs - Inner life and heartbeat → Perception API registry: executes APIs
InnerLifeService.cs - Inner life and heartbeat → Chat and domain store: reads conversation
InnerLifeService.cs - Background observation → Perception API registry: uses perception
CareWatch.cs - App settings → Chat and domain store: configures persistence
- Image generation → Configured model API: generates images
- Chat interface → Agent loop: starts agent mode
- Chat interface → Chat and domain store: persists conversation
- Chat interface → Image generation: requests generation