---
title: "bot.command@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/bot.command"
updated: null
---

# bot.command@1 · OpenVibe.Services

HTML: [bot.command@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/bot.command)

# BotCommand `bot.command@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.1.0
- Owner: bot
- Visibility: first-party
- Status: active
- Compatibility: backward
- Decision: [ADR-043](/docs/adr/ADR-043)
- Schema: [`https://openvibe.network/contracts/bot/command.v1.json`](/docs/contracts/bot.command.json)

bot.command@1: an operator's command frame on OpenVibe.Bot's operator WebSocket (wss://openvibe.bot/control, after join; server/realtime.js onOperatorCommand). id is the operator's idempotency key (at most 64 characters; Bot mints one when it is missing): a repeated id answers with the first result. Bot's gate stamps the robot, the operator and the role, builds the value from the robot profile's commands (clamped by the owner's limits) and sets the deadline; ms asks for a duration within max\_command\_ms. Answered by one command\_result frame (bot.command-result@1). The kinds button (a profile button by name, with an optional state for a hold button) and point (a normalised x, y video click) were added in 0.109.0 (plan T15 R9). The computer kinds (exec, fs, screen, input, browser; OpenVibe Link's computer plugin, Link docs/computer.md) are taken only for a person's own machine, from its owner or an agent the owner let use it (bot.computer.control); the machine's owner sets on the machine what they may do, and the answer comes back in bot.command-result@1's data. probe (a read-only check of something on the machine's own network) is the one computer kind OpenVibe.Watch may send, for owners who let their watches use the computer. input (added in 0.171.0) moves the mouse, clicks, scrolls, types or presses keys on the machine's screen, at coordinates in the space of the screen picture the caller last saw (its width and height; the Link scales them to the real screen): refused at level observe, approved one by one at ask. browser (added in 0.174.0) drives a Chromium-family browser the agent uses on the machine, in a profile of its own: open an http(s) URL, click a CSS selector or the button or link showing a text, fill a field, press a named key, go back, read the page, take a screenshot, or close it. read, screenshot and close run at every level; the rest act (refused at observe, approved one by one at ask), and below level full open refuses an address on the machine's own network. desk (added in 0.214.0; plan track K, Vibe's desk) starts, stops or reports a private desk on the machine: a display of its own (Xvfb, a window manager, its own session and browser profile) where an agent works without touching the person's screen, which the person can watch and take over; screen, input and browser take desk: private to act there instead of on the person's screen (main, the default). Starting and stopping a desk act (refused at observe, approved one by one at ask); status runs at every level.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `v` | const |  |  | - `= 1` |
| `seq` | integer |  |  | - `minimum 0` |
| `ts` | integer |  |  | - `minimum 0` |
| `type` | const | yes |  | - `= "command"` |
| `id` | string |  |  | - `minLength 1`<br>- `maxLength 64` |
| `kind` | enum | yes |  | - `one of "drive", "actuator", "ptz", "say", "display", "halt", "button", "point", "exec", "fs", "screen", "probe", "input", "browser", "desk", "ai", "headlight", "setting"` |
| `value` | object |  |  |  |
| `ms` | integer |  |  | - `minimum 1` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: ai-chat-tools

~~~~
{
  "v": 1,
  "seq": 91,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-91",
  "kind": "ai",
  "value": {
    "model": "qwen3:8b",
    "messages": [
      {
        "role": "system",
        "content": "Use the tools when a fact needs checking."
      },
      {
        "role": "user",
        "content": "What is the weather in Lisbon?"
      },
      {
        "role": "assistant",
        "content": "",
        "tool_calls": [
          {
            "id": "call_1",
            "type": "function",
            "function": {
              "name": "web_search",
              "arguments": "{\"query\":\"Lisbon weather\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "tool_call_id": "call_1",
        "content": "Lisbon: 19 C, sunny."
      }
    ],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "web_search",
          "description": "Search the web",
          "parameters": {
            "type": "object",
            "properties": {
              "query": {
                "type": "string"
              }
            },
            "required": [
              "query"
            ]
          }
        }
      }
    ],
    "tool_choice": "auto",
    "max_tokens": 800
  }
}
~~~~

Valid: ai-chat

~~~~
{
  "v": 1,
  "seq": 90,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-90",
  "kind": "ai",
  "value": {
    "model": "llama3.1:8b",
    "messages": [
      {
        "role": "system",
        "content": "Answer in one sentence."
      },
      {
        "role": "user",
        "content": "What is a mutex?"
      }
    ],
    "max_tokens": 200,
    "temperature": 0.2
  }
}
~~~~

Valid: ai-embed

~~~~
{
  "v": 1,
  "seq": 95,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-95",
  "kind": "ai",
  "value": {
    "model": "bge-small-en-v1.5",
    "input": [
      "what is a mutex",
      "a lock that one thread holds at a time"
    ]
  }
}
~~~~

Valid: browser-fill

~~~~
{
  "v": 1,
  "seq": 61,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-61",
  "kind": "browser",
  "value": {
    "action": "fill",
    "selector": "#q",
    "text": "hello"
  }
}
~~~~

Valid: browser-open-named-desk

~~~~
{
  "v": 1,
  "seq": 82,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-82",
  "kind": "browser",
  "value": {
    "action": "open",
    "url": "https://openvibe.network/",
    "desk": "desk-task-01k8ab"
  }
}
~~~~

Valid: browser-open

~~~~
{
  "v": 1,
  "seq": 60,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-60",
  "kind": "browser",
  "value": {
    "action": "open",
    "url": "https://example.org/"
  }
}
~~~~

Valid: button

~~~~
{
  "v": 1,
  "seq": 20,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-8",
  "kind": "button",
  "value": {
    "name": "lights_on"
  }
}
~~~~

Valid: desk-list

~~~~
{
  "v": 1,
  "seq": 81,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-81",
  "kind": "desk",
  "value": {
    "action": "list"
  }
}
~~~~

Valid: desk-start-browser

~~~~
{
  "v": 1,
  "seq": 84,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-84",
  "kind": "desk",
  "value": {
    "action": "start",
    "desk": "desk-task-01k8ab",
    "kind": "browser",
    "width": 1280,
    "height": 800
  }
}
~~~~

Valid: desk-start-kept-profile

~~~~
{
  "v": 1,
  "seq": 86,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-86",
  "kind": "desk",
  "value": {
    "action": "start",
    "desk": "desk-task-01k8ab",
    "kind": "browser",
    "profile": "agent"
  }
}
~~~~

Valid: desk-start-named

~~~~
{
  "v": 1,
  "seq": 80,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-80",
  "kind": "desk",
  "value": {
    "action": "start",
    "desk": "desk-task-01k8ab",
    "width": 1280,
    "height": 800
  }
}
~~~~

Valid: desk-start

~~~~
{
  "v": 1,
  "seq": 70,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-70",
  "kind": "desk",
  "value": {
    "action": "start",
    "width": 1280,
    "height": 800
  }
}
~~~~

Valid: drive

~~~~
{
  "v": 1,
  "seq": 12,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-7",
  "kind": "drive",
  "value": {
    "throttle": 0.5,
    "steer": -0.2
  },
  "ms": 300
}
~~~~

Valid: exec-detach-on-desk

~~~~
{
  "v": 1,
  "seq": 88,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-88",
  "kind": "exec",
  "value": {
    "argv": [
      "libreoffice",
      "--writer",
      "/home/me/work/notes.odt"
    ],
    "desk": "desk-task-01k8ab",
    "detach": true
  }
}
~~~~

Valid: exec

~~~~
{
  "v": 1,
  "seq": 30,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-30",
  "kind": "exec",
  "value": {
    "argv": [
      "git",
      "status",
      "--short"
    ],
    "cwd": "/home/ada/projects/site",
    "timeout_s": 20
  },
  "ms": 120000
}
~~~~

Valid: fs-read

~~~~
{
  "v": 1,
  "seq": 31,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-31",
  "kind": "fs",
  "value": {
    "op": "read",
    "path": "/home/ada/projects/site/README.md",
    "length": 4096
  }
}
~~~~

Valid: halt

~~~~
{
  "type": "command",
  "kind": "halt"
}
~~~~

Valid: hold-button

~~~~
{
  "v": 1,
  "seq": 21,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-9",
  "kind": "button",
  "value": {
    "name": "horn",
    "state": "down"
  }
}
~~~~

Valid: input-click-private-desk

~~~~
{
  "v": 1,
  "seq": 71,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-71",
  "kind": "input",
  "value": {
    "action": "click",
    "x": 640,
    "y": 400,
    "width": 1280,
    "height": 800,
    "desk": "private"
  }
}
~~~~

Valid: input-click

~~~~
{
  "v": 1,
  "seq": 50,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-50",
  "kind": "input",
  "value": {
    "action": "click",
    "x": 640,
    "y": 360,
    "width": 1280,
    "height": 720
  }
}
~~~~

Valid: input-key

~~~~
{
  "v": 1,
  "seq": 51,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-51",
  "kind": "input",
  "value": {
    "action": "key",
    "keys": "ctrl+s"
  }
}
~~~~

Valid: point

~~~~
{
  "v": 1,
  "seq": 22,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-10",
  "kind": "point",
  "value": {
    "x": 0.25,
    "y": 0.75
  }
}
~~~~

Valid: probe

~~~~
{
  "v": 1,
  "seq": 40,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-40",
  "kind": "probe",
  "value": {
    "target": "http://192.168.1.20/status.json",
    "timeout_s": 10
  }
}
~~~~

Valid: screen-private-desk

~~~~
{
  "v": 1,
  "seq": 72,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-72",
  "kind": "screen",
  "value": {
    "max_width": 1280,
    "desk": "private"
  }
}
~~~~

Valid: screen

~~~~
{
  "v": 1,
  "seq": 32,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-32",
  "kind": "screen",
  "value": {
    "max_width": 1280
  }
}
~~~~

Rejected: ai-embed-and-messages

~~~~
{
  "v": 1,
  "seq": 97,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-97",
  "kind": "ai",
  "value": {
    "model": "bge-small-en-v1.5",
    "input": [
      "x"
    ],
    "messages": [
      {
        "role": "user",
        "content": "x"
      }
    ]
  }
}
~~~~

Rejected: ai-embed-empty-input

~~~~
{
  "v": 1,
  "seq": 96,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-96",
  "kind": "ai",
  "value": {
    "model": "bge-small-en-v1.5",
    "input": []
  }
}
~~~~

Rejected: ai-embed-number

~~~~
{
  "v": 1,
  "seq": 98,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-98",
  "kind": "ai",
  "value": {
    "model": "bge-small-en-v1.5",
    "input": [
      42
    ]
  }
}
~~~~

Rejected: ai-no-messages

~~~~
{
  "v": 1,
  "seq": 91,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-91",
  "kind": "ai",
  "value": {
    "model": "llama3.1:8b",
    "messages": []
  }
}
~~~~

Rejected: ai-tool-bad-name

~~~~
{
  "v": 1,
  "seq": 93,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-93",
  "kind": "ai",
  "value": {
    "model": "qwen3:8b",
    "messages": [
      {
        "role": "user",
        "content": "hi"
      }
    ],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "rm -rf",
          "parameters": {}
        }
      }
    ]
  }
}
~~~~

