9. Given the function
$$
f(x)=\frac{2 x}{a x+b}, f(1)=1, f\left(\frac{1}{2}\right)=\frac{2}{3} \text {. }
$$

Let $x_{1}=\frac{1}{2}, x_{n+1}=f\left(x_{n}\right)$. Then the general term formula for the sequence $\left\{x_{n}\right\}$ is $x_{n}=$ $\qquad$ .
9. $\frac{2^{n-1}}{2^{n-1}+1}$.

From $f(1)=1, f\left(\frac{1}{2}\right)=\frac{2}{3}$, we get
$$
a=b=1 \Rightarrow f(x)=\frac{2 x}{x+1} \text {. }
$$

From $x_{1}=\frac{1}{2}, x_{2}=\frac{2}{3}, x_{3}=\frac{4}{5}, x_{4}=\frac{8}{9}$, we can conjecture
$$
x_{n}=\frac{2^{n-1}}{2^{n-1}+1} \text {. }
$$

Proof by mathematical induction (omitted).