How venkie07/pocket-ai works
Pocket AI is a portable, local-first AI environment. Its principal user-to-result paths are chat or direct CLI inference through a local model, and an agent workflow that turns a task into registered tools and Windows UI automation. The tree also exposes a browser chat UI and a FlaUI command-line product. README-documented OpenCode, Laya, and Colibri capabilities are shown as external or optional components because their implementations are not in the supplied tree; unsampled wiring is not inferred.
Main entry points: App.tsx Chat UI · base.py Tool Registry · Program.cs FlaUI CLI Routing · main.py Agent Entry
Components 24
Local Inference
- llama.cpp
- Local GGUF Model
- OpenCode
- Direct CLI Inference
- Colibri MoE
Chat Interface
- Chat UI
AI/web/src/App.tsx - Web Bootstrap
AI/web/src/main.tsx - Translations
AI/web/src/i18n/index.ts - Inference API Client
AI/web/src/lib/api.ts - Saved Settings
AI/web/src/lib/storage.ts
Agent Tools
- AI Application
AI/app.py - Agent Entry
AI/main.py - Tool Registry
AI/tools/base.py - Tool Registration
AI/tools/__init__.py - GhostHand Tools
AI/tools/ghosthand/tools/action.py - Session Tools
AI/tools/ghosthand/tools/session.py - GhostHand Client
AI/tools/ghosthand/client.py - Laya Clarification
Windows Automation
- FlaUI CLI Routing
FlaUI.Cli/src/FlaUI.Cli/Program.cs - Session Manager
FlaUI.Cli/src/FlaUI.Cli/Services/SessionManager.cs - Automation Engine
FlaUI.Cli/src/FlaUI.Cli/Services/AutomationEngine.cs - Session State
FlaUI.Cli/src/FlaUI.Cli/Models/SessionFile.cs - Windows UI
Other components
- User
Connections 26
- User → Chat UI: uses
README.md - Web Bootstrap → Chat UI: renders
AI/web/src/main.tsx - Chat UI → Translations: localizes
AI/web/src/App.tsx - Chat UI → Inference API Client: requests inference
AI/web/src/App.tsx - Chat UI → Saved Settings: persists settings
AI/web/src/App.tsx - Inference API Client → llama.cpp: sends requests
README.md - llama.cpp → Local GGUF Model: runs inference
README.md - User → OpenCode: uses
README.md - OpenCode → llama.cpp: calls API
README.md - User → Direct CLI Inference: runs inference
README.md - Direct CLI Inference → llama.cpp: invokes
README.md - User → Agent Entry: requests task
- Agent Entry → Tool Registry: dispatches tools
- AI Application → Tool Registration: loads tools
AI/app.py - Tool Registration → Tool Registry: registers tools
AI/tools/__init__.py - Tool Registry → GhostHand Tools: executes
AI/tools/ghosthand/tools/action.py - Tool Registry → Session Tools: executes
AI/tools/ghosthand/tools/session.py - GhostHand Tools → GhostHand Client: calls
AI/tools/ghosthand/tools/action.py - Session Tools → GhostHand Client: calls
AI/tools/ghosthand/tools/session.py - GhostHand Client → FlaUI CLI Routing: runs CLI
- FlaUI CLI Routing → Session Manager: routes commands
FlaUI.Cli/src/FlaUI.Cli/Program.cs - FlaUI CLI Routing → Automation Engine: routes commands
- Session Manager → Session State: reads and writes
FlaUI.Cli/src/FlaUI.Cli/Services/SessionManager.cs - Automation Engine → Windows UI: automates
README.md - Laya Clarification → Agent Entry: clarifies requests
README.md - Colibri MoE → Local GGUF Model: runs MoE models
README.md