# machine-core (https://docs.neuralisapp.com/machine-core)

<Callout title="Maturity: stable (90 %)">
**Machine core.** A sandboxed Linux desktop for a user or a project that agents drive through browser and desktop automation, with a shell through the shared execute tool, a live stream in the workspace and a file source.

- Machines need access to a Docker engine; without one the platform runs with no machines.
- The first beta bundles an Ubuntu XFCE desktop; operators may configure a compatible custom image. Windows or macOS guest desktops are not offered.
- A shell inside a machine is root-equivalent there; the boundary is the container sandbox, the machine shell grant and network isolation, not per-path rules inside the machine.
- A project machine shares one browser profile among everyone who starts it.

[How maturity is measured](https://docs.neuralisapp.com/getting-started/maturity.md)
</Callout>

`@neuralis/machine-core` is the workforce's hands and eyes: every user gets a
**persistent virtual desktop** — a full Linux desktop (XFCE on Ubuntu, based
on LinuxServer Webtop) running in its own Docker container and streamed into
the workspace as a widget over Selkies. An agent does not get a browser-shaped
API; it gets a computer.
Agents drive that desktop at three layers, all against the same live session:

| Layer | Surface | What it is for |
| --- | --- | --- |
| Browser | `machine_use` with `target: 'chromium'` | A real Chromium driven over CDP — JavaScript-heavy pages, logged-in sessions, forms, visual verification |
| Desktop | `machine_use` with `target: 'desktop'` | The whole XFCE session — click any window, type anywhere, launch apps, screenshot or record the screen |
| Shell | `execute` with a registered source URI in `cwd` | Commands inside that source’s container |

The desktop is stateful across turns: browser logins stick, installed
applications stick, and files under `/config/` stay on disk. An idle machine is
stopped, never thrown away, so the next start takes seconds and everything
installed inside it is still there. The container filesystem is also a regular
source — a machine source's URI scheme is its slug, for example
`machine-ops://` — so agents read and write sandbox files with the standard
`fs_*` tools.

## What the package ships [#what-the-package-ships]

| Element | Count | Page |
| --- | --- | --- |
| Tools | 1 (`machine_use`), plus Webtop shell through agent-core's `execute` | [Tools](https://docs.neuralisapp.com/machine-core/tools.md) |
| Skills | 2 (`manage-machine-sessions`, `machine-control`) and the always-active `machine-safety` rule | [Skills](https://docs.neuralisapp.com/machine-core/skills.md) |
| Connectors | 1 (`webtop`) | [Connectors](https://docs.neuralisapp.com/machine-core/connectors.md) |
| Sources | 1 declared (`machine`, user scope) | [Sources](https://docs.neuralisapp.com/machine-core/sources.md) |
| Routes | 3 (`sessions`, `stream`, `health`) | [Routes](https://docs.neuralisapp.com/machine-core/routes.md) |
| App surfaces | the `Machine` widget and its dock entry | [App surfaces](https://docs.neuralisapp.com/machine-core/app-surfaces.md) |
| Settings | 26 platform settings | [Settings](https://docs.neuralisapp.com/machine-core/config-settings.md) |
| Workflow template | 1 (**Web watch**) | below |

## Feature tiers [#feature-tiers]

The manifest declares three features and grants them by role,
deny-by-default — the standard
[features and access](https://docs.neuralisapp.com/package-system/features.md) model:

| Feature | Grants | Default roles |
| --- | --- | --- |
| `machine.read` | View machine state, screenshots, recordings, page/DOM reads, session info — and a view-only live desktop stream | owner, admin, manager, member |
| `machine.control` | Mutating browser and desktop interactions — navigate, click, type, key, drag, launch apps — control of the desktop stream: keyboard, mouse, clipboard, upload, recording — and shell commands inside the machine container | owner, admin, manager |

`machine_use` carries `machine.read` as its declared baseline gate; control-class
actions escalate to `machine.control` inside the handler because the required
feature depends on the `action` argument. Webtop shell through `execute` follows the
platform's exec rule: `core.execute` for the tool, the connector-declared entry
`machine.control`, then the source's own `exec` policy on the directory the command
starts in. Owners adjust grants per role through
[role configuration](https://docs.neuralisapp.com/enterprise/roles.md).

With `machine.read` alone you watch your desktop live, but the stream server drops
every keystroke, click, paste and resize, and the widget header shows a
**View only** badge. With `machine.control` you control it — and stream control
is as powerful as the machine's own shell (a keyboard into a terminal), so grant it
with the same care as `machine.control`.

## Safety model [#safety-model]

Every `machine_use` call is audit-logged with its action, target, session key,
and caller identity; every Webtop shell call is logged with the command. Each
session is owned by the user who started it: a project member can only inspect,
stop, or stream **their own** session, and a machine source is scoped to the
owning project. The shell command denylist is cosmetic friction, not a security
boundary — the real boundary is the container sandbox plus the `machine.control`
feature grant plus network isolation. Dangerous key combos are rejected on the
desktop, and recording goes exclusively through the capped `record` action.

<Callout type="info" title="Sandboxed, but consequential">
The machine cannot reach the Neuralis host process, but the browser inside it
may be logged into real accounts and the filesystem persists. Treat control
actions as real-world actions — the shipped safety rule enforces exactly that
posture on agents.
</Callout>

## Default workflow template [#default-workflow-template]

The package ships a **Web watch**
[workflow template](https://docs.neuralisapp.com/agent-core/workflows.md#default-templates):
a scheduled browser monitor that visits your URLs, extracts the meaningful
content, diffs it against the previous snapshot, and reports only real
changes — pair it with a channel binding to get alerts in Telegram or
WhatsApp. It requires machine access, so only roles that can drive the
machine see it.

## Folder map [#folder-map]

| Package folder | Doc page | Cross-reference |
| --- | --- | --- |
| `tools/` (`machine_use`) | [Tools](https://docs.neuralisapp.com/machine-core/tools.md) | [package-system tools](https://docs.neuralisapp.com/package-system/tools.md) |
| `skills/` (2), `rules/` (machine-safety) | [Skills](https://docs.neuralisapp.com/machine-core/skills.md) | [package-system skills](https://docs.neuralisapp.com/package-system/skills.md) |
| `src/connectors/` (webtop) | [Connectors](https://docs.neuralisapp.com/machine-core/connectors.md) | [package-system connectors](https://docs.neuralisapp.com/package-system/connectors.md) |
| `package.json#neuralis.sources` | [Sources](https://docs.neuralisapp.com/machine-core/sources.md) | [package-system sources](https://docs.neuralisapp.com/package-system/sources.md) |
| `src/routes/` (`sessions`, `stream`, `health`) | [Routes](https://docs.neuralisapp.com/machine-core/routes.md) | [package-system routes](https://docs.neuralisapp.com/package-system/routes.md) |
| `app/machine` (Machine widget) | [App surfaces](https://docs.neuralisapp.com/machine-core/app-surfaces.md) | [package-system App surfaces](https://docs.neuralisapp.com/package-system/app-surfaces.md) |
| `package.json#neuralis.configSettings`, `docker/`, `sidecar/` | [Settings](https://docs.neuralisapp.com/machine-core/config-settings.md) | [enterprise deployment](https://docs.neuralisapp.com/enterprise/deployment.md) |
| `workflows/` (Web watch template) | [Workflows](https://docs.neuralisapp.com/agent-core/workflows.md#default-templates) | — |