DEV Community

Cover image for TroLLM: small local models running real browser workflows
Alechko
Alechko

Posted on

TroLLM: small local models running real browser workflows

TL;DR
TroLLM is an open-source, Apache-2.0, Android-first runtime for AI workflows using small local language models. A Rust runtime manages authored steps, persistent state, evidence, MCP tool access, validation and recovery. A tool-capable coder makes bounded decisions; an optional reasoner provides advice. Compatible MCP servers supply tools; our Amazon browser example uses E2LLM/SiFR. We published the source, an experimental Android APK 1.0.1 and two successful historical Amazon cart runs on Samsung A04e and S21 with Qwen3.5 0.8B + 2B models, full measurements and sanitized execution evidence.

We have open-sourced TroLLM, an Android-first runtime for authored AI workflows using small local language models.

Alongside the source and an experimental Android APK, we published two completed Amazon cart workflows running local inference on a Samsung Galaxy A04e and a Galaxy S21. Both used Qwen3.5 models: a 0.8B coder and a 2B reasoner.

Each run involved more than 500 model calls. The largest recorded model inputs were 1,237 tokens on A04e and 1,253 on S21. The system carried the procedure and saved state between calls, giving each model task its relevant inputs.

The code, exact workflow bundle and historical run evidence are now available for inspection.

How the work is divided

TroLLM separates model decisions from workflow execution.

  • Coder: Interprets inputs and selects permitted tool calls.
  • Reasoner: Provides optional advice without direct tool access.
  • Runtime: Executes the authored workflow, validates calls, manages evidence and state, enforces limits, and handles recovery.

The workflow defines the available steps and allowed transitions. Models make decisions within those boundaries. The runtime preserves results and passes the required data between tasks.

The system is built with Rust, Kotlin/Compose and llama.cpp. Model roles and model files are configurable.

Connecting tools through MCP

TroLLM uses MCP (Model Context Protocol) to connect models and workflows with external tools and services.

Flows can declare tools exposed by compatible MCP servers, with explicit permissions, argument contracts and execution limits.

For the Amazon runs, we used E2LLM/SiFR to provide structured browser observations and browser actions through MCP.

The same runtime can work with other compatible MCP services for different workflows. E2LLM is the browser integration used in this example, rather than a mandatory dependency of TroLLM.

Local inference runs on the Android device. Connected tools, including a browser running on another computer, may require network access.

Two complete Amazon cart runs

We recorded two complete executions of the same authored Amazon shopping workflow, using the same model configuration and v342 workflow bundle.

The mission:

Put two retail units of one Head & Shoulders shampoo SKU and one yellow rubber duck retail package into an initially empty Amazon cart, with a merchandise subtotal strictly below $20.

The number of individual ducks inside the retail package was unrestricted. Shipping and taxes were excluded from the merchandise budget. Checkout and payment were outside the mission.

Both runs used:

  • Coder: Qwen3.5-0.8B Q4_K_M
  • Reasoner: Qwen3.5-2B Q3_K_M
  • Context: 8,192 tokens per model
  • Temperature: 0.1
  • Top-p: 0.9
  • Thinking: Disabled

Recorded results

Measurement Samsung A04e Samsung S21
Full execution time 4h 20m 21s 1h 41m 31s
Coder calls 550 534
Reasoner calls 28 28
Tool calls 537 522
Recovered tool failures 4 5
Final product lines 2 2
Final retail units 3 3
Merchandise subtotal $13.69 $18.53
Final outcome Succeeded Succeeded

Both runs started from independently checked empty carts.

Each used one Start, without Resume, seeded intermediate state, skipped stages or manual browser assistance during execution.

The workflows completed the required cart operations, including quantity adjustment and final verification. A separate browser inspection confirmed the resulting cart contents.

The selected products and observed execution paths differed between devices. The recorded durations are end-to-end results for these executions, rather than an isolated hardware benchmark.

These are two selected successful runs. Other development attempts stopped or remained unresolved. The pair is provided as execution evidence, without a claim of measured reliability across arbitrary tasks.

Recorded token measurements

The runtime records native model input and output token counts together with execution timing.

Input counts include the tokenized, chat-templated request and applicable control tokens. They are full model-input measurements, rather than counts of SiFR snapshots alone.

Input tokens per model call

Measurement A04e S21
Median, all calls 45 45
95th percentile, all calls 229 211
Median, reasoner calls 378 418.5
Maximum, either role 1,237 1,253
Total input tokens 46,713 46,257
Total output tokens 16,957 16,509

Recorded execution timing

Measurement A04e S21
Model-call time, total 15,077.386 s 5,692.107 s
Prefill time, total 6,820.999 s 2,259.148 s
Generation time, total 8,168.765 s 3,385.544 s
Gateway elapsed, summed observations 350.388 s 315.534 s

The published measurements also include tool-call timing, prompt sizes, serialization measurements and model-call counts.

Timing scopes can overlap. The reported fields should not be added together to reconstruct total execution time.

The historical run records contain additional per-call measurements and execution events.

Inspect the evidence yourself

TroLLM is open source under Apache 2.0. The repository includes the runtime, Android application, workflow definitions, documentation and an experimental APK.

The published v342 evidence package contains the original workflow bundle, readable flow definitions, model identities, execution results, measurements and sanitized historical journals.

Source and release

Run evidence

Clone the repository and run:

git clone https://github.com/e2llm/trollm.git
cd trollm
python3 scripts/check-run-examples.py
Enter fullscreen mode Exit fullscreen mode

The script verifies the published file checksums, historical workflow bundle, recorded outcomes, aggregate metrics and context statistics against the sanitized execution journals.

The historical evidence has privacy redactions. Some page content, identifiers and model prose are replaced by redaction markers with original byte counts and hashes. These records support inspection of execution structure and measurements, but do not expose every semantic decision for independent review.

The current downloadable APK is version 1.0.1. The archived v342 runs used an earlier experimental APK68 build, with its own recorded identity.

For a first hands-on test, the Android application includes simpler local workflows that do not require a browser connection. Browser workflows require configuring a compatible MCP service.

We invite developers working with small local models, MCP tools and workflow runtimes to inspect the source, check the recorded evidence and try the system with their own workflows.

If you find an inconsistency, a limitation or a better approach, open an issue or share your results.

Repository: https://github.com/e2llm/trollm

Top comments (0)