Get an API key
api.agents

Options · machine

machine: ConnectedStorage

Where the tools run. Three kinds are accepted, and two of them need you to supply the file operations.

required3 kindsdecides the tool set
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

machine.typeIsNeeds filesbashterminal
filesystemA computernoyesyes
phoneA visitor's phone or tabletyesonly with shellnever
object · managed cloudA cloud workspaceyesonly with shellonly with terminals

Anything else is refused with machine_required: a database is not a place an agent can work.

const pc = await api.storage.get();                 // this computer
const phone = await api.storage.device({ deviceId }); // a visitor's phone
const space = await api.storage.create({ service: "object", label: "Workspace" });
pc = api.storage.get()                                   # this computer
phone = api.storage.device(device_id=device_id)          # a visitor's phone
space = api.storage.create(service="object", label="Workspace")

It shapes the system prompt

The agent is told where it is working — this computer and its platform, a phone whose files are in its browser, or a Linux cloud workspace with POSIX paths. Getting that wrong is expensive: an agent that believes it is on another platform writes commands that all fail for one reason.

The workspace

On a computer it is the SDK's own folder in the user's home directory, and workspace accepts only that path — any other is refused with workspace_not_allowed. On a phone or a cloud workspace the root is whatever your files bridge presents.

The default storage is probably not a machine

An account's default is its own object storage

api.storage.get() with no argument gives you that, not the computer you are sitting at. Filter list() on type === "filesystem" and compare machineId when you mean « this machine ».

The agent works on the device you are on

Not on « the account's default », and not on a copy. That is the rule the whole design rests on: an agent reads the disk it is on, and nothing is uploaded for it to look at.