  The Serpens filament, a prominent elongated structure in a relatively nearby
molecular cloud, is believed to be at an early evolutionary stage, so studying
its physical and chemical properties can shed light on filament formation and
early evolution. The main goal is to address the physical and chemical
properties as well as the dynamical state of the Serpens filament at a spatial
resolution of $\sim$0.07 pc and a spectral resolution of
$\lesssim$0.1~km~s$^{-1}$. We performed $^{13}$CO (1--0), C$^{18}$O (1--0),
C$^{17}$O (1--0), $^{13}$CO (2--1), C$^{18}$O (2--1), and C$^{17}$O (2--1)
imaging observations toward the Serpens filament with the Institut de
Radioastronomie Millim{\'e}trique 30-m (IRAM-30 m) and Atacama Pathfinder
EXperiment (APEX) telescopes. Widespread narrow $^{13}$CO (2--1)
self-absorption is observed in this filament, causing the $^{13}$CO morphology
to be different from the filamentary structure traced by C$^{18}$O and
C$^{17}$O. Our excitation analysis suggests that the opacities of C$^{18}$O
transitions become higher than unity in most regions, and this analysis
confirms the presence of widespread CO depletion. Further we show that the
local velocity gradients have a tendency to be perpendicular to the filament's
long axis in the outskirts and parallel to the large-scale magnetic field
direction. The magnitudes of the local velocity gradients decrease toward the
filament's crest. The observed velocity structure can be a result of
gravity-driven accretion flows. The isochronic evolutionary track of the
C$^{18}$O freeze-out process indicates the filament is young with an age of
$\lesssim$2 Myr. We propose that the Serpens filament is a newly-formed
slightly-supercritical structure which appears to be actively accreting
material from its ambient gas.
