# The Bridge

Reach computers and equipment inside your company's own network, safely, from your module.

Some of the most useful stuff in a company never touches the cloud: the server in the back room, the machine on the shop floor, the PCs on the office network. The **Bridge** is how your module reaches them, safely. It runs on a computer inside the company's network and takes jobs from the platform, so nothing on that network has to be opened up to the internet.

## What the Bridge is

The Bridge is a small Data Visions program on a PC or server in the workspace's own network. Today that program is the **Bridge Harness**: one install per computer that holds the sign-in and runs the plugins (connectors) your modules need. See [Bridge connectors](article:241e9db8-1d01-4885-a349-ec8627b73712).

| Where | What you see |
|---|---|
| **System settings › Bridges** | A tile per computer: online or not, its version, who is signed in, and its connectors |
| The computer itself | The Data Visions icon in the tray, and the Bridge Harness window |

Your module never logs in to the computer and never holds a password for it. It asks the platform to run a named tool on one of the workspace's Bridges, and the platform carries the request there and brings the answer back.

## What a module can do on a Bridge

A module declares the kinds of work it needs, and lists every tool by name:

| Kind | For example |
|---|---|
| Metrics | CPU, memory and disk readings |
| Inventory | What's installed on the machine |
| Process | Listing running programs |
| File | Reading or writing files |
| Shell | Running a command |
| Patch | Applying updates |
| Remote desktop | Opening a remote session to the screen |

Your module can also list the workspace's Bridges and see which are online. An agent tool can run on the Bridge itself, so the assistant can check a machine when someone asks.

## Short jobs and long jobs

- **Short jobs** (a health check, a reading): ask and wait for the answer. A screen request has about 30 seconds to answer, so keep these quick.
- **Long jobs** (patching, a big copy): start the job, get a job number back, and check on it every few seconds until it says done. A workspace can have up to 50 long jobs running at once, and the platform keeps each result for an hour.

> **Tip.** If it might take longer than a cup of coffee, make it a long job. The person's screen stays responsive, and they can watch the progress.

## Who grants a module the Bridge

Bridge access is **off until approved**. Listing the tools in your module isn't enough on its own:

1. Your module declares what it needs: the kinds of work and the tool names.
2. **Data Visions approves** that list for your module. Until then, every Bridge call is refused.
3. Your module can use only what was both declared and approved. Adding a new tool later needs a new approval.

On top of that, a module only ever reaches **its own workspace's** Bridges. Another workspace's computer simply doesn't exist as far as your module is concerned.

## Ask the Module Builder

> *"Add a Check now button to each machine that reads its CPU, memory and free disk through the Bridge, and shows a warning when disk is under 10%."*

```json
// For developers: module.json
"bridge": {
  "capabilities": ["metrics", "process"],
  "tools": ["collect_metrics", "list_processes"]
}
```

## Good to know

- **The Module Builder's test copy can't reach Bridges.** Bridge calls are refused there, so test Bridge features in the live workspace once the module is published.
- **Each tool is named.** Asking for *shell* doesn't quietly allow every command tool; list each one.
- **Workspace Admins manage the computers** on **System settings › Bridges**. Your module never sets up a PC.
- **Bridge use is on the platform's list of services that may be metered later.** It isn't a line on the bill today, but don't poll a machine in a tight loop. See [What a module costs to run](article:dd966d79-6c2d-43c0-8d6e-3dff5886192d).


Source: https://datavisions.ai/docs/creators/platform-services/the-bridge
