Skip to main content

Snippbot Device Agent

Connect any machine to Snippbot as a remote execution node.

What It Does

The device agent runs on a remote machine and connects back to your Snippbot daemon via WebSocket. Once paired, the AI agent can route tool calls — shell commands, file operations, screenshots, browser automation — to the remote device.

Installation

pipx install snippbot-device

Or in a virtual environment:

pip install snippbot-device

With optional capabilities (use pip in a venv):

pip install snippbot-device[screen]    # Screenshots (Pillow + mss)
pip install snippbot-device[browser]   # Browser automation (Playwright)
pip install snippbot-device[camera]    # Camera capture (OpenCV)
pip install snippbot-device[all]       # All optional capabilities

Requires Python 3.11 or higher.

Quick Start

1. Pair with your Snippbot daemon

From the Snippbot UI, click Pair Device to generate a 6-digit pairing code. Then on the remote machine:

snippbot-device pair --host DAEMON_IP --port 18781 --code XXXXXX

2. Start the agent

snippbot-device start        # Background (daemonized)
snippbot-device start -f     # Foreground (see logs)

3. Verify

snippbot-device status       # Check connection and resource usage
snippbot-device capabilities # List detected capabilities

Commands

snippbot-device pair          Pair this device with a Snippbot daemon
snippbot-device configure     Change the daemon address or Cloudflare Access token
snippbot-device start         Start the device agent
snippbot-device stop          Stop the running agent
snippbot-device status        Show agent status and connection info
snippbot-device capabilities  List detected capabilities

Capabilities

The agent auto-detects what the machine can do:

Capability Requirement Description
execution.bash Built-in Shell commands (bash, zsh, cmd)
execution.python Built-in Python script execution
filesystem.read Built-in Read files
filesystem.write Built-in Write files
filesystem.transfer Built-in Send/receive files to daemon
system.info Built-in OS, CPU, memory, disk info
capture.screenshot [screen] extra Take screenshots
capture.camera_photo [camera] extra Camera capture
browser.navigate [browser] extra Browser automation
display.remote_view [remote] extra Screen streaming
execution.docker Docker CLI in PATH Docker container management

Configuration

Config is stored at ~/.snippbot-device/config.toml after pairing.

daemon_host = "192.168.1.100"
daemon_ws_port = 18781
device_name = "my-laptop"
device_token = "device_..."
device_id = "..."
max_concurrent_tasks = 4
heartbeat_interval = 15
auto_update = true

Connecting Through a Tunnel

To reach the daemon from outside its LAN, give the agent a full WebSocket URL instead of a host and port. If the hostname is protected by Cloudflare Access, also give it a service token. The token needs an Access policy with the Service Auth action on that application.

snippbot-device configure --url wss://daemon.example.com/device/ws \
    --cf-access-client-id <CLIENT_ID>          # prompts for the secret
snippbot-device stop && snippbot-device start

This doesn't need re-pairing, because the device authenticates with its token, not its address. snippbot-device configure --local switches back to the paired host and port, and --clear-cf-access removes the token. You can also pair through the tunnel with snippbot-device pair --url <wss-url>; run configure first if the tunnel needs an Access token.

The settings are stored in the [connection] section:

daemon_url = "wss://daemon.example.com/device/ws"
cf_access_client_id = "....access"
cf_access_client_secret = "..."

On Windows, Ctrl+V doesn't paste into the hidden secret prompt; right-click to paste instead.

How It Works

  1. The agent connects to the daemon via WebSocket (ws://host:port/ws/device)
  2. Authenticates using the token received during pairing
  3. Advertises its capabilities (what tools it can execute)
  4. Enters a message loop waiting for tool requests
  5. Sends heartbeats every 15 seconds with CPU/memory/disk metrics
  6. Auto-reconnects with exponential backoff if the connection drops

Security

  • Device tokens are stored locally and validated on each connection
  • Environment variables matching *_KEY, *_SECRET, *_TOKEN, *_PASSWORD are stripped from command execution
  • File operations are restricted to allowed paths (configurable)
  • Execution timeout: 5 minutes max per tool call
  • Output limit: 1 MB per result

Logs

# Foreground mode: logs to stdout
# Background mode: logs to ~/.snippbot-device/agent.log
tail -f ~/.snippbot-device/agent.log

See Also

Release files for snippbot-device 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snippbot-device 0.1.7
File Size Uploaded
snippbot_device-0.1.7.tar.gz 32.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snippbot-device 0.1.7
File Interpreter ABI Platform
snippbot_device-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 71.7 kB

Release files / snippbot_device-0.1.7.tar.gz

Download URL snippbot_device-0.1.7.tar.gz
Size 32.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a52338c80cc8d66554efc9df4c7bc1415b4af63ba191cd694a3a61345fbd1241
BLAKE2b-256 checksum
How to use checksums
10550ef448d6736f6aee588eb4e0cc000943920897f775dc56da2501f2b5e3e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release files / snippbot_device-0.1.7-py3-none-any.whl

Download URL snippbot_device-0.1.7-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3c4f15127664d07e1a2cc5055d283625fdddd6a3c566b0e729307608ffd0efa
BLAKE2b-256 checksum
How to use checksums
13b2c3a69568880108884f0313566cb9f767e127d440a834017c132638139984
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page