Docs pages: InstallAndroid

Install OpenAgentd on Android

The Android app connects to an OpenAgentd server on your computer. It is not on Google Play, so you install the APK from each release.

The OpenAgentd app on an Android phone or tablet connects over HTTP on your local network, sending the access key encrypted with a key held in the Android Keystore, to OpenAgentd on your computer (the desktop app with access from other devices on, or the CLI server), which holds your agents, sessions, and keys and calls the model provider. From outside a trusted network, an HTTPS reverse proxy or a VPN sits between them.Android phone or tabletYour computerHTTP on your networkwith the access keyOpenAgentd appAccess keyKeystore-encryptedHTTPS proxy or VPNoutside your networkOpenAgentd serverdesktop app or CLI serverModel providerthe one you choose
Fig. 1The phone is a window onto the server on your computer.
On this page

Requirements

Android 7.0+, 64-bit ARM
Android System WebView
A server it can reach
Fig. 2What you need: a 64-bit Android phone or tablet, an up-to-date WebView, and a server it can reach.
More detail: the requirements in full
  • An Android phone or tablet running Android 7.0 or later with a 64-bit ARM processor. Nearly every phone sold since about 2017 qualifies.
  • An up-to-date Android System WebView, which updates through Google Play.
  • An OpenAgentd server the phone can reach (see "Connect to your server").
  • No account. Remote control, which lets the phone reach your computers away from home and tells you when an agent is done or needs you, is optional and in beta. It needs Android 11 or later and a screen lock (a PIN, pattern, or password). Its keys stay in the Android Keystore, and adding, approving, or removing a device asks for your fingerprint or screen lock.
  • With Remote control, allow notifications for OpenAgentd when Android asks. Done, Needs you, Failed, and devices asking to join each have their own channel under Settings > Apps > OpenAgentd > Notifications, so you can mute one. If they arrive late, set OpenAgentd's battery use to Unrestricted.

Install the APK

The server holds your agents, sessions, and keys; the app does not run a backend of its own. Each release includes an .apk you install directly.

Fig. 3Installing the APK: allow your browser to install unknown apps, then Install. If Play Protect warns, More details, then Install anyway.
  1. On the phone, download OpenAgentd_<version>_Android.apk from the latest release. You can also download OpenAgentd_<version>_Android.apk.sha256 and check the file on a computer:
    Check the file
    shasum -a 256 -c OpenAgentd_<version>_Android.apk.sha256
  2. Open the downloaded APK. If Android asks, allow your browser or file manager to Install unknown apps, then go back and tap Install.
  3. If Google Play Protect warns about an unknown app, tap More details > Install anyway. The warning shows for any app that is not from Google Play.
  4. Open OpenAgentd from the app drawer.
More detail: installing with adb, and downloads

With a computer and USB debugging on, you can also install it with adb:

Terminal
adb install -r OpenAgentd_<version>_Android.apk

Files you download in the app open the system share sheet.

Update

Fig. 4The app checks for updates itself: Download, then Install.

The app checks for updates itself. When a new version is out, a card offers Download and then Install; you can also check from Settings > About > Updates. The first time, Android asks you to allow installs from OpenAgentd: turn it on, go back, and tap Install again.

More detail: updating by hand, and signing

You can still update by hand: download the newer APK and open it. Either way Android installs it over the existing app and keeps your saved servers and access keys. Every release is signed with the same key; Android refuses an update signed with a different one.

Connect to your server

The phone connects to OpenAgentd on your computer: the desktop app, or the CLI server. The desktop app needs nothing else installed.

Fig. 5Pairing by QR code: Show QR in the desktop app, Scan QR code on the phone, and the form it fills in. The address and name are examples.

From the desktop app

The desktop app can let phones and other computers on your network connect to its builtin backend:

  1. In the desktop app, open Settings, choose Switch computer, and find Let other devices connect.
  2. Turn on Allow devices on your network to connect.
  3. Under Connect a device, note the Address and This computer's access key. Use Show or Copy to read the key.
  4. To skip typing them, choose Show QR. In the OpenAgentd app, tap Scan QR code on the Computers screen (beside Add a computer by address), or scan the code with the phone's camera. The app opens a form with the first reachable address and the key filled in, and tests the connection. The phone connects only after you tap Connect.
