How ahmadfauzi34/oopbot works
OOPBoT combines an Android workspace/chat app, a Termux host bridge, and a Rust agent runtime; the README’s primary workflow is composing a chat in Android, running a per-session JSONL RPC process in Termux, and streaming agent events and tool results back to the UI. The app also supports local on-device inference, remote hosts, files, Git, terminals, session archives, and background/subagent and web-access extensions. Edges are limited to relationships shown in excerpts, the SOURCE INDEX, or README; several unsampled feature links are therefore omitted.
Main entry points: main.ts Host dispatcher · main.rs CLI entry · agent.rs Agent loop · InferenceEngine.kt Engine contract
Components 23
Android app
- App shell
android/app/src/main/kotlin/io/jeph/pipkin/MainActivity.kt - Chat controller
android/app/src/main/kotlin/io/jeph/pipkin/ui/chat/ChatController.kt - Session repository
android/app/src/main/kotlin/io/jeph/pipkin/data/SessionRepository.kt - Agent process
android/app/src/main/kotlin/io/jeph/pipkin/agent/AgentProcess.kt - Host client
android/app/src/main/kotlin/io/jeph/pipkin/host/HostClient.kt
Termux host bridge
- Host dispatcher
android/host/src/main.ts - JSONL framing
android/host/src/framing.ts - RPC mode
android/host/src/modes/rpc.ts
Rust agent runtime
- CLI entry
src/main.rs - JSONL RPC
src/rpc.rs - Agent loop
src/agent.rs - Built-in tools
src/tools.rs - Provider client
src/gemini.rs - Model catalog
src/models.rs - C ABI
src/ffi.rs
Local inference
- Inference service
android/app/src/main/kotlin/io/jeph/pipkin/localmodel/engine/InferenceService.kt - Engine contract
android/app/src/main/kotlin/io/jeph/pipkin/localmodel/engine/InferenceEngine.kt - Llama engine
android/app/src/main/kotlin/io/jeph/pipkin/localmodel/engine/llama/LlamaEngine.kt - LiteRT engine
android/app/src/main/kotlin/io/jeph/pipkin/localmodel/engine/litert/LiteRtEngine.kt
Agent extensions
- Web access
android/host/src/pi-extensions/pipkin-web-access/page-query.ts - Background tasks
android/host/src/pi-extensions/pipkin-background/tasks.ts - Web result store
android/host/src/pi-extensions/pipkin-web-access/storage.ts
Other components
- App user
Connections 20
- App user → App shell: uses
android/app/src/main/kotlin/io/jeph/pipkin/MainActivity.kt - App shell → Chat controller: opens chat
android/app/src/main/kotlin/io/jeph/pipkin/MainActivity.kt - Chat controller → Agent process: sends prompts
android/app/src/main/kotlin/io/jeph/pipkin/ui/chat/ChatController.kt - Agent process → RPC mode: starts RPC
README.md - RPC mode → CLI entry: spawns binary
README.md - Host client → Host dispatcher: sends requests
android/app/src/main/kotlin/io/jeph/pipkin/host/HostClient.kt - Host dispatcher → RPC mode: dispatches
android/host/src/main.ts - Host dispatcher → JSONL framing: parses messages
android/host/src/main.ts - CLI entry → JSONL RPC: runs RPC mode
README.md - JSONL RPC → Agent loop: runs agent
README.md - Agent loop → Built-in tools: executes tools
README.md - Agent loop → Provider client: requests completions
README.md - Provider client → Model catalog: scans models
README.md - CLI entry → C ABI: exports library
README.md - App user → Session repository: manages chats
- Inference service → Engine contract: selects engine
android/app/src/main/kotlin/io/jeph/pipkin/localmodel/engine/InferenceService.kt - Engine contract → Llama engine: implemented by
android/app/src/main/kotlin/io/jeph/pipkin/localmodel/engine/llama/LlamaEngine.kt - Engine contract → LiteRT engine: implemented by
android/app/src/main/kotlin/io/jeph/pipkin/localmodel/engine/litert/LiteRtEngine.kt - Web access → Web result store: stores results
- Background tasks → App user: runs tasks