4. As shown in the figure, in the Cartesian coordinate system $x O y$, $A, B$ are two points on the graph of the function $y=\frac{1}{x}$ in the first quadrant, satisfying $\angle O A B=90^{\circ}$ and $A O=A B$. Then the area of the isosceles right $\triangle O A B$ is
A. $\frac{1}{2}$
B. $\frac{\sqrt{2}}{2}$
C. $\frac{\sqrt{3}}{2}$
D. $\frac{\sqrt{5}}{2}$
Let $A\left(s, \frac{1}{s}\right), B\left(t, \frac{1}{t}\right)$, according to the problem, we have $\left\{\begin{array}{l}s(t-s)+\frac{1}{s}\left(\frac{1}{t}-\frac{1}{s}\right)=0, \\ t^{2}+\frac{1}{t^{2}}=2\left(s^{2}+\frac{1}{s^{2}}\right) .\end{array}\right.$
From (1), we get $(t-s)\left(s-\frac{1}{s^{2} t}\right)=0 \Rightarrow t=s^{3}$, substituting into (2), we get $s^{6}+\frac{1}{s^{6}}=\left(s^{2}+\frac{1}{s^{2}}\right)\left(s^{4}+\frac{1}{s^{4}}-1\right)=2\left(s^{2}+\frac{1}{s^{2}}\right) \Rightarrow s^{4}+\frac{1}{s^{4}}=3$.

Thus $\left(s^{2}+\frac{1}{s^{2}}\right)^{2}=s^{4}+\frac{1}{s^{4}}+2=5 \Rightarrow s^{2}+\frac{1}{s^{2}}=\sqrt{5}$,
hence $S_{\triangle O A B}=\frac{1}{2} O A^{2}=\frac{1}{2}\left(s^{2}+\frac{1}{s^{2}}\right)=\frac{\sqrt{5}}{2}$, so the answer is $D$.