I am using agave instead of sugar, do I add more flour to keep things right in cookie dough?
When substituting a wet ingredient for a dry one, try approaching it from the perspective of reducing the liquid in the recipe to compensate rather than adding a dry ingredient. You almost always have more than one dry ingredient in and should try to keep these in their original proportion. This is especially true when baking; the proportion of sugar to flour to fat in your recipe can noticeably impact the texture, shape and cooking time of the recipe.

The problem with cookies is that often, there is no simple liquid ingredient; a basic recipe calls for sugar, fat, flour, egg and some vanilla extract (or another flavor). You can't tweak the extract too much because it's so concentrated, and anyway it's alcohol-based so the liquid component evaporates quickly out of your dough. That leaves the egg to play the dual role of moistening the dough and binding it together (see also: How does the number of eggs affect a cookie recipe?). While you can reduce the size and/or number of eggs in a cookie recipe, or leave out the egg whites, that would impact the texture of the cookie in a way you may not enjoy.

The general rule I use is to reduce the liquid ingredients by one-fourth the volume of liquid sweetener substituted, whether it's honey, corn syrup, maple syrup, agave, whatever. For a cookie recipe that has no liquid ingredient (like milk or cream), I would have to experiment a bit. That said, because cookies are small, the extra liquid will be released more easily than from something like a bundt cake or loaf of bread that has less surface area for the same volume; you may be able to partly make up for the extra liquid by increasing the cooking time slightly.

There are a lot of variables that go into a particular cookie recipe; you might be surprised how much the end product can change vary, using essentially the same ingredients. For an interesting read, look up some articles about Cookulus, an app that's supposed to let you adjust those variables to spit out the perfect recipe for your desired cookie (here's one for example). I heard about it on the radio a few years back but have never actually tried it out. Who knows, might help guide you in experimenting with this substitution.