Many thanks Victor! You are very kind! 
ok there were two problem, the first was the timeout to 4000 ms, my query use 8 seconds for work, but there is another problem:
My query return to much data for the agent: 150 rows.
If I use top 20 rows, it works but I need the real result..
Now with the agent in cmd (and the AgentCommandTimeout for test setted to 90000 ms) I have this log (after 1min and 1 sec from the table query request):
Session disconnected by timeout (last activity timeout is ....)
If I test my query with nxget.exe with this command:
nxget.exe -l ipmymachine -T -w 30 query_test
I have this result:
Received too large message CMD_REQUEST_COMPLETED (15703016 bytes)
408: Request timeout
It's possible to increase the message limit?
thanks,
Claudio.