TheOrc Companion is the field node for TheOrc's HIVE MIND.
It gives your phone a real job: discover local nodes, verify LAN and Tailscale routes, run first-run setup, and contribute small constrained edge work back to the swarm.
TheOrc Companion is the Android-facing control surface for TheOrc.
Instead of being a fake mobile mockup or a second dashboard that just repeats desktop UI, the companion is aimed at real field-node work:
- discovering TheOrc and Ollama endpoints over LAN and Tailscale
- probing whether a host actually exposes the HIVE APIs you need
- persisting a local first-run setup profile
- acting as a constrained companion edge node
- queueing small jobs that make sense on a lightweight device or helper node
Right now the project is a React app with an Android wrapper, plus a local Express server that handles discovery, setup state, and the edge-job queue.
The branding here is intentionally a sibling to TheOrc, not a clone:
- the same neon-green-on-black warband palette
- the same octagonal circuit frame language
- a field node / uplink posture instead of the full boss-orchestrator stance
- a companion emblem built around a mobile device carrying the orc signal
The companion can:
- enumerate route candidates from
localhost, private LAN IPs, and Tailscale IPs - detect a configured TheOrc desktop host from
%APPDATA%\OrchestratorIDE\settings.json - probe
http://<host>:7078/hive/info - probe
http://<host>:11434/api/tags - summarize whether a route is optimal, unstable, or offline
This is the minimum needed for a real phone app to tell the truth about the HIVE instead of pretending a tunnel is healthy when it is not.
The companion persists setup state to:
%APPDATA%\TheOrcCompanion\settings.json
That setup profile currently includes:
- companion name
- preferred host
- whether to join the HIVE MIND
- enabled edge capabilities
- battery cutoff percentage
- whether metered network use is allowed
The companion does not invent a new boss role. It follows the role-architecture direction from TheOrc:
scrape_url- logical role:
RESEARCHER - execution lane:
RESEARCHER - capability:
slow_scrape
- logical role:
organize_directory- logical role:
DATA_ENGINEER - execution lane:
CODER - capability:
file_sorting
- logical role:
Current built-in job types:
- slow web scraping / summary extraction
- file sorting
- file naming suggestions
Those are intentionally narrow, useful, and cheap enough to fit a helper-node model.
The Chat tab can run a local tool-calling loop on Android without cloud API keys:
web_search— DuckDuckGo HTML search (no API key)fetch_page— fetch and summarize a public URLget_device_profile— battery, time, device model, owner nameget_hive_status— probe the selected HIVE route when the companion server is reachablequeue_scrape_url— queue a background scrape job on the companion server
Settings:
- Agent tools — on by default; uses prompt-based JSON tool calls with the loaded local model
- Web search + page fetch — network gate for search/scrape tools
Limits:
- Tools run in the app layer so packaged Android builds work standalone
- DuckDuckGo HTML scraping can rate-limit; results are not JavaScript-rendered
- Qwen2.5 1.5B is more reliable for tool JSON than Qwen3 0.6B
- HIVE/job tools need the dev server or
VITE_API_BASE; search/fetch work on-device
Dev-only debug endpoints (when npm run dev is running):
POST /api/agent/tools/web_search{ "query": "..." }POST /api/agent/tools/fetch_page{ "url": "https://..." }
The intended relationship is:
- TheOrc remains the planner and boss node.
- The companion becomes a truthful network/control console.
- Small edge-safe workloads can be routed to the companion node when capability and battery gates allow it.
This repo is the bridge between "phone UI for a demo" and "phone as a real member of the swarm."
git clone https://github.com/hardcoreerik/TheOrcCompanion.git
cd TheOrcCompanion
npm install
npm run devThen open:
http://127.0.0.1:3000
- Node.js
- TheOrc desktop environment on the same LAN or Tailscale network if you want real route testing
- Ollama if you want the companion to verify model availability
If you want the Google AI Studio orchestration and research endpoints active, provide a Gemini key in local env configuration.
Without it, parts of the original AI Studio-generated app still fall back to simulation behavior.
This repo now includes a Capacitor Android wrapper.
npm run android:syncnpm run android:opencd android
.\gradlew.bat assembleDebugThe debug APK lands at:
android/app/build/outputs/apk/debug/app-debug.apk
Android builds now use packaged web assets by default, so release builds are not pinned to a desktop or Tailscale URL.
For live development against the Vite/dev server, set CAP_SERVER_URL before syncing:
$env:CAP_SERVER_URL="http://192.168.1.227:3000"
npm run android:syncClear that variable and sync again before release packaging.
npm run android:sync
cd android
.\gradlew.bat assembleReleaseRelease signing still needs a real keystore before Play/internal distribution. Add signing material through Android Studio or local Gradle properties; do not commit keys, passwords, or generated local.properties.
| Path | Purpose |
|---|---|
src/App.tsx |
Main dashboard tabs, local chat agent, and top-level app layout |
src/lib/agent/ |
Local tool-calling loop and tool registry |
src/lib/tools/ |
DuckDuckGo search, page fetch, device/HIVE tool helpers |
src/components/AndroidCompanionHub.tsx |
Legacy companion setup UI (not mounted in current App) |
server.ts |
Discovery, probing, setup persistence, and companion-node job queue |
android/ |
Capacitor Android wrapper project |
assets/ |
README branding and companion visuals |
This project is no longer just the stock AI Studio export. It now has:
- real LAN/Tailscale route discovery
- real HIVE and Ollama probing
- persisted first-run setup
- Android packaging and deployment
- native LiteRT-LM download, load, stream, cancel, unload, and delete plumbing
- local chat agent tools with DuckDuckGo search and page fetch (no cloud search API)
- a public first-run default model: Qwen3 0.6B Mixed INT4 for LiteRT-LM
- a companion-node job queue aligned with TheOrc role architecture
What it does not claim yet:
- full distributed HIVE task execution from TheOrc
- autonomous mobile inference scheduling
- measured S23 performance/thermal tuning
- production signing
- broad local model catalog support
That honesty matters. The companion is now useful, but it is still in the "groundwork and field-node bring-up" phase.
The strongest next upgrades are:
- signed work packets from TheOrc into the companion queue
- capability heartbeat reporting back to HIVE
- route auto-selection between LAN and Tailscale
- validate LiteRT-LM download/load/chat/cancel on the S23
- add production release signing
- add optional licensed Gemma models after the in-app model catalog can handle gated downloads cleanly
- optional native LiteRT
@Toolproviders once a tool-capable on-device model is added
The desktop boss, HIVE design, and broader swarm runtime live here:
If TheOrc is the warboss, this repo is the scout, relay, and field terminal.
If this project is useful to you, consider supporting its development. Across ORC projects, support helps fund development time, hardware testing, receiver compatibility, and decoder work.