When I've been experimenting with Cursor I've found that one of the essential parts is the agent MUST be able to close the loop itself for it to be useful in any real sense.
So if you are having the agent write a script to call an endpoint and do something with the result. Have it write a script that does that and then ask it to run the script itself. It will then be able to close the loop by itself and iterate on the code until it does what you want (usually).
It is also very useful to ask the agent to write a test for something and then run that test to close the loop in the same way.
So if you are having the agent write a script to call an endpoint and do something with the result. Have it write a script that does that and then ask it to run the script itself. It will then be able to close the loop by itself and iterate on the code until it does what you want (usually).
It is also very useful to ask the agent to write a test for something and then run that test to close the loop in the same way.