# Computer

Canonical URL: https://developers.iagenify.com/sdk/ref/providers/computer/
Language: en

`await api.storage.get() → ConnectedStorage (type: "filesystem")`

The machine your code runs on, registered as a storage by the first key exchange. Its data is its files, and they never leave it.

Status: type: filesystem · registers itself · files and terminals

You do not connect a computer — the package registers the one it is on. On the first key exchange it reports the runtime, the machine and what it has, and the account gains a storage for that machine.

## Getting it {#get}

```javascript
const pc = await api.storage.get();              // the account's default
const computers = (await api.storage.list()).filter((s) => s.type === "filesystem");
```

> **The default is not necessarily this machine**
>
> An account's default is its own Object Storage. Filter api.storage.list() on type === "filesystem" and compare machineId with the machine you are on, rather than assuming get() hands you the disk under your feet.

## What it carries {#properties}

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `type` | string |  | Always `filesystem`. |
| `provider` | string |  | `machine`. |
| `machineId` | string |  | Which machine. Compared before any file operation. |
| `hostname` | string|null |  | The machine's name, as it reported it. |
| `limits` | object |  | What it reported of its own disk. |

## The two things only a computer has {#two-extras}

| Member | Is |
| --- | --- |
| [files](/sdk/ref/local-files) | The workspace on that machine — six methods, no network. |
| [terminals](/sdk/ref/connected-storage/terminals) | Shells and servers that outlive a single answer. |

```javascript
await pc.files.write("notes.md", "# Today");
const shell = await pc.terminals.create({ name: "dev" });
```

## run() is not the way in {#no-run}

A computer keeps no bytes on the account, so the data actions have nothing to read: `run()` answers that the storage is local. Its files are reached through `files`, on the machine itself.

## api.files cannot save to it {#no-save}

`file.save({ storageId })` pointed at a computer is refused with `storage_is_local`: there is nowhere on the account to put the bytes. Write it with `files.write()`, or use `save({ path, localOnly: true })` to go straight to a path of your choosing.

## What an agent does with it {#agent}

An agent created with `machine: pc` works here: it reads the disk it is on, edits in place, and runs commands in the same process tree. The boundary is the workspace and the decision is your permission callback — nothing is uploaded for the model to look at.

```javascript
const agent = api.agents.create({
  runtime: "local",
  machine: pc,
  model: "gemini-3.5-flash",
  mode: "ask",
  onPermission: async ({ tool, category }) => (category === "exec" ? "deny" : "once"),
});
```

## It needs Node {#runtime}

A browser and a worker have no filesystem to register, so this kind of storage belongs to Node. The file methods say so themselves with `local_files_require_node`.

- [LocalFiles](/sdk/ref/local-files): The six file methods in full.
- [Phone](/sdk/ref/providers/phone): A device whose files are in its browser instead.
- [Machines are storages](/sdk/concepts/machines-are-storages): Why a device is modelled this way.

```python
pc = api.storage.get()   # the account's default
computers = [s for s in api.storage.list() if s.type == "filesystem"]
```

```python
pc.files.write("notes.md", "# Today")
shell = pc.terminals.create(name="dev")
```

```python
agent = api.agents.create(
    runtime="local",
    machine=pc,
    model="gemini-3.5-flash",
    mode="ask",
    on_permission=lambda request: "deny" if request["category"] == "exec" else "once",
)
```
