Wiktionary says, regarding 'agent':
> Someone who works for an intelligence agency: whether an officer or employee thereof or anyone else who agrees to help their efforts (for ideology, for money, as blackmailee, or otherwise).
That said, I also asked ChatGPT and it says you're right.
I think wiktionary will suffer from the fact that the "incorrect" usage of agent is indeed the more common one. 007 is an agent, even though in real life the MI6 would certainly call him an officer.
"Agent" is a term of art with a rather strict meaning, but that's obviously only true when used in conversations within that specific field.