Added simple agent logic