Skip to Content
Docs

Files

A Cmdop machine’s files stay on the machine; code reaches them through it rather than by copying the tree elsewhere. Mount the machine as a drive to use local tools, ask the agent when file work is part of a larger task, or attach a small input file to a request. The machine’s permission policy governs all three.

Choose the file path

You wantDo this
Work on machine files with local toolsMount the machine as a drive — no transfer at all
Read, write, or search files as part of a taskAsk the agent
Hand a small input file to a conversationAttach it to the request

Ask the agent

The agent already has the machine’s filesystem tools, so file work is part of the request rather than a separate API:

text = await client.machines.ask( machine_id, "Read config/settings.yaml and tell me which log level is set.", ).collect()

Scope it to a repository by setting the project scope on the request, and the agent works relative to that root. See Machines for the typed options.

What the agent may read or write is decided by the machine’s permission policy, including which OS-level directories it has been granted. A refusal comes from the machine, not from your client — see Permissions.

Attach a file to a request

Small inputs travel with the request as attachments, referenced by id. Cmdop caches them on the relay; they are listed read-only in the web console under Server → Files. The relay caps that cache, and when safe reclamation is not enough new uploads report storage full rather than evicting a file that chat history still references — see Self-hosted relay.

Moving bytes, not tasks

For the plain “get this file from here to there” cases — mounting, browsing, downloading, publishing a static build — the task guides cover each one directly:

Common questions

How does code read files through Cmdop?

Ask the machine’s agent to read or inspect the file, mount the machine when you need local tools, or attach a small input file to a request. The files stay on the machine.

Is there a file-write API?

No typed file-write API is exposed as the normal integration surface. File work goes through the machine’s agent or a mounted machine, under that machine’s permissions and review path.

Where are request attachments stored?

Small request attachments are cached on the relay and listed read-only in the web console under Server → Files. The relay’s attachment store has a quota and reports storage full rather than evicting history-referenced files.

Last updated on