BeeOS DeviceAgent
AI-powered device control agent supporting ACP, MQTT, and WebRTC channels.
Installation
pip install beeos-device-agent
For AI automation (MobileAgent v3.5):
pip install beeos-device-agent[ai]
Local Development Setup
# Install bridge-client first (local dependency)
cd sdks/bridge-client-python && python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"
# Install device-agent
cd sdks/device-agent && python3 -m venv .venv
.venv/bin/pip install -e ../bridge-client-python
.venv/bin/pip install -e ".[dev]"
# Run tests
.venv/bin/pytest tests/ -v
Usage
CLI (Android via ADB)
python -m device_agent \
--bridge ws://localhost:18443 \
--key ~/.beeos/test-device.key \
--adb <serial> \
--mqtt-host localhost --mqtt-port 1883 --no-mqtt-tls \
--http --http-port 9090
CLI (Desktop mode, no ADB needed)
python -m device_agent \
--bridge ws://localhost:18443 \
--key ~/.beeos/test-device.key \
--mode desktop \
--mqtt-host localhost --mqtt-port 1883 --no-mqtt-tls \
--http --http-port 9090
CLI Options
| Flag | Default | Description |
|---|---|---|
--bridge |
(required) | Bridge WebSocket URL |
--key |
auto-generated | Ed25519 key file path |
--mode |
android |
Runtime mode: android or desktop |
--adb |
auto-detect | ADB device serial (android mode) |
--mqtt-host |
(empty) | MQTT broker host (enables MQTT channel) |
--mqtt-port |
8883 |
MQTT broker port |
--no-mqtt-tls |
false | Disable MQTT TLS (for local dev) |
--http |
false | Enable REST API |
--http-port |
8080 |
REST API port |
--vlm-model |
gpt-4o |
VLM model for AI automation |
Python API
from device_agent import DeviceAgent, DeviceAgentConfig
from device_agent.runtime.android_adb import AndroidADBRuntime
runtime = AndroidADBRuntime(serial="R5CT1234")
config = DeviceAgentConfig(
bridge_url="ws://localhost:18443",
key_file="~/.beeos/test-device.key",
mqtt_host="localhost",
mqtt_port=1883,
mqtt_use_tls=False,
)
agent = DeviceAgent(config, runtime)
await agent.start()
REST API (when --http is enabled)
| Endpoint | Method | Description |
|---|---|---|
/device/info |
GET | Device metadata |
/device/screenshot |
GET | PNG screenshot |
/device/action |
POST | Touch/key/shell actions |
/tasks |
POST | Submit AI task |
/tasks/{id} |
GET | Get task status |
Docker
The Dockerfile uses the repository root as the build context (because it
needs sdks/bridge-client-python at build time).
docker build -f sdks/device-agent/Dockerfile -t beeos-device-agent .
docker run --rm \
-e BRIDGE_URL=wss://bridge.beeos.ai \
beeos-device-agent \
python -m device_agent \
--bridge wss://bridge.beeos.ai \
--adb <device-serial> \
--mqtt-host mqtt.beeos.ai
Architecture
Three independent channels:
- ACP (via Bridge) — AI chat + device management (JSON-RPC 2.0 over WebSocket)
- MQTT (via EMQX) — WebRTC signaling + device telemetry
- WebRTC (P2P/TURN) — on-demand video streaming + DataChannel control
Each DeviceAgent instance represents one device (1 device = 1 process = 1 BeeOS Instance). The agent manages all three channels independently and coordinates them for features like on-demand streaming (auto-start when viewed, auto-cooldown when idle).
Metadata
Release files for beeos-device-agent 0.3.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| beeos_device_agent-0.3.8.tar.gz | 80.0 kB | Without provenance | Details for beeos_device_agent-0.3.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| beeos_device_agent-0.3.8-py3-none-any.whl | Python 3 | none | any | Details for beeos_device_agent-0.3.8-py3-none-any.whl |
Total release size: 172.3 kB
Release files / beeos_device_agent-0.3.8.tar.gz
| Download URL | beeos_device_agent-0.3.8.tar.gz |
|---|---|
| Size | 80.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c1369bf6dbd55e01329d901f4054bcb1cc3896d70e6c1884ba0a0bb25f948a9
|
|
BLAKE2b-256 checksum How to use checksums |
45e71dc35d83d5c47db23bdeee60b7b2d808dbaa3fba30f6eeec2243ecf3a3e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / beeos_device_agent-0.3.8-py3-none-any.whl
| Download URL | beeos_device_agent-0.3.8-py3-none-any.whl |
|---|---|
| Size | 92.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eaf7ab3e9aba01f5927d7e69083ac08eec79b9e3522b71957632ae75c647c5d0
|
|
BLAKE2b-256 checksum How to use checksums |
2eac72751e754d9fbe948add9a1d7110f86a25a6105221e87059c42e16ac5bcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for beeos-device-agent 0.3.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.