Rejected: ai-tool-without-call-id

~~~~
{
  "v": 1,
  "seq": 92,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-92",
  "kind": "ai",
  "value": {
    "model": "qwen3:8b",
    "messages": [
      {
        "role": "user",
        "content": "hi"
      },
      {
        "role": "tool",
        "content": "orphan result"
      }
    ]
  }
}
~~~~

Rejected: browser-open-file

~~~~
{
  "v": 1,
  "seq": 62,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-62",
  "kind": "browser",
  "value": {
    "action": "open",
    "url": "file:///etc/passwd"
  }
}
~~~~

Rejected: desk-bad-action

~~~~
{
  "v": 1,
  "seq": 73,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-73",
  "kind": "desk",
  "value": {
    "action": "exec",
    "width": 1280
  }
}
~~~~

Rejected: desk-bad-kind

~~~~
{
  "v": 1,
  "seq": 85,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-85",
  "kind": "desk",
  "value": {
    "action": "start",
    "desk": "desk-task-01k8ab",
    "kind": "vm"
  }
}
~~~~

Rejected: desk-bad-name

~~~~
{
  "v": 1,
  "seq": 83,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-83",
  "kind": "screen",
  "value": {
    "desk": "desk-../../etc"
  }
}
~~~~

Rejected: desk-bad-profile

