智能体
上传电脑附件
将原始字节上传到电脑的 /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
| 名称 | 类型 | 说明 |
|---|---|---|
| path | string | Absolute path of the entry on the computer. |
| name | string | Name of the entry or object. |
| type | string | Kind of entry: a file, a directory or a symbolic link. |
| size | integer | Size in bytes. |
| mime_type | string | MIME type of the file. |
| read_only | boolean | True when the entry cannot be modified through the API. |
| digest | string | null | Content digest of the file; null when not computed. |
| updated_at | string | null | RFC 3339 time at which the object was last modified. |