ChatGPT - Create agent state routine