Agent

Upload Computer Attachment

Upload raw bytes into /attachments and return the same FileInfo as the file list.

Call Create computer first and replace cmp_123 with its returned ID.

POST /agent/v1/computers/{computer_id}/attachments● Supported

Request parameters

  • computer_idstring必填

    path: Computer id (cmp_...), as returned by computers.create or computers.list.

  • namestring必填

    query: Single filename, at most 255 UTF-8 bytes, excluding slash, dot segments and control characters.

Returns

201

Own-face superset: Managed Agents has no persistent Computer attachment directory. User uploads overwrite the same name; agents retain read-only access. Run-token uploads return 403 READ_ONLY. name is one filename of at most 255 UTF-8 bytes; MIME is inferred from the extension; custom Content-Type is not persisted and digest may be absent. Limit 16 MiB (413); invalid names return 400. Archived computers accept uploads; foreign computers return 404.

Errors follow the Anthropic error format (type / message / request_id) — see error codes

Response

HTTP 201

Computer result

application/json

NameTypeDescription
pathstringAbsolute path of the entry on the computer.
namestringName of the entry or object.
typestringKind of entry: a file, a directory or a symbolic link.
sizeintegerSize in bytes.
mime_typestringMIME type of the file.
read_onlybooleanTrue when the entry cannot be modified through the API.
digeststring | nullContent digest of the file; null when not computed.
updated_atstring | nullRFC 3339 time at which the object was last modified.