/agents/environments/{environment_id}/filesCreate an agent environment file
Creates a file in a connected agent execution environment by copying an uploaded Files API file or materializing inline base64 data. Choose the file_id or inline body variant and provide the destination path inside /workspace. A 201 response returns the created environment file with its path and size in bytes.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
A file to materialize in the execution environment. Use either the file_id variant for a file uploaded through the Files API or the inline variant for standard-base64 file contents.
A 400 is returned when the request body is invalid, a 401 when authentication or project context is missing, and a 404 when the requested session or event is not found. A 409 indicates that the request conflicts with the current session state; a 500 indicates an internal error, and a 503 indicates temporary service unavailability. The body must use either the file_id variant with type, file_id, and path, or the inline variant with type, data, and path; path must be 1 to 4096 characters and data must be standard-base64 data of up to 6990508 characters.