More detail: the QR code, port, key, firewall, and turning it off
  • The QR code contains the access key. It hides when the key changes or access is turned off.
  • It listens on port 4082, or on the next free port if 4082 is taken. The page tells you which.
  • The desktop app generates the key and keeps it in a file only your user can read, network-access-key in its config folder. You can Regenerate… it, or use your own key of 16 or more characters.
  • If a device paired with an older desktop install reports Unauthorized, pair it again with the current key. A key kept in the system credential store by that install is not carried over.
  • It turns on and off without restarting the backend or stopping running turns. Turning it off or changing the key disconnects devices that use the old key right away. Access ends when the app quits.
  • Traffic is plain HTTP, so use it on a network you trust.
  • On Windows, the installer allows the backend through the firewall on Private networks only; on a network marked Public the port stays closed. When devices cannot connect, the page shows the firewall step for your platform.

From the CLI server

Or, on the computer that runs OpenAgentd, start a CLI server the phone can reach:

Start the server
agentd server start --public --key --qr
Check it
agentd server status
More detail: what the flags do, and installing the CLI server

--public listens on every network interface, and --key prompts you to choose the access key every client must send; the server refuses to listen on the network without one. --qr prints a QR code: scan it with the phone's camera to open the app's form for a new computer with the address and key filled in, then tap Connect. agentd server status --qr shows it again.

If OpenAgentd is not installed yet, install the CLI server:

Terminal
curl -fsSL https://openagentd.dev/install.sh | sh -s -- --cli

In the app

  1. Open Settings > Switch computer (or tap Computers on the Sessions screen) and choose Add a computer by address.
  2. Enter the server's address and the access key: the Address the desktop app shows (with its access key), or the CLI server's LAN address, for example http://192.168.1.20:4082. A Name is optional.
  3. Choose Connect. The app checks the address and key, saves the computer, and switches to it. The key is encrypted with a key held in the Android Keystore.
More detail: reaching it from outside your network

The server has no built-in TLS. To reach it from outside a trusted network, put an HTTPS reverse proxy (or a private network such as a VPN) in front of it, and connect to that address instead.

Home-screen widgets

Touch and hold an empty spot on the home screen, tap Widgets, and find OpenAgentd. There are three:

Fig. 6The three widgets on a home screen. Sessions, tasks and times are examples.
More detail: what each widget shows, and how fresh it is
  • Quick start (2x2): continue your last session, or start a new one in your last folder.
  • Sessions (4x2): up to three sessions, the ones that need you first, then the ones still running, then recent ones.
  • Next task (2x2): your next scheduled task and whether its last run passed. Tapping it opens the scheduler on that task.

The widgets show what the app knew the last time it was open, with an "as of" time. Open the app to refresh them. After 30 minutes, "Needs you" and "Running" turn into plain ages, because the session may have moved on. The widgets never store the server address or access key.

Troubleshooting

  1. 1Same network?The phone and the computer
  2. 2Access on?Allow devices… in the desktop app, or --public --key for the CLI
  3. 3Key matches?Otherwise "Unauthorized": re-enter the current key
Fig. 7When the app cannot reach your server, check these in order.
More detail: every problem and its fix
ProblemFix
"App not installed" on a fresh installThe phone runs a 32-bit system, which this APK does not support, or the download is incomplete. Check the .sha256.
"App not installed" when updatingThe installed copy was signed with a different key, such as a local developer build. Uninstall it, then install the release APK. You will need to add your servers again.
The app cannot reach the serverCheck that the phone and the computer are on the same network. With the desktop app, check that Allow devices on your network to connect is on in Settings > Switch computer and the app is open (on Windows, that the network is marked Private). With the CLI server, check that it was started with --public --key. Turn off mobile data to rule out the phone leaving Wi-Fi.
"Unauthorized" when connectingThe access key does not match. Re-enter the current key the desktop app shows, especially after regenerating it or moving from an older install, or the key you chose for the CLI server. To set a new CLI key, run agentd server restart --public --key.
Scanning the QR code shows text instead of opening the appSome Android camera apps do not open apps from this kind of code. Scan it from the app instead, with Scan QR code on the Computers screen (Settings > Switch computer), or enter the Address and Access key the desktop app shows by hand.
The app asks for the access key again after restoring a backup or moving to a new phoneExpected. The encryption key stays on the original device, so re-enter the access key.
The screen is blank or looks brokenUpdate Android System WebView and Chrome in Google Play.
Tapping a widget does nothingAndroid cancels a widget's taps when the app is force-stopped. Open the app once and the widgets work again.
"Set a screen lock on this phone to use an OpenAgentd account"Remote control needs a PIN, pattern, or password. Set one in Android's settings, then try again.
"Accounts need Android 11 or later"Remote control is not available on this phone. Connect to your server by address instead.
"This phone can't add devices any more"The screen lock was turned off, which removed the key that adds devices. Add devices from another phone; this one still opens your computers.
"Push notifications are not set up in this build"A build made without push settings, such as a local developer build. Install the release APK.

This guide is also in the repository: Install the OpenAgentd Android app.