Skip to main content
The MacOS skill lets agents control a Mac like a human: taking screenshots, clicking and typing, opening apps, managing files, and reading system state. It communicates with the Definable Desktop Bridge — a lightweight Swift app that exposes macOS capabilities over a local HTTP API.
This skill executes real macOS actions. Always use allowed_apps or blocked_apps in production to limit exposure. Keep the bridge bound to 127.0.0.1 (default) — never expose it to external networks.

Setup

1. Build and run the Desktop Bridge

On first launch the bridge:
  • Generates a random auth token and writes it to ~/.definable/bridge-token (chmod 600)
  • Checks Accessibility and Screen Recording permissions
  • Listens on http://127.0.0.1:7777
Grant permissions in System Settings → Privacy & Security when prompted.

2. Install the Python package

The desktop extra adds websockets for the optional DesktopInterface. The bridge client uses httpx, which is already a core dependency.

Quick Start

The skill reads ~/.definable/bridge-token automatically — no token configuration required.

Constructor Parameters

str
default:"\"127.0.0.1\""
Bridge hostname. Change only if the bridge runs on a different host.
int
default:7777
Bridge port.
Optional[str]
default:"None"
Bearer token for bridge authentication. If None, automatically reads from ~/.definable/bridge-token.
Optional[Set[str]]
default:"None"
App allowlist. When set, only app names in this set can be targeted by tools. Apps in both allowed_apps and blocked_apps are blocked (blocked takes precedence).
Set[str]
default:"set()"
App blocklist. App names in this set are always rejected, regardless of allowed_apps.
bool
default:true
Expose the run_applescript tool. Disable when scripting access is not needed.
bool
default:true
Expose write_file and move_file tools. read_file and list_files are always available.
bool
default:true
Expose input simulation tools: click, type_text, press_key, scroll, drag, set_clipboard, click_element, set_element_value.

Tools Reference

Screen (always available)

Input (requires enable_input=True)

Apps (always available)

Windows (always available)

Accessibility (always available)

Files (always readable; write requires enable_file_write=True)

Clipboard (always available)

System (always available)

AppleScript (requires enable_applescript=True)

Tool Counts

Safety Controls

App Allowlisting

App Blocklisting

Read-Only Mode

When allowed_apps and blocked_apps both contain the same app, blocked_apps wins (security-first).

Required macOS Permissions

Grant these in System Settings → Privacy & Security before using the bridge: The /health endpoint reports current permission status:

Remote Control via Telegram

Control your Mac remotely using the MacOS skill + Telegram interface:
The MacOS skill works with any Definable interface — Telegram, Discord, or a custom WebSocket frontend.

Using BridgeClient Directly

See definable/definable/interfaces/desktop/bridge_client.py for the full API.

DesktopInterface (Local Chat)

The DesktopInterface provides a local WebSocket server for direct chat without an external messaging platform:
Connect with any WebSocket client sending {"text": "your message"}.

Bridge API Reference

The bridge exposes a JSON HTTP API on http://127.0.0.1:7777. All endpoints require Authorization: Bearer <token>. See the Desktop Bridge README for the full endpoint reference.