How bycyrus/airi works
AIRI is a multi-platform AI virtual-character project, with desktop, browser, and mobile applications supported by shared agent, speech, and character-rendering packages. The principal product workflow is user interaction with a character, followed by LLM response generation and spoken, animated output; the repository also includes Minecraft perception and computer-use capabilities. The tree and excerpts show selected internal links, but not enough to establish a complete app-to-package runtime chain, so those connections are omitted.
Main entry points: workflows/engine.ts Computer-use workflow · rules/engine.ts Perception rules · llm-service.ts LLM service · motion-manager.ts Live2D motion
Components 29
AIRI clients
- Desktop client
apps/stage-tamagotchi/src/renderer - Browser client
apps/stage-web/src - Pocket client
apps/stage-pocket/src
Agent and tools
- LLM service
packages/core-agent/src/runtime/llm-service.ts - Responses stream
packages/core-agent/src/runtime/responses.ts - Inference providers
packages/provider-inference - Computer-use workflow
services/computer-use-mcp/src/workflows/engine.ts - Action executor
services/computer-use-mcp/src/server/action-executor.ts - Workflow state
services/computer-use-mcp/src/state.ts - Action strategy
services/computer-use-mcp/src/strategy.ts - Action transparency
services/computer-use-mcp/src/transparency.ts
Speech and character
- Speech pipeline
packages/pipelines-audio/src/speech-pipeline.ts - TTS chunker
packages/pipelines-audio/src/processors/tts-chunker.ts - Speech runtime
packages/stage-ui/src/services/speech/pipeline-runtime.ts - Streaming TTS
packages/stage-ui/src/libs/speech/streaming-pipeline.ts - Live2D motion
packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts - Expression control
packages/stage-ui-live2d/src/composables/live2d/expression-controller.ts - Motion control state
packages/stage-ui-live2d/src/stores/motion-control.ts
External integrations
- Minecraft perception
integrations/minecraft/src/cognitive/perception/pipeline.ts - Perception event bus
integrations/minecraft/src/cognitive/event-bus.ts - Perception rules
integrations/minecraft/src/cognitive/perception/rules/engine.ts - Rule matcher
integrations/minecraft/src/cognitive/perception/rules/matcher.ts - Temporal detector
integrations/minecraft/src/cognitive/perception/rules/temporal-detector.ts - Fall event
integrations/minecraft/src/cognitive/perception/events/definitions/fall-tracker.ts
Mobile bridges
- iOS WebSocket session
apps/stage-pocket/ios/App/App/URLSessionHostWebSocketSession.swift - iOS WebSocket bridge
apps/stage-pocket/ios/App/App/HostWebSocketBridge.swift - DualSense controller
packages/input-playstation-dualsense-5/src/controller.ts - Controller input report
packages/input-playstation-dualsense-5/src/input-report.ts
Other components
- User
Connections 21
- User → Desktop client: interacts with
README.md - User → Browser client: interacts with
README.md - User → Pocket client: interacts with
README.md - LLM service → Responses stream: streams responses
packages/core-agent/src/runtime/llm-service.ts - LLM service → Inference providers: uses provider
packages/core-agent/src/runtime/llm-service.ts - Computer-use workflow → Action executor: executes actions
services/computer-use-mcp/src/workflows/engine.ts - Computer-use workflow → Workflow state: reads state
services/computer-use-mcp/src/workflows/engine.ts - Computer-use workflow → Action strategy: evaluates strategy
services/computer-use-mcp/src/workflows/engine.ts - Computer-use workflow → Action transparency: explains intent
services/computer-use-mcp/src/workflows/engine.ts - Speech pipeline → TTS chunker: segments speech
packages/pipelines-audio/src/speech-pipeline.ts - Speech runtime → Speech pipeline: uses pipeline
packages/stage-ui/src/services/speech/pipeline-runtime.ts - Streaming TTS → User: delivers audio
- Live2D motion → Motion control state: samples motion
packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts - Live2D motion → Expression control: applies expressions
packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts - Minecraft perception → Perception event bus: uses event bus
integrations/minecraft/src/cognitive/perception/pipeline.ts - Minecraft perception → Fall event: registers definitions
integrations/minecraft/src/cognitive/perception/pipeline.ts - Perception rules → Perception event bus: emits signals
integrations/minecraft/src/cognitive/perception/rules/engine.ts - Perception rules → Rule matcher: renders matches
integrations/minecraft/src/cognitive/perception/rules/engine.ts - Perception rules → Temporal detector: processes windows
integrations/minecraft/src/cognitive/perception/rules/engine.ts - iOS WebSocket bridge → iOS WebSocket session: uses session
apps/stage-pocket/ios/App/App/DevBridgeViewController.swift - DualSense controller → Controller input report: parses reports
packages/input-playstation-dualsense-5/src/controller.ts