Multi-device plan

Status: plan, not built. See Next.

One owner, many devices, one brain. Parts of it exist in other forms: per-device tokens (device scope), computers as nodes (Computers) and remembered phones (Accounts).

Goal

The assistant knows which devices the owner has, what each can do, and which one a request came from. It builds this from variables (env + config file), not from guessing. The model reads a short device summary; the core enforces the rules.

This is not multi-user (see Open questions #8). Every device belongs to the same owner_id.

Model: one host, many clients

The host is the only writer to the DB. Clients never sync a copy of memory.

Where devices are declared

Two sources. Env overrides the file.

  1. File devices.toml in the config dir.
  2. Env variables, one group per device: ASSISTANT_DEVICE_<ID>_<FIELD>.
[devices.laptop]
name = "Main laptop"
kind = "laptop"            # laptop | desktop | phone | tablet | watch | server | home_hub | other
os = "macos"
role = "host"              # host | client | node
capabilities = ["files", "shell", "calendar_ui"]
can_approve = ["low", "medium", "high"]
location = "home"
token_ref = "device-laptop"  # name of a secret in the keychain, never the value

[devices.phone]
name = "Pixel phone"
kind = "phone"
os = "android"
role = "client"
capabilities = ["notify", "camera", "gps", "voice"]
can_approve = ["low", "medium"]

Same device in env:

ASSISTANT_DEVICE_PHONE_NAME="Pixel phone"
ASSISTANT_DEVICE_PHONE_KIND=phone
ASSISTANT_DEVICE_PHONE_ROLE=client
ASSISTANT_DEVICE_PHONE_CAPABILITIES=notify,camera,gps,voice
ASSISTANT_DEVICE_PHONE_CAN_APPROVE=low,medium
ASSISTANT_DEVICE_PHONE_TOKEN_REF=device-phone

Other variables:

VariableMeaning
ASSISTANT_DEVICE_IDWhich device this process is. Set on the host and on each node.
ASSISTANT_DEVICES_FILEPath to a different devices.toml.
ASSISTANT_DEVICES_STRICTIf true, unknown devices are refused. Default true.

Rules:

The device registry (core)

At start the core:

  1. Reads file and env, merges them (env wins), validates the schema.
  2. Stores the result in a devices table: id, owner_id, name, kind, os, role, capabilities, can_approve, location, token_ref, status, last_seen, paired_at, revoked_at.
  3. Marks status from live signals: online (token used or SSE open in the last minutes), idle, offline.

last_seen and status come from the core, never from the device's own claims alone. Capabilities are what the owner declared; a device cannot add its own.

How the model understands devices

Core-set, read-only for the model (same rule as memory trust labels).

The model uses this to adapt: short replies on a watch, a notification instead of a long text on a phone, shell work only on the laptop.

Routing

Approvals across devices

Pairing and trust

  1. Owner starts pairing on the host: assistant devices pair --id phone.
  2. Host shows a short-lived code (5 minutes, single use) and a device fingerprint.
  3. The new device sends the code. The host checks it against the declared phone entry, issues a client token, and saves it under token_ref.
  4. Owner can list, rename or revoke: assistant devices list | revoke <id>. Revoke kills the token and open streams at once.

Rules:

API additions (sketch)

RouteUseToken
GET /v1/devicesList devices and statusclient
GET /v1/devices/{id}One deviceclient
POST /v1/devices/pairStart pairingowner
POST /v1/devices/{id}/revokeRevokeowner
POST /v1/devices/{id}/heartbeatReport alivethat device

Events: device.online, device.offline, device.paired, device.revoked.

Threats to cover (add to Threat model)

ThreatDefense
Stolen or lost devicePer-device token, instant revoke, can_approve limits
Fake device joinsStrict registry, single-use pairing code, fingerprint check
Device claims power it lacksCapabilities set by owner config, not by the device
Model changes device listRegistry is core-only; model tools are read-only
Approval shown on weak devicecan_approve per risk level; card shows target device
Env leaks tokensEnv holds token_ref only; values in keychain; scrubbed from logs
Prompt injection names a device ("send to my other phone")Outside content is data; device must exist in registry; send/share still needs approval

Build order

  1. Schema and parser: devices.toml + env merge + validation + devices table.
  2. Read-only API and tools: GET /v1/devices, list_devices, device_info, device index in the prompt.
  3. Per-device tokens, origin_device on every turn, last_seen and status.
  4. Pairing and revoke (CLI + API) with action-log entries.
  5. Safety Gate device checks and can_approve on approvals.
  6. Notice routing and the short offline queue.
  7. Nodes: tools that run on another device.

Open questions