When placing on an action space with placed resources, do you take those first or action first? So on Delvers Folly, if it has a corruption placed on it and you place agent on it, but you have no corruption to start with, do you take corruption and then remove it via action space? Or action first must be done, so you end up with corruption?
When you assign an Agent to an action space containing placed resources, you take those resources and place them in your Tavern as the first part of that action. Thus, you can use the newly collected resources in the same action (for example, using collected Gold to purchase a Building).
In your case, you take the Corruption and then remove it.
In case of Delver's Folly and other action spaces that have a cost, you have to be able to pay the cost in order to use the action space. So if you don't currently have any Corruption, you aren't allowed to place an agent on that space unless there is a Corruption token on the space for you to collect first.