How bielxdh3/aip works
AIP is a local-first agent platform: users interact with persistent agents through the desktop UI, which invokes a Rust-owned core for conversation, state, and persistence; generation crosses a managed NDJSON boundary to a local Ollama host. The graph also preserves documented memory, overlays, tools, voice, vision, extensions, and companion/gateway capabilities. Several Rust subsystems are represented from the repository map and README rather than inspected source; their internal edges are omitted where wiring was not evidenced.
Main entry points: App.tsx Agent UI · server.py Python runtime · MainActivity.kt Android companion · lib.rs Tauri core
Components 25
User interfaces
- Agent UI
apps/desktop/src/App.tsx - Agent overlays
apps/desktop/src/Overlay.tsx - Agent bubble
apps/desktop/src/Bubble.tsx - Agent sprite
apps/desktop/src/components/AgentSprite.tsx - Conversation state
apps/desktop/src/conversation-state.ts
Desktop core
- Tauri core
apps/desktop/src-tauri/src/lib.rs - Chat handling
apps/desktop/src-tauri/src/chat.rs - Conversation lifecycle
apps/desktop/src-tauri/src/conversation.rs - SQLite state
apps/desktop/src-tauri/src/database.rs - Agent cognition
apps/desktop/src-tauri/src/cognitive.rs - Agent tools
apps/desktop/src-tauri/src/tools.rs - Extensions
apps/desktop/src-tauri/src/extensions.rs - Voice
apps/desktop/src-tauri/src/voice.rs - Screen vision
apps/desktop/src-tauri/src/screen_vision.rs - Overlay management
apps/desktop/src-tauri/src/overlays.rs - Companion gateway
apps/desktop/src-tauri/src/gateway.rs
Local inference
- Python runtime
services/runtime/src/aip_runtime/server.py - NDJSON protocol
services/runtime/src/aip_runtime/protocol.py - Ollama adapter
services/runtime/src/aip_runtime/ollama.py - Ollama lifecycle
services/runtime/src/aip_runtime/readiness.py
Companion access
- Android companion
android/app/src/main/java/com/aip/companion/MainActivity.kt - Secure credentials
android/app/src/main/java/com/aip/companion/SecureStore.kt - Android overlay
android/app/src/main/java/com/aip/companion/OverlayService.kt
Other components
- User
- Ollama host
Connections 19
- User → Agent UI: interacts
README.md - Agent UI → Tauri core: invokes commands
apps/desktop/src/App.tsx - Agent UI → Conversation state: uses state
apps/desktop/src/App.tsx - Agent UI → Agent sprite: renders
apps/desktop/src/App.tsx - User → Agent overlays: uses overlay
README.md - User → Agent bubble: uses bubble
README.md - Agent overlays → Agent sprite: renders
apps/desktop/src/Overlay.tsx - Tauri core → SQLite state: owns persistence
README.md - Tauri core → Python runtime: manages boundary
README.md - Python runtime → NDJSON protocol: validates messages
services/runtime/src/aip_runtime/server.py - Python runtime → Ollama adapter: dispatches requests
services/runtime/src/aip_runtime/server.py - Python runtime → Ollama lifecycle: checks readiness
services/runtime/src/aip_runtime/server.py - Ollama adapter → Ollama host: streams generation
README.md - Ollama lifecycle → Ollama host: manages lifecycle
services/runtime/src/aip_runtime/readiness.py - Agent cognition → SQLite state: persists state
apps/desktop/src-tauri/src/cognitive.rs - User → Android companion: connects locally
README.md - Android companion → Secure credentials: uses credentials
android/app/src/main/java/com/aip/companion/MainActivity.kt - Android companion → Android overlay: starts service
android/app/src/main/java/com/aip/companion/MainActivity.kt - Android companion → Companion gateway: connects companion
README.md