~~~~
{
  "v": 1,
  "seq": 87,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-87",
  "kind": "desk",
  "value": {
    "action": "start",
    "desk": "desk-task-01k8ab",
    "profile": "../agent"
  }
}
~~~~

Rejected: desk-start-main

~~~~
{
  "v": 1,
  "seq": 84,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-84",
  "kind": "desk",
  "value": {
    "action": "start",
    "desk": "main"
  }
}
~~~~

Rejected: exec-bad-desk

~~~~
{
  "v": 1,
  "seq": 89,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-89",
  "kind": "exec",
  "value": {
    "argv": [
      "xterm"
    ],
    "desk": "desk-../x"
  }
}
~~~~

Rejected: exec-shell-line

~~~~
{
  "v": 1,
  "seq": 33,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-33",
  "kind": "exec",
  "value": {
    "argv": "rm -rf /"
  }
}
~~~~

Rejected: fs-bad-op

~~~~
{
  "v": 1,
  "seq": 34,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-34",
  "kind": "fs",
  "value": {
    "op": "delete",
    "path": "/home/ada"
  }
}
~~~~

Rejected: input-key-shell

~~~~
{
  "v": 1,
  "seq": 52,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-52",
  "kind": "input",
  "value": {
    "action": "key",
    "keys": "ctrl+s; rm -rf ~"
  }
}
~~~~

Rejected: point-out-of-range

~~~~
{
  "v": 1,
  "seq": 23,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-11",
  "kind": "point",
  "value": {
    "x": 1.5,
    "y": 0.5
  }
}
~~~~

Rejected: probe-ftp

~~~~
{
  "v": 1,
  "seq": 41,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-41",
  "kind": "probe",
  "value": {
    "target": "ftp://192.168.1.20/"
  }
}
~~~~

Rejected: screen-unknown-desk

~~~~
{
  "v": 1,
  "seq": 74,
  "ts": 1759600000000,
  "type": "command",
  "id": "op-74",
  "kind": "screen",
  "value": {
    "desk": "neighbour"
  }
}
~~~~

Rejected: stamped-operator

~~~~
{
  "type": "command",
  "kind": "drive",
  "value": {},
  "operator": {
    "subject": "usr_01J8Z4P7T3W9Y1AC5N8R0S4V6X",
    "role": "owner"
  }
}
~~~~

Rejected: unknown-kind

~~~~
{
  "type": "command",
  "kind": "self_destruct"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('bot.command@1', value);   // { valid, errors: [{ path, message }] }
~~~~
