智能体

上传电脑附件

将原始字节上传到电脑的 /attachments,返回与文件列表相同的 FileInfo。

先调用「创建计算机」,用返回的计算机 ID 替换 cmp_123。

POST /agent/v1/computers/{computer_id}/attachments● 支持

请求参数

  • 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.

返回

201

Praxis 扩展:Managed Agents 没有持久 Computer 附件目录。用户上传可以覆盖同名附件,智能体始终只读;运行令牌调用上传返回 403 READ_ONLY。name 是单个文件名、最多 255 UTF-8 字节,MIME 始终按扩展名推断,上传的 Content-Type 不持久保存,digest 可省略。上限 16 MiB,超限 413、非法名字 400;归档电脑也可上传,跨租户 404。

错误按 Anthropic 错误格式返回(type / message / request_id),参见 错误码

响应

HTTP 201

Computer result

application/json

名称类型说明
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.