Reworking the coffeescript and ruby sample agents