Omnibot Buddy v1.14.0
One dispatcher for every AI on the phone. This build cuts what a refresh costs, installs and verifies real tools in Termux from a plain request, and turns a task into a work session that keeps using every AI until the steps are done. A Termux gateway really calls local models and cloud keys, intents hand a prompt to installed AI apps, and a narrow accessibility bridge types into an app and reads its reply. Each layer is named in every result, and a handoff is never reported as a model call.
versionCode 19 versionName 1.14.0 package com.omnibot.buddy compileSdk 34 · minSdk 26 debug-signed APK keyless local modelsDownloads
termux-engine/ with s24_bridge.py, docs
sha256 812f8286e36bd82923163350e2f7297e8f776d9ec767a2748ae5816eb8b4fcb1
Review bundle
Source, engine, docs, START-HERE, SHA256SUMS and the APK
sha256 f9b9e1618819ffa9c340f28e2dede62014acebaa7ea81c97f952ba16b5acba1e
Verify after download: sha256sum omnibot-buddy-1.14.0-debug.apk.
The APK inside the review bundle is the same build (c5a47678…).
New in 1.14.0 — Galaxy AI surfaces and the Termux S24 bridge
Samsung publishes no REST API for Galaxy AI, so this is wired the only way Android allows: real Intents, one labelled accessibility click, and a local model that may pick which surface to open. No result calls a hand-off a model call.
Galaxy card / @omni galaxy / tool galaxy_ai
interpreter launch com.samsung.android.app.interpreter
notes ACTION_SEND into Samsung Notes, else its launch Intent
gemini_voice resolved ACTION_VOICE_COMMAND (the phone's default assistant)
writing_assist accessibility click: "writing assist" / "galaxy ai" / "chat assist" …
input-method window first, then the app window, 6-level clickable climb
screen / status visible text, and what this phone really has
S24 bridge · termux-engine/s24_bridge.py · 127.0.0.1:8765
GET /health version, model, whether Ollama is reachable
POST /omnibot {prompt, context:{screen_text}} -> {reply, s24_action, s24_payload}
tools run_cmd (30 s, blocked patterns), write_file/read_file (Termux home only),
trigger_s24_ai (one of 4 allowlisted Galaxy actions)
--check/--token config probe and X-Omni-Token; stdlib only, loopback bind
termux-engine/boot/start_omnibot_ai.sh
Termux:Boot: ollama serve (OLLAMA_KEEP_ALIVE=-1), warm qwen3:1.7b, bridge if not running
A model-returned action is a request, not a success. The bridge validates the action name, the app applies its own allowlist again, and the reply prints what the bridge answered and what the phone actually did — or why it could not.
New in 1.13.2 — page controls in the panel, and a window that can take typing
Floating panel (only while a page is open)
Page · <title> appears under the status line
– minimize · ▣ restore (follows the window bar both ways)
✕ page close the window and destroy the WebView
Buddy page window
focusable window FLAG_NOT_FOCUSABLE removed → a page field can take typing
outside touches still pass through (FLAG_NOT_TOUCH_MODAL kept)
Back hide keyboard → page history → minimize → close when minimized
minimized re-adds FLAG_NOT_FOCUSABLE, so the bar cannot hold the keyboard
The keyboard check found a real defect: the window was created with
FLAG_NOT_FOCUSABLE. An overlay WebView in a non-focusable window cannot take input
focus, so no page field could ever accept typing — the window was watch-only. It is now a
focusable window with a focusable root and WebView, and minimize puts the non-focusable flag
back so a collapsed page cannot keep the keyboard open.
The panel's Page row is driven by BrowserEngine.onStateChanged,
so it updates whether the window bar, the panel or a tool changed the window, and it disappears
when no page is open. The row hides itself rather than adding more clutter to the header.
New in 1.13.1 — the page window closes and minimizes itself
Buddy page window
– minimize collapse to a 220 dp bar · page stays loaded · tap the bar to restore
✕ close removes the window and destroys the WebView directly
bar draggable, so the controls never sit under a notch or off the edge
targets both chips are 44 dp, not a 12 dp glyph
The old window had one small ✕ stop label, and it only worked by notifying the
overlay service. If that listener was not attached — a page opened while the floating service
was stopped — the tap did nothing and the window had no other control, so the phone had to be
restarted. Closing no longer depends on another component being alive: the
engine removes its own window, with a second removal attempt if the view was never attached,
and destroys the page. The overlay is told afterwards, not asked first.
Minimizing keeps the page loaded, so restoring returns to the exact scroll position. Closing
the panel still closes the page, and browser_close from chat goes through the same
code path.
New in 1.13.0 — cheaper refresh, real Termux installs, work that keeps going
Settings screen — what a refresh costs now
refreshAll() coalesced: one pass, 80 ms after the first request
assembly scan reused for 30 s; Connect / Assemble / Get force a new one
/health sampled at most once per 5 s
tool catalog one probe pass per 20 s (the gateway caches probes 20 s too)
assembly rows re-rendered only when a row's state really changed
Termux · tell Buddy what to download
@omni get ollama plan → confirm → pkg install → version probe → serve → URL test
@omni tools what is installed, measured on this phone
python · pip · git · curl · node · cmake · ollama · llama.cpp · openai client
outside Termux → HTTP 409 with the commands to run yourself
Automatic work
@omni work <task> plan (2–6 steps) → run → provider failover → save every step
@omni work status | stop | resume | auto on | auto off | clear
alarm every 15 min while running · a reboot resumes from the saved transcript
The omni section used to make two loopback calls and walk every installed package on every tap and every resume. Now a measured pass is reused for 30 seconds, and only an action that changed something pays for a new one. Changes are what choose the cost, not taps.
Downloads are real. The gateway runs the package steps as argv arrays, captures every exit code and its output, then proves the tool with its own version command. A tool with a server is started and its URL is polled until it answers. A tool is never reported as usable because a catalog listed it.
Work keeps going. Each step records the provider that answered, the session is written to disk after every step, and an alarm continues it with the app closed. When no model answers, no session is created: the reason is printed instead. Steps are model calls; actions that change the phone still go through the approval gates.
New in 1.12.0 — assemble everything, close everything, start it automatically
Omni-Router → Assemble all AIs
✓ per app: installed · measured route · the one manual step left
· catalog: Gemini · ChatGPT · Claude · Perplexity · Copilot · Grok · Meta AI · Bixby · Termux
· plus any installed app whose label names an AI (deepseek, le chat, poe, qwen, kimi, …)
· a gateway provider is the only route Buddy calls; the rest are named handoffs
Closeable surfaces
panel ✕ · drag the handle down · hardware Back → chooser → approval → panel
closing the panel also closes the browsing page it opened
Auto-start (Termux RUN_COMMAND, or Termux:Boot)
./omni-gateway.sh start|status|stop pid file, log, real /health answer
~/.termux/boot/omnibot-gateway.sh runs at boot with no app involved
@omni assemble and @omni connect <package> work from chat with
no model configured. Connect opens the Play Store page for a missing app,
confirms a mapped gateway provider, or opens the Omni bridge settings when enabling the bridge
is the only thing left. Nothing is upgraded on hope.
Key vault, no harvesting: python3 omni_gateway.py --keys-template
writes ~/.omnibot-omni/omni.env (mode 600); the gateway loads it and the app shows
key set / no key, never a value. This build does not search GitHub or
any other site for keys: a key in someone else's repository belongs to them, and using it is
credential theft, not a shortcut.
New in 1.11.0 — the omni-router
Layer 1 Termux gateway 127.0.0.1:8899 readable answer, chainable
ollama · llama.cpp · vLLM · cloud keys
Layer 2 ACTION_SEND → deep link → app launch prompt handed over, app owns send
Gemini · ChatGPT · Claude · Perplexity · Copilot · Grok · Meta AI · Bixby
Layer 3 Omni accessibility bridge types the prompt, clicks send, reads reply
per-prompt queue · refuses password fields · 60 s cap
One prompt, every AI: @omni all <prompt> fans out through the gateway and
shows each provider's answer with its own status and latency. @omni app:gemini
<prompt> hands the prompt to the app and names the route that really resolved.
Fail-closed gateway, verified against a stub provider
- No token → 401; the gateway binds loopback and writes a 64-hex token, mode 600.
- Unknown provider id → 400 with the known ids, not a silent skip.
- Cloud provider without a key →
skipped/FAIL_CLOSED. - Dead local runtime →
errorwith the address it tried; the working provider still answers. /v1/omni/probeis reachability only and says so; a cloud key reportskey_setrather than spending money on a probe.
Carried from 1.10.0 — AI acquisition and runtime
Omnibot Buddy (Kotlin)
│ loopback HTTP + Bearer token
▼
termux-engine (Python 3, stdlib only)
├── hardware.py /proc/meminfo, disk, cpu flags, getprop, thermal, battery, commands
├── catalog.py trusted entries: runtimes, frameworks, tools, models, speech
├── pipeline.py validate → install → configure → test → register (+ cancel, remove)
├── airegistry.py lifecycle states, job log, tool conversion (SQLite)
├── adapters.py ollama chat/embed, OpenAI-compatible HTTP, CLI, honest library refusal
├── agent.py verified resources become ai:<id> plan tools
└── server.py /ai/hardware /ai/catalog /ai/plan /ai/install /ai/jobs /ai/registry …
DISCOVER → VALIDATE → PLAN → APPROVE → DOWNLOAD/INSTALL → CONFIGURE → TEST →
REGISTER. A completed download is INSTALLED, never READY.
available turns true only after the entry's test really passed.
Three levels, kept separate
| Level | Meaning | What Buddy verifies |
|---|---|---|
| Connectivity | Buddy can reach or open the AI | A launcher intent resolves, or a loopback port answers |
| Interaction | Buddy can submit and receive | The share sheet accepts text, a composer exists, or an endpoint returns a message |
| Tool integration | Buddy can invoke it and use the result | A real invocation returned output the engine can chain |
Installed AI apps are reported with real PackageManager checks at open/share level
and are never labelled connected models. Tool integration requires a real interface: local
runtime, OpenAI-compatible endpoint, CLI, MCP or the Termux engine.
What the catalog contains
| Type | Entries |
|---|---|
| Runtimes | Ollama, llama.cpp, ONNX Runtime |
| Frameworks | CrewAI, Microsoft AutoGen, OpenAI Swarm, LangGraph, MCP Python SDK |
| Tools | llm CLI with the Ollama plugin, tiktoken, Vosk |
| Models | Qwen2.5 0.5B / 1.5B, Qwen2.5 Coder 1.5B, Llama 3.2 1B / 3B, Gemma 2 2B, Phi-3 Mini, LLaVA 7B (vision), Nomic Embed Text |
| Speech | Vosk small English model, downloaded and loaded before registration |
Refusal happens before download: architecture, missing prerequisite commands, a 55% RAM budget, free storage plus 512 MB headroom. Anything of 1 GB or more, and every model, needs a second explicit confirmation in the app.
What is verified — and how
Run here, with output
python3 -m py_compileon every engine module andmain.py: clean.main.py --hardware: real profile — x86_64, 8 cores, 15,993 MB RAM, 54,398 MB free, and thermal/battery reported as unreadable instead of invented.main.py --catalog: Ollama models correctlyblockedwith “needs the ollama command” on a machine without Ollama.- Bridge auth unchanged:
/ai/hardwarewithout a token → 401. - Real pip install through the pipeline (
tiktoken): job succeeded only afterimport tiktokenprinted0.14.0; registry showed READY and exposedai:tiktokenas not a chat tool; invoking it returned the library explanation, not a fabricated answer. - Model install without its runtime → 400, “missing a prerequisite: needs the ollama command”.
- Large-download gate → 400 without approval; job created with it.
- Download + test gate: the Vosk model really downloaded (41,205,931 bytes,
SHA-256 recorded), extracted, then failed its import test here and stayed
FAILED— not registered. - Model lifecycle against a stub Ollama command and server: pull → list →
real generate test → READY; invoke returned
OKwith request evidence; the orchestrator ranai:qwen2.5-0.5bas a plan step and returned it inevidence. - Cancellation stopped a slow pull in under a second, reported
cancelled, and marked the resourceFAILED. - Removal ran
ollama rmwith exit 0 and deleted the registry entry. - Android:
:app:assembleDebugsuccessful, versionCode 19, 1.14.0;ai_toolbox,ai_install,/ai/install,AIToolLevels,OmniAIRouter,OmniAccessibilityBridge,omni_router,@omni,OmniAssembler,OmniGatewayBoot,OmniTermux,OmniWork,RefreshGate,@omni get,@omni work,Download & use,OMNI_WORK_TICK,/v1/omni/tools/install, Assemble all AIs, Key vault and Autostart confirmed in the APK. - Termux tool catalog, real HTTP here (gateway 1.2.0):
/v1/omni/toolsreported 6 of 9 installed with the versions the binaries printed andin_termux: false; thecmakeinstall plan returneddry_runand changed nothing; a confirmedcmakeinstall withoutpkgreturned 409 with its command;pythonreturnedalready_installedwithPython 3.12.3; an unknown tool was 400, starting an uninstalled server 409, and the endpoint without a token 401. - Probe cache: a second catalog request inside 20 s reused the measured
probes;
installandstartalways re-measure. - Gateway supervisor, run for real here:
omni-gateway.sh startprintedHTTP 200with the stored token,statusmatched,stopleft nothing listening andstatusthen reportedConnection refused. - Key vault, run for real here:
--keys-templatewroteomni.envat mode 600; a key appended to it loaded into the provider table (gemini configured: True) and the gateway reported it without printing it. - Omni gateway, real HTTP calls: 401 without the token; provider table and
probe correct;
local_ollamaanswered through a stub, two unlistening runtimes reported as errors, Geminiskippedfor a missing key; unknown id → 400; CLI--dispatchexit 0 when answered.
Not verified — do not read these as working
- Nothing has run on an Android device. No phone or emulator here: Termux
package availability,
ollamaon Termux, ARM64 latency and the app's loopback calls are untested. - No real model inference. The model path was verified with a stub runtime; real answer quality and speed are unknown.
- CrewAI, AutoGen, Swarm, LangGraph and MCP have never executed. Install and import are tested; orchestration through them is not.
- No
pkginstall was executed (this workspace is not Termux). The method is implemented and reports the exact failure if a package is unavailable; the 409 path is what was verified, not a real Termux install. - No real model pull happened: a multi-GB
ollama pull, an ARM64 build andollama servewere not run here. - The refresh saving is structural, not profiled. The gate, the 30 s report reuse and the coalesced pass compile and are in the APK; no device was available to measure frame or CPU time.
- The work loop has not run on a device: the 15-minute alarm, Doze behaviour, the reboot resume and the work-session UI are untested. Steps 51–58 of START-HERE are that first run.
- The page-window controls are compiled, not touched. The minimize/restore
layout change, the drag gesture, the panel row and the window removal all use
WindowManagerand need a phone; steps 59–61 of START-HERE are that test. - Typing was fixed by code inspection, not by typing. Removing
FLAG_NOT_FOCUSABLEis what a focusable overlay needs, but the IME over an overlay window and the Back ordering (keyboard → history → minimize) have not run on a device: step 62 is that test. - Galaxy AI cannot be exercised here. No S24 Ultra, no Samsung keyboard, no enabled accessibility service: opening Interpreter or Notes, the Writing assist click and the assistant hand-off are compiled and documented, not run. Steps 63–64 are the phone test.
- The bridge was exercised without Ollama.
s24_bridge.pypassespy_compile;/healthanswers 200, a missing token 401, an empty prompt 400, an unknown path 404, and a real question 503 with the honest reason when Ollama is absent. The action allowlist and the home-path guard were tested in-process. A real qwen3 answer has not been produced here: step 66 is that test. - Updates are not automated. The lifecycle has an
UPDATINGstate, but no update flow is implemented; reinstall to refresh. - The omni-router has not run on a phone either. Package names, share resolution, the Gemini deep link, the accessibility typing/capture flow and the Termux gateway have not been exercised on Android.
- Assembly, closing and auto-start are compiled and inspected, not device-tested.
The label-based app discovery, the store fallback, the drag/Back close gestures and Termux's
RUN_COMMANDhandshake all depend on the phone: the first run is the test. - No device is available here, so an Android version that blocks background service starts is reported as a refusal by the app, not worked around.
- The bridge capture is DOM-free but not app-proof. Apps that draw replies in a canvas or a WebView without accessible text cannot be captured, and a redesigned send button falls back to “press send yourself”.
Security
- Same loopback bridge, same 64-hex token,
hmac.compare_digest, mode 600; no new port. ai_installandai_removeare approval-gated, so a model cannot install or delete silently.- Large downloads need a second confirmation; the UI offers a separate Allow large.
- Installs run as argv arrays, never shell strings; zip extraction is checked for path escapes before writing.
- System
pkgpackages are never removed by the engine; it refuses and says why. - No credentials are used or stored by this layer.
- Keys stay yours: the gateway reads
~/.omnibot-omni/omni.env(mode 600) or the environment; the app only asks whether a provider has a key. No key is ever accepted in the app, echoed back, logged or committed. - No credential harvesting: the app never searches GitHub or other sites for API keys. Keys found in public repositories belong to their authors; using them is theft and breaks GitHub's and each provider's terms.
- Omni gateway: loopback only, bearer token, keys stay in Termux environment variables; a missing key is skipped, never substituted.
- Omni bridge: acts only on a package you queued a prompt for, refuses password fields, clears its queue on interrupt, and gives up after 60 s instead of guessing.
- Approval: a model-initiated
omni_router dispatchorassistantraises an approval request; a command you typed does not.
Set it up
# Termux
pkg install python git
# copy termux-engine/ from the bundle, e.g. to ~/omnibot-engine
cd ~/omnibot-engine && ./run.sh
python3 main.py --hardware # this device, measured
python3 main.py --catalog # what fits here, and why the rest does not
# keyless local intelligence
pkg install ollama && ollama serve
ollama pull llama3.2 # or install a catalog model from the app
# omni gateway (one endpoint for local + cloud)
mkdir -p ~/omnibot && cp ~/omnibot-engine/omni_gateway.py ~/omnibot/
cd ~/omnibot && python3 omni_gateway.py --check
python3 omni_gateway.py --keys-template # ~/.omnibot-omni/omni.env, mode 600, your own keys
python3 omni_gateway.py --tools # what is installed here, measured
python3 omni_gateway.py --install-tool ollama --yes # install, probe, then start it
./omni-gateway.sh start # background start, prints the real /health answer
./omni-gateway.sh status # pid + HTTP status with the stored token
python3 omni_gateway.py --print-token # paste into Settings → Omni-Router
# start it at every boot, with no app involved
mkdir -p ~/.termux/boot
cp ~/omnibot-engine/boot/omnibot-gateway.sh ~/.termux/boot/ && chmod 700 ~/.termux/boot/omnibot-gateway.sh
Then in Buddy: Settings → Termux Intelligence Engine → ~/omnibot-engine →
Pair & start. Then AI Acquisition & Runtime →
Hardware → Catalog → id → Install →
Registry → Invoke. Use Allow large for models,
and App levels to see what your installed AI apps can really do.
Then Settings → Omni-Router: save the gateway port and token, press Scan
AIs, Ask all models, or Dispatch to app. Enable the
Omni auto-prompt accessibility service to let Buddy type the prompt into one app and
capture its reply. In chat, @omni status works even with no API provider configured.
Press Assemble all AIs once to measure and connect every AI on the phone, then
Connect on any row for the one step it still needs. Turn on Autostart
so the gateway is there when you open the app.
Carried over
1.9.0 Termux intelligence engine: the native team (planner → tools → workers → critic → synthesizer → verifier), optional CrewAI / Swarm / AutoGen strategies with recorded fallback, per-task tool approval, and real command evidence. 1.8.0 Buddy Studio: change the app's own source through Termux with backups, a build, optional repair, undo and an exported APK. Six development permissions, all off by default.