It is not necessary to find an agent to sell your masterpiece in the nonfiction world. Indeed, it can be as difficult to find an agent willing to represent your work as it is to find a publisher directly. Some literary agents deal exclusively with nonfiction, but the large majority deal with both fiction and nonfiction. Remember that agents, like publishers, are looking for work from which they can make money. They charge a commission on sales when a book is published. As with publishers, literary agents deal only with certain specified genres. Make sure that any agent to whom the work is submitted works in the relevant area - otherwise you are just wasting your and their time.
In general, agents are not particularly interested in works having minority appeal. So-called "niche" subjects may include "how to" photographic books which are not likely to become best sellers. Indeed any author embarking on a project of this type would be wise to keep in check their expectations of future financial reward. In cases such as this, prospective authors are best advised to seek out and make direct contact with publishers specializing in the appropriate field of work.