Agent access
Installed filesystem providers share one Memona agent tool, remote_files.
Enable access for each connection in Plugins → Connections. New connections
default to Off. Read only permits browsing and reading; Read and write also
permits supported changes.
An agent first discovers connections:
{"operation": "connections"}
Only connections with an enabled plugin and an agent grant appear. Use the returned connection ID for subsequent calls:
{
"operation": "list",
"connectionId": "the-returned-connection-id",
"path": "/",
"cursor": null,
"limit": 100
}
To read part of a file:
{
"operation": "read",
"connectionId": "the-returned-connection-id",
"path": "/notes.md",
"offset": 0,
"length": 65536
}
File bytes are JSON arrays of integers from 0 through 255. A read includes an opaque revision when the provider supports it and an end-of-file flag. Continue with the next offset to read a larger file. Each call transfers at most 1 MiB.
Changing a file
A write replaces the entire file. Always choose a condition:
| Condition | Behavior |
|---|---|
{"kind":"createOnly"} | Fail if a file already exists. |
{"kind":"ifMatch","revision":"opaque-token"} | Replace only the revision you read. |
{"kind":"overwrite"} | Explicitly replace the current contents. |
Conditional replacement requires provider support. An unsupported condition fails; the host never silently changes it to overwrite. A file larger than the write limit cannot be saved with this API version. Splitting it into multiple writes would repeatedly replace the file, not append chunks.
If a mutation reports outcomeUnknown, inspect the remote state before deciding
whether to retry: the service may have completed it before the response was lost.
These resources are connection-relative paths, not operating-system mounts. An agent’s ordinary shell and local file tools do not automatically access them. Changing the grant or disabling the plugin affects subsequent calls and cancels active work for that connection.