Let the co-ordinates of a point P be (h, k) which is mid point of the chord AB.
$op=\sqrt{\left(h-0\right)^{2}+\left(k-0\right)^{2}}$
$=\sqrt{h^{2}+k^{2}}$
Now in $\Delta OPA$,
$cos \frac{\pi}{3}=\frac{OP}{OA}$
$\Rightarrow\, \frac{1}{2}=\frac{\sqrt{h^{2}+k^{2}}}{3}$
$\Rightarrow\, h^{2}+k^{2}=\left(\frac{3}{2}\right)^{2}$
$\Rightarrow\, h^{2}+k^{2}=\frac{9}{4}$
Thus the required locus is
$x^{2}+y^{2}=\frac{9}{4}$