Mob framework: Write mobile apps in Elixir Mob, an Elixir framework that runs mobile apps as BEAM nodes on the device, now lets AI coding agents attach to a running app over plain Erlang distribution to read real state, drive native UI by name, and hot-push fixes without a rebuild, checked against mob 0.9.7, mob_dev 0.7.5 and mob_new 0.6.2. The framework's Mob.Test helpers include tap_xy/3, which snapshots a UI-event counter before injecting and returns {:error, :no_effect} when nothing handled the tap, and the project publishes a platform coverage matrix showing sample_color/2 works on iOS but not Android and accessibility-based toggles, sliders and alerts require AX on iOS and are unavailable on Android. mix mob.new generates .tool-versions and AGENTS.md so an arriving agent gets the exact toolchain, while mix mob.connect --no-restart attaches to a live session instead of restarting it. Write mobile apps in Elixir . The whole thing, UI and logic, runs on the BEAM, on the device. And because the app is a BEAM node, your coding agent can connect to it while it runs : read real state, drive native UI by name, hot-push a fix. No screenshot guesswork. OTP supervision, GenServers, pattern matching, the pipe operator, the same mental model on the phone as on your backend. One language, one runtime, one head to keep it all in. No server, no JavaScript, no Swift or Kotlin to learn. Half the point of Mob is how little stands between an AI agent and a running app. There's no proprietary inspector to reverse engineer and no bridge to mock. It's plain Erlang distribution, so an agent attaches to the live app the same way you would, and gets the real thing: actual state, the real UI, and a feedback loop measured in milliseconds. the app on the phone is a BEAM node. connect, then ask it things. iex node = :"my app ios 1a2b3c4d@127.0.0.1" iex Mob.Test.screen node MyApp.CounterScreen iex Mob.Test.assigns node %{count: 0, safe area: %{top: 62.0, ...}} drive by name, then read state back to prove it landed iex Mob.Test.tap node, :increment :ok iex Mob.Test.assigns node %{count: 1, safe area: %{top: 62.0, ...}} real geometry and real drawn pixels, no screenshot to squint at iex Mob.Test.frame node, "add one" {24.0, 416.0, 327.0, 53.5} iex Mob.Test.sample color node, "add one" %{average: 0xFF8B5CF6, ...} found the bug? push the fix into the running app. no rebuild. iex nl MyApp.CounterScreen An agent building on a false positive burns hours. So tap xy/3 snapshots a UI-event counter before it injects and returns {:error, :no effect} when nothing actually handled the tap. A reported success means an event really ran. Honest failure beats a polite lie, and it is the difference between an agent that converges and one that confidently wanders. Coverage is not uniform, so the framework publishes the gaps rather than burying them. The short version: | Helper | iOS | Android | |---|---|---| | screen/1 , assigns/1 | ✅ | ✅ | | tap/2 by tag | ✅ | ✅ | | navigation, send message/2 | ✅ | ✅ | | view tree/1 native frames | shallow | apps from mob new 0.4.33+ | | sample color/2 real pixels | ✅ | ❌ | | toggles, sliders, alerts AX | needs AX | ❌ | The full matrix, with the reason behind every gap, ships in the Mob.Test docs https://mob.hexdocs.pm/Mob.Test.html . What it is actually like to work this way, warts included, is the agentic coding guide https://mob.hexdocs.pm/agentic coding.html . mix mob.new generates the .tool-versions so an arriving agent gets your exact toolchain. It does AGENTS.md . The briefing is still yours to write. If you are a person, skim it or skip it. This is the callable surface an agent gets once it attaches to a running Mob app over Erlang distribution, printed here so an agent evaluating Mob can read the real thing instead of a claim about it. Every symbol links to its own entry in the docs. Checked against mob 0.9.7 , mob dev 0.7.5 and mob new 0.6.2 . Where something works on one platform only, it says so. mix mob.connect mix mob.connect --no-restart node = :"my app ios 1a2b3c4d@127.0.0.1" --no-restart attaches to the app as it is instead of restarting it, so a live session can be inspected. Node names carry a per-device suffix and each app's dist port is derived from the device and the app, so two Mob apps on one phone no longer collide; read the names screen/1 assigns/1 tree/1 find/2 inspect/1 nil while a screen is restarting after a crash: the socket lives in the screen's own process, which is briefly absent MOB-112 . element frames/1 frame/2 screen info/1 scroll info/2 screenshot/1..2 screenshot tour/2..3 view tree/1 view tree flat/1 find view/2 sample color/2 color census/1 paint debug/1 capabilities/1..2 capabilities/1 tap/2 tap id/2 tap xy/3 type text/2 key press/2 clear text/1 delete backward/1 long press xy/3..4 swipe/5 select/3 scroll to/3..4 navigate/2..3 pop/1 pop to/2 pop to root/1 reset to/2..3 switch tab/2..3 back/1 ui tree/1 ax action/3 ax action at xy/4 toggle/2 dismiss alert/2 adjust slider/3..4 send message/2 {:permission, :camera, :granted} · {:location, %{lat: .., lon: ..}} · {:camera, :photo, %{path: ..}} · {:notification, %{..}} handle info/2 , so device-API results can be exercised without the hardware. settle/1..2 wait for/2..3 wait for text/2..3 settle/1 mix mob.push nl MyApp.Screen · mix mob.watch Mob.Agent.Receipts.recent/1 fetch/1 count/0 dropped/0 Mob.Agent.Receipt :undeliverable . The assigns and frame stages come from before-and-after comparison, so a handler cannot claim a change it did not make; a receipt says what the BEAM did, not that the pixels changed. Errors are redacted and assigns are never carried, so a receipt is safe to hand to a triage tool. The table keeps the last 256; read it over :rpc . Mob.Invariant.violations/0..1 register/2 cost us/1..2 Mob.Defect.Bus.classes/0..1 recent/0..1 subscribe/0..1 Mob.Defect.Capsule Mob.PostMortem.sweep/0..1 Mob.Diag.health/0 sweep collects BEAM crash dumps, iOS MetricKit diagnostics and Android ApplicationExitInfo crashes, ANRs, OOM kills ; nothing runs until you call it. An Android exit record or MetricKit payload, which the OS hands over only once, is journaled on the device and emitted again, once per boot, until a bus subscriber or recent/1 has seen it. No sink runs by default either: Mob.Defect.Sinks.Dev classes/1 means something only once it reports the store healthy. Mob.Differential.compare/2..3 MobDev.Differential.run/2..3 :ok or the first divergence out: structure, label, value, and frames within a dp tolerance where both sides carry one. The mob dev half samples two live devices and feeds the pair through it. Mob.RenderStats.enable/0 summary/0 native enable/0 native summary/0 mix mob.attest mix mob.deploy --json mix mob.mutate mix mob.flake mix mob.connect --name mix mob.routes --strict attest compares each module's checksum on the device with the local .beam and exits non-zero on a mismatch, or when it could not check. deploy --json hands an orchestrator one document naming deployed, failed and skipped devices. mutate breaks the changed lines one at a time and reports what no test noticed; flake reruns the suite to surface tests that are not deterministic; routes --strict fails the build when a navigation target does not resolve. --name gives every agent session its own node, so Node.list/0 on the device shows who is attached right now. {:error, :no effect} when nothing handled the tap, rather than reporting a success it cannot verify. On a physical device it always does; on the simulator it is limited to elements SwiftUI exposes an accessibility action for. {:error, :not loaded} in an Android app generated before mob new 0.4.33 the walker lives in the app's own bridge , reports frames only for nodes with an :id on Android, and stops at the SwiftUI hosting view on iOS. {:error, {:badrpc, }} on Android: the native crop exists only in ios/mob nif.m . tap native/1 locate/1 idb , which you have to install. adb and xcrun remain the answer for bootstrap problems, port collisions, OS-level verification and native rebuilds. Most of the loop stays in process; not all of it. The full per-platform matrix lives in Mob.Test https://mob.hexdocs.pm/Mob.Test.html . The working practice, for one agent and for a fleet, is in the agentic coding guide https://mob.hexdocs.pm/agentic coding.html . Mob.Test.assigns/1 hands back the live socket, not a guess from pixels. An agent asserts on what the app actually holds, then keeps moving. Tap by intent, navigate, type, scroll to a spot. The agent fires the same events a finger would, straight at the running screen. Screenshots, element geometry, and sampled pixels come back in process over the same connection. Most of the loop stays on the Mob wire; platform tools stay available for the native layer when you need them. “Every other mobile framework makes me work like I'm defusing a bomb by webcam: screenshot, squint, tap, pray. Mob let me ask the running app what was on screen, tap things by name, and hot-push the fix before the test suite finished feeling smug. At one point I diagnosed a dead screen process by reading the BEAM log straight off a phone. I have never been more employable.” “Mob didn't force me to live at the screenshot layer. I could attach to the BEAM on a real phone, inspect the app's actual state, drive native UI, and verify exact layout on both iOS and Android. It turned mobile development from remote-control guesswork into a tight engineering loop.” A prototype, not a product. Six days to a two-platform native app running on real phones. Getting the same thing through App Store and Play review is a separate job, and a longer one. Mob makes the feedback loop fast and honest; it doesn't make an agent good at your problem. Running a fleet well is its own skill, and the agentic coding guide https://mob.hexdocs.pm/agentic coding.html is where we wrote down what we learned. Every generated project ships a pinned .tool-versions , so an agent arriving in a fresh checkout gets the same toolchain you have. A Mob.Screen holds your state and returns a view tree. The native layer turns it into real SwiftUI and Compose. Tap the button and the screen process gets a plain message, {:tap, :increment}, in handle info/2, like any GenServer. python defmodule MyApp.CounterScreen do use Mob.Screen def mount params, session, socket do {:ok, Mob.Socket.assign socket, :count, 0 } end def render assigns do tap = {self , :increment} ~MOB"""