How jay4ignite/yana works
YANA is a native Windows desktop AI companion. Its main workflow runs from user chat or voice input through the desktop IPC client to the FastAPI agent, then to AI response or a planned, permission-gated tool execution; results return to the UI for chat and task display. Memory, voice, and native desktop controls are distinct supporting capabilities. The execution pipeline, memory manager, and voice pipeline are evidenced by sampled source; additional major capabilities and their paths follow the README and tree.
Main entry points: executor/pipeline.py Execution Pipeline · conversation_routes.py Conversation API · voice/pipeline.py Voice Pipeline · App.tsx Companion UI
Components 28
Desktop Companion
- Companion UI
apps/desktop/src/App.tsx - Pet and Chat Views
apps/desktop/src/components/Companion/ExpandedAssistantView.tsx - Protocol Hook
apps/desktop/src/hooks/useProtocol.ts - Agent Client
apps/desktop/src/services/agentClient.ts - Native IPC
apps/desktop/src-tauri/src/commands/agent.rs - Agent Supervisor
apps/desktop/src-tauri/src/agent_supervisor.rs - IPC Contracts
packages/protocol/src/types.ts - Shared Domain Types
packages/shared-types/src
Agent Runtime
- FastAPI Routes
apps/agent/app/main.py - Conversation API
apps/agent/app/api/conversation_routes.py - Task Planner
apps/agent/app/core/planner/base.py - Task Lifecycle
apps/agent/app/core/task_manager.py - AI Providers
apps/agent/app/ai/factory.py - Execution Pipeline
apps/agent/app/core/executor/pipeline.py - Result Verifier
apps/agent/app/core/verifier/base.py - Security Audit
apps/agent/app/security/audit.py
Safe Actions
- Tool Registry
apps/agent/app/tools/registry.py - Permission Manager
apps/agent/app/permissions/manager.py - OS Tool Modules
apps/agent/app/tools
Local Memory
- Memory API
apps/agent/app/api/memory_routes.py - Memory Manager
apps/agent/app/memory/memory_manager.py - SQLite Memory
apps/agent/app/memory/db.py
Voice Interaction
- Voice API
apps/agent/app/api/voice_routes.py - Voice Pipeline
apps/agent/app/voice/pipeline.py - Audio Devices
apps/agent/app/voice/device_manager.py - STT and TTS
apps/agent/app/voice
Other components
- User
- Operating System
Connections 28
- User → Pet and Chat Views: interacts
- Companion UI → Pet and Chat Views: renders
- Companion UI → Protocol Hook: uses
- Protocol Hook → Agent Client: sends requests
- Agent Client → Native IPC: invokes IPC
- Native IPC → Agent Supervisor: manages agent
- Native IPC → FastAPI Routes: forwards requests
- FastAPI Routes → Conversation API: routes chat
- Conversation API → AI Providers: requests generation
- Conversation API → Task Lifecycle: tracks task
- Conversation API → Memory Manager: uses conversation context
- FastAPI Routes → Task Planner: routes agent tasks
- Task Planner → Execution Pipeline: submits tool calls
- Execution Pipeline → Tool Registry: looks up tools
- Execution Pipeline → Permission Manager: authorizes calls
- Execution Pipeline → OS Tool Modules: executes approved tool
- OS Tool Modules → Operating System: operates on
- Execution Pipeline → Result Verifier: verifies result
- Execution Pipeline → Security Audit: records events
- Result Verifier → Execution Pipeline: returns verification
- Memory API → Memory Manager: delegates memory operations
- Memory Manager → SQLite Memory: reads and writes
- Voice API → Voice Pipeline: controls voice
- Voice Pipeline → Audio Devices: checks devices
- Voice Pipeline → STT and TTS: transcribes and synthesizes
- Voice Pipeline → Conversation API: submits transcript
- Protocol Hook → IPC Contracts: uses message types
- Companion UI → Shared Domain Types: uses domain models