You cannot use such a system to make energy. That would violate the conservation of energy.
You can use it to convert energy from thermal energy to mechanical energy though. I believe this is what you really intended.
An engine that converts heat to mechanical work is a Heat engine. You can see there are many types of heat engines. They run off different cycles and have various applications. One with ammonia like you describe would be a form of phase change heat engine.
The specific application you're looking for may not be possible though; because you suggest running an engine off atmospheric heat. The thing is, for a heat engine, you need a hot and cold resovior. The heat transfer to run the engine requires a temperature difference. If all your surroundings are the same temperature, you cannot extract the heat as work. If one end were a little warmer, it would be possible to use ammonia as a phase change substance in the thermodynamic cycle.
Another potential topic of interest might be exergy which is the available energy. Air at the same temperature has no exergy. when there's a temperature difference, the act of the systems trying to reach equilibrium can do work, which is what we utilize in thermodynamics.